running Unmanaged code

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.
 
P

Paul G. Tobey [eMVP]

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.
 
G

Guest

Thanks for your reply paul . But is there any way by which .Net CF can be
extended as to run MFC DLL.
 
P

Paul G. Tobey [eMVP]

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.
 

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