Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
Error 126 means Windows could not load a requested DLL. The DLL named in the message may be present; a dependent DLL, Microsoft Visual C++ runtime, graphics component, incompatible binary, permission, or DLL search-path problem may be the real cause.
Start by recording the complete error and the application that displays it. Then repair the affected application, install the correct official Visual C++ runtime, and reinstall the relevant GPU driver if the message names AMD, NVIDIA, or Intel. If that does not work, inspect the DLL’s dependency chain instead of downloading a replacement DLL.
What Error 126 means
Windows applications load dynamic-link libraries, or DLLs, when they need additional code. The Windows LoadLibrary function fails when the requested module cannot be loaded, and the application can obtain more detail through GetLastError.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →In practical terms, Error 126 can indicate that:
- The requested DLL is genuinely missing.
- A DLL required by that DLL is missing.
- The application cannot find the DLL through its search path.
- The executable and DLL have different architectures, such as 32-bit versus 64-bit.
- A Visual C++ runtime or graphics runtime is missing or damaged.
- A stale or incompatible DLL is being found first.
- The process lacks permission to access the file or its directory.
- An antivirus product quarantined or blocked a component.
- The installation was damaged during an update, uninstall, or driver change.
For example:
app.exe
└── plugin.dll
└── runtime.dll ← missing
The error may mention plugin.dll even though runtime.dll is the missing file. Windows resolves dependencies according to defined loader rules; dependent DLLs can be searched separately from the directory containing the top-level DLL. See Microsoft’s DLL search-order documentation.
#1 Best Overall
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Quick fixes to try first
- Restart Windows. This clears a locked or partially updated process, although it will not repair a missing dependency.
- Identify the failing application and exact DLL filename. Record the full popup, application version, Windows version, and whether the problem began after an update or reinstall.
- Repair or reinstall the affected application. Use its built-in Repair option, launcher file verification, or the official vendor installer.
- Install the official Visual C++ Redistributable. Match its architecture to the application. If you use both 32-bit and 64-bit programs, installing both x86 and x64 packages is reasonable.
- Reinstall the official graphics driver if the error names an AMD, NVIDIA, or Intel DLL or occurs when launching a 3D application.
- Restart and test again. If the failure remains, identify the dependency rather than copying random DLL files.
Do not download a standalone DLL from a search result or DLL archive site, and do not copy it into C:WindowsSystem32. Such files may be tampered with, the wrong version, or the wrong architecture. They can also create conflicts with Windows servicing and other applications.
Find the real missing DLL
Capture the context
The same error has different likely causes depending on where it appears:
| Where it appears | Likely cause | Best first action |
|---|---|---|
| One desktop application | Application files, runtime, or private dependency | Repair the application and install the matching VC++ runtime |
| Python, an IDE, or a notebook | Virtual environment, wheel, architecture, or DLL-directory issue | Check the interpreter and package installation |
| Game startup | Game files, graphics driver, runtime, anti-cheat, or overlay | Verify game files and reinstall the official GPU driver |
| AMD, NVIDIA, or Intel software | Driver component or Windows Update replacement | Reinstall the matching vendor driver |
| Windows login | Orphaned startup entry or driver component | Identify the startup item before removing it |
| Windows service or scheduled task | Service account, permissions, environment, or network path | Test under the same account and inspect access |
Check whether the named file exists
If the message provides a full path, test it in PowerShell:
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Test-Path "C:fullpathtoproblem.dll"
If it gives only a filename:
where.exe problem.dll
Also inspect the application’s installation folder and its bin, lib, or runtime directories. A successful Test-Path does not prove that the DLL can load. Its own dependencies may still be absent or incompatible.
Inspect dependencies
Developers with Visual Studio or Build Tools can use dumpbin from a Developer Command Prompt:
dumpbin /DEPENDENTS "C:pathtoproblem.dll"
Check each listed dependency:
where.exe dependency.dll
Test-Path "C:pathtodependency.dll"
dumpbin lists statically linked dependencies, but it cannot reveal every DLL loaded dynamically at runtime. The output is evidence, not a complete diagnosis. Microsoft explains these limitations in its guidance on determining which DLLs to redistribute.
The old Dependency Walker utility is not a reliable final authority on modern Windows. It can report false missing dependencies because of API sets, delay-loaded modules, and newer loader behavior. For advanced investigation, Microsoft’s Process Explorer can show loaded modules and help expose version conflicts. Runtime tracing may be necessary when a library is loaded only after a button click or specific operation.
Install or repair Visual C++ Redistributables
Many Windows applications require Microsoft’s C++ runtime libraries. Download them only from Microsoft’s current Visual C++ Redistributable page.
Rank #2
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Use:
- x86 for a 32-bit application.
- x64 for a 64-bit application.
- ARM64 for compatible ARM64 software.
Microsoft’s direct links are:
https://aka.ms/vc14/vc_redist.x64.exe
https://aka.ms/vc14/vc_redist.x86.exe
https://aka.ms/vc14/vc_redist.arm64.exe
A 64-bit Windows installation can run 32-bit applications, but those applications still need the x86 runtime. Installing x64 alone does not satisfy every program. If the computer runs a mixture of applications, install both x86 and x64, then restart.
The latest v14 package covers applications built with several newer Visual Studio toolsets, but it does not replace every legacy runtime. Software built with Visual C++ 2013, 2010, or earlier may require its older redistributable installed side by side. Do not replace an old runtime by deleting files from Windows folders. If the redistributable installer fails, use Microsoft’s VC++ installation troubleshooting guidance.
Check 32-bit and 64-bit compatibility
A 32-bit process cannot load a 64-bit in-process DLL, and a 64-bit process cannot normally use a 32-bit DLL as its dependency. Matching filenames are not enough: the binary architecture and expected ABI must also match.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsCheck Windows architecture:
Get-CimInstance Win32_OperatingSystem |
Select-Object Caption, OSArchitecture
For Python, check the interpreter actually being used:
python -c "import sys, platform, struct; print(sys.executable); print(sys.version); print(platform.architecture()); print(struct.calcsize('P') * 8)"
A Python package installed for one interpreter, virtual environment, or architecture may not work in another. Do not copy package DLLs between environments.
Repair graphics-driver and hardware-acceleration failures
If the filename contains an AMD, NVIDIA, or Intel component, the graphics stack is a stronger suspect than the generic Windows DLL system. This is especially true when the error appears while launching a game, video editor, CAD application, browser acceleration, or machine-learning framework.
- Identify the GPU vendor and the exact DLL named in the message.
- Download the driver from the vendor’s official support page: AMD Drivers and Support, NVIDIA Driver Downloads, or Intel Driver & Support Assistant.
- Choose the package for the GPU and Windows edition.
- Use the installer’s clean-install option when offered and appropriate.
- Restart and test the original application.
A clean driver installation can reset profiles and remove optional vendor components. Do not begin by running an unspecified “driver cleaner”; use a deliberate, documented procedure only when ordinary vendor reinstallation does not resolve a clearly damaged driver installation.
Recommended Free Tools
Python, PyTorch, TensorFlow, OpenCV, and similar errors
Python failures often occur because the package, interpreter, runtime, or GPU libraries belong to different environments. First verify the active interpreter and package manager:
Rank #3
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
python -c "import sys, platform; print(sys.executable); print(sys.version); print(platform.architecture())"
python -m pip --version
python -m pip list
Use python -m pip rather than bare pip so the package is installed into the interpreter being tested. Test the import directly:
python -c "import package_name; print(package_name.__file__)"
For a PyTorch-style failure:
python -c "import torch; print(torch.__version__)"
If the package was recently upgraded, reinstall it inside the active environment using the framework’s official instructions. Check its supported Python versions, operating-system requirements, GPU support, and CUDA or other runtime combinations. There is no universal CUDA installation command that fixes every package.
Python 3.8 and later can use explicit DLL-directory handling. If a vendor package requires a private binary directory, a process-local test may look like this:
import os
os.add_dll_directory(r"C:pathtovendorbin")
See Python’s os.add_dll_directory documentation. An IDE, notebook, embedded interpreter, and terminal can have different working directories and environments, so changing the system PATH may not affect the process you are testing.
Diagnose PATH and DLL search-order problems
Display the current process’s PATH:
$env:Path -split ';'
For a temporary diagnostic test, prepend the application’s own binary directory in the same PowerShell window:
$env:Path = "C:Program FilesVendorAppbin;$env:Path"
Launch the application from that window. If it works, the issue may be an environment or search-path difference. Undo the test by closing the PowerShell window; do not immediately make the change system-wide.
Permanent PATH edits can make one program load another program’s incompatible DLL, break unrelated software, and increase DLL preloading risk. Microsoft recommends controlled loading approaches such as fully qualified paths and appropriate loader APIs; see its guidance on loading libraries safely.
Free tools Windows power users keep installed
One-click scans. No signup required.
A program launched by a shortcut, service, scheduled task, IDE, or elevated process may see a different PATH, current directory, user profile, or network mapping. Fix the application’s launch configuration or private dependency directory rather than adding every vendor folder to the global PATH.
Rank #4
- 5 in 1 Connectivity: The USB C Multiport Adapter is equipped with a 4K HDMI port, a 100W USB C PD port, a 5 Gbps USB A data port, and two 480 Mbps USB A ports
Startup popups, services, permissions, and scheduled tasks
Windows startup
If the popup appears immediately after login, it may be an orphaned startup entry left behind after uninstalling software.
- Open Task Manager.
- Select Startup apps.
- Identify the entry by name and location.
- Check Task Scheduler for a matching task.
- Disable or remove only the entry you have positively identified.
Do not delete arbitrary registry values merely because they reference a DLL.
Services and impersonated accounts
If the program works interactively but fails as a service or scheduled task, check the account running it, its NTFS permissions, working directory, environment, and access to network shares. A mapped drive available to your user may not exist for a service account.
Microsoft documents a specific LoadLibrary failure involving impersonated threads and DLL access rights. This is an advanced case; consult the Microsoft troubleshooting article rather than changing permissions broadly.
Security software
If the DLL disappeared after an application update, inspect the antivirus or endpoint-security quarantine history. Restore only a file verified by the software vendor. Do not permanently disable protection. If a temporary exclusion is unavoidable for a controlled test, remove it immediately afterward.
When SFC and DISM help
Windows system-file repair is appropriate when several unrelated applications fail or there is evidence of Windows component corruption. It is not a universal fix for an application-private missing DLL.
From an elevated Command Prompt, run:
DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow
Restart Windows and retest. These commands may repair Windows components, but they will not install a vendor’s private runtime, repair a broken Python wheel, or supply a missing GPU package.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Use the error context to choose the next step
- One application fails after installation: repair or reinstall that application, then check its runtime.
- Several unrelated applications fail: investigate a recent Windows, driver, PATH, security-software, or runtime change.
- The DLL exists beside the executable: inspect its dependencies and architecture.
- It works from a terminal but not a shortcut: compare PATH, working directory, and launcher settings.
- It works only as administrator: investigate permissions or security software; do not make administrator mode permanent.
- It fails only in Python: verify the interpreter, virtual environment, package architecture, and framework compatibility.
- It fails only as a service: inspect the service account, process-specific environment, share access, and impersonation behavior.
Do not confuse Error 126 with nearby errors
Windows loader errors are not interchangeable:
- 126: the requested module could not be found or loaded.
- 127: the required procedure or entry point could not be found.
- 193: not a valid Win32 application; often an architecture or file-format problem.
- 1114: the DLL initialization routine failed.
- 14001: a side-by-side configuration problem.
Check Microsoft’s System Error Codes when the application reports a different number. The remedy for Error 127, for example, may be an incompatible version or missing entry point rather than a missing file.
Best Value
- Portable and powerful USB-C HUB: BENFEI USB Type-C HUB, with super-soft and knot-free silicone woven design cable, meets most mobile office needs. Compact, lightweight, stylish, and powerful portable USB C Hub equipped with 1 x HDMI port, 1 x 100W charging, and 3 x USB ports. 18-month warranty, 24-hour response, to ensure you feel at ease when using our product.
- Design centered on comfort and reliability: Thanks to BENFEI's end-to-end in-house cable production capability, in-house PCBA and assembly capability, using the industry's most advanced silicone woven design and process, 20cm cable in length, no knots, super-soft, the HUB is easy to use in all scenarios: laptop, tablet, stand etc. Super-soft, 25000+ life cycles, to meet your daily carrying and office needs.
- 100W Charging: Support up to 90W USB C pass-through charging via Type-C port to keep your laptop powered. 10W is reserved for other interface operations. No data and video function on the Type-C port.
- 4K HDMI Display: The HDMI port supports media display at resolutions up to 4K 30Hz, keeping every incredible moment detailed and ultra vivid. Please note that the C port of the Host device needs to support video output.
- Transfer Files in Seconds: Transfer files and from your laptop at speeds up to 10 Gbps with USB A 3.2 port. Extra 2 USB A 2.0 ports are perfectly for your keyboards and mouse.
When to contact the software vendor
Stop replacing files when the dependency chain remains unresolved after an official application, runtime, or driver repair. Give the vendor:
- The complete error text and exact DLL filename or path.
- Application name and version.
- Windows edition and build.
- CPU, GPU, and process architecture.
- Whether the issue occurs for another Windows account.
- Dependency output from
dumpbinor another trusted diagnostic. - Relevant Application event-log entries.
- Recent Windows, application, Python-package, or driver changes.
- Whether the failure occurs from a shortcut, terminal, IDE, service, or scheduled task.
A useful best-effort event-log check is:
Get-WinEvent -LogName Application -MaxEvents 50 |
Where-Object {
$_.Message -match 'LoadLibrary|error 126|module could not be found|DLL'
} |
Select-Object TimeCreated, ProviderName, Id, LevelDisplayName, Message
Not every application records useful loader details, so an empty result does not rule out a dependency problem.
Frequently asked questions
Why does Windows say the DLL is missing when it is present?
The named DLL may depend on another DLL that is missing, inaccessible, incompatible, or outside the relevant search path. Inspect the dependency chain instead of assuming the named file is the problem.
Should I download the missing DLL?
No. Use the application vendor, Microsoft, or the relevant GPU manufacturer. Random DLL sites can provide malicious, altered, or incompatible files.
Do I need both x86 and x64 Visual C++?
Install the package matching the application. On a 64-bit PC running both 32-bit and 64-bit software, installing both official packages can cover both architectures, but it will not fix an unrelated vendor dependency.
Can editing PATH fix Error 126?
Sometimes a temporary process-local PATH change can confirm a search-path problem. A permanent global edit is risky because it can cause DLL version conflicts and affect unrelated applications.
Why does Error 126 happen only in Python?
The IDE or virtual environment may use a different interpreter, package architecture, PATH, or DLL-directory configuration. Check sys.executable, use python -m pip, and follow the package’s official compatibility instructions.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallWhy does it appear at startup?
An orphaned startup item, scheduled task, or driver component may be launching after its parent application was removed or damaged. Identify the entry in Task Manager or Task Scheduler before deleting anything.
Is Error 126 the same as Error 127?
No. Error 126 concerns loading a requested module; Error 127 means a required procedure or entry point was not found. They often require different fixes.
Will reinstalling Windows fix it?
Usually not as a first step. Reinstalling Windows may help genuine system corruption, but it will not automatically restore the correct application, Python, GPU, or legacy runtime dependency. Diagnose and repair the affected software first.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

