126.96.36.199.1.13 INtmsLibraryControl1::DeleteNtmsDrive (Opnum 16)
The DeleteNtmsDrive method deletes a drive.
HRESULT DeleteNtmsDrive( [in] LPNTMS_GUID lpDriveId );
lpDriveId: A pointer to the identifier of the drive to delete.
The call was successful.
Access to an object was denied.
The drive identifier is not valid.
A parameter is not valid.
The library identifier is not valid.
The database query or update failed.
The database is full.
An unexpected state was encountered.
Upon receiving this message, the server MUST verify that lpDriveId is not NULL. If it is NULL, the server MUST immediately fail the operation and return ERROR_INVALID_PARAMETER (0x80070057).
If 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 (0x8007139F).
If this drive belongs to a standalone library (that is, the number of slots in the library is zero) the server MUST delete the library, thereby leaving the media, drive and library objects in a state that is consistent with the physical state.
The DeleteNtmsDrive method deletes a drive from the RSM database. If the drive is not a standalone drive, then the drive MUST have dwOperationalState set to NTMS_NOT_PRESENT. If the drive does not have dwOperationalState set to NTMS_NOT_PRESENT, the server MUST fail the operation and return ERROR_INVALID_STATE (0x8007139F).