InjectNtmsCleaner

[This is preliminary documentation and subject to change.]

The InjectNtmsCleaner function allows a cleaner cartridge to be inserted into the specified online library unit.

DWORD WINAPI InjectNtmsCleaner(
  HANDLE hSession, 
  LPNTMS_GUID lpLibrary,
  LPNTMS_GUID lpInjectOperation,
  WORD dwNumberOfCleansLeft,
  DWORD dwAction
);
 

Parameters

hSession
Handle to the session returned by the OpenNtmsSession function.
lpLibrary
Specifies the unique identifier of a library object.
lpInjectOperation
Specifies the GUID of the insert process. This is returned for use of with Stop action code.
dwNumberOfCleansLeft
Represents the number of cleaning cycles left on the inserted cleaning cartridge
dwAction
This parameter can be one of the following values.
Value Meaning
NTMS_INJECT_START Start the insertion with either the NTMS_IEPORT or the NTMS_IEDOOR object. A single cleaner cartridge should be inserted. If the NTMS_IEDOOR object is used, no inventory will be performed on the library.
NTMS_INJECT_STOP For libraries with PORTs only: Terminates the insertion prior to the time-out event lapsing.

Return Values

ERROR_ACCESS_DENIED
Access to at least one RSM object is denied.
ERROR_DEVICE_NOT_AVAILABLE
The library is not currently connected.
ERROR_INVALID_HANDLE
The value specified in the hSession parameter is invalid.
ERROR_INVALID_LIBRARY
Unable to retrieve the library definition from the database.
ERROR_LIBRARY_OFFLINE
The library must be online for a cleaner cartridge to be inserted.
ERROR_NO_SLOT_RESERVED
This library has no slot reserved as a cleaner slot.
ERROR_SLOT_FULL
A cleaner slot is reserved but already has a cleaner cartridge. The cleaner cartridge must be ejected first, using the EjectNtmsCleaner function.
ERROR_SLOT_NOT_PRESENT
A cleaner slot is reserved but the slot specified is currently not installed in the library. This error occurs if at least one magazine is missing from the library.
ERROR_SUCCESS
The function was successful.

Remarks

To use the InjectNtmsCleaner function, the number of cleaning cycles that remain on the cleaner cartridge must be specified so that RSM can keep track of it.

If an NTMS_IEPORT object is available, the NTMS_IEPORT object directs the cartridge to the currently reserved cleaner slot.

If there is no NTMS_IEPORT object, a door access is performed. In this case, the operator is directed to place the media into the reserved slot.

QuickInfo

  Windows NT: Requires version 5.0 or later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in ntmsapi.h.
  Import Library: Use ntmsapi.lib.

See Also

Cleaner Management Functions, CleanNtmsDrive, EjectNtmsCleaner, ReleaseNtmsCleanerSlot, ReserveNtmsCleanerSlot