From b0ff7615b1ce38df0b785a000a469234b8ae20a2 Mon Sep 17 00:00:00 2001 From: Gaurav Jain Date: Thu, 23 Feb 2012 22:30:00 -0500 Subject: shell32: Added stubs for IMarshal interface --- dlls/shell32/shelllink.c | 94 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 94 insertions(+), 0 deletions(-) diff --git a/dlls/shell32/shelllink.c b/dlls/shell32/shelllink.c index e325e2e..848cff7 100644 --- a/dlls/shell32/shelllink.c +++ b/dlls/shell32/shelllink.c @@ -123,6 +123,7 @@ static const IShellLinkDataListVtbl dlvt; static const IShellExtInitVtbl eivt; static const IContextMenuVtbl cmvt; static const IObjectWithSiteVtbl owsvt; +static const IMarshalVtbl mvt; /* IShellLink Implementation */ @@ -136,6 +137,7 @@ typedef struct IShellExtInit IShellExtInit_iface; IContextMenu IContextMenu_iface; IObjectWithSite IObjectWithSite_iface; + IMarshal IMarshal_iface; LONG ref; @@ -205,6 +207,11 @@ static inline IShellLinkImpl *impl_from_IObjectWithSite(IObjectWithSite *iface) return CONTAINING_RECORD(iface, IShellLinkImpl, IObjectWithSite_iface); } +static inline IShellLinkImpl *impl_from_IMarshal(IMarshal *iface) +{ + return CONTAINING_RECORD(iface, IShellLinkImpl, IMarshal_iface); +} + static HRESULT ShellLink_UpdatePath(LPCWSTR sPathRel, LPCWSTR path, LPCWSTR sWorkDir, LPWSTR* psPath); /* strdup on the process heap */ @@ -269,6 +276,10 @@ static HRESULT ShellLink_QueryInterface( IShellLinkImpl *This, REFIID riid, LPV { *ppvObj = &This->IObjectWithSite_iface; } + else if(IsEqualIID(riid, &IID_IMarshal)) + { + *ppvObj = &This->IMarshal_iface; + } if(*ppvObj) { @@ -1270,6 +1281,7 @@ HRESULT WINAPI IShellLink_Constructor( IUnknown *pUnkOuter, sl->IShellExtInit_iface.lpVtbl = &eivt; sl->IContextMenu_iface.lpVtbl = &cmvt; sl->IObjectWithSite_iface.lpVtbl = &owsvt; + sl->IMarshal_iface.lpVtbl = &mvt; sl->iShowCmd = SW_SHOWNORMAL; sl->bDirty = FALSE; sl->iIdOpen = -1; @@ -2647,3 +2659,85 @@ static const IObjectWithSiteVtbl owsvt = ShellLink_SetSite, ShellLink_GetSite, }; + +static HRESULT WINAPI +ShellLink_Marshal_QueryInterface( IMarshal* iface, REFIID riid, void** ppvObject ) +{ + IShellLinkImpl *This = impl_from_IMarshal(iface); + return ShellLink_QueryInterface( This, riid, ppvObject ); +} + +static ULONG WINAPI +ShellLink_Marshal_AddRef( IMarshal *iface ) +{ + IShellLinkImpl *This = impl_from_IMarshal(iface); + return ShellLink_AddRef( This ); +} + +static ULONG WINAPI +ShellLink_Marshal_Release( IMarshal *iface ) +{ + IShellLinkImpl *This = impl_from_IMarshal(iface); + return ShellLink_Release( This ); +} + +static HRESULT WINAPI +ShellLink_GetUnmarshalClass( IMarshal *iface, REFIID riid, void *pv, DWORD dwDestContext, void *pvDestContext, DWORD mshlflags, CLSID *pCid ) +{ + FIXME("(%p)->(riid=%s pv=%p dwDestContext=%u pvDestContext=%p mshlflags=%u pCid=%p): stub\n", iface, debugstr_guid(riid), pv, dwDestContext, pvDestContext, mshlflags, pCid); + return E_NOTIMPL; +} + +static HRESULT WINAPI +ShellLink_GetMarshalSizeMax( IMarshal *iface, REFIID riid, void *pv, DWORD dwDestContext, void *pvDestContext, DWORD mshlflags, DWORD *pSize ) +{ + FIXME("(%p)->(riid=%s pv=%p dwDestContext=%u pvDestContext=%p mshlflags=%u pSize=%p): stub\n", iface, debugstr_guid(riid), pv, dwDestContext, pvDestContext, mshlflags, pSize); + return E_NOTIMPL; +} + +static HRESULT WINAPI +ShellLink_MarshalInterface( IMarshal *iface, + IStream *pStm, + REFIID riid, + void *pv, + DWORD dwDestContext, + void *pvDestContext, + DWORD mshlflags ) +{ + FIXME("(%p)->(pStm=%p riid=%s pv=%p dwDestContext=%u pvDestContext=%p mshlflags=%u): stub\n", iface, pStm, debugstr_guid(riid), pv, dwDestContext, pvDestContext, mshlflags); + return E_NOTIMPL; +} + +static HRESULT WINAPI +ShellLink_UnmarshalInterface( IMarshal *iface, IStream *pStm, REFIID riid, void **ppv ) +{ + FIXME("(%p)->(pStm=%p riid=%s ppv=%p): stub\n", iface, pStm, debugstr_guid(riid), ppv); + return E_NOTIMPL; +} + +static HRESULT WINAPI +ShellLink_ReleaseMarshalData( IMarshal *iface, IStream *pStm ) +{ + FIXME("(%p)->(pStm=%p): stub\n", iface, pStm); + return E_NOTIMPL; +} + +static HRESULT WINAPI +ShellLink_DisconnectObject( IMarshal *iface, DWORD dwReserved ) +{ + FIXME("(%p)->(dwReserved=%u): stub\n", iface, dwReserved); + return E_NOTIMPL; +} + +static const IMarshalVtbl mvt = +{ + ShellLink_Marshal_QueryInterface, + ShellLink_Marshal_AddRef, + ShellLink_Marshal_Release, + ShellLink_GetUnmarshalClass, + ShellLink_GetMarshalSizeMax, + ShellLink_MarshalInterface, + ShellLink_UnmarshalInterface, + ShellLink_ReleaseMarshalData, + ShellLink_DisconnectObject, +}; -- 1.7.5.4