managed code execution from unmanaged code; AppDomain

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dotnetchic@gmail.com

    #1

    managed code execution from unmanaged code; AppDomain

    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?

  • Peter Bromberg [C# MVP]

    #2
    RE: managed code execution from unmanaged code; AppDomain

    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
    --
    Co-founder, Eggheadcafe.com developer portal:

    UnBlog:





    "dotnetchic@gma il.com" wrote:
    [color=blue]
    > 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?
    >
    >[/color]

    Comment

    • Vadym Stetsyak

      #3
      Re: managed code execution from unmanaged code; AppDomain

      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.

      --
      Vadym Stetsyak aka Vadmyst
      Blog about software development, algorithms, network protocols, .NET, programming languages, tips & tricks, coding techniques and more.


      <dotnetchic@gma il.com> wrote in message
      news:1138379872 .374951.35310@f 14g2000cwb.goog legroups.com...[color=blue]
      > 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?
      >[/color]


      Comment

      Working...