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?
views:
162answers:
3
A:
Only if you are using multi-threading, i.e. ActiveX EXEs or in-proc with CoMarshalInterThreadInterfaceInStream
etc. functions.
wqw
2010-05-10 18:57:48
+1
A:
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 '
MarkJ
2010-05-12 00:10:24