The LuaCOM 1.3b2 User Manual explains how to use the LuaCOM library to access and implement COM objects from Lua scripts.
The LuaCOM library is an add‑on for the Lua programming language that enables Lua programs to create, control, and automate Microsoft Component Object Model (COM) objects. This manual provides a complete reference, tutorial, and implementation guide for developers who need to work with COM objects, type libraries, and automation interfaces from Lua.
It covers installation, API usage, type conversion rules, event handling, and advanced topics such as building COM servers and OLE controls. The document also lists known limitations, bug reports, and future enhancements, making it a valuable resource for both newcomers and experienced Lua developers.
| Supported Lua versions | Lua 5 and Lua 4 |
|---|---|
| COM initialization requirement | COM must be initialized before lua_open and terminated after the last lua_close |
Use the luacom.CreateObject function with the object's ProgID, e.g., `word = luacom.CreateObject("Word.Application")`.
Objects are released automatically by Lua’s garbage collector, but you can force release by setting the object to nil and calling `collectgarbage()`.