From 78b7286eba563466438ff37975f17d8733ed47e5 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Tue, 23 May 2006 22:16:26 +0200 Subject: [PATCH] mshtml: Added stub implementation of IPersistStreamInit. --- dlls/mshtml/htmldoc.c | 3 ++ dlls/mshtml/mshtml_private.h | 2 + dlls/mshtml/persist.c | 79 ++++++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+) diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index f14eb2537b9..d028d8373ad 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -110,6 +110,9 @@ static HRESULT WINAPI HTMLDocument_QueryInterface(IHTMLDocument2 *iface, REFIID }else if(IsEqualGUID(&IID_IConnectionPointContainer, riid)) { TRACE("(%p)->(IID_IConnectionPointContainer %p)\n", This, ppvObject); *ppvObject = CONPTCONT(This); + }else if(IsEqualGUID(&IID_IPersistStreamInit, riid)) { + TRACE("(%p)->(IID_IPersistStreamInit %p)\n", This, ppvObject); + *ppvObject = PERSTRINIT(This); } if(*ppvObject) { diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index aaf2f4f90dc..3d7ed03d03b 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -64,6 +64,7 @@ typedef struct { const IOleControlVtbl *lpOleControlVtbl; const IHlinkTargetVtbl *lpHlinkTargetVtbl; const IConnectionPointContainerVtbl *lpConnectionPointContainerVtbl; + const IPersistStreamInitVtbl *lpPersistStreamInitVtbl; LONG ref; @@ -177,6 +178,7 @@ typedef struct { #define STATUSCLB(x) ((IBindStatusCallback*) &(x)->lpBindStatusCallbackVtbl) #define HLNKTARGET(x) ((IHlinkTarget*) &(x)->lpHlinkTargetVtbl) #define CONPTCONT(x) ((IConnectionPointContainer*) &(x)->lpConnectionPointContainerVtbl) +#define PERSTRINIT(x) ((IPersistStreamInit*) &(x)->lpPersistStreamInitVtbl) #define NSWBCHROME(x) ((nsIWebBrowserChrome*) &(x)->lpWebBrowserChromeVtbl) #define NSCML(x) ((nsIContextMenuListener*) &(x)->lpContextMenuListenerVtbl) diff --git a/dlls/mshtml/persist.c b/dlls/mshtml/persist.c index 0c0b71f098a..be12106bb82 100644 --- a/dlls/mshtml/persist.c +++ b/dlls/mshtml/persist.c @@ -643,11 +643,90 @@ static const IPersistFileVtbl PersistFileVtbl = { PersistFile_GetCurFile }; +#define PERSTRINIT_THIS(iface) DEFINE_THIS(HTMLDocument, PersistStreamInit, iface); + +static HRESULT WINAPI PersistStreamInit_QueryInterface(IPersistStreamInit *iface, + REFIID riid, void **ppv) +{ + HTMLDocument *This = PERSTRINIT_THIS(iface); + return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppv); +} + +static ULONG WINAPI PersistStreamInit_AddRef(IPersistStreamInit *iface) +{ + HTMLDocument *This = PERSTRINIT_THIS(iface); + return IHTMLDocument2_AddRef(HTMLDOC(This)); +} + +static ULONG WINAPI PersistStreamInit_Release(IPersistStreamInit *iface) +{ + HTMLDocument *This = PERSTRINIT_THIS(iface); + return IHTMLDocument2_AddRef(HTMLDOC(This)); +} + +static HRESULT WINAPI PersistStreamInit_GetClassID(IPersistStreamInit *iface, CLSID *pClassID) +{ + HTMLDocument *This = PERSTRINIT_THIS(iface); + return IPersist_GetClassID(PERSIST(This), pClassID); +} + +static HRESULT WINAPI PersistStreamInit_IsDirty(IPersistStreamInit *iface) +{ + HTMLDocument *This = PERSTRINIT_THIS(iface); + FIXME("(%p)\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI PersistStreamInit_Load(IPersistStreamInit *iface, LPSTREAM pStm) +{ + HTMLDocument *This = PERSTRINIT_THIS(iface); + FIXME("(%p)->(%p)\n", This, pStm); + return E_NOTIMPL; +} + +static HRESULT WINAPI PersistStreamInit_Save(IPersistStreamInit *iface, LPSTREAM pStm, + BOOL fClearDirty) +{ + HTMLDocument *This = PERSTRINIT_THIS(iface); + FIXME("(%p)->(%p %x)\n", This, pStm, fClearDirty); + return E_NOTIMPL; +} + +static HRESULT WINAPI PersistStreamInit_GetSizeMax(IPersistStreamInit *iface, + ULARGE_INTEGER *pcbSize) +{ + HTMLDocument *This = PERSTRINIT_THIS(iface); + FIXME("(%p)->(%p)\n", This, pcbSize); + return E_NOTIMPL; +} + +static HRESULT WINAPI PersistStreamInit_InitNew(IPersistStreamInit *iface) +{ + HTMLDocument *This = PERSTRINIT_THIS(iface); + FIXME("(%p)\n", This); + return E_NOTIMPL; +} + +#undef PERSTRINIT_THIS + +static const IPersistStreamInitVtbl PersistStreamInitVtbl = { + PersistStreamInit_QueryInterface, + PersistStreamInit_AddRef, + PersistStreamInit_Release, + PersistStreamInit_GetClassID, + PersistStreamInit_IsDirty, + PersistStreamInit_Load, + PersistStreamInit_Save, + PersistStreamInit_GetSizeMax, + PersistStreamInit_InitNew +}; + void HTMLDocument_Persist_Init(HTMLDocument *This) { This->lpPersistMonikerVtbl = &PersistMonikerVtbl; This->lpPersistFileVtbl = &PersistFileVtbl; This->lpMonikerPropVtbl = &MonikerPropVtbl; + This->lpPersistStreamInitVtbl = &PersistStreamInitVtbl; This->status_callback = NULL; }