How to call a function in a dll on a CE device

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All,
I have a dll built under PB. I want to call a function in the dll from C#
so...

[DllImport("EventMgr.dll")]
public static extern bool EventApiInit();
....
bool ret = EventApiInit();
(all within the same class def.)

However when the call runs I always get:

MissingMethodException was unhandled
Can't find an Entry Point 'EventApiInit' in a PInvoke 'EventMgr.dll'.

I've copied my dll to Windows and my app's folder on the CE device with the
same end result. Any assistance as to how to make this work would be greatly
appreciated.

Thanks in advance,
Richard
 
The answer is in a post in this group (Subject: Re: Making C++ DLL to use in
C#)from irnbru irnbru
(Sorry, don't know how to ref posts)
 
Hi,

Under what format ( native, COM ) is the dll compiled ?
What OS it does support ( XP, PPC ) ?
what kind of device you are using ( PPC, CE ) ?
What processor are you using? ( ARM, x86 )?

only if you know the answer to these questions we can help you. basically
the p/invoke you are using is correct

the error though seems to point that it's not a native dll for that
platform !
 
Back
Top