Jacek Caban : shdocvw: Added mode dispids implementation in
DocHost::Invoke .
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Mar 9 15:47:41 CST 2007
Module: wine
Branch: master
Commit: 72bf4a641e614674a09bad9e9ba451007e8951f9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=72bf4a641e614674a09bad9e9ba451007e8951f9
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Mar 9 16:50:01 2007 +0100
shdocvw: Added mode dispids implementation in DocHost::Invoke.
---
dlls/shdocvw/client.c | 8 ++++++++
dlls/shdocvw/dochost.c | 5 +++++
dlls/shdocvw/oleobject.c | 3 +++
dlls/shdocvw/shdocvw.h | 4 +++-
4 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/dlls/shdocvw/client.c b/dlls/shdocvw/client.c
index c2d71cf..c74918a 100644
--- a/dlls/shdocvw/client.c
+++ b/dlls/shdocvw/client.c
@@ -433,6 +433,14 @@ static HRESULT WINAPI ClDispatch_Invoke(IDispatch *iface, DISPID dispIdMember, R
debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
switch(dispIdMember) {
+ case DISPID_AMBIENT_USERMODE:
+ case DISPID_AMBIENT_DLCONTROL:
+ case DISPID_AMBIENT_USERAGENT:
+ case DISPID_AMBIENT_PALETTE:
+ if(!This->client_disp)
+ return E_FAIL;
+ return IDispatch_Invoke(This->client_disp, dispIdMember, riid, lcid, wFlags,
+ pDispParams, pVarResult, pExcepInfo, puArgErr);
case DISPID_AMBIENT_OFFLINEIFNOTCONNECTED:
V_VT(pVarResult) = VT_BOOL;
V_BOOL(pVarResult) = This->offline;
diff --git a/dlls/shdocvw/dochost.c b/dlls/shdocvw/dochost.c
index 6d51f2e..c170a4a 100644
--- a/dlls/shdocvw/dochost.c
+++ b/dlls/shdocvw/dochost.c
@@ -486,6 +486,8 @@ void DocHost_Init(DocHost *This, IDispatch *disp)
This->disp = disp;
+ This->client_disp = NULL;
+
This->document = NULL;
This->hostui = NULL;
@@ -504,6 +506,9 @@ void DocHost_Init(DocHost *This, IDispatch *disp)
void DocHost_Release(DocHost *This)
{
+ if(This->client_disp)
+ IDispatch_Release(This->client_disp);
+
DocHost_ClientSite_Release(This);
ConnectionPointContainer_Destroy(&This->cps);
diff --git a/dlls/shdocvw/oleobject.c b/dlls/shdocvw/oleobject.c
index 307fe0b..17f740a 100644
--- a/dlls/shdocvw/oleobject.c
+++ b/dlls/shdocvw/oleobject.c
@@ -307,6 +307,9 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, LPOLECLIENTSITE
IOleClientSite_AddRef(pClientSite);
+ IOleClientSite_QueryInterface(This->client, &IID_IDispatch,
+ (void**)&This->doc_host.client_disp);
+
IOleClientSite_QueryInterface(This->client, &IID_IDocHostUIHandler,
(void**)&This->doc_host.hostui);
diff --git a/dlls/shdocvw/shdocvw.h b/dlls/shdocvw/shdocvw.h
index 78b43d2..0f897e7 100644
--- a/dlls/shdocvw/shdocvw.h
+++ b/dlls/shdocvw/shdocvw.h
@@ -74,9 +74,11 @@ typedef struct {
IDispatch *disp;
+ IDispatch *client_disp;
+ IDocHostUIHandler *hostui;
+
IUnknown *document;
IOleDocumentView *view;
- IDocHostUIHandler *hostui;
HWND hwnd;
HWND frame_hwnd;
More information about the wine-cvs
mailing list