I ve read Get File Icon used by Shell and the other similar posts - and already use SHFileInfo to get the associated icon for any given extension, and that works great.
However, Outlook uses ".msg" for mail and appointment items (if you drag an email and drag an event onto your desktop, the resulting icons are different). I noticed that if I use the registry method, the standard envelope icon is at index 17 of C:WINDOWSInstaller{90120000-0011-0000-0000-0000000FF1CE}outicon.exe (on my XP machine running Outlook 2007) - and, conveniently enough, the appointment icon is at index 18. I can hardcode 18 when extracting the icon, but that sounds very flimsy.
Given the filename of an email or an appointment (but not the actual file), and knowledge that it is an email or an appointment, does anybody know how to get the correct icon, either through the shell or through the registry?
Of course, if I had the actual file handy, I could just use Icon.ExtractAssociatedIcon, but in the system I m working on, we re showing a list of files that are stored elsewhere and downloading each of them beforehand is not possible.