The IMSAdminBase::AddKey method creates a key and adds it to the metabase as a subkey of an existing key at the specified path.
HRESULT AddKey(
METADATA_HANDLE hMDHandle, //metabase handle.
LPCWSTR pszMDPath //path to the key relative to hMDHandle.
);
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_DUP_NAME | A key of that name already exists in the metabase. |
ERROR_INVALID_NAME | The specified name is invalid. |
ERROR_INVALID_PARAMETER | The parameter is incorrect. |
ERROR_NOT_ENOUGH_MEMORY | Not enough storage is available to process this command. |
ERROR_PATH_NOT_FOUND | The specified path is not found in the metabase. |
ERROR_SUCCESS | The method succeeded. |