C# project with 'Register for COM Interop' set to true


J

Jo

Hi all,

I have a dll written in C#. I need this dll being called by some un-managed
dll or app through COM.

My question is, do I have to set 'Register for COM Interop' set to true in
the project settings?

If you can point some articles about this that will be helpful also.

TIA,

Jo
 
Ad

Advertisements

A

Alberto Poblacion

Jo said:
I have a dll written in C#. I need this dll being called by some
un-managed dll or app through COM.

My question is, do I have to set 'Register for COM Interop' set to true in
the project settings?

That's the easiest way to make your dll callable from COM clients.
If you don't want Visual Studio to do all the work for you, an
alternative way to make your dll accessible to COM is to use the TLBEXP.exe
program (Type Library Exporter) to create a .tlb from your .dll. This .tlb
can then be used to add a reference from COM consumers. You will also need
to register your dll in the Windows Registry using REGASM, because regsvr32
does not operate on .Net dlls. You can also use the /tlb option of regasm to
produce the same effect of running tlbexp.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top