3.2.5.2.1.12 INtmsLibraryControl1::DeleteNtmsLibrary (Opnum 15)
The DeleteNtmsLibrary method deletes a library and all the devices in it. Any media in the library are moved to the offline library.
-
HRESULT DeleteNtmsLibrary( [in] LPNTMS_GUID lpLibraryId );
lpLibraryId: A pointer to the identifier of the media library to delete.
-
Return value/code
Description
0x00000000
S_OK
The call was successful.
0x80070005
ERROR_ACCESS_DENIED
Access to the object was denied.
0x80070008
ERROR_NOT_ENOUGH_MEMORY
An allocation failure occurred during processing.
0x80070057
ERROR_INVALID_PARAMETER
A parameter is not valid.
0x800710CD
ERROR_INVALID_LIBRARY
The library identifier is invalid.
0x800710D9
ERROR_DATABASE_FAILURE
The database is inaccessible or damaged.
0x800710DA
ERROR_DATABASE_FULL
The database is full.
0x8007139F
ERROR_INVALID_STATE
The library is not in expected state for this operation.
Upon receiving this message, the server MUST verify that lpLibrary is not NULL. If it is NULL, the server MUST immediately fail the operation and return ERROR_INVALID_PARAMETER (0x80070057).
If the parameter validation succeeds, the server MUST check access rights to the library and verify that the library is enabled and offline before further processing. If the client does not have the required access rights, NTMS_MODIFY_ACCESS to the library is denied and the server MUST return ERROR_ACCESS_DENIED (0x80070005). Other security errors are possible but indicate a security subsystem error. If the library is disabled or online, the server MUST return ERROR_INVALID_STATE (0x80071139F).
If validation is successful, the DeleteNtmsLibrary method deletes the library and all devices contained within the library from the server database after all media in the library are moved to a location in an offline library.