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

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
 
G

Guest

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)
 
I

Ignacio Machin \( .NET/ C# MVP \)

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 !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top