3

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.

4

1 回答 1

2

这里有一些很好的资源可以帮助您入门:

话虽如此,您还需要确保您的 .NET 项目设置为通过 COM 公开类。确保Register For COM Interop在您的项目设置中打开,并使用标记适当的类型[ComVisible(true)](除非您制作整个程序集ComVisible,在这种情况下,您将标记您不想公开的类型[ComVisible(false)]

于 2012-07-10T15:46:37.910 回答