EjectNtmsCleaner

[This is preliminary documentation and subject to change.]

The EjectNtmsCleaner function ejects the cleaning cartridge from the currently reserved cleaner slot.

DWORD WINAPI EjectNtmsCleaner(
  HANDLE hSession, 
  LPNTMS_GUID lpLibrary,
  LPNTMS_GUID lpEjectOperation,
  DWORD dwAction
);
 

Parameters

hSession
Handle to the session returned by the OpenNtmsSession function.
lpLibrary
Specifies the unique identifier of a library object.
lpEjectOperation
Specifies the GUID of the eject process. This value is returned for use with a Stop action code.
dwAction
Specifies the action to take. This parameter can be either one of the following values.
Value Meaning
NTMS_EJECT_START Starts the eject operation with a port. The specified medium is ejected until the time-out event occurs or the EjectNtmsCleaner function is called again with the NTMS_EJECT_STOP flag set for this parameter. The time-out value is specified in the library object and is applied to all ejections in the library.
NTMS_EJECT_STOP For libraries with NTMS_IEPORTobjects only. Terminates the ejection process prior to the time-out event lapsing.

Return Values

ERROR_ACCESS_DENIED
Access to one or more RSM objects is denied.
ERROR_INVALID_HANDLE
The value supplied in the hSession parameter is invalid.
ERROR_INVALID_LIBRARY
Unable to retrieve the library definition from the database.
ERROR_NO_SLOT_RESERVED
This library does not have a cleaner slot reserved.
ERROR_NOT_CONNECTED
Unable to connect to the RSM service.
ERROR_SLOT_EMPTY
A cleaner slot is reserved but is already empty.
ERROR_SLOT_NOT_PRESENT
A cleaner slot is reserved but the slot is currently not installed in the library. This error occurs when at least one magazine is missing from the library.
ERROR_SUCCESS
The function was successful.

Remarks

If the library specified in the EjectNtmsCleaner function has an NTMS_IEPORT object, RSM uses the NTMS_IEPORT object to eject the cleaner. If there is no NTMS_IEPORT object, the NTMS_IEDOOR object is used to allow the operator to gain access to the cleaner slot.

Ejected cleaner cartridges are not tracked in an offline library.

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, InjectNtmsCleaner, ReleaseNtmsCleanerSlot, ReserveNtmsCleanerSlot