Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting error 8007007E 1

Status
Not open for further replies.

xwb

Programmer
Jul 11, 2002
6,828
GB
I'm working on a C# program which uses an unmanaged DLL through interop services. This is running on Vista.

It works on most development systems but on some of them I get error 8007007E, DLL not found. The DLL is in the same directory as the executable and on the path so I really don't know where it is looking for it.

It is not a COM DLL so I can't regsvr32 it. Running depends on a C# executable doesn't tell me anything. Looks like everything is dynamically loaded in C#.

1) Is there a way to tell the executable that the DLL is in the same directory and that is where it should be looking

2) Is there a way of telling where the executable is looking for the DLL at runtime - something like strace on Linux.

 
It could be a runtime error in the DLL itself. I assume you're using the DllImport attribute. Given the filename, .NET will search on the ffg: system folder, application folder, and paths defined on the system environment.

For debugging, try using the filemon.exe from sysinternals to verify if the dll is indeed found by your app.

Also, check for other dependencies of the dll you're importing.


just some thoughts [wink]
 
It was one of those silly ones - the DLL I was importing was in turn dynamically loading other DLLs. The system basically reported that the first DLL wouldn't load but it was actually the one it was trying to load.

filemon with process monitor did the trick. Wish these tools came as standard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top