From 3ee6628aa5f1b1c156ec1e3da08072771623c92c Mon Sep 17 00:00:00 2001 From: Giannis Adamopoulos Date: Sun, 27 Aug 2017 09:35:03 +0000 Subject: [PATCH] [BROWSEUI] -CExplorerBand: Calling ILGetDisplayNameEx with a full pidl was a bit hacky after all because it doesn't work always in win10. Just get the name manually as no helper is good enough. svn path=/trunk/; revision=75687 --- reactos/dll/win32/browseui/explorerband.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/reactos/dll/win32/browseui/explorerband.cpp b/reactos/dll/win32/browseui/explorerband.cpp index f64ca9a9295..2c8cbe8da94 100644 --- a/reactos/dll/win32/browseui/explorerband.cpp +++ b/reactos/dll/win32/browseui/explorerband.cpp @@ -574,11 +574,14 @@ HTREEITEM CExplorerBand::InsertItem(HTREEITEM hParent, IShellFolder *psfParent, /* Get the name of the node */ WCHAR wszDisplayName[MAX_PATH]; - if (!ILGetDisplayNameEx(psfParent, pElt, wszDisplayName, ILGDN_INFOLDER)) - { - ERR("Failed to get node name\n"); + STRRET strret; + hr = psfParent->GetDisplayNameOf(pEltRelative, SHGDN_INFOLDER, &strret); + if (FAILED_UNEXPECTEDLY(hr)) + return NULL; + + hr = StrRetToBufW(&strret, pEltRelative, wszDisplayName, MAX_PATH); + if (FAILED_UNEXPECTEDLY(hr)) return NULL; - } /* Get the icon of the node */ INT iIcon = SHMapPIDLToSystemImageListIndex(psfParent, pEltRelative, NULL); -- 2.17.1