The IMSAdminBase::DeleteData method deletes a data from a key in the metabase.
HRESULT DeleteData(
METADATA_HANDLE hMDHandle, //metadata handle.
LPCWSTR pszMDPath, //path to the key relative to hMDHandle.
DWORD dwMDIdentifier, //identifier of the data.
DWORD dwMDDataType //type of data to remove.
);
Data type | Description |
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 |
ERROR_ACCESS_DENIED | 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. |
ERROR_INVALID_PARAMETER | The parameter is incorrect. |
ERROR_PATH_NOT_FOUND | The specified path was not found in the metabase. |
ERROR_SUCCESS | The method succeeded. |
MD_ERROR_DATA_NOT_FOUND | The specified data is not found in the metabase. |