From 535ffb932aa6cd4db430e1b3740cfa51ae2421aa Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 13 Jun 2005 20:45:24 +0000 Subject: [PATCH] =?utf8?q?Patch=20from=20Ole=20Andr=C3=A9,=20call=20Regist?= =?utf8?q?erActiveObject()=20so=20the=20objects=20can=20be=20retrieved=20f?= =?utf8?q?rom=20the=20PyWin32=20modules.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/contrib/activex/wxie/wxactivex.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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"); -- 2.45.2