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. All the API is accessible as functions inside a global table named luacom; hereafter these functions will be called LuaCOM methods2.1. Below there is summary of the LuaCOM API. Detailed information on these methods is available in chapter 5.
CreateObject Creates a LuaCOM object.
NewObject Creates a LuaCOM object implemented in Lua.
GetObject Creates a LuaCOM object associated with an instance of an already running ActiveX object.
ExposeObject Exposes a LuaCOM object, so that other applications can get a reference to it.
RevokeObject Undoes the operation of ExposeObject.
RegisterObject Fills in the registry entries necessary for exposing a COM object.
Connect Creates a connection point between an object and a Lua table.
ImplInterface Implements an IDispatch interface using a Lua table.
ImplInterfaceFromTypelib Implements an IDispatch interface described in a Type Library using a Lua table.
addConnection Connects two LuaCOM objects.
releaseConnection Disconnects a LuaCOM object from its connection point.
isMember Checks whether a name correspond to a method or a property of an LuaCOM object.
ProgIDfromCLSID Gets the ProgID associated with a CLSID.
CLSIDfromProgID Gets the CLSID associated with a ProgID.
GetIUnknown Returns an IUnknown interface to a LuaCOM object as a userdata.
DumpTypeInfo Dumps to the console the type information of the specified LuaCOM object. This method should be used only for debugging purposes.
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-27