title: LoadLibrary fails: First chance exception 0xC0000139 (DLL Not Found) - How to debug?
body: <p>I have a dll "mytest.dll" that when loaded via <code>LoadLibrary()</code>, returns NULL (and 127 as the <code>GetLastError()</code>).  If I use DependencyWalker on "mytest.dll", it reports that it should load correctly and that all DLLs are found correctly.  Running the profiler option of DependencyWalker on the host exe gives me this relevant section in the log:</p>
  
  <pre>
  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).
  </pre>
  
  <p>Is there a way to debug this to find out what the DLL Not Found message that NTDLL.DLL reports is trying to look for?  Or should I be looking elsewhere for the source of the problem?</p>
  
  <p>Note that loading this same "mytest.DLL" from another application seems to work correctly.</p>