7.11.1 Name-Table Entry

There is one name-table entry for each resource that uses either a named resource or a named-resource identifier. The NameTable structure depicts the form of these entries:

struct NameTable {
        WORD wBytesInEntry;
        WORD wTypeOrdinal;
        WORD wIDOrdinal;
        char szType[];
        char szID[];
};

Following are the members in the NameTable structure:

wBytesInEntry

Specifies the number of bytes in the name-table entry.

wTypeOrdinal

Specifies the ordinal value of the resource type for this name-table entry. If the high-order bit of this member is set, the named type of the resource was replaced with an ordinal value by the resource compiler. If this bit is not set, the resource type was not a named-type member and the szType member contains a single null byte.

wIDOrdinal

Specifies the ordinal value of the resource identifier for this name-table entry. If the high-order bit of this member is set, the named identifier of the resource was replaced with an ordinal value by the resource compiler and the named-identifier string appears in the szID array. If this bit is not set, a named-resource identifier does not exist and the szID array contains a single null byte.

szType

Specifies the resource type. This array must contain a null-terminated string. If the high bit of the wTypeOrdinal member is not set, this array contains a single-byte value of zero.

szID

Specifies a resource name. This array must be a null-terminated string. If the high bit of the wIDOrdinal member is not set, this array contains a single-byte value of zero.

Note:

Name-table entries are supported in Windows 3.0, but they are not required. Name-table entries do not appear in Windows 3.1.