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

  • Thread starter Constantin Christmann via .NET 247
  • 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
 
N

Nicholas Paldino [.NET/C# MVP]

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.
 

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