Type libraries are binary files which contain important information about the types, objects, modules, and
interfaces exposed by an Automation server to its clients. An Automation client, such as Visual Basic, can read this
information and bind to it as it would any object. No need for Declare
statements or hard to remember constants because Visual Basic does all the
work. There are several advantages in creating a type library for your DLL. The most important of these is better type safety. But you also get the advantage of better performance, because Visual Basic automatically binds to your functions using early-binding. In contrast, all Declare statements are late-bound. Furthermore, the type library allows you to provide Visual Basic-friendly names for functions and parameters, along with helpful extras like enumerations and User Defined Types (UDTs). Registering Type libraries Type libraries can be registered using regtlib. In Vista regtlib should be run at administrator level. Note: Type library files (*.tlb) are not required to be shipped with software exception is when you supply source code with the software in which case developer will require .tlb files to compile the code. |