Paulo
Paulo

Reputation: 7303

Use a .net assembly from a totally unmanaged C++ application?

Is there any way I can reference and use classes and methods from a managed .net assembly from within a totally unmanaged C++ application? (no /clr)

Upvotes: 1

Views: 854

Answers (3)

Shay Erlichmen
Shay Erlichmen

Reputation: 31928

You can expose the .NET class thru COM and consume the classes thru COM.

Upvotes: 1

Chris Ballance
Chris Ballance

Reputation: 34337

Absolutely, and this gem from CodeProject should prove helpful

You need a CCW (COM callable wrapper).

Upvotes: 3

Harper Shelby
Harper Shelby

Reputation: 16585

You can - by hosting the CLR. I found one set of example code here . I have no way of knowing how good the advice there is though, as I've never done it.

Upvotes: 1

Related Questions