Ashish Ashu
Ashish Ashu

Reputation: 14667

How can we use .NET dll in VC++?

Please suggest me the best way to use .NET dll in VC++ project.

Upvotes: 5

Views: 3510

Answers (3)

axel_c
axel_c

Reputation: 6796

As an alternative, if you don't mind using the mono version instead of Microsoft, you can embed the mono runtime in your VC++ code (it's plain C) and use it to load the assembly and call methods, as described here.

Upvotes: 2

Grant Peters
Grant Peters

Reputation: 7825

If you make a Managed (CLR) VC++ project (I believe you can just set this in the compiler settings, though I'm not 100% sure if you need to change anything else in code to get it to work properly), you can use the .Net code without any "com" code, though you will have to write managed c++ code (this way you can also get the advantages of both managed .Net code as well as the advantages of standard c++)

Upvotes: 2

Henrik
Henrik

Reputation: 23324

Make it ComVisible. See link text

Upvotes: 4

Related Questions