Next: 2.5 Methods and Properties
Up: 2. Tutorial
Previous: 2.3 Creating Objects
  Contents
To use a COM object, the first thing one must know is its
interface, that is, its set of methods and properties. This
information normally is available in the documentation of the object,
but sometimes one do not have access to this documentation. LuaCOM
can offer some help if the object has type information. If the object
has an associated help file, LuaCOM can launch it using the method
ShowHelp:
word = luacom.CreateObject("Word.Application")
assert(word)
luacom.ShowHelp(word)
If the object has an associated type library, LuaCOM can generate
and display an HTML file describing it. This information can also be
read using other type library browsers, as OleView.
The method DumpTypeInfo can be used in console applications to
list the methods and properties of the interface. It does not give
much information, but can be helpful when playing with an object.
Fabio Mascarenhas de Queiroz
2005-06-06