title: How to get the missing DLL name after when GetLastError() returns ERROR_MOD_NOT_FOUND
body: <p>My application loads a DLL using <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms684175%28v=vs.85%29.aspx" rel="nofollow"><code>LoadLibrary()</code></a> suppressing the standard critical-error-handler message box. When <code>LoadLibrary()</code> fails and <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms679360%28v=vs.85%29.aspx" rel="nofollow"><code>GetLastError()</code></a> returns <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms681382%28v=vs.85%29.aspx" rel="nofollow">ERROR_MOD_NOT_FOUND</a> (0x7E) I'd like to retrieve the missing DLL name. This error code is set not only when the requested DLL is missing, <strong>but also when any DLL it depends on is missing</strong>.</p>
  
  <p>It's worth noting that the standard message box (which is suppressed) displays the correct missing DLL name, and the question is how can I get it within the code.</p>
  
  <p>Thanks</p>