From 92d94fdb7c33351462b7e2240bcbbf20ffa1480b Mon Sep 17 00:00:00 2001 From: Sylvain Petreolle Date: Tue, 15 Mar 2011 15:37:09 +0000 Subject: [PATCH] [SHELL32] Fix missing "Open" menu entry on right click for All Users desktop shortcuts. Patch by Thomas Faber See issue #5998 for more details. svn path=/trunk/; revision=51053 --- reactos/dll/win32/shell32/clipboard.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/reactos/dll/win32/shell32/clipboard.c b/reactos/dll/win32/shell32/clipboard.c index 1bdae631878..0c989c6ddd5 100644 --- a/reactos/dll/win32/shell32/clipboard.c +++ b/reactos/dll/win32/shell32/clipboard.c @@ -47,26 +47,26 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell); HGLOBAL RenderHDROP(LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl) { UINT i; - int rootlen = 0,size = 0; - WCHAR wszRootPath[MAX_PATH]; + int size = 0; WCHAR wszFileName[MAX_PATH]; HGLOBAL hGlobal; DROPFILES *pDropFiles; int offset; + LPITEMIDLIST *pidls; TRACE("(%p,%p,%u)\n", pidlRoot, apidl, cidl); + pidls = HeapAlloc(GetProcessHeap(), 0, cidl * sizeof *pidls); + if (!pidls) return NULL; + /* get the size needed */ size = sizeof(DROPFILES); - SHGetPathFromIDListW(pidlRoot, wszRootPath); - PathAddBackslashW(wszRootPath); - rootlen = wcslen(wszRootPath); - for (i=0; ipFiles = offset * sizeof(WCHAR); pDropFiles->fWide = TRUE; - wcscpy(wszFileName, wszRootPath); - for (i=0; i