Each document type has an associated application (.exe) .

In each application there may be icon resources embedded into it. These are numbered starting at 0.

This means that if the return from the "associated icon" section of the registry is not a filename then you need to find th eassociated application (.exe) file and then do an ExtractAssociatedIcon() call to get the relevant icon.

This association is the same mechanism as is used to launch an application from it's data file in Explorer.

HTH,
D.