From 21f8a2746978d8e74cd072d38bbfbd688f353764 Mon Sep 17 00:00:00 2001 From: Giannis Adamopoulos Date: Sun, 14 Aug 2016 16:15:02 +0000 Subject: [PATCH] [SHELL32] - Fix a bug in CStartMenu_Constructor and add some comments to explain what this part does. svn path=/trunk/; revision=72221 --- reactos/dll/win32/shell32/shellmenu/CStartMenu.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reactos/dll/win32/shell32/shellmenu/CStartMenu.cpp b/reactos/dll/win32/shell32/shellmenu/CStartMenu.cpp index bd9659694a5..6959055be9d 100644 --- a/reactos/dll/win32/shell32/shellmenu/CStartMenu.cpp +++ b/reactos/dll/win32/shell32/shellmenu/CStartMenu.cpp @@ -472,6 +472,7 @@ CStartMenu_Constructor(REFIID riid, void **ppv) if (FAILED_UNEXPECTEDLY(hr)) return hr; + /* psf is a merged folder, so now we want to get the pidl of the programs item from the merged folder */ { hr = SHGetSpecialFolderLocation(NULL, CSIDL_PROGRAMS, &pidlProgramsAbsolute); if (FAILED(hr)) @@ -491,13 +492,14 @@ CStartMenu_Constructor(REFIID riid, void **ppv) if (FAILED(hr)) return hr; - hr = psfParent->GetDisplayNameOf(pcidlPrograms, SHGDN_NORMAL, &str); + hr = psfParent->GetDisplayNameOf(pcidlPrograms, SHGDN_FORPARSING | SHGDN_INFOLDER, &str); if (FAILED(hr)) return hr; StrRetToBuf(&str, pcidlPrograms, szDisplayName, _countof(szDisplayName)); ILFree(pidlProgramsAbsolute); + /* We got the display name from the fs folder and we parse it with the merged folder here */ hr = psf->ParseDisplayName(NULL, NULL, szDisplayName, NULL, &pidlPrograms, NULL); if (FAILED(hr)) return hr;