COM Interop with .NET

dharmesht
dharmesht used Ask the Experts™
on
I have an issues of some methods of a 3rd party COM API not appearing in Interop DLL created by VS.NET. I read a message on this board about assemblimg interop DLL manually... any leads on how and where I can refer to learn this art?

Thanks.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
I dont Know about creating the Interop manually,  I suppose that it is done by running the tlbimp.exe.  But to tell you the true the COM component should aready be there.

First I asume that you have already installed and registered the component with regsrv32.exe.  That will not change.  Net does not uses The registry but I will look for COM objects on the registry.

Second when you add a reference to the Com, you opened the Solution explorer.  Rigth click into references, select add reference.  

At this point you get a dialog with the tabs NET /COM / Projects.  Select the COM Tab and look there for your reference.  

Finally, (this works just like vb6)  Create a variable of type object, intantiate it (use the NEW verb) and use it.

Good luck
Most Valuable Expert 2012
Top Expert 2008

Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered by CarlosMu

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheLearnedOne
EE Cleanup Volunteer

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial