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

This commit is contained in:
Jacek Caban 2007-03-09 16:50:01 +01:00 committed by Alexandre Julliard
parent 0b48542f1f
commit 72bf4a641e
4 changed files with 19 additions and 1 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -74,9 +74,11 @@ typedef struct {
IDispatch *disp;
IDispatch *client_disp;
IDocHostUIHandler *hostui;
IUnknown *document;
IOleDocumentView *view;
IDocHostUIHandler *hostui;
HWND hwnd;
HWND frame_hwnd;