Reputation: 14667
Please suggest me the best way to use .NET dll in VC++ project.
Upvotes: 5
Views: 3510
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
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