managed code execution from unmanaged code; AppDomain

  • Thread starter Thread starter dotnetchic
  • Start date Start date
D

dotnetchic

I've been enlisted to update some legacy code (VC++ 6.0/MFC) and prefer
to do in C#. Has anyone had some experience with this? advice?
 
There are a couple of approaches, you can try IJW (It Just Works) with the
/CLR swich in VC++ .NET, or you can write a managed C# Wrapper over the
native C++.
A good place to start is "Essential Guide to Managed Extensions" (aPress) by
Challa and Laksberg.
There are some online tutorial articles as well, both from MSDN and 3rd
parties, that should be helpful.
Peter
 
It depends on the kind of legacy code. If you're doing complete port then
you will use Winforms to replace
MFC and reimplement non-GUI modules.

Another way is to use P/Invoke for non-GUI parts of the application, this
will save time if these components are complex and hard to reimplement in
managed way.

If your legacy app is using 3-rd party modules dlls, then you'll almost for
sure use p/invoke.
 
Back
Top