What is the TLB file format?
.tlb files are used by OLE/COM (Component Object Model) objects and components on Windows.
Files with the .tlb extension contain type libraries that store interface descriptions for COM objects. Such objects form the building blocks of COM-based Windows components. A type library does not store media content - it stores structured definitions such as:
- interface and method signatures,
- property and event declarations,
- type aliases and constants,
- CoClass (creatable class) definitions.
.tlb files store the parameters and metadata needed for clients to interface with COM components at runtime. Type libraries can be embedded into an .EXE file, .DLL library, or .ocx ActiveX control as a TYPELIB resource - or defined in a standalone .tlb file. The Windows API function LoadTypeLib() loads them at runtime.
Two on-disk binary formats exist: the modern MSFT format (generated by the MIDL compiler from .idl source, magic bytes MSFT) and the older SLTG format from the early Visual Basic and Office era. Visual Basic and other COM-aware tools use type libraries to enable IntelliSense and late-binding.
Security & safety
RISK: LOWA .tlb file is a read-only binary type description and contains no executable code. Loading or inspecting one (in OleView, Visual Studio or a TLB viewer) is safe. It cannot run code on its own. The COM component the .tlb describes (a .dll or .ocx) is the executable part and carries its own risk - but the .tlb itself is harmless metadata.
Format details
in a nutshell- Delphi Type Library file (.tlb) - Borland/Embarcadero Delphi also uses .tlb for COM type libraries it generates - same Microsoft COM standard format, just created by Delphi's TLIBIMP or TLIB tools.
- Watcom C++ linker temp file - Some older Watcom/OpenWatcom builds used .tlb as a temporary object/linker file - unrelated to COM, do not open as a type library.
Programs that open TLB files
Technical details
deep spec| Format type | Binary COM/OLE type library describing interfaces, methods and type definitions |
| MSFT format magic bytes | 4D 53 46 54 - MSFT signature at offset 0; modern format generated by MIDL/CreateTypeLib2 |
| SLTG format magic bytes | 53 4C 54 47 - SLTG signature at offset 0; older Visual Basic-era format from CreateTypeLib |
| Byte order | Little-endian |
| Typical file size | 10 KB - 2 MB (varies with number of interfaces and types described) |
| Internal structure | Fixed header, segment directory, string pool, GUID pool and type descriptor records encoding all interface definitions, method signatures, constants and events |
| Embedded form | Commonly stored as a TYPELIB resource inside a .dll, .ocx or .exe rather than as a standalone file |
| Build tool | MIDL compiler (.idl → .tlb); deprecated MKTYPLIB (.odl → .tlb) |
| Windows load API | LoadTypeLib() / LoadRegTypeLib() |
| Platform | Windows only (OLE/COM subsystem) |
| Primary use | Enables early binding, IntelliSense and COM automation scripting in development tools and runtime clients |
| Partial successor | .winmd (ECMA-335 metadata) for WinRT; .NET assembly metadata for managed COM interop |
| Released | 1993 (OLE 2.0 / COM; type library concept introduced for OLE Automation) |
| Latest version | MSFT format used with CreateTypeLib2 API (current; generated by MIDL compiler); SLTG format (older, CreateTypeLib API) |
| Open standard | Yes · royalty-free |
| Specification | learn.microsoft.com |
TLB conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about TLB files.