An icon-directory resource is nearly identical in format to an icon directory in an icon-resource file. The resource specifies the number of icon images associated with this resource, as well as the dimensions and color formats for each icon. However, the last member of the ICONDIRENTRY structure (dwImageOffset) is replaced with a 16-bit value that specifies the resource-table index of the corresponding icon-image resource. The index is 1-based. If an executable file contains multiple icon resources, the index must be unique across all directories. For more information about the icon-directory format, see Chapter 1, “Graphics File Formats.”
Each icon-directory resource must have a corresponding entry in the resource table of the executable file. This means the resource table must contain a TYPEINFO structure in which the rscTypeID member is set to the RT_GROUP_ICON value.