METADATA_RECORD
The METADATA_RECORD structure contains information about a metabase entry. It is used as an input parameter by the SetData method and as an [in,out] parameter by methods that retrieve data from the metabase, such as GetData, EnumData, or GetAllData.
Example Code
typedef struct _METADATA_RECORD {
DWORD dwMDIdentifier;
DWORD dwMDAttributes;
DWORD dwMDUserType;
DWORD dwMDDataType;
DWORD dwMDDataLen;
unsigned char *pbMDData;
DWORD dwMDDataTag;
} METADATA_RECORD;
Members
dwMDIdentifier
A DWORD that uniquely identifies the metabase entry, for example, MD_SERVER_STATE.dwMDAttributes
Flags that specify how to set or get data from the metabase. This member can be set to one or more of the following values:Flag
Description
METADATA_INHERIT
Set: The data can be inherited.
Get: Return inheritable data.
METADATA_INSERT_PATH
For a string data item:
Set: Indicates the string contains MD_INSERT_PATH_STRINGW.
Get: Replace MD_INSERT_PATH_STRINGW with the path of the data item relative to the handle.
METADATA_ISINHERITED
Set: Not valid.
Get: Mark data items that were inherited.
METADATA_NO_ATTRIBUTES
Set: The data does not have any attributes.
Get: Not applicable. Data is returned regardless of this flag setting.
METADATA_PARTIAL_PATH
Set: Not valid.
Get: Return S_OK and any inherited data even if the entire path is not present. This flag is only valid if METADATA_INHERIT is also set.
METADATA_REFERENCE
Set: The data was retrieved by reference.
Get: Not valid.
METADATA_SECURE
Set: Store and transport the data in a secure fashion.
Get: Not valid.
METADATA_VOLATILE
Set: Do not save the data in long-term storage.
Get: Not valid.
dwMDUserType
A DWORD that specifies the user type of the data. When you use the SetData method to create a new data item, specify a user type above 2,000. User types 2,000 and below are reserved. When retrieving or updating data, this parameter specifies the user type assigned to the data item.IIS currently uses the following user types:
User type
Description
ASP_MD_UT_APP
The entry contains information specific to ASP application configuration.
IIS_MD_UT_FILE
The entry contains information about a file, such as access permissions, or logon methods.
IIS_MD_UT_SERVER
The entry contains information specific to the server, such as ports in use and IP addresses.
IIS_MD_UT_WAM
The entry contains information specific to Web application management.
dwMDDataType
Identifies the type of data in the metabase entry. This parameter can be one of the following values:Data type
Description
ALL_METADATA
Set: Not valid
Get: Return data regardless of type.
BINARY_METADATA
Binary data in any form.
DWORD_METADATA
An unsigned 32-bit number.
EXPANDSZ_METADATA
A null-terminated string that contains unexpanded environment variables, such as %PATH%. The environment variables are not expanded by the IIS Admin Base Object.
MULTISZ_METADATA
An array of null-terminated strings, terminated by two null characters.
STRING_METADATA
A null-terminated string.
dwMDDataLen
A DWORD that specifies the length of the data in bytes. If the data is a string, this value includes the ending null character. For multisz data (a list of strings), this includes an additional null character after the final string. For example, the length of a multisz string containing two strings would be:(wcslen(stringA) + 1) * sizeof(WCHAR) + (wcslen(stringB) + 1) * sizeof(WCHAR) + 1 * sizeof(WCHAR)
In-process clients need to specify dwMDDataLen only when setting binary and multisz values in the metabase. Remote applications must specify dwMDDataLen for all data types.
pbMDData
When METADATA_RECORD is being used with methods such as IMSAdminBase::SetData to set a value in the metabase, pbMDData points to a buffer that contains the new data. When METADATA_RECORD is being used with methods such as IMSAdminBase::GetData to retrieve data from the metabase, pbMDData points to a buffer that will receive the data.dwMDDataTag
Reserved. Do not use.
Requirements
Client: Requires Windows XP Professional, Windows 2000 Professional, or Windows NT Workstation 4.0.
Server: Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0.
Product: IIS
Header: Declared in Mddefw.h; include iiscnfg.h, iadmw.h.