An icon resource is identical in format to an icon image in an icon-resource file. The resource contains the icon-image header, color table, and XOR and AND masks. For more information about the icon-image format, see Chapter 1, “Graphics File Formats.”
Each icon 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_ICON value.