InventoryNtmsLibrary Function
[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.
Syntax
DWORD InventoryNtmsLibrary(
__in HANDLE hSession,
__in LPNTMS_GUID lpLibraryId,
__in DWORD dwAction
);
Parameters
hSession [in]
Handle to the session returned by the OpenNtmsSession function.lpLibraryId [in]
Unique identifier of a library object.dwAction [in]
Action to perform. This parameter can be one of the following values.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 (see NTMS_LIBRARYINFORMATION).
NTMS_INVENTORY_STOP Stop the current inventory in the specified library.
Return Value
This function returns one of the following values.
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 not valid. |
ERROR_INVALID_LIBRARY | The library is the offline library. |
ERROR_INVALID_PARAMETER | The library ID or session ID is not valid. |
ERROR_NOT_CONNECTED | Unable to connect to the RSM service. |
ERROR_SUCCESS | The function was successful. |
Remarks
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.
Requirements
Minimum supported client |
Windows 2000 Professional |
Minimum supported server |
Windows 2000 Server |
End of client support |
Windows Vista |
End of server support |
Windows Server 2008 |
Header |
Ntmsapi.h |
Library |
Ntmsapi.lib |
DLL |
Ntmsapi.dll |
See Also
Send comments about this topic to Microsoft
Build date: 6/9/2011