Another failed attempt to get the icon for the icon for the .. parent folder
cppdashboard.dev/r/2026/11/another-failed-attempt-to-get-the-icon-for-the-icon-for-theThis article discusses the issues encountered when trying to retrieve the icon for the parent folder using SHGetFileInfo, highlighting the complexities of the shell namespace parsing.
From the article
Last time, we looked at why asking SHGetFileInfo for the icon of .. (the parent folder) produces inconsistent results . One of the things the customer tried was concatenating the .. to the current directory:
SHGetFileInfo(L"C:\\dir\\..", 0, &info, sizeof(info), SHGFI_ICON | SHGFI_SMALLICON | SHGFI_SYSICONINDEX); This in fact made it worse: The function failed!
As I noted last time, if the thing you pass in looks like a relative path, it will be resolved against the current directory. But in this case, the string we passed doesn’t look like a relative path, so no such resolution occurs. The string C:\dir\.. is then sent through the namespace parser.
Share this resource