Author: gadamopoulos
Date: Sun Aug 27 09:35:03 2017
New Revision: 75687

URL: http://svn.reactos.org/svn/reactos?rev=75687&view=rev
Log:
[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.

Modified:
    trunk/reactos/dll/win32/browseui/explorerband.cpp

Modified: trunk/reactos/dll/win32/browseui/explorerband.cpp
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/explorerband.cpp?rev=75687&r1=75686&r2=75687&view=diff
==============================================================================
--- trunk/reactos/dll/win32/browseui/explorerband.cpp   [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/explorerband.cpp   [iso-8859-1] Sun Aug 27 
09:35:03 2017
@@ -574,11 +574,14 @@
 
     /* 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);


Reply via email to