Based on ole32/defaulthandler.c implementation.
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/ieframe/ieframe.h | 1 + dlls/ieframe/view.c | 13 +++++++++++-- dlls/ieframe/webbrowser.c | 3 +++ 3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/dlls/ieframe/ieframe.h b/dlls/ieframe/ieframe.h index 329cea2f7c..6b19fabaec 100644 --- a/dlls/ieframe/ieframe.h +++ b/dlls/ieframe/ieframe.h @@ -200,6 +200,7 @@ struct WebBrowser { DWORD sink_flags;
IOleAdviseHolder *advise_holder; + IDataAdviseHolder *data_advise_holder;
/* window context */
diff --git a/dlls/ieframe/view.c b/dlls/ieframe/view.c index d307bb5a00..7bd9429c3d 100644 --- a/dlls/ieframe/view.c +++ b/dlls/ieframe/view.c @@ -217,8 +217,17 @@ static HRESULT WINAPI DataObject_EnumFormatEtc(LPDATAOBJECT iface, DWORD dwDirec static HRESULT WINAPI DataObject_DAdvise(LPDATAOBJECT iface, FORMATETC *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection) { WebBrowser *This = impl_from_IDataObject(iface); - FIXME("(%p)->()\n", This); - return E_NOTIMPL; + HRESULT hr = S_OK; + + TRACE("(%p)->(%p,%08x,%p,%p)\n", This, pformatetc, advf, pAdvSink, pdwConnection); + + if(!This->data_advise_holder) + hr = CreateDataAdviseHolder(&This->data_advise_holder); + + if(hr == S_OK) + hr = IDataAdviseHolder_Advise(This->data_advise_holder, iface, pformatetc, advf, pAdvSink, pdwConnection); + + return hr; }
static HRESULT WINAPI DataObject_DUnadvise(LPDATAOBJECT iface, DWORD dwConnection) diff --git a/dlls/ieframe/webbrowser.c b/dlls/ieframe/webbrowser.c index 87b74b8e01..746e66c889 100644 --- a/dlls/ieframe/webbrowser.c +++ b/dlls/ieframe/webbrowser.c @@ -173,6 +173,9 @@ static ULONG WINAPI WebBrowser_Release(IUnknown *iface) if(This->advise_holder) IOleAdviseHolder_Release(This->advise_holder);
+ if(This->data_advise_holder) + IDataAdviseHolder_Release(This->data_advise_holder); + if(This->doc_host.document) IUnknown_Release(This->doc_host.document);