18.104.22.168.1.6 INtmsLibraryControl1::InventoryNtmsLibrary (Opnum 8)
The InventoryNtmsLibrary method queues a request to perform an inventory of an online library.
HRESULT InventoryNtmsLibrary( [in] LPNTMS_GUID lpLibraryId, [in] DWORD dwAction );
lpLibraryId: A pointer to the identifier of a media library.
dwAction: One of the NTMS_INVENTORY_STOP, NTMS_INVENTORY_OMID, NTMS_INVENTORY_FAST, or NTMS_INVENTORY_DEFAULT values from the NtmsInventoryMethod enumeration, specifying the action to perform.
The call was successful.
Access to the object was denied.
A parameter is not valid.
Unable to connect to the server.
The library identifier refers to an offline library.
A resource required for this operation is disabled.
The library identifier is invalid.
Upon receiving this message, the server MUST verify that lpLibraryId is not NULL. If parameter validation fails, the server MUST immediately fail the operation and return ERROR_INVALID_PARAMETER (0x80070057).
If parameter validation succeeds, the server MUST get the library selected from the database, check the access to the library, and verify that the library is enabled and is online before making the call. If the client does not have the required access rights, the server MUST return ERROR_ACCESS_DENIED. If the library is disabled, the server MUST return ERROR_RESOURCE_DISABLED (0x800710D5). If the library is offline, the server MUST return ERROR_LIBRARY_OFFLINE (0x800710D1).
The action taken by the server depends on the value of dwAction. The following table lists all possible values for dwAction.
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 inventory method specified in the library object (for more information, see the description of the NTMS_LIBRARYINFORMATION structure).
Stop the current inventory in the specified library.
The libraries that are not present MUST not be inventoried.
The InventoryNtmsLibrary method MUST mark all the slots that currently contain a medium in the library for classification or identification. The InventoryNtmsLibrary method returns when all the media is marked.
On completion of an asynchronous operation, notification will be sent with the identifier lpLibraryId.