views:

22

answers:

1

I am working on Windows Mobile application.

Whenever I download some sample which is using wrapper around native code (using DllImport), it always gives "Can't find PInvoke DLL" error.

I am using VS 2005 with C# on 64-bit Windows 7 OS.

I have checked many of solution on stackoverflow as well as othersites, but with no solution to my problem.

If its 64-bit OS problem, what are the steps to get that dll compiled for 64-bit? I tried to change platform to x64 through Configuration Manager, but not working.

A: 

What are you talking about with 64-bit? All WinMo and WinCE devices are 32-bit. Did you build MAPILib.dll? Is it on the device in a folder where the loader can find it (like \Windows)? Did you build MAPILib for the correct processor/OS (i.e. you didn't build it for the desktop)?

ctacke
The problem is resolved. The download does not contain MAPILib.ddl file. It was generated when I ran it for the first time and gave error (I don't know why). And from second time it was running successfully without error.
Sunil Sharma