git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58087
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
friend class FrameSite;
friend class wxActiveXEvents;
friend class FrameSite;
friend class wxActiveXEvents;
+ FrameSite *m_frameSite;
wxAutoIDispatch m_Dispatch;
wxAutoIOleClientSite m_clientSite;
wxAutoIUnknown m_ActiveX;
wxAutoIDispatch m_Dispatch;
wxAutoIOleClientSite m_clientSite;
wxAutoIUnknown m_ActiveX;
m_oleObject->Close(OLECLOSE_NOSAVE);
m_oleObject->SetClientSite(NULL);
}
m_oleObject->Close(OLECLOSE_NOSAVE);
m_oleObject->SetClientSite(NULL);
}
+
+ // m_clientSite uses m_frameSite so destroy it first
+ m_clientSite.Free();
+ delete m_frameSite;
}
// VZ: we might want to really report an error instead of just asserting here
}
// VZ: we might want to really report an error instead of just asserting here
CHECK_HR(hret);
// FrameSite
CHECK_HR(hret);
// FrameSite
- FrameSite *frame = new FrameSite(m_realparent, this);
+ m_frameSite = new FrameSite(m_realparent, this);
// oleClientSite
hret = m_clientSite.QueryInterface(
// oleClientSite
hret = m_clientSite.QueryInterface(
- IID_IOleClientSite, (IDispatch *) frame);
+ IID_IOleClientSite, (IDispatch *) m_frameSite);
CHECK_HR(hret);
// adviseSink
CHECK_HR(hret);
// adviseSink
- wxAutoIAdviseSink adviseSink(IID_IAdviseSink, (IDispatch *) frame);
+ wxAutoIAdviseSink adviseSink(IID_IAdviseSink, (IDispatch *) m_frameSite);
wxASSERT(adviseSink.Ok());
// Get Dispatch interface
wxASSERT(adviseSink.Ok());
// Get Dispatch interface
CHECK_HR(hret);
IDispatch* disp;
CHECK_HR(hret);
IDispatch* disp;
- frame->QueryInterface(IID_IDispatch, (void**)&disp);
+ m_frameSite->QueryInterface(IID_IDispatch, (void**)&disp);
hret = cp->Advise(new wxActiveXEvents(this, ta->guid),
&adviseCookie);
CHECK_HR(hret);
hret = cp->Advise(new wxActiveXEvents(this, ta->guid),
&adviseCookie);
CHECK_HR(hret);