TL or type library is a container, COM (see elsewhere), classes, a binary version of an Interface Definition Language (IDL) file. Its function and character is one of providing comprehensive, detailed and complete information about the interfaces of a COM object.
The/a type library contains a binary description of the interfaces exposed by a component, defining the methods, along with their parameters and return types.
Type libraries exist typically in one of the following forms
• Built into existing COM objects. By far the preferred method of declaring type libraries
• Adding a reference, through Visual Studio. Associations editor in Microsoft® Visual Studio® Installer provides an easy way to associate COM objects with their type libraries.
• As stand-alone type library (.tlb) files. Can be embedded in a .dll, .exe, .ocx, or .olb file.
The type library importer (tlmb.exe),creates and interoperative assembly using a type defined in the type library. This can be used to import a type library into an assembly. Used typically for COM applications and protocols. It is important to know how to use type libraries, to enact how the import conversion process transforms type information as it converts a COM-style type library to .NET Framework metadata. Marshalling processes control ensures passing of data in correct formats. How to access COM objects, how to allow COM clients to use managed classes.
Key Exam Points
- Use Visual Basic, C#.
- Access COM library, adding references in Visual Studio, creating prototype methods using attributes, Callback functions or delegate, inter-operating with COM
- For the exam study examples for creating a .NET library, interface, with COM and access, to help you to gain a better practical understanding of this topic, inter-operability.NET to COM (visa versa), TypeLibrary Importer, TypeLibrary Exporter.
Interface, Contract, API, COM, Assembly Conversion
This article is based on the 2nd edition of the Microsoft .Net Framework Application Training Kit with the purpose to help 70-536 Exam takers to succeed. I constantly look for ways to improve the content. Please leave a comment about this article or drop me a message if you would like to see changes for this site.