I can't get SHGetFileInfo to return an icon location
问题 I'm on Windows 10 Pro and Visual Studio 2013, and I'm using SHGetFileInfoW to get an icon location (path + index) for a file type: std::wstring wFile { L"a.bas" }; SHFILEINFOW fi {}; DWORD success = ::SHGetFileInfoW(wFile.c_str(), FILE_ATTRIBUTE_NORMAL, &fi, sizeof(fi), SHGFI_USEFILEATTRIBUTES | SHGFI_ICONLOCATION); No matter whether wFile refers to an existing file or is just any filename, the call returns 1 indicating success. The iIcon member of fi is set to a number, but szDisplayString