Commit 72bf4a64 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

shdocvw: Added mode dispids implementation in DocHost::Invoke.

parent 0b48542f
......@@ -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;
......
......@@ -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);
......
......@@ -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);
......
......@@ -74,9 +74,11 @@ typedef struct {
IDispatch *disp;
IDispatch *client_disp;
IDocHostUIHandler *hostui;
IUnknown *document;
IOleDocumentView *view;
IDocHostUIHandler *hostui;
HWND hwnd;
HWND frame_hwnd;
......
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