C# – Calling C# COM object

ccom

Ok, I've created a c# dll, made all its interface and methods all ComVisible(true). Added it to the GAC using gacutil, then registered it using regasm and created a type library tlb file.

Now I have another c# project that I want to make calls to that com object, how can I do this? What would the code roughly look like to import the com object then use its calls?

Best Answer

First of all, why do you want to call that C# Assembly (that you've made comvisible) in your other C# project via COM ? That is not necessary ...

Ontopic: If you've created a tlb file, then you shouldn't do anything special. You can just reference the 'runtime callable wrapper' of the c#assembly you've created.

Related Topic