[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: LuaCom, using luacom_IDispatch2LuaCOM with CWnd
- From: Pablo Garcia <pablomorpheo@...>
- Date: Fri, 11 Mar 2011 13:01:45 +0100
Hi guys, i'm triying to use my activex object created with CWnd derivated class but I had a lot of problems, i cant call functions, the program crash, i can get properties but only a few of them, if I set a property, it works very strange, it sums the numbers, or do crazy things, some other times the program crash...
i'm using a correct enviroment, with debug versions, dinamic linking, and everithing ok, luacom works perfectly using createobject but I want windowed activex interface, not typelibs...
Can you anybody put me in the way to do that¿?
I'm actually doing that
my lua exported func
void CreateAndExport(lua_State* L)
{
........................
//get access to my object and identify (works perfectly)
........................
CmObject* pwndObject = (CmObject*) pwndObject;
LPUNKNOWN pUnk = pwndObject->m_pMyObjectActivex->GetControlUnknown();
LPDISPATCH pDisp = NULL;
pUnk->QueryInterface(IID_IDispatch, (LPVOID*)&pDisp);
luacom_IDispatch2LuaCOM(L, (void *) pdisp);
}
______________________________
Pablo García