Reputation: 523
I have to use a DLL in my project that is a .NET assembly. I have to use C++ for this project. I'm a relative beginner to programming, so my knowledge doesn't extend too far. I was told COM Interop is one way to get the DLL to work in my project (the other being C++/CLI). The problem is I have ZERO idea how to begin, as I've never done anything like this before, and the Microsoft documentation on the matter isn't really helping.
If anyone can even point me in the right direction, that would be much obliged.
Upvotes: 3
Views: 2139
Reputation: 564323
Here are some good resources to get you started:
That being said, you'll also need to make sure that your .NET project is setup to expose the classes via COM. Make sure to turn on Register For COM Interop
in your project settings, and flag appropriate types with [ComVisible(true)]
(Unless you make the entire assembly ComVisible
, in which case you would flag types you don't want to expose with [ComVisible(false)]
)
Upvotes: 2