ReserveNtmsCleanerSlot function (ntmsapi.h)
[Removable Storage Manager is no longer available as of Windows 7 and Windows Server 2008 R2.]
The ReserveNtmsCleanerSlot function reserves a single slot in a library unit for a drive cleaner cartridge.
Syntax
DWORD ReserveNtmsCleanerSlot(
[in] HANDLE hSession,
[in] LPNTMS_GUID lpLibrary,
[in] LPNTMS_GUID lpSlot
);
Parameters
[in] hSession
Handle to the session returned by the OpenNtmsSession function.
[in] lpLibrary
Unique identifier of the library to reserve the cleaner slot.
[in] lpSlot
Unique identifier of the slot that is to be reserved for a cleaner cartridge.
Return value
This function returns one of the following values.
Value | Meaning |
---|---|
|
NTMS_CONTROL_ACCESS to the library is denied. Other security errors are also possible, but they would indicate a security subsystem error. |
|
Either this slot or another slot in the library has already been reserved for cleaning. To change the cleaner cartridge slot, the currently reserved cleaner slot must be released first, using the ReleaseNtmsCleanerSlot function. |
|
The library is not currently connected. |
|
The value that is specified in the hSession parameter is not valid. |
|
Unable to retrieve the slot definition from the database. |
|
Unable to connect to the RSM service. |
|
A cleaner slot is not reserved. The slot specified has media in it. Reservation can only be performed on an empty slot. |
|
A cleaner slot is not reserved. The slot specified is currently not installed in the library. This error occurs if at least one cartridge magazine is missing from the library. |
|
The function was queued successfully. |
Remarks
The slot reserved with the ReserveNtmsCleanerSlot function must be present and empty. The library must not already have a slot reserved for a cleaner cartridge.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | ntmsapi.h |
Library | Ntmsapi.lib |
DLL | Ntmsapi.dll |