DllNotFoundException
-
I am porting a C# app from .Net 1.1 to 2.0. The app uses a native DLL. In 1.1, I used the following code successfully:
[DllImport(@"cbWaypoint.dll", EntryPoint="NEWJOB")] public static extern void NEWJOB();
The DLL was located in the same folder as the assembly (bin/Debug). However, when I try to do the same thing using 2.0, I get a DllNotFoundException:Unable to load DLL 'cbWaypoint.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Is anyone aware of changes to PInvoke in 2.0 that would cause this problem? -
I am porting a C# app from .Net 1.1 to 2.0. The app uses a native DLL. In 1.1, I used the following code successfully:
[DllImport(@"cbWaypoint.dll", EntryPoint="NEWJOB")] public static extern void NEWJOB();
The DLL was located in the same folder as the assembly (bin/Debug). However, when I try to do the same thing using 2.0, I get a DllNotFoundException:Unable to load DLL 'cbWaypoint.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Is anyone aware of changes to PInvoke in 2.0 that would cause this problem?Does your native DLL have any dependencies that may be missing (i.e. must also be in the same folder or registered elsewhere on the machine)? -Phil