Skip to content

Latest commit

 

History

History
47 lines (27 loc) · 946 Bytes

com.md

File metadata and controls

47 lines (27 loc) · 946 Bytes

COM

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();