shdocvw: Get rid of DocHost-related *_THIS macros.

This commit is contained in:
Jacek Caban 2010-11-13 17:48:09 +01:00 committed by Alexandre Julliard
parent ca353c9b7e
commit 538a870b89
3 changed files with 113 additions and 123 deletions

View File

@ -42,31 +42,31 @@ static HRESULT WINAPI ClientSite_QueryInterface(IOleClientSite *iface, REFIID ri
*ppv = &This->IOleClientSite_iface; *ppv = &This->IOleClientSite_iface;
}else if(IsEqualGUID(&IID_IOleWindow, riid)) { }else if(IsEqualGUID(&IID_IOleWindow, riid)) {
TRACE("(%p)->(IID_IOleWindow %p)\n", This, ppv); TRACE("(%p)->(IID_IOleWindow %p)\n", This, ppv);
*ppv = INPLACESITE(This); *ppv = &This->IOleInPlaceSite_iface;
}else if(IsEqualGUID(&IID_IOleInPlaceSite, riid)) { }else if(IsEqualGUID(&IID_IOleInPlaceSite, riid)) {
TRACE("(%p)->(IID_IOleInPlaceSite %p)\n", This, ppv); TRACE("(%p)->(IID_IOleInPlaceSite %p)\n", This, ppv);
*ppv = INPLACESITE(This); *ppv = &This->IOleInPlaceSite_iface;
}else if(IsEqualGUID(&IID_IDocHostUIHandler, riid)) { }else if(IsEqualGUID(&IID_IDocHostUIHandler, riid)) {
TRACE("(%p)->(IID_IDocHostUIHandler %p)\n", This, ppv); TRACE("(%p)->(IID_IDocHostUIHandler %p)\n", This, ppv);
*ppv = DOCHOSTUI(This); *ppv = &This->IDocHostUIHandler2_iface;
}else if(IsEqualGUID(&IID_IDocHostUIHandler2, riid)) { }else if(IsEqualGUID(&IID_IDocHostUIHandler2, riid)) {
TRACE("(%p)->(IID_IDocHostUIHandler2 %p)\n", This, ppv); TRACE("(%p)->(IID_IDocHostUIHandler2 %p)\n", This, ppv);
*ppv = DOCHOSTUI2(This); *ppv = &This->IDocHostUIHandler2_iface;
}else if(IsEqualGUID(&IID_IOleDocumentSite, riid)) { }else if(IsEqualGUID(&IID_IOleDocumentSite, riid)) {
TRACE("(%p)->(IID_IOleDocumentSite %p)\n", This, ppv); TRACE("(%p)->(IID_IOleDocumentSite %p)\n", This, ppv);
*ppv = DOCSITE(This); *ppv = &This->IOleDocumentSite_iface;
}else if(IsEqualGUID(&IID_IOleCommandTarget, riid)) { }else if(IsEqualGUID(&IID_IOleCommandTarget, riid)) {
TRACE("(%p)->(IID_IOleCommandTarget %p)\n", This, ppv); TRACE("(%p)->(IID_IOleCommandTarget %p)\n", This, ppv);
*ppv = OLECMD(This); *ppv = &This->IOleCommandTarget_iface;
}else if(IsEqualGUID(&IID_IDispatch, riid)) { }else if(IsEqualGUID(&IID_IDispatch, riid)) {
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv); TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
*ppv = CLDISP(This); *ppv = &This->IDispatch_iface;
}else if(IsEqualGUID(&IID_IPropertyNotifySink, riid)) { }else if(IsEqualGUID(&IID_IPropertyNotifySink, riid)) {
TRACE("(%p)->(IID_IPropertyNotifySink %p)\n", This, ppv); TRACE("(%p)->(IID_IPropertyNotifySink %p)\n", This, ppv);
*ppv = PROPNOTIF(This); *ppv = &This->IPropertyNotifySink_iface;
}else if(IsEqualGUID(&IID_IServiceProvider, riid)) { }else if(IsEqualGUID(&IID_IServiceProvider, riid)) {
TRACE("(%p)->(IID_IServiceProvider %p)\n", This, ppv); TRACE("(%p)->(IID_IServiceProvider %p)\n", This, ppv);
*ppv = SERVPROV(This); *ppv = &This->IServiceProvider_iface;
}else { }else {
*ppv = NULL; *ppv = NULL;
WARN("Unsupported interface %s\n", debugstr_guid(riid)); WARN("Unsupported interface %s\n", debugstr_guid(riid));
@ -144,29 +144,32 @@ static const IOleClientSiteVtbl OleClientSiteVtbl = {
ClientSite_RequestNewObjectLayout ClientSite_RequestNewObjectLayout
}; };
#define INPLACESITE_THIS(iface) DEFINE_THIS(DocHost, OleInPlaceSite, iface) static inline DocHost *impl_from_IOleInPlaceSite(IOleInPlaceSite *iface)
{
return (DocHost*)((char*)iface - FIELD_OFFSET(DocHost, IOleInPlaceSite_iface));
}
static HRESULT WINAPI InPlaceSite_QueryInterface(IOleInPlaceSite *iface, REFIID riid, void **ppv) static HRESULT WINAPI InPlaceSite_QueryInterface(IOleInPlaceSite *iface, REFIID riid, void **ppv)
{ {
DocHost *This = INPLACESITE_THIS(iface); DocHost *This = impl_from_IOleInPlaceSite(iface);
return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv); return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
} }
static ULONG WINAPI InPlaceSite_AddRef(IOleInPlaceSite *iface) static ULONG WINAPI InPlaceSite_AddRef(IOleInPlaceSite *iface)
{ {
DocHost *This = INPLACESITE_THIS(iface); DocHost *This = impl_from_IOleInPlaceSite(iface);
return IOleClientSite_AddRef(&This->IOleClientSite_iface); return IOleClientSite_AddRef(&This->IOleClientSite_iface);
} }
static ULONG WINAPI InPlaceSite_Release(IOleInPlaceSite *iface) static ULONG WINAPI InPlaceSite_Release(IOleInPlaceSite *iface)
{ {
DocHost *This = INPLACESITE_THIS(iface); DocHost *This = impl_from_IOleInPlaceSite(iface);
return IOleClientSite_Release(&This->IOleClientSite_iface); return IOleClientSite_Release(&This->IOleClientSite_iface);
} }
static HRESULT WINAPI InPlaceSite_GetWindow(IOleInPlaceSite *iface, HWND *phwnd) static HRESULT WINAPI InPlaceSite_GetWindow(IOleInPlaceSite *iface, HWND *phwnd)
{ {
DocHost *This = INPLACESITE_THIS(iface); DocHost *This = impl_from_IOleInPlaceSite(iface);
TRACE("(%p)->(%p)\n", This, phwnd); TRACE("(%p)->(%p)\n", This, phwnd);
@ -176,14 +179,14 @@ static HRESULT WINAPI InPlaceSite_GetWindow(IOleInPlaceSite *iface, HWND *phwnd)
static HRESULT WINAPI InPlaceSite_ContextSensitiveHelp(IOleInPlaceSite *iface, BOOL fEnterMode) static HRESULT WINAPI InPlaceSite_ContextSensitiveHelp(IOleInPlaceSite *iface, BOOL fEnterMode)
{ {
DocHost *This = INPLACESITE_THIS(iface); DocHost *This = impl_from_IOleInPlaceSite(iface);
FIXME("(%p)->(%x)\n", This, fEnterMode); FIXME("(%p)->(%x)\n", This, fEnterMode);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI InPlaceSite_CanInPlaceActivate(IOleInPlaceSite *iface) static HRESULT WINAPI InPlaceSite_CanInPlaceActivate(IOleInPlaceSite *iface)
{ {
DocHost *This = INPLACESITE_THIS(iface); DocHost *This = impl_from_IOleInPlaceSite(iface);
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
@ -193,7 +196,7 @@ static HRESULT WINAPI InPlaceSite_CanInPlaceActivate(IOleInPlaceSite *iface)
static HRESULT WINAPI InPlaceSite_OnInPlaceActivate(IOleInPlaceSite *iface) static HRESULT WINAPI InPlaceSite_OnInPlaceActivate(IOleInPlaceSite *iface)
{ {
DocHost *This = INPLACESITE_THIS(iface); DocHost *This = impl_from_IOleInPlaceSite(iface);
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
@ -203,7 +206,7 @@ static HRESULT WINAPI InPlaceSite_OnInPlaceActivate(IOleInPlaceSite *iface)
static HRESULT WINAPI InPlaceSite_OnUIActivate(IOleInPlaceSite *iface) static HRESULT WINAPI InPlaceSite_OnUIActivate(IOleInPlaceSite *iface)
{ {
DocHost *This = INPLACESITE_THIS(iface); DocHost *This = impl_from_IOleInPlaceSite(iface);
FIXME("(%p)\n", This); FIXME("(%p)\n", This);
return E_NOTIMPL; return E_NOTIMPL;
} }
@ -212,7 +215,7 @@ static HRESULT WINAPI InPlaceSite_GetWindowContext(IOleInPlaceSite *iface,
IOleInPlaceFrame **ppFrame, IOleInPlaceUIWindow **ppDoc, LPRECT lprcPosRect, IOleInPlaceFrame **ppFrame, IOleInPlaceUIWindow **ppDoc, LPRECT lprcPosRect,
LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO lpFrameInfo) LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO lpFrameInfo)
{ {
DocHost *This = INPLACESITE_THIS(iface); DocHost *This = impl_from_IOleInPlaceSite(iface);
TRACE("(%p)->(%p %p %p %p %p)\n", This, ppFrame, ppDoc, lprcPosRect, TRACE("(%p)->(%p %p %p %p %p)\n", This, ppFrame, ppDoc, lprcPosRect,
lprcClipRect, lpFrameInfo); lprcClipRect, lpFrameInfo);
@ -235,21 +238,21 @@ static HRESULT WINAPI InPlaceSite_GetWindowContext(IOleInPlaceSite *iface,
static HRESULT WINAPI InPlaceSite_Scroll(IOleInPlaceSite *iface, SIZE scrollExtent) static HRESULT WINAPI InPlaceSite_Scroll(IOleInPlaceSite *iface, SIZE scrollExtent)
{ {
DocHost *This = INPLACESITE_THIS(iface); DocHost *This = impl_from_IOleInPlaceSite(iface);
FIXME("(%p)->({%d %d})\n", This, scrollExtent.cx, scrollExtent.cy); FIXME("(%p)->({%d %d})\n", This, scrollExtent.cx, scrollExtent.cy);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI InPlaceSite_OnUIDeactivate(IOleInPlaceSite *iface, BOOL fUndoable) static HRESULT WINAPI InPlaceSite_OnUIDeactivate(IOleInPlaceSite *iface, BOOL fUndoable)
{ {
DocHost *This = INPLACESITE_THIS(iface); DocHost *This = impl_from_IOleInPlaceSite(iface);
FIXME("(%p)->(%x)\n", This, fUndoable); FIXME("(%p)->(%x)\n", This, fUndoable);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI InPlaceSite_OnInPlaceDeactivate(IOleInPlaceSite *iface) static HRESULT WINAPI InPlaceSite_OnInPlaceDeactivate(IOleInPlaceSite *iface)
{ {
DocHost *This = INPLACESITE_THIS(iface); DocHost *This = impl_from_IOleInPlaceSite(iface);
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
@ -259,14 +262,14 @@ static HRESULT WINAPI InPlaceSite_OnInPlaceDeactivate(IOleInPlaceSite *iface)
static HRESULT WINAPI InPlaceSite_DiscardUndoState(IOleInPlaceSite *iface) static HRESULT WINAPI InPlaceSite_DiscardUndoState(IOleInPlaceSite *iface)
{ {
DocHost *This = INPLACESITE_THIS(iface); DocHost *This = impl_from_IOleInPlaceSite(iface);
FIXME("(%p)\n", This); FIXME("(%p)\n", This);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI InPlaceSite_DeactivateAndUndo(IOleInPlaceSite *iface) static HRESULT WINAPI InPlaceSite_DeactivateAndUndo(IOleInPlaceSite *iface)
{ {
DocHost *This = INPLACESITE_THIS(iface); DocHost *This = impl_from_IOleInPlaceSite(iface);
FIXME("(%p)\n", This); FIXME("(%p)\n", This);
return E_NOTIMPL; return E_NOTIMPL;
} }
@ -274,7 +277,7 @@ static HRESULT WINAPI InPlaceSite_DeactivateAndUndo(IOleInPlaceSite *iface)
static HRESULT WINAPI InPlaceSite_OnPosRectChange(IOleInPlaceSite *iface, static HRESULT WINAPI InPlaceSite_OnPosRectChange(IOleInPlaceSite *iface,
LPCRECT lprcPosRect) LPCRECT lprcPosRect)
{ {
DocHost *This = INPLACESITE_THIS(iface); DocHost *This = impl_from_IOleInPlaceSite(iface);
FIXME("(%p)->(%p)\n", This, lprcPosRect); FIXME("(%p)->(%p)\n", This, lprcPosRect);
return E_NOTIMPL; return E_NOTIMPL;
} }
@ -297,31 +300,34 @@ static const IOleInPlaceSiteVtbl OleInPlaceSiteVtbl = {
InPlaceSite_OnPosRectChange InPlaceSite_OnPosRectChange
}; };
#define DOCSITE_THIS(iface) DEFINE_THIS(DocHost, OleDocumentSite, iface) static inline DocHost *impl_from_IOleDocumentSite(IOleDocumentSite *iface)
{
return (DocHost*)((char*)iface - FIELD_OFFSET(DocHost, IOleDocumentSite_iface));
}
static HRESULT WINAPI OleDocumentSite_QueryInterface(IOleDocumentSite *iface, static HRESULT WINAPI OleDocumentSite_QueryInterface(IOleDocumentSite *iface,
REFIID riid, void **ppv) REFIID riid, void **ppv)
{ {
DocHost *This = DOCSITE_THIS(iface); DocHost *This = impl_from_IOleDocumentSite(iface);
return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv); return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
} }
static ULONG WINAPI OleDocumentSite_AddRef(IOleDocumentSite *iface) static ULONG WINAPI OleDocumentSite_AddRef(IOleDocumentSite *iface)
{ {
DocHost *This = DOCSITE_THIS(iface); DocHost *This = impl_from_IOleDocumentSite(iface);
return IOleClientSite_AddRef(&This->IOleClientSite_iface); return IOleClientSite_AddRef(&This->IOleClientSite_iface);
} }
static ULONG WINAPI OleDocumentSite_Release(IOleDocumentSite *iface) static ULONG WINAPI OleDocumentSite_Release(IOleDocumentSite *iface)
{ {
DocHost *This = DOCSITE_THIS(iface); DocHost *This = impl_from_IOleDocumentSite(iface);
return IOleClientSite_Release(&This->IOleClientSite_iface); return IOleClientSite_Release(&This->IOleClientSite_iface);
} }
static HRESULT WINAPI OleDocumentSite_ActivateMe(IOleDocumentSite *iface, static HRESULT WINAPI OleDocumentSite_ActivateMe(IOleDocumentSite *iface,
IOleDocumentView *pViewToActivate) IOleDocumentView *pViewToActivate)
{ {
DocHost *This = DOCSITE_THIS(iface); DocHost *This = impl_from_IOleDocumentSite(iface);
IOleDocument *oledoc; IOleDocument *oledoc;
RECT rect; RECT rect;
HRESULT hres; HRESULT hres;
@ -332,7 +338,7 @@ static HRESULT WINAPI OleDocumentSite_ActivateMe(IOleDocumentSite *iface,
if(FAILED(hres)) if(FAILED(hres))
return hres; return hres;
IOleDocument_CreateView(oledoc, INPLACESITE(This), NULL, 0, &This->view); IOleDocument_CreateView(oledoc, &This->IOleInPlaceSite_iface, NULL, 0, &This->view);
IOleDocument_Release(oledoc); IOleDocument_Release(oledoc);
GetClientRect(This->hwnd, &rect); GetClientRect(This->hwnd, &rect);
@ -350,29 +356,32 @@ static const IOleDocumentSiteVtbl OleDocumentSiteVtbl = {
OleDocumentSite_ActivateMe OleDocumentSite_ActivateMe
}; };
#define DISP_THIS(iface) DEFINE_THIS(DocHost, Dispatch, iface) static inline DocHost *impl_from_IDispatch(IDispatch *iface)
{
return (DocHost*)((char*)iface - FIELD_OFFSET(DocHost, IDispatch_iface));
}
static HRESULT WINAPI ClDispatch_QueryInterface(IDispatch *iface, REFIID riid, void **ppv) static HRESULT WINAPI ClDispatch_QueryInterface(IDispatch *iface, REFIID riid, void **ppv)
{ {
DocHost *This = DISP_THIS(iface); DocHost *This = impl_from_IDispatch(iface);
return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv); return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
} }
static ULONG WINAPI ClDispatch_AddRef(IDispatch *iface) static ULONG WINAPI ClDispatch_AddRef(IDispatch *iface)
{ {
DocHost *This = DISP_THIS(iface); DocHost *This = impl_from_IDispatch(iface);
return IOleClientSite_AddRef(&This->IOleClientSite_iface); return IOleClientSite_AddRef(&This->IOleClientSite_iface);
} }
static ULONG WINAPI ClDispatch_Release(IDispatch *iface) static ULONG WINAPI ClDispatch_Release(IDispatch *iface)
{ {
DocHost *This = DISP_THIS(iface); DocHost *This = impl_from_IDispatch(iface);
return IOleClientSite_Release(&This->IOleClientSite_iface); return IOleClientSite_Release(&This->IOleClientSite_iface);
} }
static HRESULT WINAPI ClDispatch_GetTypeInfoCount(IDispatch *iface, UINT *pctinfo) static HRESULT WINAPI ClDispatch_GetTypeInfoCount(IDispatch *iface, UINT *pctinfo)
{ {
DocHost *This = DISP_THIS(iface); DocHost *This = impl_from_IDispatch(iface);
TRACE("(%p)->(%p)\n", This, pctinfo); TRACE("(%p)->(%p)\n", This, pctinfo);
@ -382,7 +391,7 @@ static HRESULT WINAPI ClDispatch_GetTypeInfoCount(IDispatch *iface, UINT *pctinf
static HRESULT WINAPI ClDispatch_GetTypeInfo(IDispatch *iface, UINT iTInfo, LCID lcid, static HRESULT WINAPI ClDispatch_GetTypeInfo(IDispatch *iface, UINT iTInfo, LCID lcid,
ITypeInfo **ppTInfo) ITypeInfo **ppTInfo)
{ {
DocHost *This = DISP_THIS(iface); DocHost *This = impl_from_IDispatch(iface);
TRACE("(%p)->(%u %d %p)\n", This, iTInfo, lcid, ppTInfo); TRACE("(%p)->(%u %d %p)\n", This, iTInfo, lcid, ppTInfo);
@ -392,7 +401,7 @@ static HRESULT WINAPI ClDispatch_GetTypeInfo(IDispatch *iface, UINT iTInfo, LCID
static HRESULT WINAPI ClDispatch_GetIDsOfNames(IDispatch *iface, REFIID riid, LPOLESTR *rgszNames, static HRESULT WINAPI ClDispatch_GetIDsOfNames(IDispatch *iface, REFIID riid, LPOLESTR *rgszNames,
UINT cNames, LCID lcid, DISPID *rgDispId) UINT cNames, LCID lcid, DISPID *rgDispId)
{ {
DocHost *This = DISP_THIS(iface); DocHost *This = impl_from_IDispatch(iface);
TRACE("(%p)->(%s %p %u %d %p)\n", This, debugstr_guid(riid), rgszNames, cNames, TRACE("(%p)->(%s %p %u %d %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
lcid, rgDispId); lcid, rgDispId);
@ -423,7 +432,7 @@ static HRESULT WINAPI ClDispatch_Invoke(IDispatch *iface, DISPID dispIdMember, R
LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
{ {
DocHost *This = DISP_THIS(iface); DocHost *This = impl_from_IDispatch(iface);
TRACE("(%p)->(%s %s %d %04x %p %p %p %p)\n", This, debugstr_dispid(dispIdMember), TRACE("(%p)->(%s %s %d %04x %p %p %p %p)\n", This, debugstr_dispid(dispIdMember),
debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
@ -461,31 +470,34 @@ static const IDispatchVtbl DispatchVtbl = {
ClDispatch_Invoke ClDispatch_Invoke
}; };
#define SERVPROV_THIS(iface) DEFINE_THIS(DocHost, ServiceProvider, iface) static inline DocHost *impl_from_IServiceProvider(IServiceProvider *iface)
{
return (DocHost*)((char*)iface - FIELD_OFFSET(DocHost, IServiceProvider_iface));
}
static HRESULT WINAPI ClServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, static HRESULT WINAPI ClServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid,
void **ppv) void **ppv)
{ {
DocHost *This = SERVPROV_THIS(iface); DocHost *This = impl_from_IServiceProvider(iface);
return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv); return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
} }
static ULONG WINAPI ClServiceProvider_AddRef(IServiceProvider *iface) static ULONG WINAPI ClServiceProvider_AddRef(IServiceProvider *iface)
{ {
DocHost *This = SERVPROV_THIS(iface); DocHost *This = impl_from_IServiceProvider(iface);
return IOleClientSite_AddRef(&This->IOleClientSite_iface); return IOleClientSite_AddRef(&This->IOleClientSite_iface);
} }
static ULONG WINAPI ClServiceProvider_Release(IServiceProvider *iface) static ULONG WINAPI ClServiceProvider_Release(IServiceProvider *iface)
{ {
DocHost *This = SERVPROV_THIS(iface); DocHost *This = impl_from_IServiceProvider(iface);
return IOleClientSite_Release(&This->IOleClientSite_iface); return IOleClientSite_Release(&This->IOleClientSite_iface);
} }
static HRESULT WINAPI ClServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService, static HRESULT WINAPI ClServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService,
REFIID riid, void **ppv) REFIID riid, void **ppv)
{ {
DocHost *This = SERVPROV_THIS(iface); DocHost *This = impl_from_IServiceProvider(iface);
if(IsEqualGUID(&IID_IHlinkFrame, guidService)) { if(IsEqualGUID(&IID_IHlinkFrame, guidService)) {
TRACE("(%p)->(IID_IHlinkFrame %s %p)\n", This, debugstr_guid(riid), ppv); TRACE("(%p)->(IID_IHlinkFrame %s %p)\n", This, debugstr_guid(riid), ppv);
@ -507,12 +519,10 @@ static const IServiceProviderVtbl ServiceProviderVtbl = {
void DocHost_ClientSite_Init(DocHost *This) void DocHost_ClientSite_Init(DocHost *This)
{ {
This->IOleClientSite_iface.lpVtbl = &OleClientSiteVtbl; This->IOleClientSite_iface.lpVtbl = &OleClientSiteVtbl;
This->lpOleInPlaceSiteVtbl = &OleInPlaceSiteVtbl; This->IOleInPlaceSite_iface.lpVtbl = &OleInPlaceSiteVtbl;
This->lpOleDocumentSiteVtbl = &OleDocumentSiteVtbl; This->IOleDocumentSite_iface.lpVtbl = &OleDocumentSiteVtbl;
This->lpDispatchVtbl = &DispatchVtbl; This->IDispatch_iface.lpVtbl = &DispatchVtbl;
This->lpServiceProviderVtbl = &ServiceProviderVtbl; This->IServiceProvider_iface.lpVtbl = &ServiceProviderVtbl;
This->view = NULL;
} }
void DocHost_ClientSite_Release(DocHost *This) void DocHost_ClientSite_Release(DocHost *This)

View File

@ -150,7 +150,7 @@ static void advise_prop_notif(DocHost *This, BOOL set)
return; return;
if(set) if(set)
hres = IConnectionPoint_Advise(cp, (IUnknown*)PROPNOTIF(This), &This->prop_notif_cookie); hres = IConnectionPoint_Advise(cp, (IUnknown*)&This->IPropertyNotifySink_iface, &This->prop_notif_cookie);
else else
hres = IConnectionPoint_Unadvise(cp, This->prop_notif_cookie); hres = IConnectionPoint_Unadvise(cp, This->prop_notif_cookie);
IConnectionPoint_Release(cp); IConnectionPoint_Release(cp);
@ -402,31 +402,34 @@ void release_dochost_client(DocHost *This)
} }
} }
#define OLECMD_THIS(iface) DEFINE_THIS(DocHost, OleCommandTarget, iface) static inline DocHost *impl_from_IOleCommandTarget(IOleCommandTarget *iface)
{
return (DocHost*)((char*)iface - FIELD_OFFSET(DocHost, IOleCommandTarget_iface));
}
static HRESULT WINAPI ClOleCommandTarget_QueryInterface(IOleCommandTarget *iface, static HRESULT WINAPI ClOleCommandTarget_QueryInterface(IOleCommandTarget *iface,
REFIID riid, void **ppv) REFIID riid, void **ppv)
{ {
DocHost *This = OLECMD_THIS(iface); DocHost *This = impl_from_IOleCommandTarget(iface);
return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv); return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
} }
static ULONG WINAPI ClOleCommandTarget_AddRef(IOleCommandTarget *iface) static ULONG WINAPI ClOleCommandTarget_AddRef(IOleCommandTarget *iface)
{ {
DocHost *This = OLECMD_THIS(iface); DocHost *This = impl_from_IOleCommandTarget(iface);
return IOleClientSite_AddRef(&This->IOleClientSite_iface); return IOleClientSite_AddRef(&This->IOleClientSite_iface);
} }
static ULONG WINAPI ClOleCommandTarget_Release(IOleCommandTarget *iface) static ULONG WINAPI ClOleCommandTarget_Release(IOleCommandTarget *iface)
{ {
DocHost *This = OLECMD_THIS(iface); DocHost *This = impl_from_IOleCommandTarget(iface);
return IOleClientSite_Release(&This->IOleClientSite_iface); return IOleClientSite_Release(&This->IOleClientSite_iface);
} }
static HRESULT WINAPI ClOleCommandTarget_QueryStatus(IOleCommandTarget *iface, static HRESULT WINAPI ClOleCommandTarget_QueryStatus(IOleCommandTarget *iface,
const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText) const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText)
{ {
DocHost *This = OLECMD_THIS(iface); DocHost *This = impl_from_IOleCommandTarget(iface);
ULONG i= 0; ULONG i= 0;
FIXME("(%p)->(%s %u %p %p)\n", This, debugstr_guid(pguidCmdGroup), cCmds, prgCmds, FIXME("(%p)->(%s %u %p %p)\n", This, debugstr_guid(pguidCmdGroup), cCmds, prgCmds,
pCmdText); pCmdText);
@ -441,7 +444,7 @@ static HRESULT WINAPI ClOleCommandTarget_Exec(IOleCommandTarget *iface,
const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn,
VARIANT *pvaOut) VARIANT *pvaOut)
{ {
DocHost *This = OLECMD_THIS(iface); DocHost *This = impl_from_IOleCommandTarget(iface);
TRACE("(%p)->(%s %d %d %p %p)\n", This, debugstr_guid(pguidCmdGroup), nCmdID, TRACE("(%p)->(%s %d %d %p %p)\n", This, debugstr_guid(pguidCmdGroup), nCmdID,
nCmdexecopt, debugstr_variant(pvaIn), debugstr_variant(pvaOut)); nCmdexecopt, debugstr_variant(pvaIn), debugstr_variant(pvaOut));
@ -479,7 +482,7 @@ static HRESULT WINAPI ClOleCommandTarget_Exec(IOleCommandTarget *iface,
return E_NOTIMPL; return E_NOTIMPL;
} }
#undef OLECMD_THIS #undef impl_from_IOleCommandTarget
static const IOleCommandTargetVtbl OleCommandTargetVtbl = { static const IOleCommandTargetVtbl OleCommandTargetVtbl = {
ClOleCommandTarget_QueryInterface, ClOleCommandTarget_QueryInterface,
@ -489,31 +492,34 @@ static const IOleCommandTargetVtbl OleCommandTargetVtbl = {
ClOleCommandTarget_Exec ClOleCommandTarget_Exec
}; };
#define DOCHOSTUI_THIS(iface) DEFINE_THIS(DocHost, DocHostUIHandler, iface) static inline DocHost *impl_from_IDocHostUIHandler2(IDocHostUIHandler2 *iface)
{
return (DocHost*)((char*)iface - FIELD_OFFSET(DocHost, IDocHostUIHandler2_iface));
}
static HRESULT WINAPI DocHostUIHandler_QueryInterface(IDocHostUIHandler2 *iface, static HRESULT WINAPI DocHostUIHandler_QueryInterface(IDocHostUIHandler2 *iface,
REFIID riid, void **ppv) REFIID riid, void **ppv)
{ {
DocHost *This = DOCHOSTUI_THIS(iface); DocHost *This = impl_from_IDocHostUIHandler2(iface);
return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv); return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
} }
static ULONG WINAPI DocHostUIHandler_AddRef(IDocHostUIHandler2 *iface) static ULONG WINAPI DocHostUIHandler_AddRef(IDocHostUIHandler2 *iface)
{ {
DocHost *This = DOCHOSTUI_THIS(iface); DocHost *This = impl_from_IDocHostUIHandler2(iface);
return IOleClientSite_AddRef(&This->IOleClientSite_iface); return IOleClientSite_AddRef(&This->IOleClientSite_iface);
} }
static ULONG WINAPI DocHostUIHandler_Release(IDocHostUIHandler2 *iface) static ULONG WINAPI DocHostUIHandler_Release(IDocHostUIHandler2 *iface)
{ {
DocHost *This = DOCHOSTUI_THIS(iface); DocHost *This = impl_from_IDocHostUIHandler2(iface);
return IOleClientSite_Release(&This->IOleClientSite_iface); return IOleClientSite_Release(&This->IOleClientSite_iface);
} }
static HRESULT WINAPI DocHostUIHandler_ShowContextMenu(IDocHostUIHandler2 *iface, static HRESULT WINAPI DocHostUIHandler_ShowContextMenu(IDocHostUIHandler2 *iface,
DWORD dwID, POINT *ppt, IUnknown *pcmdtReserved, IDispatch *pdispReserved) DWORD dwID, POINT *ppt, IUnknown *pcmdtReserved, IDispatch *pdispReserved)
{ {
DocHost *This = DOCHOSTUI_THIS(iface); DocHost *This = impl_from_IDocHostUIHandler2(iface);
HRESULT hres; HRESULT hres;
TRACE("(%p)->(%d %p %p %p)\n", This, dwID, ppt, pcmdtReserved, pdispReserved); TRACE("(%p)->(%d %p %p %p)\n", This, dwID, ppt, pcmdtReserved, pdispReserved);
@ -532,7 +538,7 @@ static HRESULT WINAPI DocHostUIHandler_ShowContextMenu(IDocHostUIHandler2 *iface
static HRESULT WINAPI DocHostUIHandler_GetHostInfo(IDocHostUIHandler2 *iface, static HRESULT WINAPI DocHostUIHandler_GetHostInfo(IDocHostUIHandler2 *iface,
DOCHOSTUIINFO *pInfo) DOCHOSTUIINFO *pInfo)
{ {
DocHost *This = DOCHOSTUI_THIS(iface); DocHost *This = impl_from_IDocHostUIHandler2(iface);
HRESULT hres; HRESULT hres;
TRACE("(%p)->(%p)\n", This, pInfo); TRACE("(%p)->(%p)\n", This, pInfo);
@ -553,7 +559,7 @@ static HRESULT WINAPI DocHostUIHandler_ShowUI(IDocHostUIHandler2 *iface, DWORD d
IOleInPlaceActiveObject *pActiveObject, IOleCommandTarget *pCommandTarget, IOleInPlaceActiveObject *pActiveObject, IOleCommandTarget *pCommandTarget,
IOleInPlaceFrame *pFrame, IOleInPlaceUIWindow *pDoc) IOleInPlaceFrame *pFrame, IOleInPlaceUIWindow *pDoc)
{ {
DocHost *This = DOCHOSTUI_THIS(iface); DocHost *This = impl_from_IDocHostUIHandler2(iface);
FIXME("(%p)->(%d %p %p %p %p)\n", This, dwID, pActiveObject, pCommandTarget, FIXME("(%p)->(%d %p %p %p %p)\n", This, dwID, pActiveObject, pCommandTarget,
pFrame, pDoc); pFrame, pDoc);
return E_NOTIMPL; return E_NOTIMPL;
@ -561,14 +567,14 @@ static HRESULT WINAPI DocHostUIHandler_ShowUI(IDocHostUIHandler2 *iface, DWORD d
static HRESULT WINAPI DocHostUIHandler_HideUI(IDocHostUIHandler2 *iface) static HRESULT WINAPI DocHostUIHandler_HideUI(IDocHostUIHandler2 *iface)
{ {
DocHost *This = DOCHOSTUI_THIS(iface); DocHost *This = impl_from_IDocHostUIHandler2(iface);
FIXME("(%p)\n", This); FIXME("(%p)\n", This);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI DocHostUIHandler_UpdateUI(IDocHostUIHandler2 *iface) static HRESULT WINAPI DocHostUIHandler_UpdateUI(IDocHostUIHandler2 *iface)
{ {
DocHost *This = DOCHOSTUI_THIS(iface); DocHost *This = impl_from_IDocHostUIHandler2(iface);
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
@ -581,7 +587,7 @@ static HRESULT WINAPI DocHostUIHandler_UpdateUI(IDocHostUIHandler2 *iface)
static HRESULT WINAPI DocHostUIHandler_EnableModeless(IDocHostUIHandler2 *iface, static HRESULT WINAPI DocHostUIHandler_EnableModeless(IDocHostUIHandler2 *iface,
BOOL fEnable) BOOL fEnable)
{ {
DocHost *This = DOCHOSTUI_THIS(iface); DocHost *This = impl_from_IDocHostUIHandler2(iface);
FIXME("(%p)->(%x)\n", This, fEnable); FIXME("(%p)->(%x)\n", This, fEnable);
return E_NOTIMPL; return E_NOTIMPL;
} }
@ -589,7 +595,7 @@ static HRESULT WINAPI DocHostUIHandler_EnableModeless(IDocHostUIHandler2 *iface,
static HRESULT WINAPI DocHostUIHandler_OnDocWindowActivate(IDocHostUIHandler2 *iface, static HRESULT WINAPI DocHostUIHandler_OnDocWindowActivate(IDocHostUIHandler2 *iface,
BOOL fActivate) BOOL fActivate)
{ {
DocHost *This = DOCHOSTUI_THIS(iface); DocHost *This = impl_from_IDocHostUIHandler2(iface);
FIXME("(%p)->(%x)\n", This, fActivate); FIXME("(%p)->(%x)\n", This, fActivate);
return E_NOTIMPL; return E_NOTIMPL;
} }
@ -597,7 +603,7 @@ static HRESULT WINAPI DocHostUIHandler_OnDocWindowActivate(IDocHostUIHandler2 *i
static HRESULT WINAPI DocHostUIHandler_OnFrameWindowActivate(IDocHostUIHandler2 *iface, static HRESULT WINAPI DocHostUIHandler_OnFrameWindowActivate(IDocHostUIHandler2 *iface,
BOOL fActivate) BOOL fActivate)
{ {
DocHost *This = DOCHOSTUI_THIS(iface); DocHost *This = impl_from_IDocHostUIHandler2(iface);
FIXME("(%p)->(%x)\n", This, fActivate); FIXME("(%p)->(%x)\n", This, fActivate);
return E_NOTIMPL; return E_NOTIMPL;
} }
@ -605,7 +611,7 @@ static HRESULT WINAPI DocHostUIHandler_OnFrameWindowActivate(IDocHostUIHandler2
static HRESULT WINAPI DocHostUIHandler_ResizeBorder(IDocHostUIHandler2 *iface, static HRESULT WINAPI DocHostUIHandler_ResizeBorder(IDocHostUIHandler2 *iface,
LPCRECT prcBorder, IOleInPlaceUIWindow *pUIWindow, BOOL fRameWindow) LPCRECT prcBorder, IOleInPlaceUIWindow *pUIWindow, BOOL fRameWindow)
{ {
DocHost *This = DOCHOSTUI_THIS(iface); DocHost *This = impl_from_IDocHostUIHandler2(iface);
FIXME("(%p)->(%p %p %X)\n", This, prcBorder, pUIWindow, fRameWindow); FIXME("(%p)->(%p %p %X)\n", This, prcBorder, pUIWindow, fRameWindow);
return E_NOTIMPL; return E_NOTIMPL;
} }
@ -613,7 +619,7 @@ static HRESULT WINAPI DocHostUIHandler_ResizeBorder(IDocHostUIHandler2 *iface,
static HRESULT WINAPI DocHostUIHandler_TranslateAccelerator(IDocHostUIHandler2 *iface, static HRESULT WINAPI DocHostUIHandler_TranslateAccelerator(IDocHostUIHandler2 *iface,
LPMSG lpMsg, const GUID *pguidCmdGroup, DWORD nCmdID) LPMSG lpMsg, const GUID *pguidCmdGroup, DWORD nCmdID)
{ {
DocHost *This = DOCHOSTUI_THIS(iface); DocHost *This = impl_from_IDocHostUIHandler2(iface);
FIXME("(%p)->(%p %p %d)\n", This, lpMsg, pguidCmdGroup, nCmdID); FIXME("(%p)->(%p %p %d)\n", This, lpMsg, pguidCmdGroup, nCmdID);
return E_NOTIMPL; return E_NOTIMPL;
} }
@ -621,7 +627,7 @@ static HRESULT WINAPI DocHostUIHandler_TranslateAccelerator(IDocHostUIHandler2 *
static HRESULT WINAPI DocHostUIHandler_GetOptionKeyPath(IDocHostUIHandler2 *iface, static HRESULT WINAPI DocHostUIHandler_GetOptionKeyPath(IDocHostUIHandler2 *iface,
LPOLESTR *pchKey, DWORD dw) LPOLESTR *pchKey, DWORD dw)
{ {
DocHost *This = DOCHOSTUI_THIS(iface); DocHost *This = impl_from_IDocHostUIHandler2(iface);
TRACE("(%p)->(%p %d)\n", This, pchKey, dw); TRACE("(%p)->(%p %d)\n", This, pchKey, dw);
@ -634,7 +640,7 @@ static HRESULT WINAPI DocHostUIHandler_GetOptionKeyPath(IDocHostUIHandler2 *ifac
static HRESULT WINAPI DocHostUIHandler_GetDropTarget(IDocHostUIHandler2 *iface, static HRESULT WINAPI DocHostUIHandler_GetDropTarget(IDocHostUIHandler2 *iface,
IDropTarget *pDropTarget, IDropTarget **ppDropTarget) IDropTarget *pDropTarget, IDropTarget **ppDropTarget)
{ {
DocHost *This = DOCHOSTUI_THIS(iface); DocHost *This = impl_from_IDocHostUIHandler2(iface);
FIXME("(%p)\n", This); FIXME("(%p)\n", This);
return E_NOTIMPL; return E_NOTIMPL;
} }
@ -642,7 +648,7 @@ static HRESULT WINAPI DocHostUIHandler_GetDropTarget(IDocHostUIHandler2 *iface,
static HRESULT WINAPI DocHostUIHandler_GetExternal(IDocHostUIHandler2 *iface, static HRESULT WINAPI DocHostUIHandler_GetExternal(IDocHostUIHandler2 *iface,
IDispatch **ppDispatch) IDispatch **ppDispatch)
{ {
DocHost *This = DOCHOSTUI_THIS(iface); DocHost *This = impl_from_IDocHostUIHandler2(iface);
TRACE("(%p)->(%p)\n", This, ppDispatch); TRACE("(%p)->(%p)\n", This, ppDispatch);
@ -656,7 +662,7 @@ static HRESULT WINAPI DocHostUIHandler_GetExternal(IDocHostUIHandler2 *iface,
static HRESULT WINAPI DocHostUIHandler_TranslateUrl(IDocHostUIHandler2 *iface, static HRESULT WINAPI DocHostUIHandler_TranslateUrl(IDocHostUIHandler2 *iface,
DWORD dwTranslate, OLECHAR *pchURLIn, OLECHAR **ppchURLOut) DWORD dwTranslate, OLECHAR *pchURLIn, OLECHAR **ppchURLOut)
{ {
DocHost *This = DOCHOSTUI_THIS(iface); DocHost *This = impl_from_IDocHostUIHandler2(iface);
TRACE("(%p)->(%d %s %p)\n", This, dwTranslate, debugstr_w(pchURLIn), ppchURLOut); TRACE("(%p)->(%d %s %p)\n", This, dwTranslate, debugstr_w(pchURLIn), ppchURLOut);
@ -670,7 +676,7 @@ static HRESULT WINAPI DocHostUIHandler_TranslateUrl(IDocHostUIHandler2 *iface,
static HRESULT WINAPI DocHostUIHandler_FilterDataObject(IDocHostUIHandler2 *iface, static HRESULT WINAPI DocHostUIHandler_FilterDataObject(IDocHostUIHandler2 *iface,
IDataObject *pDO, IDataObject **ppDORet) IDataObject *pDO, IDataObject **ppDORet)
{ {
DocHost *This = DOCHOSTUI_THIS(iface); DocHost *This = impl_from_IDocHostUIHandler2(iface);
FIXME("(%p)->(%p %p)\n", This, pDO, ppDORet); FIXME("(%p)->(%p %p)\n", This, pDO, ppDORet);
return E_NOTIMPL; return E_NOTIMPL;
} }
@ -678,7 +684,7 @@ static HRESULT WINAPI DocHostUIHandler_FilterDataObject(IDocHostUIHandler2 *ifac
static HRESULT WINAPI DocHostUIHandler_GetOverrideKeyPath(IDocHostUIHandler2 *iface, static HRESULT WINAPI DocHostUIHandler_GetOverrideKeyPath(IDocHostUIHandler2 *iface,
LPOLESTR *pchKey, DWORD dw) LPOLESTR *pchKey, DWORD dw)
{ {
DocHost *This = DOCHOSTUI_THIS(iface); DocHost *This = impl_from_IDocHostUIHandler2(iface);
IDocHostUIHandler2 *handler; IDocHostUIHandler2 *handler;
HRESULT hres; HRESULT hres;
@ -698,8 +704,6 @@ static HRESULT WINAPI DocHostUIHandler_GetOverrideKeyPath(IDocHostUIHandler2 *if
return S_OK; return S_OK;
} }
#undef DOCHOSTUI_THIS
static const IDocHostUIHandler2Vtbl DocHostUIHandler2Vtbl = { static const IDocHostUIHandler2Vtbl DocHostUIHandler2Vtbl = {
DocHostUIHandler_QueryInterface, DocHostUIHandler_QueryInterface,
DocHostUIHandler_AddRef, DocHostUIHandler_AddRef,
@ -722,30 +726,33 @@ static const IDocHostUIHandler2Vtbl DocHostUIHandler2Vtbl = {
DocHostUIHandler_GetOverrideKeyPath DocHostUIHandler_GetOverrideKeyPath
}; };
#define PROPNOTIF_THIS(iface) DEFINE_THIS(DocHost, IPropertyNotifySink, iface) static inline DocHost *impl_from_IPropertyNotifySink(IPropertyNotifySink *iface)
{
return (DocHost*)((char*)iface - FIELD_OFFSET(DocHost, IPropertyNotifySink_iface));
}
static HRESULT WINAPI PropertyNotifySink_QueryInterface(IPropertyNotifySink *iface, static HRESULT WINAPI PropertyNotifySink_QueryInterface(IPropertyNotifySink *iface,
REFIID riid, void **ppv) REFIID riid, void **ppv)
{ {
DocHost *This = PROPNOTIF_THIS(iface); DocHost *This = impl_from_IPropertyNotifySink(iface);
return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv); return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
} }
static ULONG WINAPI PropertyNotifySink_AddRef(IPropertyNotifySink *iface) static ULONG WINAPI PropertyNotifySink_AddRef(IPropertyNotifySink *iface)
{ {
DocHost *This = PROPNOTIF_THIS(iface); DocHost *This = impl_from_IPropertyNotifySink(iface);
return IOleClientSite_AddRef(&This->IOleClientSite_iface); return IOleClientSite_AddRef(&This->IOleClientSite_iface);
} }
static ULONG WINAPI PropertyNotifySink_Release(IPropertyNotifySink *iface) static ULONG WINAPI PropertyNotifySink_Release(IPropertyNotifySink *iface)
{ {
DocHost *This = PROPNOTIF_THIS(iface); DocHost *This = impl_from_IPropertyNotifySink(iface);
return IOleClientSite_Release(&This->IOleClientSite_iface); return IOleClientSite_Release(&This->IOleClientSite_iface);
} }
static HRESULT WINAPI PropertyNotifySink_OnChanged(IPropertyNotifySink *iface, DISPID dispID) static HRESULT WINAPI PropertyNotifySink_OnChanged(IPropertyNotifySink *iface, DISPID dispID)
{ {
DocHost *This = PROPNOTIF_THIS(iface); DocHost *This = impl_from_IPropertyNotifySink(iface);
TRACE("(%p)->(%d)\n", This, dispID); TRACE("(%p)->(%d)\n", This, dispID);
@ -774,13 +781,11 @@ static HRESULT WINAPI PropertyNotifySink_OnChanged(IPropertyNotifySink *iface, D
static HRESULT WINAPI PropertyNotifySink_OnRequestEdit(IPropertyNotifySink *iface, DISPID dispID) static HRESULT WINAPI PropertyNotifySink_OnRequestEdit(IPropertyNotifySink *iface, DISPID dispID)
{ {
DocHost *This = PROPNOTIF_THIS(iface); DocHost *This = impl_from_IPropertyNotifySink(iface);
FIXME("(%p)->(%d)\n", This, dispID); FIXME("(%p)->(%d)\n", This, dispID);
return E_NOTIMPL; return E_NOTIMPL;
} }
#undef PROPNOTIF_THIS
static const IPropertyNotifySinkVtbl PropertyNotifySinkVtbl = { static const IPropertyNotifySinkVtbl PropertyNotifySinkVtbl = {
PropertyNotifySink_QueryInterface, PropertyNotifySink_QueryInterface,
PropertyNotifySink_AddRef, PropertyNotifySink_AddRef,
@ -791,29 +796,14 @@ static const IPropertyNotifySinkVtbl PropertyNotifySinkVtbl = {
void DocHost_Init(DocHost *This, IDispatch *disp, const IDocHostContainerVtbl* container) void DocHost_Init(DocHost *This, IDispatch *disp, const IDocHostContainerVtbl* container)
{ {
This->lpDocHostUIHandlerVtbl = &DocHostUIHandler2Vtbl; This->IDocHostUIHandler2_iface.lpVtbl = &DocHostUIHandler2Vtbl;
This->lpOleCommandTargetVtbl = &OleCommandTargetVtbl; This->IOleCommandTarget_iface.lpVtbl = &OleCommandTargetVtbl;
This->lpIPropertyNotifySinkVtbl = &PropertyNotifySinkVtbl; This->IPropertyNotifySink_iface.lpVtbl = &PropertyNotifySinkVtbl;
This->disp = disp; This->disp = disp;
This->container_vtbl = container; This->container_vtbl = container;
This->client_disp = NULL;
This->document = NULL;
This->hostui = NULL;
This->frame = NULL;
This->hwnd = NULL;
This->frame_hwnd = NULL;
This->url = NULL;
This->silent = VARIANT_FALSE;
This->offline = VARIANT_FALSE;
This->ready_state = READYSTATE_UNINITIALIZED; This->ready_state = READYSTATE_UNINITIALIZED;
This->is_prop_notif = FALSE;
DocHost_ClientSite_Init(This); DocHost_ClientSite_Init(This);
DocHost_Frame_Init(This); DocHost_Frame_Init(This);

View File

@ -94,13 +94,13 @@ typedef struct _IDocHostContainerVtbl
struct DocHost { struct DocHost {
IOleClientSite IOleClientSite_iface; IOleClientSite IOleClientSite_iface;
const IOleInPlaceSiteVtbl *lpOleInPlaceSiteVtbl; IOleInPlaceSite IOleInPlaceSite_iface;
const IDocHostUIHandler2Vtbl *lpDocHostUIHandlerVtbl; IDocHostUIHandler2 IDocHostUIHandler2_iface;
const IOleDocumentSiteVtbl *lpOleDocumentSiteVtbl; IOleDocumentSite IOleDocumentSite_iface;
const IOleCommandTargetVtbl *lpOleCommandTargetVtbl; IOleCommandTarget IOleCommandTarget_iface;
const IDispatchVtbl *lpDispatchVtbl; IDispatch IDispatch_iface;
const IPropertyNotifySinkVtbl *lpIPropertyNotifySinkVtbl; IPropertyNotifySink IPropertyNotifySink_iface;
const IServiceProviderVtbl *lpServiceProviderVtbl; IServiceProvider IServiceProvider_iface;
/* Interfaces of InPlaceFrame object */ /* Interfaces of InPlaceFrame object */
const IOleInPlaceFrameVtbl *lpOleInPlaceFrameVtbl; const IOleInPlaceFrameVtbl *lpOleInPlaceFrameVtbl;
@ -195,16 +195,6 @@ struct InternetExplorer {
}; };
#define CONPTCONT(x) ((IConnectionPointContainer*) &(x)->lpConnectionPointContainerVtbl) #define CONPTCONT(x) ((IConnectionPointContainer*) &(x)->lpConnectionPointContainerVtbl)
#define OLECMD(x) ((IOleCommandTarget*) &(x)->lpOleCommandTargetVtbl)
#define INPLACESITE(x) ((IOleInPlaceSite*) &(x)->lpOleInPlaceSiteVtbl)
#define DOCHOSTUI(x) ((IDocHostUIHandler*) &(x)->lpDocHostUIHandlerVtbl)
#define DOCHOSTUI2(x) ((IDocHostUIHandler2*) &(x)->lpDocHostUIHandlerVtbl)
#define DOCSITE(x) ((IOleDocumentSite*) &(x)->lpOleDocumentSiteVtbl)
#define CLDISP(x) ((IDispatch*) &(x)->lpDispatchVtbl)
#define PROPNOTIF(x) ((IPropertyNotifySink*) &(x)->lpIPropertyNotifySinkVtbl)
#define SERVPROV(x) ((IServiceProvider*) &(x)->lpServiceProviderVtbl)
#define INPLACEFRAME(x) ((IOleInPlaceFrame*) &(x)->lpOleInPlaceFrameVtbl) #define INPLACEFRAME(x) ((IOleInPlaceFrame*) &(x)->lpOleInPlaceFrameVtbl)
#define HLINKFRAME(x) ((IHlinkFrame*) &(x)->lpIHlinkFrameVtbl) #define HLINKFRAME(x) ((IHlinkFrame*) &(x)->lpIHlinkFrameVtbl)