Reputation: 927
I created a COM C++ and register it in the Windows system.
Now, If I'm creatine a C++ application and would like to load it and call the function objects, I'm using the CoCreateInstance function.
What should I do instead that if I want to create .NET (C#) application and load the COM C++?
Thanks
Upvotes: 1
Views: 92
Reputation: 39650
Assuming you are using Visual Studio:
Right click on your project, then select "Add Reference". In the following dialog, just select the Tab "COM". There you can select your COM library, Visual Studio will take care of creating an Interop assembly and you can start using your library from C#.
Upvotes: 4