Use C# assembly in MFC - help

S

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!
 
D

David Browne

SJ said:
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
 

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