4

How can I use a C# .NET DLL in C++Builder?
I would like to use the functions of the C# dll's classes in C++Builder.

Johan
  • 74,508
  • 24
  • 191
  • 319
Szilvia Lázár
  • 111
  • 1
  • 8

1 Answers1

4

In order to call managed code from unmanaged code under Windows, you pretty much have to go through COM.

In your case, this means building your C# library as COM Visible and registering it for COM Interoperation.

Then you need to invoke your COM object from the C++ code in the normal way.

There's a good answer here which goes through the steps necessary to achieve this.

Community
  • 1
  • 1
Baldrick
  • 11,712
  • 2
  • 31
  • 35