Поделиться через


Value Lists

A value list is a block of memory containing a sequence of data structures. Value lists are used as the building blocks of property lists and as return values for some control code operations.

Each data structure in a value list consists of the following elements:

  • A header that describes the syntax and length of the data contained within the structure. For example, many control codes use value lists that use the CLUSPROP_VALUE structure as the header. In turn, CLUSPROP_VALUE contains a CLUSPROP_SYNTAX value that describes the type of data, and a DWORD containing the length of that data.
  • The data itself. Types of data can include a single value (such as a string or DWORD), an array of values (such as a BYTE array), or a user-defined structure.

For an example that uses a more complex structure than simply a list of CLUSPROP_VALUE elements and their associated data, see Value Lists for Storage Class Resources.

Note

each data structure in the value list must be DWORD-aligned. It is a good idea to zero the memory of your value list buffer before building the list so that bytes used for padding do not contain misleading values.

 

To mark the end of a value list, the last entry in the list contains only the Syntax member of a data structure set to CLUSPROP_SYNTAX_ENDMARK. The last entry has no Length member and no data. The following diagram shows the layout of a value list.

For more information on how to build and read value lists, see Using Value Lists.