COM interop q

F

Frank Rizzo

I am using a .net library from VB6.
So I do
regasm mylib.dll /tlb:mylib.tlb
to make it available to COM clients. As I understand, the command
actually generates a new .TLB file everytime you run the command.

So when I do REGASM, what actually gets registered: the DLL or the TLB?

In addition, when I deploy my VB6 app, I would copy mylib.dll and
mylib.tlb to the target PC. Would I need to run the REGASM command
again or can I simply register the existing .TLB file? If I can just
register the .TLB file, how can I do so? REGSVR32 does not seem to work
with the .TLB file.

Thanks
Frank
 
M

Mattias Sjögren

Frank,
So when I do REGASM, what actually gets registered: the DLL or the TLB?
Both


Would I need to run the REGASM command
again or can I simply register the existing .TLB file?

Yes you need to run Regasm on the target machine, or have a setup
package that handles the registration.



Mattias
 
F

Frank Rizzo

Mattias said:
Frank,


Yes you need to run Regasm on the target machine, or have a setup
package that handles the registration.

So, are you saying that I don't actually need to distribute the .TLB
file since I have to run RegAsm on the target machine anyway (which will
recreate the .tlb file)?

Thanks
Frank
 
M

Mattias Sjögren

Frank,
So, are you saying that I don't actually need to distribute the .TLB
file since I have to run RegAsm on the target machine anyway (which will
recreate the .tlb file)?

No, you don't necessarily have to distribute the TLB.



Mattias
 

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