Export (0) Print
Expand All

IMSAdminBase::DeleteData

IIS 6.0

The IMSAdminBase::DeleteData method deletes a data from a key in the metabase.

HRESULT DeleteData(
   METADATA_HANDLE hMDHandle,
   LPCWSTR pszMDPath,
   DWORD dwMDIdentifier,
   DWORD dwMDDataType
);

hMDHandle

Specifies a handle returned by the IMSAdminBase::OpenKey method with write permission. This parameter cannot be set to METADATA_MASTER_ROOT_HANDLE.

pszMDPath

Specifies the path of the key to have its data deleted, relative to the path of the handle. For example, if the handle references the /LM key, you could specify the Web services subkey using the path /W3SVC.

dwMDIdentifier

Specifies the identifier of the data, such as MD_CONNECTION_TIMEOUT.

dwMDDataType

Specifies a data type. If this parameter is not set to ALL_METADATA, the data item will be removed only if its data type matches the specified type. This parameter can be one of the following values.

Data type

Meaning

ALL_METADATA

Specifies all 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%.

MULTISZ_METADATA

An array of null-terminated strings, terminated by two null characters.

STRING_METADATA

A null-terminated ASCII string.

Returns an HRESULT that contains one of the following values.

Value

Description

E_ACCESSDENIED

Access is denied. Either the open handle does not have read or write permission as needed, or the user does not have sufficient permissions to perform the operation.

E_INVALIDARG

The parameter is incorrect.

HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND)

The specified path was not found in the metabase.

S_OK

The method succeeded.

MD_ERROR_DATA_NOT_FOUND

The specified data is not found in the metabase.

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 iadmw.h; include iiscnfg.h.

Show:
© 2014 Microsoft