How can one use or extend a C++ class in a pocket pc project?

G

Guest

How can one use or extend a C++ class in a pocket pc project which uses C#.
Suppose I have written a C++ class,in a Visual C++ project,which gives output
as .DLL. Now my first query is How can i add this DLL to my C# project(can i
add it in references)?Secondly how can i access this class in C# pocket pc
project? Now if i am able to access the class,can i implement its virtual
functions if there are any in the class?
 
P

Peter Foot [MVP]

You cannot call C++ classes from .NETCF code. If you export the
functionality as static C methods you can call them through P/Invoke,
alternatively implement COM classes and use COM interop in .NETCF v2.0.

Peter
 
G

Guest

In addition to Peter's comments, the DLL must also be compiled for the CE OS
and the correct processor, so even writing a shim wrapper would require that
the target DLL containing the class be compiled specifically for your target
environment.


--
Chris Tacke - Embedded MVP
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
 

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