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

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
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
 
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
 
Back
Top