[Removable Storage Manager is no longer available as of Windows 7 and Windows Server 2008 R2.]
The InventoryNtmsLibrary function queues an inventory of the specified library. If the library is busy, RSM queues InventoryNtmsLibrary and returns success.
DWORD InventoryNtmsLibrary( HANDLE hSession, LPNTMS_GUID lpLibraryId, DWORD dwAction );
Handle to the session returned by the OpenNtmsSession function.
Unique identifier of a library object.
Action to perform. This parameter can be one of the following values.
||A full on-media inventory is performed. Each side of each medium must be mounted into a drive. This is a time consuming process.|
||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).|
||Use the InventoryMethod specified in the library object (see NTMS_LIBRARYINFORMATION).|
||Stop the current inventory in the specified library.|
This function returns one of the following values.
||Access to one or more RSM objects is denied.|
||The library is not currently connected.|
||The value specified in the hSession parameter is not valid.|
||The library is the offline library.|
||The library ID or session ID is not valid.|
||Unable to connect to the RSM service.|
||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 version||Windows XP [desktop apps only] Windows Server 2003 [desktop apps only]|