"Jo" <jo@microsoft.comwrote in message
news:O%****************@TK2MSFTNGP02.phx.gbl...
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.