[BROWSEUI] -CExplorerBand: Calling ILGetDisplayNameEx with a full pidl was a bit...
authorGiannis Adamopoulos <gadamopoulos@reactos.org>
Sun, 27 Aug 2017 09:35:03 +0000 (09:35 +0000)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Sun, 27 Aug 2017 09:35:03 +0000 (09:35 +0000)
svn path=/trunk/; revision=75687

reactos/dll/win32/browseui/explorerband.cpp

index f64ca9a..2c8cbe8 100644 (file)
@@ -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);