Fastest way to get shell icon Fastest way to get shell icon shell shell

Fastest way to get shell icon


Try using the SHGFI_USEFILEATTRIBUTES flag as well. See the articles Tuning SHGetFileInfo for Optimum Performance and What does SHGFI_USEFILEATTRIBUTES mean? for more information.


I have used a cache when I used SHGetFileInfo. Unless it is an .exe or .ico file (and perhaps a few more) the icon will be the same for the same file extension, so when you show a dir list you can use the same icon for files of the same type and you don't have to call (and wait for) SHGetFileInfo again.