From fa3dd31a9c21efc199b58049d8f68dc96b59fa33 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Mon, 22 Mar 2010 01:32:02 +0300 Subject: [PATCH] shell32: Add IShellFolderView::GetSelectedObjects implementation for IShellView. --- dlls/shell32/shlview.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c index cd0fb3bf12d..e3f170e88dd 100644 --- a/dlls/shell32/shlview.c +++ b/dlls/shell32/shlview.c @@ -3062,8 +3062,21 @@ static HRESULT WINAPI IShellFolderView_fnGetSelectedObjects( UINT *items) { IShellViewImpl *This = impl_from_IShellFolderView(iface); - FIXME("(%p)->(%p %p) stub\n", This, pidl, items); - return E_NOTIMPL; + + TRACE("(%p)->(%p %p)\n", This, pidl, items); + + *items = ShellView_GetSelections( This ); + + if (*items) + { + *pidl = LocalAlloc(0, *items*sizeof(LPITEMIDLIST)); + if (!*pidl) return E_OUTOFMEMORY; + + /* it's documented that caller shouldn't PIDLs, only array itself */ + memcpy((PITEMID_CHILD*)*pidl, This->apidl, *items*sizeof(LPITEMIDLIST)); + } + + return S_OK; } static HRESULT WINAPI IShellFolderView_fnIsDropOnSource(