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

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?
 
B

Ben Voigt

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top