mshtml: COM cleanup for the IObjectWithSite iface.

This commit is contained in:
Michael Stefaniuc 2010-12-27 01:49:48 +01:00 committed by Alexandre Julliard
parent 2efc64fbc2
commit b574f2fd91
3 changed files with 13 additions and 13 deletions

View File

@ -1821,7 +1821,7 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv)
*ppv = NULL;
}else if(IsEqualGUID(&IID_IObjectWithSite, riid)) {
TRACE("(%p)->(IID_IObjectWithSite %p)\n", This, ppv);
*ppv = OBJSITE(This);
*ppv = &This->IObjectWithSite_iface;
}else if(IsEqualGUID(&IID_IOleContainer, riid)) {
TRACE("(%p)->(IID_IOleContainer %p)\n", This, ppv);
*ppv = &This->IOleContainer_iface;

View File

@ -364,8 +364,8 @@ struct HTMLDocument {
IPersistStreamInit IPersistStreamInit_iface;
const IDispatchExVtbl *lpIDispatchExVtbl;
ISupportErrorInfo ISupportErrorInfo_iface;
const IObjectWithSiteVtbl *lpObjectWithSiteVtbl;
IOleContainer IOleContainer_iface;
IObjectWithSite IObjectWithSite_iface;
IOleContainer IOleContainer_iface;
IUnknown *unk_impl;
IDispatchEx *dispex;
@ -627,7 +627,6 @@ struct HTMLDocumentNode {
#define HTMLWINDOW4(x) ((IHTMLWindow4*) &(x)->lpHTMLWindow4Vtbl)
#define CONPTCONT(x) ((IConnectionPointContainer*) &(x)->lpConnectionPointContainerVtbl)
#define CUSTOMDOC(x) ((ICustomDoc*) &(x)->lpCustomDocVtbl)
#define OBJSITE(x) ((IObjectWithSite*) &(x)->lpObjectWithSiteVtbl)
#define NSWBCHROME(x) ((nsIWebBrowserChrome*) &(x)->lpWebBrowserChromeVtbl)
#define NSCML(x) ((nsIContextMenuListener*) &(x)->lpContextMenuListenerVtbl)

View File

@ -757,42 +757,43 @@ static const IOleControlVtbl OleControlVtbl = {
* IObjectWithSite implementation
*/
#define OBJSITE_THIS(iface) DEFINE_THIS(HTMLDocument, ObjectWithSite, iface)
static inline HTMLDocument *impl_from_IObjectWithSite(IObjectWithSite *iface)
{
return CONTAINING_RECORD(iface, HTMLDocument, IObjectWithSite_iface);
}
static HRESULT WINAPI ObjectWithSite_QueryInterface(IObjectWithSite *iface, REFIID riid, void **ppv)
{
HTMLDocument *This = OBJSITE_THIS(iface);
HTMLDocument *This = impl_from_IObjectWithSite(iface);
return htmldoc_query_interface(This, riid, ppv);
}
static ULONG WINAPI ObjectWithSite_AddRef(IObjectWithSite *iface)
{
HTMLDocument *This = OBJSITE_THIS(iface);
HTMLDocument *This = impl_from_IObjectWithSite(iface);
return htmldoc_addref(This);
}
static ULONG WINAPI ObjectWithSite_Release(IObjectWithSite *iface)
{
HTMLDocument *This = OBJSITE_THIS(iface);
HTMLDocument *This = impl_from_IObjectWithSite(iface);
return htmldoc_release(This);
}
static HRESULT WINAPI ObjectWithSite_SetSite(IObjectWithSite *iface, IUnknown *pUnkSite)
{
HTMLDocument *This = OBJSITE_THIS(iface);
HTMLDocument *This = impl_from_IObjectWithSite(iface);
FIXME("(%p)->(%p)\n", This, pUnkSite);
return E_NOTIMPL;
}
static HRESULT WINAPI ObjectWithSite_GetSite(IObjectWithSite* iface, REFIID riid, PVOID *ppvSite)
{
HTMLDocument *This = OBJSITE_THIS(iface);
HTMLDocument *This = impl_from_IObjectWithSite(iface);
FIXME("(%p)->(%p)\n", This, ppvSite);
return E_NOTIMPL;
}
#undef OBJSITE_THIS
static const IObjectWithSiteVtbl ObjectWithSiteVtbl = {
ObjectWithSite_QueryInterface,
ObjectWithSite_AddRef,
@ -876,6 +877,6 @@ void HTMLDocument_OleObj_Init(HTMLDocument *This)
This->IOleObject_iface.lpVtbl = &OleObjectVtbl;
This->IOleDocument_iface.lpVtbl = &OleDocumentVtbl;
This->IOleControl_iface.lpVtbl = &OleControlVtbl;
This->lpObjectWithSiteVtbl = &ObjectWithSiteVtbl;
This->IObjectWithSite_iface.lpVtbl = &ObjectWithSiteVtbl;
This->IOleContainer_iface.lpVtbl = &OleContainerVtbl;
}