>I have been passing 0 as the IconIndex. Perhaps I am trying to accomplish the wrong task: I am not trying to extract an icon from an EXE file, but I want to display the icon of the application associated with a file extension. For Example, a file with a '.doc' extension will display the MS Word icon. Am I using the wrong API? If so, which one does Windows Explorer use?
>
>Thanks for your patience and rapid response.
>
Troy,
No problem. Substitute ExtractAssociatedIcon(). As I mentioned earlier it sounds like you weren't passing the icon index parameter properly (by value rather than reference). All you need is a valid icon handle. If you like post the code that was causing the C5.
One note, however, the icon displayed in the Explorer, is determined sometimes by the index in the registry. For example, VFP has 12 icons embedded in its exectuable. That's how the Explorer knows to display which icon for the various types of VFP files.
George
Ubi caritas et amor, deus ibi est