Chapter 7 Resource Formats Within Executable Files

This chapter describes the format of executable-file resources used by the Microsoft Windows operating system. A resource, or collection of binary data, can be one of two types: standard or user-defined. The data in a standard resource describes an icon, cursor, menu, dialog box, bitmap, font, string table, or accelerator. The data in a user-defined resource describes an application-specific object. This chapter describes standard resources.

A Windows executable file contains a resource table that describes each of the resources in the file. The data in this table includes an offset from the beginning of the file to each resource. It also includes values that specify the resource type, the resource length, and so on. For more information about the organization of the resource table, see Chapter 6, “Executable-File Header Format.”

This chapter uses C structures to depict the organization of data in resources. In some cases, these structures are not true C structures, because they contain members that can be variable-length strings. These structures were created only to depict the organization of data within a resource; they do not appear in any of the include files shipped with the Microsoft Windows 3.1 Software Development Kit (SDK).