From: Robin Dunn Date: Tue, 14 Jun 2005 21:03:59 +0000 (+0000) Subject: Unregister the object too X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9c721ebf971a48dc512ff50bbda0a4b4cdbe1a2c Unregister the object too git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34655 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/contrib/activex/wxie/wxactivex.cpp b/wxPython/contrib/activex/wxie/wxactivex.cpp index 1fb0755413..6b78486076 100644 --- a/wxPython/contrib/activex/wxie/wxactivex.cpp +++ b/wxPython/contrib/activex/wxie/wxactivex.cpp @@ -298,6 +298,9 @@ wxActiveX::~wxActiveX() m_oleObject->Close(OLECLOSE_NOSAVE); m_oleObject->SetClientSite(NULL); } + + // Unregister object as active + RevokeActiveObject(m_pdwRegister, NULL); } void wxActiveX::CreateActiveX(REFCLSID clsid) @@ -323,7 +326,7 @@ void wxActiveX::CreateActiveX(REFCLSID clsid) // Register object as active unsigned long pdwRegister; - hret = RegisterActiveObject(m_ActiveX, clsid, ACTIVEOBJECT_WEAK, &pdwRegister); + hret = RegisterActiveObject(m_ActiveX, clsid, ACTIVEOBJECT_WEAK, &m_pdwRegister); WXOLE_WARN(hret, "Unable to register object as active"); // Get Dispatch interface diff --git a/wxPython/contrib/activex/wxie/wxactivex.h b/wxPython/contrib/activex/wxie/wxactivex.h index fa1d173aa0..c5e3902a59 100644 --- a/wxPython/contrib/activex/wxie/wxactivex.h +++ b/wxPython/contrib/activex/wxie/wxactivex.h @@ -566,6 +566,7 @@ protected: friend class FrameSite; friend class wxActiveXEvents; + unsigned long m_pdwRegister; typedef map MemberIdMap; typedef map NameMap;