next up previous contents
Next: 2.2 LuaCOM objects Up: 2. LuaCOM Elements Previous: 2. LuaCOM Elements   Contents

2.1 LuaCOM API

The LuaCOM API is divided in two parts: the Lua API and the C/C++ API. The C/C++ API is used primarily for initialization of the library and for low-level construction of LuaCOM objects. The Lua API permits Lua programs to access all the functionality of LuaCOM. Below there is summary of the LuaCOM API. Detailed information on these functions is available in chapter 5.
Lua API
Function
Description
luacom_CreateObject Creates a LuaCOM object.
luacom_NewObject Creates a LuaCOM object implemented in Lua.
luacom_GetObject Creates a LuaCOM object associated with an instance of an already running ActiveX object.
luacom_ExposeObject Exposes a LuaCOM object, so that other applications can get a reference to it.
luacom_RevokeObject Undoes the operation of luacom_ExposeObject.
luacom_RegisterObject Fills in the registry entries necessary for exposing a COM object.
luacom_Connect Creates a connection point between an object and a Lua table.
luacom_ImplInterface Implements an IDispatch interface using a Lua table.
luacom_ImplInterfaceFromTypelib Implements an IDispatch interface described in a Type Library using a Lua table.
luacom_addConnection Connects two LuaCOM objects.
luacom_releaseConnection Disconnects a LuaCOM object from its connection point.
luacom_isMember Checks whether a name correspond to a method or a property of an LuaCOM object.
luacom_ProgIDfromCLSID Gets the ProgID associated with a CLSID.
luacom_CLSIDfromProgID Gets the CLSID associated with a ProgID.
luacom_GetIUnknown Returns an IUnknown interface to a LuaCOM object as a userdata.
luacom_DumpTypeInfo Dumps to the console the type information of the specified LuaCOM object. This function should be used only for debugging purposes.
C/C++ API
Function
Description
luacom_open Initializes the LuaCOM library in a Lua state. It must be called before any use of LuaCOM features.
luacom_close LuaCOM's termination function.
luacom_detectAutomation This function is a helper to create COM servers. It looks in the command line for the switches ``/Automation'' and ``/Register'' and call some user-defined Lua functions accordingly.
luacom_IDispatch2LuaCOM Takes an IDispatch interface and creates a LuaCOM object to expose it, pushing the object on the Lua stack.

next up previous contents
Next: 2.2 LuaCOM objects Up: 2. LuaCOM Elements Previous: 2. LuaCOM Elements   Contents
Vinicius da Silva Almendra 2003-06-04