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);