]> git.saurik.com Git - wxWidgets.git/commitdiff
Unregister the object too
authorRobin Dunn <robin@alldunn.com>
Tue, 14 Jun 2005 21:03:59 +0000 (21:03 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 14 Jun 2005 21:03:59 +0000 (21:03 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34655 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/contrib/activex/wxie/wxactivex.cpp
wxPython/contrib/activex/wxie/wxactivex.h

index 1fb0755413c60535bfb9c9968535236ac7dac0f9..6b78486076d105421e91a5dd960fb501ba3b4658 100644 (file)
@@ -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
index fa1d173aa0d994ed86a3c49baa10e8baa4850786..c5e3902a5911da7edc8b35f18410e765e4b83368 100644 (file)
@@ -566,6 +566,7 @@ protected:
     friend class FrameSite;
     friend class wxActiveXEvents;
 
+    unsigned long m_pdwRegister;
         
     typedef map<MEMBERID, int>                                  MemberIdMap;
     typedef map<wxString, int, NS_wxActiveX::less_wxStringI>    NameMap;