Nikolay Sivov : shell32: Add IShellFolderView:: GetSelectedObjects implementation for IShellView.
Module: wine Branch: master Commit: fa3dd31a9c21efc199b58049d8f68dc96b59fa33 URL: http://source.winehq.org/git/wine.git/?a=commit;h=fa3dd31a9c21efc199b58049d8... Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Mar 22 01:32:02 2010 +0300 shell32: Add IShellFolderView::GetSelectedObjects implementation for IShellView. --- dlls/shell32/shlview.c | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c index cd0fb3b..e3f170e 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(
participants (1)
-
Alexandre Julliard