"Can't find an Entry Point" using PInvoke

T

Tim Johnson

I've finally gotten my legacy C++/MFC dll working again under WM5 and VS2005
after numerous problems, and my legacy C++ test app works too. The dll has
both an exported class with methods and an exported set of "flat" API
functions. I can call both from my C++ app.

I also have an existing C# app, which uses P/Invoke to call into the dll.
I've recompiled this under VS2005 too with no reported problems. But when I
run it under WM5 I now get "Can't find an Entry Point 'myMethod' in a
PInvoke DLL 'myclass.dll'". Under Windows Mobile and VS2003 this all works
fine. Note this isn't a "MissingMethod" exception.

Any thoughts on what causes my exported functions (verified by dumpbin
/Exports) to be callable from C++ but not C#/PInvoke?
 
G

Guest

Aarrgh! That was it - I must have accidentally grabbed an old version of my
..h file during the conversion process, and it only had __declspec(dllexport),
not prefixed with "extern C". Thanks for a fresh pair of eyes.

Tim

Chris Tacke said:
Dumpbin shows the function and it's undecorated?

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate
 

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