AccessNtmsLibraryDoor function (ntmsapi.h)
[Removable Storage Manager is no longer available as of Windows 7 and Windows Server 2008 R2.]
The AccessNtmsLibraryDoor function unlocks the door of the specified library. If the library is busy, RSM queues the request and returns successfully.
Syntax
DWORD AccessNtmsLibraryDoor(
[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 the library object. This library must support door access.
[in] dwAction
Action to perform. This parameter can be one of the following values.
Value | Meaning |
---|---|
|
After the user closes the door, no inventory is performed. However, if a mount-label check fails, an inventory will be performed. |
|
After the user closes the door, a full on-media inventory is performed. This can be time consuming because each side of each medium must be mounted. |
|
If the library has a bar-code reader installed, this flag causes 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. The OMIDs are checked on each medium placed in an empty slot while the door is open. |
|
Use the InventoryMethod specified in the library object (see NTMS_LIBRARYINFORMATION). |
Return value
This function returns one of the following values.
Value | Meaning |
---|---|
|
NTMS_CONTROL_ACCESS to the library is denied. Other security errors are also possible, but they would indicate a security subsystem error. |
|
The database is inaccessible or damaged. |
|
The database is full. |
|
The session ID is missing or is not valid. |
|
The library ID is missing. |
|
The library ID references an offline library without a door. |
|
An allocation failure occurred during processing. |
|
The library is disabled. |
|
The library does not have a door. |
|
Door access is queued. |
Remarks
Some libraries provide no means for RSM to programmatically lock and unlock their doors. The behavior of this function with these libraries is identical to its behavior with libraries that RSM can unlock and lock.
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 |