From: Robin Dunn Date: Mon, 13 Jun 2005 20:45:24 +0000 (+0000) Subject: Patch from Ole André, call RegisterActiveObject() so the objects can X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/535ffb932aa6cd4db430e1b3740cfa51ae2421aa?ds=inline Patch from Ole André, call RegisterActiveObject() so the objects can be retrieved from the PyWin32 modules. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/contrib/activex/wxie/wxactivex.cpp b/wxPython/contrib/activex/wxie/wxactivex.cpp index 96a4a51480..1fb0755413 100644 --- a/wxPython/contrib/activex/wxie/wxactivex.cpp +++ b/wxPython/contrib/activex/wxie/wxactivex.cpp @@ -317,10 +317,15 @@ void wxActiveX::CreateActiveX(REFCLSID clsid) wxCHECK_RET(adviseSink.Ok(), _T("adviseSink not Ok")); - // // Create Object, get IUnknown interface + // Create Object, get IUnknown interface m_ActiveX.CreateInstance(clsid, IID_IUnknown); wxCHECK_RET(m_ActiveX.Ok(), _T("m_ActiveX.CreateInstance failed")); + // Register object as active + unsigned long pdwRegister; + hret = RegisterActiveObject(m_ActiveX, clsid, ACTIVEOBJECT_WEAK, &pdwRegister); + WXOLE_WARN(hret, "Unable to register object as active"); + // Get Dispatch interface hret = m_Dispatch.QueryInterface(IID_IDispatch, m_ActiveX); WXOLE_WARN(hret, "Unable to get dispatch interface");