About Data Structures
The Failover Cluster API defines a number of data structures that are used as building blocks of value lists. A data structure acts as a "header" for an area of memory, describing the type and length of the data that follows. A data structure consists of the following members.
- A Syntax member describing the format and type of the data value.
- A Length member describing the byte size of the data value.
- A data value member holding the data.
This architecture is shown in the following diagram.
When "stacked" contiguously in a buffer, data structures allow parsing routines to search for specific data values by reading the Syntax member, and advance past blocks of data by using the Length member.
Note that the Syntax and Length members are actually members of the CLUSPROP_VALUE structure. The definition of each data structure in ClusAPI.h includes a CLUSPROP_VALUE structure. Therefore, the actual architecture of a data structure consists of the following:
- A CLUSPROP_VALUE member
- A data value member
However, when describing and using data structures, it is more convenient to refer to the Syntax and Length members explicitly as if they were data structure members.
For more information on each of these members, refer to the following sections.