Hi

I want to retrofit a C# class library assembly into legacy MFC C++
applications. The application projects are VS2005 or VS2003 projects but
are unmanaged MFC C++ apps. I believe one approach is to enable COM
interoperability in the C# assembly and use it as a COM library in the
c++ app. Are there any other possible solutions without requiring
recoding of the c# modules etc or any major rework? Thanks!

Re: Use C# assembly in MFC - help by David

David
Fri Mar 23 20:06:21 CDT 2007



"SJ" <sjw0410@gmail.com> wrote in message
news:eu1odk$sj3$1@news-01.bur.connect.com.au...
> Hi
>
> I want to retrofit a C# class library assembly into legacy MFC C++
> applications. The application projects are VS2005 or VS2003 projects but
> are unmanaged MFC C++ apps. I believe one approach is to enable COM
> interoperability in the C# assembly and use it as a COM library in the c++
> app. Are there any other possible solutions without requiring recoding of
> the c# modules etc or any major rework? Thanks!

You can add a C++/CLI class to a C++ project in VS 2005. Such a class can
directly interact with both managed C# assemblies and link with unmanaged C
and C++ compilation units.

David