[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Question about returning values of COM method call by using luacom
- From: Ignacio Burgueño <ignaciob@...>
- Date: Wed, 17 Dec 2008 11:38:22 -0200
Jei-Wen Teng wrote:
I am trying to call a COM method from Lua by using LuaCOM.
The signature is as follow:
[out, retval] long* pVal);
Directional attribute [in], [out] is not specified.
EncodedData is the parameter that this method will store its result in.
That is wrong, see below.
My question is:
1. Will LuaCOM return all the values of VARIANT* type parameters?
No, because when no directional attribute is present, [in] is assumed 
2. If not, is there any way in LuaCOM to get the result value of
Unless you can change your method declaration, or add a new method with
[in,out] parameters, you can't.
Also, you could create a new COM interface and wrap the calls to
However, by not specifying [in,out] and changing EncodedData you're
relying on not crossing apartments or worst, process boundaries. In the
former, things may work under certain circumstances. In the latter, they
won't work at all.