The IMSAdminBase::RenameKey method renames a key in the metabase.
HRESULT RenameKey(
METADATA_HANDLE hMDHandle, //metabase handle to the key
LPCWSTR pszMDPath, //path of the key, relative to
// hMDHandle
LPCWSTR pszMDNewName //new name for the key
);
Returns an HRESULT that contains one of the following values:
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_PARAMETER | The parameter is incorrect. |
ERROR_NOT_ENOUGH_MEMORY | Not enough memory is available to process this command. |
ERROR_PATH_NOT_FOUND | The specified path was not found in the metabase. |
ERROR_SUCCESS | The method succeeded. |