Article ID: 324468 - View products that this article applies to.
This article was previously published under Q324468
The LoadLibrary or the LoadLibraryEx function may fail with error 126 (ERROR_MOD_NOT_FOUND) if a directory name in the path contains a period.
This error occurs under the following circumstances:
To work around this problem, specify a fully qualified file name that includes the file name extension when you call LoadLibrary or LoadLibraryEx. For example:
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
According to the Microsoft Platform Software Development Kit (SDK) documentation for LoadLibrary and LoadLibraryEx, if you do not include the file name extension with the file name, the system tries to load a file with no extension. If such a file does not exist, the .dll extension is appended to the file name, and the system tries to load the file again. The error that is listed in the "Symptoms" section occurs only if the directory in the path that is passed to LoadLibrary or LoadLibraryEx contains a period (.) and if no extension is appended to the .dll file name.
Article ID: 324468 - Last Review: November 21, 2006 - Revision: 4.2