3.3.4.1.1 lua2com situation

LuaCOM

next up previous contents Next: 3.3.4.1.2 com2lua situation Up: 3.3.4.1 Calling COM from Previous: 3.3.4.1 Calling COM from   Contents

3.3.4.1.1 lua2com situation

The translation is done based on the type information of the method (or property); it's done following the order the parameters appear in the type information of the method. The Lua parameters are used in the same order. For each parameter there are three possibilities:

The parameter is an ``in'' parameter
LuaCOM gets the first Lua parameter not yet converted and converts it to COM using LuaCOM type conversion engine.

The parameter is an ``out'' parameter
LuaCOM ignores this parameter, as it will only be filled by the called method. That is, the ``out'' parameters SHOULD NOT appear in the Lua parameter list.

The parameter is an ``in-out'' parameter
LuaCOM does the same as for ``in'' parameters.

When the caller of the method wants to omit a parameter, it must pass the nil value; LuaCOM then proceeds accordingly, informing the called method about the omission of the parameter. If the parameter has a default value, it is used instead. Notice that LuaCOM does not complain when one omits non-optional parameters. In fact, LuaCOM ignores the fact that a parameter is or isn't optional. It leaves the responsibility for checking this to the implementation of the called method.


next up previous contents
Next: 3.3.4.1.2 com2lua situation Up: 3.3.4.1 Calling COM from Previous: 3.3.4.1 Calling COM from   Contents
Fabio Mascarenhas de Queiroz 2005-01-07