FileNotFound exception doesn't show missing file name for unmanaged imports

  • Thread starter Thread starter n.estner
  • Start date Start date
N

n.estner

If I include an unmanaged DLL into a mixed mode C++/CLR assembly using
it's import library (NOT using P/Invoke) and the DLL can't be found at
runtime, the CLI throws an exception (FileNotFound), but the exception
doesn't carry the missing module's name. Neither does fuslogvw. Is
there a way to find out what DLL can't be found in such situations?
 
If I include an unmanaged DLL into a mixed mode C++/CLR assembly using
it's import library (NOT using P/Invoke) and the DLL can't be found at
runtime, the CLI throws an exception (FileNotFound), but the exception
doesn't carry the missing module's name. Neither does fuslogvw. Is
there a way to find out what DLL can't be found in such situations?

The Win32 LoadLibrary call is failing, and Windows doesn't report which DLL
was missing... the Dependency Walker tool (www.dependencywalker.com) is good
for checking statically and dynamically loaded DLLs for missing
dependencies.
 
Back
Top