How to Fix Different Error Code 126: Step by Step

5 mins read

Updated on 2025-10-27 17:45:49 to Windows Fix

This is a frustrating issue, as it prevents the software from starting most of the time. Today, the custom.dll error code 126, xgameruntime.dll error code 126, and onlinefix64.dll error code 126 will be discussed further in this article. If you wonder how to fix error code 126? Please read on.

Part 1. What is Error Code 126?

Error code 126 is typically related to missing, corrupted, or blocked DLL files that Windows needs to run certain programs. A DLL (Dynamic Link Library) is like a shared helper file that applications require to load and run. Such a missing file will cause Windows to generate error code 126.

fix different error code 126

Common Causes

  • Antivirus or Windows Defender mistakenly quarantines the DLL.
  • Corrupted DLL due to interrupted updates or malware.
  • Improper installation of the game or software.
  • Registry errors where Windows loses the reference path to the DLL.

Part 2. How to Fix "Failed to Load OnlineFix64.dll from the List Error Code 126”

“Failed to Load OnlineFix64.dll from the List Error Code 126” is linked with Xbox Gaming Services. Without it, games from the Microsoft Store or Xbox app may fail to launch. When this error appears, the DLL is usually flagged by antivirus software. Below are different methods for restoring functionality.

Fix 1: Temporarily Disable Antivirus Software

Sometimes the antivirus mistakenly blocks onlinefix64.dll. Temporarily disabling it can allow the file to load. The steps below are for the default Windows Defender antivirus. If you are using third-party antivirus software, you may disable it accordingly.

  • Open the "Start Menu" on your computer and search for "Windows Security," then click on the Windows Security app to open it.

  • Now, click on the "Virus and Threat Protection" tab from the left sidebar and click on "Manage Settings"

    click manage settings
  • Now, locate the “Real-time Protection” option and toggle the switch under it to the off state.

Fix 2: Restoring the File under Protection History

Windows Defender may keep the blocked DLL in Protection History. Restoring it can fix the error because when you remove the files from protection history, the antivirus skips checking them, and not checking means that it will not block them again, hence fixing the issue.

  • Press "Windows + I" to open Settings and go to "Privacy & Security," then select "Windows Security."

  • Open "Virus & Threat Protection" and click "Protection History" and find onlinefix64.dll.

    protection history
  • Click it to expand the options and click “Actions” then select “Allow on Device” to restore it from protection history.

Fix 3: Restore the OnlineFix64.dll file from the Quarantine Section in Antivirus Software

Sometimes, antivirus software stores blocked files in quarantine. Restoring onlinefix64.dll from here can resolve the issue.

  • Search for "Virus and Threat Protection" in the Windows search bar.

  • Click the “Protection History” option and open the “Filters” drop down to select Quarantined Items and choose "Blocked Actions", then click "Blocked Items”.

    blocked items
  • If you see the target DLL file in the folder, you can click it and then choose “Restore” to restore it from the antivirus software.

Fix 4: Reinstall the Game or Related Application

If the DLL is corrupted or deleted, reinstalling it will replace it with a fresh copy, so that trick can solve your problem.

  • Open “Control Panel” on your computer and go to “Uninstall a Program”. Here, you need to uninstall the game or application that is facing the issue by right-clicking on it and selecting "Uninstall”.

    uninstall a program
  • Now, go to your App Store or Browser and download the game/application again from a reliable source.

  • Install the game and do not skip any installation files if asked during the installation wizard setup.

Fix 5: Manually Register the DLL File

If the DLL exists but Windows cannot recognize it, re-registering it often resolves the problem. Running the regsvr32 commands makes Windows OS register the DLL file, and the issue is gone completely.

  • Press “Win + R” and type the command “regsvr32 [DLL file path]” and click “OK” to execute.

    regsvr32 command in run
  • Wait for the confirmation message that will be shown when the DLL file manual registration is complete and successful before you restart the game.

Bonus: How to Fix a Missing or Corrupted DLL File?

If you continue facing missing or corrupted DLL errors, use 4DDiG DLL Fixer. It can automatically scan, repair, and replace DLL files with safe versions. It does not require you to work with any complex commands, and the easy-to-use UI makes the whole process very simple so that any beginner can use it.

FREE DOWNLOAD

Secure Download

  • Download and install the 4DDiG DLL Fixer software. Launch it and select the "DLL Repair", and click the "Full Scan" button to begin scanning your system.

    click full scan
  • It will display a complete list of the missing and corrupted DLL files. Next, click the "Repair" button to begin the automatic repairing process with 4DDiG.

    display wrong dll files
  • Now, you just need to wait patiently. After it finishes, you will have the latest and 100% working versions of all the required DLL files on your system.

    ​complete repairing dll errors

Part 3. Solutions for "Failed to Load xgameruntime.dll from the List Error Code 126”

Are you also facing the " failed to load xgameruntime.dll from the list error code 126? This error usually happens with Microsoft Store games. Below are tested fixes.

Fix 1: Repair or Reset Gaming Services

