2.2.7 METADATA_RECORD

The METADATA_RECORD structure defines information about a metabase entry.

 typedef struct _METADATA_RECORD {
   DWORD dwMDIdentifier;
   DWORD dwMDAttributes;
   DWORD dwMDUserType;
   DWORD dwMDDataType;
   DWORD dwMDDataLen;
   [unique, size_is(dwMDDataLen)] unsigned char *pbMDData;
   DWORD dwMDDataTag;
 } METADATA_RECORD;

dwMDIdentifier: An unsigned integer value that uniquely identifies the metabase entry.

dwMDAttributes: An unsigned integer value containing bit flags that specify how to get or set data from the metabase. This member MUST have a valid combination of the following flags set.

Value

Meaning

METADATA_INHERIT

0x00000001

In Get methods: Returns inheritable data.

In Set methods: The data can be inherited.

METADATA_INSERT_PATH

0x00000040

For a string data item.

In Get methods: Replaces all occurrences of "<%INSERT_PATH%>" with the path of the data item relative to the handle.

In Set methods: Indicate that the string contains the Unicode character substring "<%INSERT_PATH%>".

METADATA_ISINHERITED

0x00000020

In Get methods: Marks data items that were inherited.

In Set methods: Not valid.

METADATA_NO_ATTRIBUTES

0x00000000

In Get methods: Not applicable. Data is returned regardless of this flag setting.

In Set methods: The data does not have any attributes.

METADATA_PARTIAL_PATH

0x00000002

In Get methods: Returns any inherited data even if the entire path is not present. This flag is valid only if METADATA_INHERIT is also set.

In Set methods: Not valid.

 METADATA_SECURE

0x00000004

In Get methods: Not valid.

In Set methods: Stores and transports the data in a secure fashion, as specified in 3.1.4.1.

METADATA_VOLATILE

0x00000010

In Get methods: Not valid.

In Set methods: Does not save the data in long-term storage.

dwMDUserType: An integer value that specifies the user type of the data. The dwMDUserType member MUST be set to one of the following values.

Value

Meaning

ASP_MD_UT_APP

0x00000065

The entry contains information specific to ASP application configuration.

IIS_MD_UT_FILE

0x00000002

The entry contains information about a file, such as access permissions or logon methods.

IIS_MD_UT_SERVER

0x00000001

The entry contains information specific to the server, such as ports in use and IP addresses.

IIS_MD_UT_WAM

0x00000064

The entry contains information specific to WAM.

dwMDDataType: An unsigned integer value that identifies the type of data in the metabase entry. The dwMDDataType member MUST be set to one of the following values.

Value

Meaning

ALL_METADATA

0x00000000

Specifies all data, regardless of type.

BINARY_METADATA

0x00000003

Specifies binary data.

DWORD_METADATA

0x00000001

Specifies all DWORD (unsigned 32-bit integer) data.

EXPANDSZ_METADATA

0x00000004

Specifies all data that consists of a string that includes the terminating null character and which contains environment variables that are not expanded.

MULTISZ_METADATA

0x00000005

Specifies all data represented as an array of strings, where each string includes the terminating null character, and the array itself is terminated by two terminating null characters.

STRING_METADATA

0x00000002

Specifies all data consisting of an ASCII string that includes the terminating null character.

dwMDDataLen: An unsigned integer value that specifies the length of the data in bytes. If the data is a string, this value includes the terminating null character. For lists of strings, this includes an additional terminating null character after the final string (double terminating null characters).

For example, the length of a string list containing two strings would be as follows.

 (wcslen(stringA) + 1) * sizeof(WCHAR) + (wcslen(stringB) + 1)
  * sizeof(WCHAR) + 1 * sizeof(WCHAR)

In-process clients need to specify dwMDDataLen only when setting binary data in the metabase. Remote clients MUST specify dwMDDataLen for all data types.

pbMDData: When setting data in the metabase, this member contains a pointer to a buffer that holds the data. When getting data from the metabase, this member contains a pointer to a buffer that will receive the data.

dwMDDataTag: A reserved member that is currently unused.