]> git.saurik.com Git - wxWidgets.git/commitdiff
Patch from Ole André, call RegisterActiveObject() so the objects can
authorRobin Dunn <robin@alldunn.com>
Mon, 13 Jun 2005 20:45:24 +0000 (20:45 +0000)
committerRobin Dunn <robin@alldunn.com>
Mon, 13 Jun 2005 20:45:24 +0000 (20:45 +0000)
be retrieved from the PyWin32 modules.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/contrib/activex/wxie/wxactivex.cpp

index 96a4a51480cd5eca71bf038762e025ef5e181bf0..1fb0755413c60535bfb9c9968535236ac7dac0f9 100644 (file)
@@ -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");