Unable to load (unmanaged) DLL: not found
-
I am getting an error loading a function from an unmanaged DLL, but I'm getting this error:
System.DllNotFoundException: Unable to load DLL 'MyLibrary.dll': The specified module could not be found.
(Exception from HRESULT: 0x8007007E)I have the DLL file in the project next to the source code files, and its properties are set to "copy if newer". Even "copy always" did not work. The file is there, but the application can't find it (at least in VS Debugger)! :wtf: I tried checking
File.Exists("MyLibrary.dll")
, and it returns true! Any idea what's happening? :confused: -
I am getting an error loading a function from an unmanaged DLL, but I'm getting this error:
System.DllNotFoundException: Unable to load DLL 'MyLibrary.dll': The specified module could not be found.
(Exception from HRESULT: 0x8007007E)I have the DLL file in the project next to the source code files, and its properties are set to "copy if newer". Even "copy always" did not work. The file is there, but the application can't find it (at least in VS Debugger)! :wtf: I tried checking
File.Exists("MyLibrary.dll")
, and it returns true! Any idea what's happening? :confused:Post the code you are using to load the dll.
Simon
-
Post the code you are using to load the dll.
Simon
[DllImport("MyLibrary.dll")]void myFunction();
I think I found the error: MyLibrary.dll depends on another DLL, and that other was not found. The error message is misleading. Thanks.
-
[DllImport("MyLibrary.dll")]void myFunction();
I think I found the error: MyLibrary.dll depends on another DLL, and that other was not found. The error message is misleading. Thanks.
Cool. At least you figured it out.
Simon