I am trying to debug a C++ code from C# Device Appliation. When i reached calling the C++ function from C# it gives "Can't find PInvoke DLL '110506Demoptt.dll'.".
The following is the code sipnet.
public static CallBackDelegate myDelegate;[
DllImport("110506Demoptt.dll")] private static extern void SetCallBackPointer(CallBackDelegate myDelegate); static void Main(){
myDelegate =
new CallBackDelegate(CallbackFunction);SetCallBackPointer(myDelegate); \\ When i reached this place i am getting the error "Can't find
\\ PInvoke DLL '110506Demoptt.dll'."
}
What could be the possible solution for this.
Thanks in advance.

Can't find PInvoke DLL '110506Demoptt.dll'.
Mark Shoesmith
I have the same problem. I tried putting the DLL in the Windows and in the Application folder -- still doesn't work.
The dumpbin produces:
1C2 machine (Thumb)
32 bit word machine
I am trying to install this on Treo 750, WM5 and do a DLLImport from .NET framework.
Thank you for your help!
Evgueni
NoGoodNameExists
Regards,
xnpa555
The exception says what it says - it can' find the dll. Make sure it exists either in the application directory or /Windows
Faizel
MikeSmo
hi
I have the same problem. The dll is in the same directory as the running program, but it doesn't accept my dll.
I ran the dumpbin-stuff you suggested and it responded like this
1C0 machine (ARM)
32 bit word machine
I'm trying to run the program on an Pocket PC 2003 device. The device and the emulator gives the same error.
cgoodyear
You can either include the dll in your project and in the properties mark it as Content and Copy Always, or just copy it manually using Explorer and ActiveSync. This will not help you with making sure your DLL is built for the correct platform. To check the platform from the Visual Studio program group in the start menu launch Visual Studio Command Prompt (under Visual Studio tools), then change directory to where your DLL is located and run:
dumpbin /headers 110506Demoptt.dll |find "machine"
It will print something like:
14C machine (x86)
or
1C2 machine (Thumb)
Let me know which on it is and on what platform are you trying to use it
mikeonbike