| Previous | Next |
| ERROR_DDE_FAIL | ERROR_NO_MORE_USER_HANDLES |
ERROR_DLL_NOT_FOUND
A library required for launch or loading could not be located.
ERROR_DLL_NOT_FOUND has decimal value 1157 (0x485). The name shown by the application is not always the missing file: Windows may find the requested module and then fail while resolving one of its imported, delay-loaded, or plug-in dependencies.
Where the code can surface
- application startup before the program's main entry point runs
LoadLibraryorLoadLibraryExfor an optional component- shell activation of an application whose private runtime is incomplete
- delay-load resolution when a rarely used feature is opened
- a service or scheduled task with a different DLL search environment from an interactive launch
Do not diagnose by filename alone
The loader applies a defined search order and can resolve dependencies from the application directory, system locations, package context, or paths explicitly added by the process. Logging only “foo.dll missing” without the parent module and searched locations often sends an investigation toward the wrong directory.
Likely causes
- the installer omitted a redistributable or feature-specific component
- an update removed the old library before publishing the new complete set
- a 32-bit and 64-bit deployment placed dependencies in different directories
- the DLL exists, but one of its own imports is absent
- PATH or current-directory assumptions differ under a service account
- security or cleanup software quarantined a private dependency
Evidence to preserve
- top-level module requested by the caller and whether loading was implicit, explicit, or delayed
- resolved parent module path, process architecture, and package or installation version
- the first missing import identified by loader diagnostics or a file-system trace
- effective search directories and any
LoadLibraryExflags - hashes and versions of neighboring DLLs in the same component set
Recovery strategy
Repair or reinstall the product from a trusted package and keep versioned dependencies together. Copying one library from another machine can satisfy the first lookup while introducing ABI differences, missing exports, or an unsupported runtime. For optional plug-ins, disable the affected feature and keep the host process usable when the product contract permits it.
Developers should use explicit, controlled search paths, deploy transitive dependencies, and fail with the exact module chain. An updater should stage and validate an entire component set before switching the active directory so readers never observe a half-updated dependency graph.
Retry considerations
A timed retry is useful only when another deployment operation is known to be completing. Otherwise the search inputs are unchanged and repeated loads add noise. If files are delivered asynchronously, wait for an atomic “version ready” marker rather than polling the loader.
How 1157 differs from similar errors
ERROR_MOD_NOT_FOUND is another common missing-module result and may be returned by lower-level loader calls. ERROR_INVALID_DLL says a selected file exists but is not a usable DLL. ERROR_DLL_INIT_FAILED means initialization ran and failed. Error 1157 is the missing-library branch of the diagnosis.
Example
A plug-in DLL is present in the application's extension directory, but its vendor runtime was removed by a cleanup package. The host reports the plug-in name, while loader tracing identifies the absent runtime DLL imported by that plug-in. Restoring the vendor's complete redistributable fixes the dependency chain; copying only the plug-in again does not.
References
- Microsoft: System Error Codes (1000–1299)
- Microsoft: LoadLibraryExW function
- Microsoft: Dynamic-link library search order
Looking for a different code? Search another status or error code.
