Jacek Caban : mshtml: Added stub implementation of IPersistStreamInit.

Alexandre Julliard julliard at wine.codeweavers.com
Wed May 24 04:00:17 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 78b7286eba563466438ff37975f17d8733ed47e5
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=78b7286eba563466438ff37975f17d8733ed47e5

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Tue May 23 22:16:26 2006 +0200

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(+), 0 deletions(-)

diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c
index f14eb25..d028d83 100644
--- a/dlls/mshtml/htmldoc.c
+++ b/dlls/mshtml/htmldoc.c
@@ -110,6 +110,9 @@ static HRESULT WINAPI HTMLDocument_Query
     }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 aaf2f4f..3d7ed03 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 @@ #define CONTROL(x)       ((IOleControl*)
 #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 0c0b71f..be12106 100644
--- a/dlls/mshtml/persist.c
+++ b/dlls/mshtml/persist.c
@@ -643,11 +643,90 @@ static const IPersistFileVtbl PersistFil
     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;
 }




More information about the wine-cvs mailing list