Xbox gaming services are often responsible for handling game files. When this tool glitches, it can cause issues with games. Repairing Xbox Gaming Services can restore missing files, and if repairing does not work, you can reset it for a fresh start.

  • Open Settings with "Win + I" and go to "Apps", then "Installed Apps" and click on "Gaming Services”.

    click gaming services
  • Click the "Options/3-dots" button and click "Advanced Options". Click "Repair" and after the repair is complete, test the game. If the issue is still there, you may click "Reset"

Fix 2: Using System File Checker (SFC)

SFC scans and repairs corrupted system files, including DLLs. It is one of the most comprehensive tools available on the Windows OS. Here are the steps:

  • Open the Start menu, type "cmd," and select "Run as administrator," then run the command: "sfc /scannow.”

    sfc scan
  • Wait for the scan to complete and restart your computer once it is finished.

Fix 3: Check the Antivirus Software's Quarantine & Add xgameruntime.dll to the Antivirus Software Whitelist

Antivirus may remove xgameruntime.dll again and again. Adding it to the whitelist prevents repeated issues.

  • Open the "Windows Security" app and go to "Virus and Threat Protection," then click "Manage Settings" and go to "Exclusions."

  • Click “Add an Exclusion” and choose your folder where the problematic game/app is located, and confirm to whitelist it from Antivirus on your system.

    add an exclusion

Fix 4: Reinstall Xbox Gaming Services or Microsoft Store

Repairing or resetting Xbox gaming services may not always work, so reinstalling them is another option.

  • Press "Windows + X" and select "Windows PowerShell (Admin)." Once it opens, run the following commands one by one:

    “get-appxpackage Microsoft.GamingServices”

    “get-appxpackage Microsoft.GamingServices | remove-AppxPackage –allusers"

    “start ms-windows-store://pdp/?productid=9MWPM2CQNLHN”

    install gaming services command
  • Once the process is complete, you will get a Gaming Services pop-up on the Microsoft Store download page. Click "Get" on it and let the Gaming Services install completely to fix the issue.

Fix 5: Manually Register the DLL File

If all else fails, then you need to register the DLL file on your OS manually. Registering helps Windows locate the xgameruntime.dll file, and here is how you can easily do it using Command Prompt.

  • Open "Windows Search" and search for "Command Prompt," then right-click to choose "Run as Admin"

  • Execute the command “regsvr32 [DLL file name]” and wait for the success confirmation message on your screen.

    regsvr32 cammand

Part 4. How to Fix “Failed to Load Custom.dll from the List Error Code 126”

The custom.dll error code 126 usually appears in games with mods. Antivirus interference is the most common cause, and here is how you can fix this error code.

Fix 1: Enter Protection History and Restore Lost File

If Windows Defender blocks the file, restore it directly. This way, the game will not detect this DLL file as missing.

  • Press "Win + I" to open settings and go to the "Update and Security" option. Choose “Windows Security” and go to “Virus and Threat Protection”.

  • Click “Manage Settings” and toggle off the “Real-time Protection” option.

    toggle off the real time protection
  • Click "Back Arrow" from the top left and go to "Protection History"

  • Open the "Filtered by" dropdown menu and click "Quarantined Items," then click "Blocked Actions" and select "Blocked Items."

    click blocked items
  • If you see the "custom.dll" file, click it to open "Actions" and then click "Restore" to remove it from the blocked list.

Fix 2: Turn off Antivirus and Move the custom.dll Back to the Game Folder

  • Search for the "Windows Security" app and open it, then go to "Virus and Threat Protection”.

  • Click “Manage Settings” and toggle off the “Real-time Protection” button to turn off antivirus.

  • Now, copy the “custom.dll” file from the original game zip folder. Otherwise, you need to look for some reliable custom.dll download sources and get the file from there. Paste it in the game installation folder to fix the issue.

Fix 3: Excluded the Games Folder from the Antivirus and Unzipped It with the Antivirus off

Excluding the folder ensures the antivirus does not block the file again, and you can enjoy seamless gaming with this method.

  • Open the "Windows Security" app and go to "Virus and Threat Protection," then click "Manage Settings”.

  • Go to "Exclusions" and click "Add an Exclusion," then select "Folder" and select your "Games" folder. It is better to keep all games in 1 folder and exclude it to resolve errors like "failed to load custom.dll from the list error code 126". Afterwards, you can unzip the game folder, and the DLL files will stay this time.

    select folder under exclusions

More FAQs about Error Code 126

Q1: What Should I Do If Error Code 126 Appears on Steam or in Games like Among Us?

Reinstall the game and make sure that the DLL files are restored with the game.

Q2: What Is Error Code 126 in Minecraft?

It means that Minecraft is unable to find or load a necessary DLL file, which is often because of antivirus blocking or missing libraries.

Conclusion

The error code 126 is known to interfere with gaming and applications, and most of the problems are associated with missing or blocked DLL files.

To fix the persistent cases or to fix several DLL errors, 4DDiG DLL Fixer can automatically restore safe DLL files and simplify the process. Using this guide, you will be able to solve error code 126 and get back to gaming without any problems.

FREE DOWNLOAD

Secure Download

William Bollson (senior editor)

William Bollson, the editor-in-chief of 4DDiG, devotes to providing the best solutions for Windows and Mac related issues, including data recovery, repair, error fixes.

(Click to rate this post)

You rated 4.5 ( participated)