Platform SDK: Removable Storage Manager |
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 );
Value | Meaning |
---|---|
NTMS_INVENTORY_OMID | A full on-media inventory is performed. Each side 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_STOP | Stop the current inventory in the specified library. |
Value | Meaning |
---|---|
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. |
Not present libraries cannot 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.
Windows NT/2000: Requires Windows 2000.
Header: Declared in Ntmsapi.h.
Library: Use Ntmsapi.lib.