Generates Odin bindings from Windows COM type libraries and IDL files.
com_codegen <input> <package_name>
Inputs:
.tlb- COM Type Library (Windows only).idl- Interface Definition Language (cross-platform)- Directory of
.tlbfiles (Windows only)
Examples:
com_codegen mylib.tlb excel
com_codegen audioclient.idl wasapi
com_codegen C:\Windows\System32 stdole
Generates an Odin package containing:
com_base.odin- COM types and helpersforward_decls.odin- Interface forward declarations- Per-library
.odinfiles with interfaces, enums, structs
- Interface vtables with wrapper methods
- BSTR/VARIANT_BOOL converted to string/bool
[out, retval]params as return values- Optional parameter overloads
- Coclass factories (
_create,_get_active) - Event sink generation
- Module DLL imports
- IDL
#defineconstants from cpp_quote
odin build .
TLB parsing requires Windows. IDL parsing works on any platform.