Sample

LuaCOM

next up previous contents Next: 6.2 The Lua Standard Up: luacom_IDispatch2LuaCOM Previous: Description   Contents

Sample

void CreateAndExport(lua_State* L)
{
  // Creates the object
  IUnknown *obj = CreateObj();

  // Gets the IDispatch
  IDispatch* pdisp = NULL;
  QueryInterface(IID_IDISPATCH, &pdisp);

  // pushes onto lua stack
  luacom_IDispatch2LuaCOM(L, (void *) pdisp);
}



Fabio Mascarenhas de Queiroz 2005-01-07