[Removable Storage Manager is no longer available as of Windows 7 and Windows Server 2008 R2.]
The EjectNtmsCleaner function ejects the cleaning cartridge from the currently reserved cleaner slot.
DWORD EjectNtmsCleaner( __in HANDLE hSession, __in LPNTMS_GUID lpLibrary, __inout LPNTMS_GUID lpEjectOperation, __in DWORD dwAction );
Handle to the session returned by the OpenNtmsSession function.
Unique identifier of a library object.
lpEjectOperation [in, out]
GUID of the eject process library operation. If dwAction is NTMS_EJECT_START, this parameter receives the GUID for the operation. If dwAction is NTMS_EJECT_STOP, this parameter must be set to the GUID for the operation to be stopped.
Action to perform. 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 function is called again with NTMS_EJECT_STOP. The time-out value is specified in the library object and is applied to all ejections in the library.
For libraries with NTMS_IEPORT objects only. Terminates the ejection process specified by lpEjectOperation prior to the time-out event lapsing.
This function returns one of the following values.
Access to one or more RSM objects is denied.
The value supplied in the hSession parameter is not valid.
Unable to retrieve the library definition from the database.
This library does not have a cleaner slot reserved.
Unable to connect to the RSM service.
A cleaner slot is reserved but is already empty.
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.
The function was successful.
The EjectNtmsCleaner function returns to the application as soon as the eject request is queued.
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 the offline library.
Minimum supported client
|Windows 2000 Professional|
Minimum supported server
|Windows 2000 Server|
End of client support
End of server support
|Windows Server 2008|
Build date: 6/9/2011