Vincent Povirk : shell32: Implement Get/SetIDList on ShellItem objects.
Module: wine Branch: master Commit: b4ea7d32217c782c270a0f0037409d50d03ef5f5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=b4ea7d32217c782c270a0f0037... Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Fri Feb 13 16:40:19 2009 -0600 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 = {
participants (1)
-
Alexandre Julliard