About Value Lists

A value list is a collection of data values that is used as the data portion of a property value in a property list and is returned from the following control code operations:

Because each of the data values in a value list can have a different format, type, and length, each entry in the list begins with a CLUSPROP_VALUE structure. The CLUSPROP_VALUE structure describes the data that follows it and has two members: a syntax member and a length member. The syntax member is a CLUSPROP_SYNTAX structure, a union that describes data as either a single DWORD such as CLUSPROP_SYNTAX_SCSI_ADDRESS or as a format and type such as CLUSPROP_FORMAT_DWORD and CLUSPROP_TYPE_CHARACTERISTICS.

For some types of data, one way is definitely preferred. User-defined types fall into this category and must be described with a format and type. A user-defined value type might be used with a user-defined control function. The CLUSPROP_VALUE structure's Syntax member for user-defined numeric data would be set as follows. Notice that the wType member is set to a value beginning with CLUSPROP_TYPE_USER, the beginning of the range for user-defined data types.

#define CLUSPROP_TYPE_MY_TYPE (CLUSPROP_TYPE_USER+1)
CLUSPROP_SYNTAX Syntax;
Syntax.wFormat = CLUSPROP_FORMAT_DWORD;
Syntax.wType = CLUSPROP_TYPE_MY_TYPE;
 

Other types of data can set to appropriate values either the dw member of the CLUSPROP_VALUE structure or the wFormat and wType members of the CLUSPROP_SYNTAX structure. For example, you could describe a disk number in either of the following two ways:

CLUSPROP_SYNTAX Syntax;
Syntax.dw = CLUSPROP_SYNTAX_DISK_NUMBER;

CLUSPROP_SYNTAX Syntax;
Syntax.wFormat = CLUSPROP_FORMAT_DWORD;
Syntax.wType = CLUSPROP_TYPE_DISK_NUMBER;
 

The only difference between the two definitions is that the first example combines the format and type values at compile time while the second example combines them at run time.

The last entry in a value list is special. Because its purpose is solely to mark the end of the list, it contains only the CLUSPROP_SYNTAX portion of the CLUSPROP_VALUE structure. There is no length member and no data. The last entry appears as follows:

CLUSPROP_SYNTAX Syntax;
Syntax.dw = CLUSPROP_SYNTAX_ENDMARK;
 

For information about property lists, see About Property Lists.