COM

February 16, 2015 ยท View on GitHub

luacom

The com library can be used to create and access COM instances on Windows. It is accessed using the global luacom variable.

obj = luacom.CreateObject("PowerPoint.Application");

For a complete reference, see refer to the LuaCOM User Manual.

luacom.CreateObject( id )

Creates an instance of the object with the specified id.

obj = luacom.CreateObject("PowerPoint.Application");

luacom.GetObject( id )

Finds a running instance of the object with the specified id.

obj = luacom.GetObject("PowerPoint.Application");

Releasing

It is very important to release all COM objects when they are no longer in use.

obj = nil;
collectgarbage();