Commit bbfa604d authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

mshtml: Added OleObject_Advise implementation.

parent 45e0dd9d
......@@ -1951,6 +1951,8 @@ static ULONG WINAPI CustomDoc_Release(ICustomDoc *iface)
This->basedoc.window->doc_obj = NULL;
IHTMLWindow2_Release(HTMLWINDOW2(This->basedoc.window));
}
if(This->basedoc.advise_holder)
IOleAdviseHolder_Release(This->basedoc.advise_holder);
if(This->client)
IOleObject_SetClientSite(OLEOBJ(&This->basedoc), NULL);
......
......@@ -338,6 +338,8 @@ struct HTMLDocument {
ConnectionPoint cp_htmldocevents;
ConnectionPoint cp_htmldocevents2;
ConnectionPoint cp_propnotif;
IOleAdviseHolder *advise_holder;
};
static inline HRESULT htmldoc_query_interface(HTMLDocument *This, REFIID riid, void **ppv)
......
......@@ -380,8 +380,23 @@ static HRESULT WINAPI OleObject_GetExtent(IOleObject *iface, DWORD dwDrawAspect,
static HRESULT WINAPI OleObject_Advise(IOleObject *iface, IAdviseSink *pAdvSink, DWORD *pdwConnection)
{
HTMLDocument *This = OLEOBJ_THIS(iface);
FIXME("(%p)->(%p %p)\n", This, pAdvSink, pdwConnection);
return E_NOTIMPL;
TRACE("(%p)->(%p %p)\n", This, pAdvSink, pdwConnection);
if(!pdwConnection)
return E_INVALIDARG;
if(!pAdvSink) {
*pdwConnection = 0;
return E_INVALIDARG;
}
if(!This->advise_holder) {
CreateOleAdviseHolder(&This->advise_holder);
if(!This->advise_holder)
return E_OUTOFMEMORY;
}
return IOleAdviseHolder_Advise(This->advise_holder, pAdvSink, pdwConnection);
}
static HRESULT WINAPI OleObject_Unadvise(IOleObject *iface, DWORD dwConnection)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment