Platform SDK: Removable Storage Manager

ReserveNtmsCleanerSlot

The ReserveNtmsCleanerSlot function reserves a single slot in an online library unit for a drive cleaner cartridge.

DWORD WINAPI ReserveNtmsCleanerSlot(
  HANDLE hSession,
  LPNTMS_GUID lpLibrary,
  LPNTMS_GUID lpSlot
);

Parameters

hSession
Handle to the session returned by the OpenNtmsSession function.
lpLibrary
Specifies the unique identifier of the library to set the cleaner slot.
lpSlot
Specifies the unique identifier of the slot that is to be reserved for a cleaner cartridge.

Return Values

Value Meaning
ERROR_ALREADY_RESERVED 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.
ERROR_ DEVICE_NOT_AVAILABLE The library is not currently connected.
ERROR_INVALID_HANDLE The value specified in the hSession parameter is invalid.
ERROR_INVALID_SLOT Unable to retrieve the slot definition from the database.
ERROR_NOT_CONNECTED Unable to connect to the RSM service.
ERROR_SLOT_FULL A cleaner slot is not reserved. The slot specified has media in it. Reservation can only be performed on an empty slot.
ERROR_SLOT_NOT_PRESENT 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.
ERROR_SUCCESS 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

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Ntmsapi.h.
  Library: Use Ntmsapi.lib.

See Also

Cleaner Management Functions, CleanNtmsDrive, EjectNtmsCleaner, InjectNtmsCleaner, ReleaseNtmsCleanerSlot