next up previous contents
Next: 3.3.4.1.1 lua2com situation Up: 3.3.4 Parameter Passing Previous: 3.3.4 Parameter Passing   Contents

3.3.4.1 Calling COM from Lua

This situation happens when accessing a property or calling a method of a COM object through the LuaCOM object. Here follows a sample:

word = luacom.GetObject("Word.Application")

-- Here we are calling the "Move" method of the Application object of
-- a running instance of Microsoft(R) Word(R)
word:Move(100,100)

In this situation, there are two steps in the parameter passing process:

  1. convert Lua parameters to COM (this will be called the ``lua2com'' situation);
  2. convert COM's return value and output values back to Lua (this will be called the ``com2lua'' situation).



Subsections

Fabio Mascarenhas de Queiroz 2004-09-13