If I make use of a Type Library in a VB6 project do I need to distribute the .tlb file (and perhaps even register it?) with the compiled exe on the target computer?
No, usually it is only needed if you actually call code that attempts to use the types from the type library. I have found some exceptions, involving using types from the type library to dimension variables. I think it was something like this...
Supposing the type library defines a structure A, and your app contains a procedure like this. If the type library is not registered your app cannot start - an error message is displayed.
Sub testSub1(ByRef mybadarray() As A)
but this would be OK
Sub testSub2()
Dim ok As A ' OK provided you never actually Call testSub2 at runtime '
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With