Commit 62e7be0e authored by Chris Wulff's avatar Chris Wulff Committed by Alexandre Julliard

shdocvw: Add IPersistMemory interface stub.

parent 0a2008ae
......@@ -92,8 +92,6 @@ static HRESULT WINAPI PersistStorage_SaveCompleted(IPersistStorage *iface, LPSTO
return E_NOTIMPL;
}
#define PERSTORAGE_THIS(ifce) DEFINE_THIS(WebBrowser, PersistStorage, iface)
static const IPersistStorageVtbl PersistStorageVtbl =
{
PersistStorage_QueryInterface,
......@@ -108,6 +106,87 @@ static const IPersistStorageVtbl PersistStorageVtbl =
};
/**********************************************************************
* Implement the IPersistMemory interface
*/
#define PERMEMORY_THIS(ifce) DEFINE_THIS(WebBrowser, PersistMemory, iface)
static HRESULT WINAPI PersistMemory_QueryInterface(IPersistMemory *iface,
REFIID riid, LPVOID *ppobj)
{
WebBrowser *This = PERMEMORY_THIS(iface);
return IWebBrowser_QueryInterface(WEBBROWSER(This), riid, ppobj);
}
static ULONG WINAPI PersistMemory_AddRef(IPersistMemory *iface)
{
WebBrowser *This = PERMEMORY_THIS(iface);
return IWebBrowser_AddRef(WEBBROWSER(This));
}
static ULONG WINAPI PersistMemory_Release(IPersistMemory *iface)
{
WebBrowser *This = PERMEMORY_THIS(iface);
return IWebBrowser_Release(WEBBROWSER(This));
}
static HRESULT WINAPI PersistMemory_GetClassID(IPersistMemory *iface, CLSID *pClassID)
{
WebBrowser *This = PERMEMORY_THIS(iface);
FIXME("(%p)->(%p)\n", This, pClassID);
return E_NOTIMPL;
}
static HRESULT WINAPI PersistMemory_IsDirty(IPersistMemory *iface)
{
WebBrowser *This = PERMEMORY_THIS(iface);
FIXME("(%p)\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI PersistMemory_InitNew(IPersistMemory *iface)
{
WebBrowser *This = PERMEMORY_THIS(iface);
FIXME("(%p)\n", This);
return S_OK;
}
static HRESULT WINAPI PersistMemory_Load(IPersistMemory *iface, LPVOID pMem, ULONG cbSize)
{
WebBrowser *This = PERMEMORY_THIS(iface);
FIXME("(%p)->(%p %x)\n", This, pMem, cbSize);
return E_NOTIMPL;
}
static HRESULT WINAPI PersistMemory_Save(IPersistMemory *iface, LPVOID pMem,
BOOL fClearDirty, ULONG cbSize)
{
WebBrowser *This = PERMEMORY_THIS(iface);
FIXME("(%p)->(%p %x %x)\n", This, pMem, fClearDirty, cbSize);
return E_NOTIMPL;
}
static HRESULT WINAPI PersistMemory_GetSizeMax(IPersistMemory *iface, ULONG *pCbSize)
{
WebBrowser *This = PERMEMORY_THIS(iface);
FIXME("(%p)->(%p)\n", This, pCbSize);
return E_NOTIMPL;
}
static const IPersistMemoryVtbl PersistMemoryVtbl =
{
PersistMemory_QueryInterface,
PersistMemory_AddRef,
PersistMemory_Release,
PersistMemory_GetClassID,
PersistMemory_IsDirty,
PersistMemory_Load,
PersistMemory_Save,
PersistMemory_GetSizeMax,
PersistMemory_InitNew
};
/**********************************************************************
* Implement the IPersistStreamInit interface
*/
......@@ -192,5 +271,6 @@ static const IPersistStreamInitVtbl PersistStreamInitVtbl =
void WebBrowser_Persist_Init(WebBrowser *This)
{
This->lpPersistStorageVtbl = &PersistStorageVtbl;
This->lpPersistMemoryVtbl = &PersistMemoryVtbl;
This->lpPersistStreamInitVtbl = &PersistStreamInitVtbl;
}
......@@ -100,6 +100,7 @@ struct WebBrowser {
const IOleInPlaceObjectVtbl *lpOleInPlaceObjectVtbl;
const IOleControlVtbl *lpOleControlVtbl;
const IPersistStorageVtbl *lpPersistStorageVtbl;
const IPersistMemoryVtbl *lpPersistMemoryVtbl;
const IPersistStreamInitVtbl *lpPersistStreamInitVtbl;
const IProvideClassInfo2Vtbl *lpProvideClassInfoVtbl;
const IViewObject2Vtbl *lpViewObjectVtbl;
......@@ -152,6 +153,7 @@ struct InternetExplorer {
#define INPLACEOBJ(x) ((IOleInPlaceObject*) &(x)->lpOleInPlaceObjectVtbl)
#define CONTROL(x) ((IOleControl*) &(x)->lpOleControlVtbl)
#define PERSTORAGE(x) ((IPersistStorage*) &(x)->lpPersistStorageVtbl)
#define PERMEMORY(x) ((IPersistMemory*) &(x)->lpPersistMemoryVtbl)
#define PERSTRINIT(x) ((IPersistStreamInit*) &(x)->lpPersistStreamInitVtbl)
#define CLASSINFO(x) ((IProvideClassInfo2*) &(x)->lpProvideClassInfoVtbl)
#define CONPTCONT(x) ((IConnectionPointContainer*) &(x)->lpConnectionPointContainerVtbl)
......
......@@ -72,6 +72,9 @@ static HRESULT WINAPI WebBrowser_QueryInterface(IWebBrowser2 *iface, REFIID riid
}else if(IsEqualGUID(&IID_IPersistStorage, riid)) {
TRACE("(%p)->(IID_IPersistStorage %p)\n", This, ppv);
*ppv = PERSTORAGE(This);
}else if(IsEqualGUID(&IID_IPersistMemory, riid)) {
TRACE("(%p)->(IID_IPersistStorage %p)\n", This, ppv);
*ppv = PERMEMORY(This);
}else if(IsEqualGUID (&IID_IPersistStreamInit, riid)) {
TRACE("(%p)->(IID_IPersistStreamInit %p)\n", This, ppv);
*ppv = PERSTRINIT(This);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment