A property table is an array of RESUTIL_PROPERTY_ITEM structures that is useful for working with multiple properties. Rather than using the CLUSPROP_BUFFER_HELPER structure to step through each property, applications and resource DLLs can use a property table. In combination with the utility functions written to manipulate property values, property lists, and property tables, using a property table offers developers a simpler solution to the potentially complex task of property management.
Each entry in a property table contains information about a particular property and an offset to the property's data. The data, or a pointer to the data, is stored in a buffer known as a parameter block. A parameter block is typically a structure that contains one member for each data value that belongs to a property in the property table. However, because an offset is used to identify the location of data, parameter block structures can contain non-property members as well as property members.
The following illustration shows the relationship between a property table and a parameter block. The property table has two entries, each represented by a RESUTIL_PROPERTY_ITEM structure. The Offset member of each property table entry points to a member in the parameter block. Notice that non-property table data is included in the parameter block.
The type of data stored in the Default, Minimum, and Maximum members as well as in the corresponding parameter block depends on the value of the Format member. The following list indicates the relationship between the Format member and the type of data in the Default member and parameter block.
Format member | Default member | Parameter block |
---|---|---|
CLUSPROP_FORMAT_BINARY | Pointer to a buffer if the value is non-null | LPWSTR pointing to the data followed by a DWORD to indicate size of the data in bytes |
CLUSPROP_FORMAT_DWORD | DWORD | DWORD |
CLUSPROP_FORMAT_EXPAND_SZ | Pointer to a null-terminated Unicode string if non-null | LPWSTR |
CLUSPROP_FORMAT_MULTI_SZ | Pointer to a buffer if the value is non-null | LPWSTR pointing to the data followed by a DWORD to indicate size of the data in bytes |
CLUSPROP_FORMAT_SZ | Pointer to a null-terminated Unicode string if non-null | LPWSTR |