InventoryNtmsLibrary

[This is preliminary documentation and subject to change.]

The InventoryNtmsLibrary function queues an inventory of the specified online library. If the library is busy, RSM queues InventoryNtmsLibrary and returns success.

DWORD WINAPI InventoryNtmsLibrary(
  HANDLE hSession,
  LPNTMS_GUID lpLibraryId,
  DWORD dwAction
);
 

Parameters

hSession
Handle to the session returned by the OpenNtmsSession function.
lpLibraryId
Specifies the unique identifier of an online library object.
dwAction
This parameter can be one of the following values.
Value Meaning
NTMS_INVENTORY_OMID A full on-media inventory is performed. Each partition of each medium must be mounted into a drive. This is a time consuming process.
NTMS_INVENTORY_FAST If the library has a bar-code reader installed, this flag causes a bar-code inventory to be performed. If the library does not have a bar-code reader, this flag causes a differential inventory to be performed (slots are classified).
NTMS_INVENTORY_DEFAULT Use the InventoryMethod specified in the library object.
NTMS_INVENTORY_NONE Perform no inventory. Operation is a non-operation.

Return Values

ERROR_ACCESS_DENIED
Access to one or more RSM objects 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
The library specified is not an online library.
ERROR_INVALID_PARAMETER
The library ID or session ID is invalid.
ERROR_NOT_CONNECTED
Unable to connect to the RSM service.
ERROR_SUCCESS
The function was successful.

Remarks

Only online libraries can be inventoried.

The InventoryNtmsLibrary function marks all the slots that currently contain a medium in the library for classification/identification. The InventoryNtmsLibrary function returns when all the media is marked.

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

Library Control Functions, AccessNtmsLibraryDoor