lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi everyone. I'm using LuaCom 1.2 RC1, and I'm having trouble with COM
events.
I have a COM component which publishes two interfaces: IControl and ICall.
IControl fires an event which passes a ICall**.
Whenever I get that event in Lua, the parameter is always nil. The event is
defined like this:
[id(0x00000001), helpstring("method NewCall")] HRESULT newCall([out] ICall**
newCall); Is that kind of stuff supported in this release of LuaCom?

Thanks in advance,
Ignacio Burgueño

P.S.
This is the relevant part of the code:

tapi_events = {}

function tapi_events:newCall(theCall)
	print("newcall fired")
	print(theCall)	-- this is always nil ?
end

objTapi = luacom.CreateObject("TAPIClient.Control")
assert(objTapi)

-- Connects object and table
res = luacom.Connect(objTapi, tapi_events) if res == nil then
  os.exit(1)
end

objTapi:MakeNewCall("144", "")	-- calling this method will cause the
"newcall" event to fire

-- the host implements a message loop in order to receive the event