LoadLibrary error: exception of first chance 0xC0000139 (DLL not found) - How to debug?

I have a dll "mytest.dll", which when loaded through LoadLibrary()returns NULL (and 127 as GetLastError()). If I use DependencyWalker on "mytest.dll", it says that it should load correctly and that all DLLs are found correctly. Running the DependencyWalker profiling option on the exe host gives me this section in the log:

00: 00: 55.099: Loaded "mytest.DLL" at address 0x07860000 by thread 0xBBC. Successfully hooked module.
00: 00: 55.115: First chance exception 0xC0000139 (DLL Not Found) occurred in "NTDLL.DLL" at address 0x76E24285 by thread 0xBBC.
00: 00: 55.115: Unloaded "mytest.DLL" at address 0x07860000 by thread 0xBBC.
00: 00: 55.115: LoadLibraryW ("mytest.dll") returned NULL by thread 0xBBC. Error: The specified procedure could not be found (127).

Is there a way to debug this to find out what the Not Found DLL message that is looking for NTDLL.DLL reports is looking for? Or should I look elsewhere for the source of the problem?

Please note that loading the same "mytest.DLL" from another application is working correctly.

+3
source share
3 answers

Can your application try to call a specific DLL function via GetProcAddress after an initial load (possibly) that is not found? Is this a 32 or 64 bit application?

If it loads correctly in another application, as you assume, it probably has the correct entry point.

google search , , , , - ( ) DLL. DLL Exescope .

, DLL (, DLL)?

+2

Process Monitor FileMon SysInternals , myTest.dll , .

+3

DependencyWalker (, Windows). DLL, LoadLibrary, , DependencyWalker (, ini , , DependencyWalker ).

DLL , . DLL-, - . DLL , dll , .

, FileMon. , - SysInternals , FileMon , , ProcMon.

+2
source

Source: https://habr.com/ru/post/1707212/


All Articles