The IMSAdminBase::DeleteKey method deletes a key and all of its data from the metabase. All of the key's subkeys are recursively deleted.
HRESULT DeleteKey(
METADATA_HANDLE hMDHandle, //metabase handle.
LPCWSTR pszMDPath //path of the key to delete.
);
This parameter cannot be null.
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 is not found in the metabase. |
ERROR_SUCCESS | The method succeeded. |