running Unmanaged code

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

Guest

How can i run unmanaged code(VC++ and MFC) under .net compact framework 1.0
or 2.0 in Windows CE 5.0.
 
What do you mean by "run it under .NET CF"? You can P/Invoke to unmanaged
DLLs in either .NET CF 1.0 or 2.0, but probably not MFC DLLs, since they
rely on being run inside a MFC application environment. If you have
unmanaged COM objects, you're on the edge of unusability in 1.0, but better
off in 2.0. Note, also, that there's no .NET CF 2.0 available for 5.0, at
this point.

Paul T.
 
Thanks for your reply paul . But is there any way by which .Net CF can be
extended as to run MFC DLL.
 
And MFC DLLs are making assumptions about there being a main window of a
certain class, certain values stored in extra bytes for each window, etc.
You can't do those things in .NET CF right now (and I doubt that there would
be enough interest in them for MS to change that -- I certainly hope that
they don't waste time on it). MFC is a bad choice for general-purpose DLLs.
You can port your DLLs over to straight C++ with no MFC, maybe, or write an
application in MFC to use the DLL and create some type of interprocess
communication for your managed code to communicate with that program.

Paul T.
 
Back
Top