how to import C# DLLs in C++ project?

  • Thread starter Thread starter Constantin Christmann via .NET 247
  • Start date Start date
C

Constantin Christmann via .NET 247

Hi!

I need to create some windows for debugging purpose in a big C++ project but I don't want to do this with MFC or Win32 coding.
I'd prefer to build this debugging windows with C#, make a DLL and import this in the big project.
My problem is now that there is a lot of information how to use old C++ DLLs in C# but nothing about how to go the opposite way.

Tx!
Constantin
 
Constantin,

You have two options. The first would be to export your types from .NET
into COM, and then call it through your C++ code.

The other option is to use managed extentions for C++ to access managed
code.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Constantin Christmann via .NET 247 said:
Hi!

I need to create some windows for debugging purpose in a big C++ project
but I don't want to do this with MFC or Win32 coding.
I'd prefer to build this debugging windows with C#, make a DLL and import this in the big project.
My problem is now that there is a lot of information how to use old C++
DLLs in C# but nothing about how to go the opposite way.
 
Back
Top