Home All Groups Group Topic Archive Search About

Use C# assembly in MFC - help

Author
23 Mar 2007 11:38 PM
SJ
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!

Author
24 Mar 2007 1:06 AM
David Browne
"SJ" <sjw0***@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

AddThis Social Bookmark Button