184.108.40.206.2.2 INtmsMediaServices1::DismountNtmsMedia (Opnum 4)
The DismountNtmsMedia method queues a command to move a medium in a drive to its storage.
HRESULT DismountNtmsMedia( [in, size_is(dwCount)] LPNTMS_GUID lpMediaId, [in] DWORD dwCount, [in] DWORD dwOptions );
dwCount: The number of elements in the lpMediaId array.
dwOptions: One of the options from the NtmsDismountOptions (section 220.127.116.11) numeration.
The call was successful.
NTMS_USE_ACCESS to the media pool or library that contains the media is denied; other security errors are possible, but indicate a security subsystem error.
A parameter is missing.
The database is inaccessible or damaged.
The database is full.
One or more resources required to perform the dismount are not currently available.
The library that contains the drives or media is not valid.
A medium is not valid, or lpMediaId contains duplicate identifiers.
An unexpected media or device state occurred during dismount.
The specified media is offline.
A memory allocation failure occurred during processing.
The time-out event expired while the application attempted to acquire one or more resources.
Upon receiving this message, the server MUST verify that dwCount is not 0 and verify that lpMediaId is not NULL. If parameter validation fails, the server MUST immediately fail the operation and return ERROR_INVALID_PARAMETER (0x80070057).
The DismountNtmsMedia method MUST return as soon as the operation is queued with the server. The application can wait for the side state to become idle. An application MUST use the DismountNtmsMedia method to release the drive resource after the application has used the specified medium. Unreleased media cannot be used by other RSM sessions.
On completion of an asynchronous operation, notification is sent with the identifier lpMediaId.