Help with P/Invoke

  • Thread starter Thread starter Safiiru no Baka
  • Start date Start date
S

Safiiru no Baka

I'm in real need of help with P/Invoking a native DLL written and
compiled with eVC. I'm getting the MissingMethodException when trying
to use it with C# in VS2003 WCE Emulator.

Anyone please help me figure out what is wrong? I can load default
DLLs easily like coredll.dll works fine.
 
Well just as an update... I did a DLL view of the exposed methods and
indeed my method names show up as expected. So it seems the DLL is
compiled correctly...
 
You wrote "I'm getting the MissingMethodException when trying
to use it with C# in VS2003 WCE Emulator". Does it mean that you don't
get that exception when using DLL on a real device?
That is maybe your dll is compiled not for x86 platform?
 
Well I didnt try it on other platforms. It is compiled for "Win 32
(WCE emulator)" device under eVC.

I actually tried to use that same DLL, compiled for the emulator on the
desktop framework and I get a

"This application has failed to start because COREDLL.dll was not
found. Re-installing the application may fix this problem."

It seems that its trying to load some Compact Framework driver
(coredll.dll is CF only correct?).
 
Incorrect. CoreDLL.dll is a CE (not CF) equivalent of Kernel32 + User32 +
GDI32 plus a lot of other libraries (tapi32.dll, ws32.dll etc)
Bottom line - you cannot use a dll compiled for Windows CE on the desktop
 
Back
Top