Call functions in a C# .dll from unmanaged C++

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hello

is it possible to call functions implemented in a C# .dll from unmanaged C++ code

Thank you
 
Andreas,

The only way you are going to be able to do this is to either mix your
C++ code with managed C++ code (have a mixed mode application), or to export
your .NET types as COM types, and then access them in your C++ application.

Hope this helps.
 
Sanjay,

This isn't necessarily correct. The C# code is already managed, so you
won't need a managed C++ wrapper around the managed assembly that the OP
wants to use.
 
What I meant was
unmanaged C++ --> managed C++ --> managed C# :)

Nicholas Paldino said:
Sanjay,

This isn't necessarily correct. The C# code is already managed, so you
won't need a managed C++ wrapper around the managed assembly that the OP
wants to use.

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

Sanjay Vyas said:
Yes, but you need to write Managed C++ wrapper for the unmanaged C++ to
call.

unmanaged
C++ code?
 
Back
Top