From fab9304721a05b1b8b0369c554f1209218cf695d Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Sat, 13 Mar 2010 16:43:24 +0100 Subject: [PATCH] shdocvw: Store object passed in DOCHOST_DOCCANNAVIGATE command. --- dlls/shdocvw/dochost.c | 40 ++++++++++++++++++++++++++++++++++++++-- dlls/shdocvw/shdocvw.h | 1 + 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/dlls/shdocvw/dochost.c b/dlls/shdocvw/dochost.c index e8982e4f12a..6eb81996367 100644 --- a/dlls/shdocvw/dochost.c +++ b/dlls/shdocvw/dochost.c @@ -21,9 +21,14 @@ #include "hlink.h" #include "exdispid.h" #include "mshtml.h" +#include "initguid.h" WINE_DEFAULT_DEBUG_CHANNEL(shdocvw); +DEFINE_OLEGUID(CGID_DocHostCmdPriv, 0x000214D4L, 0, 0); + +#define DOCHOST_DOCCANNAVIGATE 0 + static ATOM doc_view_atom = 0; void push_dochost_task(DocHost *This, task_header_t *task, task_proc_t proc, BOOL send) @@ -314,6 +319,11 @@ void deactivate_document(DocHost *This) IHlinkTarget *hlink = NULL; HRESULT hres; + if(This->doc_navigate) { + IUnknown_Release(This->doc_navigate); + This->doc_navigate = NULL; + } + if(This->is_prop_notif) advise_prop_notif(This, FALSE); @@ -425,8 +435,34 @@ static HRESULT WINAPI ClOleCommandTarget_Exec(IOleCommandTarget *iface, VARIANT *pvaOut) { DocHost *This = OLECMD_THIS(iface); - FIXME("(%p)->(%s %d %d %p %p)\n", This, debugstr_guid(pguidCmdGroup), nCmdID, - nCmdexecopt, pvaIn, pvaOut); + + TRACE("(%p)->(%s %d %d %p %p)\n", This, debugstr_guid(pguidCmdGroup), nCmdID, + nCmdexecopt, debugstr_variant(pvaIn), debugstr_variant(pvaOut)); + + if(!pguidCmdGroup) { + FIXME("Unimplemented cmdid %d\n", nCmdID); + return E_NOTIMPL; + } + + if(IsEqualGUID(pguidCmdGroup, &CGID_DocHostCmdPriv)) { + switch(nCmdID) { + case DOCHOST_DOCCANNAVIGATE: + if(!pvaIn || V_VT(pvaIn) != VT_UNKNOWN) + return E_INVALIDARG; + + if(This->doc_navigate) + IUnknown_Release(This->doc_navigate); + IUnknown_AddRef(V_UNKNOWN(pvaIn)); + This->doc_navigate = V_UNKNOWN(pvaIn); + return S_OK; + + default: + FIXME("unsupported command %d of CGID_DocHostCmdPriv\n", nCmdID); + return E_NOTIMPL; + } + } + + FIXME("Unimplemented group %s\n", debugstr_guid(pguidCmdGroup)); return E_NOTIMPL; } diff --git a/dlls/shdocvw/shdocvw.h b/dlls/shdocvw/shdocvw.h index c734f04f5cd..16412226012 100644 --- a/dlls/shdocvw/shdocvw.h +++ b/dlls/shdocvw/shdocvw.h @@ -92,6 +92,7 @@ struct DocHost { IUnknown *document; IOleDocumentView *view; + IUnknown *doc_navigate; HWND hwnd; HWND frame_hwnd; -- 2.11.4.GIT