From 20932a7d7bd2cd2c7b3baf74f1093743512cb9f7 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Fri, 13 Feb 2009 16:40:19 -0600 Subject: [PATCH] shell32: implement Get/SetIDList on ShellItem objects --- dlls/shell32/shellitem.c | 24 ++++++++++++++++++++---- 1 files changed, 20 insertions(+), 4 deletions(-) diff --git a/dlls/shell32/shellitem.c b/dlls/shell32/shellitem.c index b995534..643f1b5 100644 --- a/dlls/shell32/shellitem.c +++ b/dlls/shell32/shellitem.c @@ -204,9 +204,20 @@ static HRESULT WINAPI ShellItem_IPersistIDList_SetIDList(IPersistIDList* iface, LPCITEMIDLIST pidl) { ShellItem *This = impl_from_IPersistIDList(iface); + LPITEMIDLIST new_pidl; - FIXME("(%p,%p)\n", This, pidl); - return E_NOTIMPL; + TRACE("(%p,%p)\n", This, pidl); + + new_pidl = ILClone(pidl); + + if (new_pidl) + { + ILFree(This->pidl); + This->pidl = new_pidl; + return S_OK; + } + else + return E_OUTOFMEMORY; } static HRESULT WINAPI ShellItem_IPersistIDList_GetIDList(IPersistIDList* iface, @@ -214,8 +225,13 @@ static HRESULT WINAPI ShellItem_IPersistIDList_GetIDList(IPersistIDList* iface, { ShellItem *This = impl_from_IPersistIDList(iface); - FIXME("(%p,%p)\n", This, ppidl); - return E_NOTIMPL; + TRACE("(%p,%p)\n", This, ppidl); + + *ppidl = ILClone(This->pidl); + if (*ppidl) + return S_OK; + else + return E_OUTOFMEMORY; } static const IPersistIDListVtbl ShellItem_IPersistIDList_Vtbl = { -- 1.5.4.3