InventoryNtmsLibrary function (ntmsapi.h)
[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
[in] hSession
Handle to the session returned by the OpenNtmsSession function.
[in] lpLibraryId
Unique identifier of a library object.
[in] dwAction
Action to perform. This parameter can be one of the following values.
Value | Meaning |
---|---|
|
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. |
Return value
This function returns one of the following values.
Value | Meaning |
---|---|
|
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. |
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
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | ntmsapi.h |
Library | Ntmsapi.lib |
DLL | Ntmsapi.dll |