Skip to content

Latest commit

 

History

History
250 lines (198 loc) · 5.89 KB

nf-ntmsapi-injectntmscleaner.md

File metadata and controls

250 lines (198 loc) · 5.89 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:ntmsapi.InjectNtmsCleaner
InjectNtmsCleaner function (ntmsapi.h)
The InjectNtmsCleaner function allows a cleaner cartridge to be inserted into the specified library unit.
InjectNtmsCleaner
InjectNtmsCleaner function [Files]
NTMS_INJECT_START
NTMS_INJECT_STOP
_zaw_injectntmscleaner
base.injectntmscleaner
fs.injectntmscleaner
ntmsapi/InjectNtmsCleaner
fs\injectntmscleaner.htm
fs
973441cb-2ec4-4a8d-8e75-3c6d01552a59
12/05/2018
InjectNtmsCleaner, InjectNtmsCleaner function [Files], NTMS_INJECT_START, NTMS_INJECT_STOP, _zaw_injectntmscleaner, base.injectntmscleaner, fs.injectntmscleaner, ntmsapi/InjectNtmsCleaner
ntmsapi.h
Windows
Windows XP [desktop apps only]
Windows Server 2003 [desktop apps only]
Ntmsapi.lib
Ntmsapi.dll
Windows
19H1
InjectNtmsCleaner
ntmsapi/InjectNtmsCleaner
c++
APIRef
kbSyntax
DllExport
Ntmsapi.dll
InjectNtmsCleaner

InjectNtmsCleaner function

-description

[Removable Storage Manager is no longer available as of Windows 7 and Windows Server 2008 R2.]

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

-parameters

-param hSession [in]

Handle to the session returned by the OpenNtmsSession function.

-param lpLibrary [in]

Unique identifier of a library object.

-param lpInjectOperation [in, out]

GUID of the insert process library operation. If dwAction is NTMS_INJECT_START, this parameter receives the GUID for the operation. If dwAction is NTMS_INJECT_STOP, this parameter must be set to the GUID for the operation to be stopped.

-param dwNumberOfCleansLeft [out]

Number of cleaning cycles left on the inserted cleaning cartridge.

-param dwAction [in]

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
Terminates the insertion prior to the time-out event lapsing. (For libraries with ports only.)

-returns

This function returns one of the following values.

Value Meaning
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 not valid.
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_SET
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

This function returns to the application as soon as the insert request is queued.

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.

-see-also

CleanNtmsDrive

Cleaner Management Functions

EjectNtmsCleaner

ReleaseNtmsCleanerSlot

ReserveNtmsCleanerSlot