22.214.171.124.2.4 INtmsMediaServices1::DeallocateNtmsMedia (Opnum 7)
HRESULT DeallocateNtmsMedia( [in] LPNTMS_GUID lpMediaId, [in] DWORD dwOptions );
lpMediaId: A pointer to the identifier of the logical media.
dwOptions: This parameter is unused. It MUST be sent as 0 and MUST be ignored on receipt.
The call was successful.
NTMS_MODIFY_ACCESS to the library is denied; other security errors are possible, but indicate a security subsystem error.
An allocation error occurred during processing.
The media or media pool identifiers are missing.
The database is inaccessible or damaged.
The database is full.
Upon receiving this message, the server MUST verify that lpMediaId is not NULL. If it is NULL, the server MUST immediately fail the operation and return ERROR_INVALID_PARAMETER (0x80070057).
If parameter validation succeeds, the server MUST verify that the user has the required access rights, and disassociate the logical media. If the client does not have the required access rights, the server MUST return ERROR_ACCESS_DENIED (0x80070005).
When a logical medium is deallocated with the DeallocateNtmsMedia method, the server puts the side that is associated with the logical media in the available or decommissioned media state, and the logical media is deleted from the system.
Sides are decommissioned upon deallocation if the side has been allocated the maximum number of times specified in the media pool. After media enters the decommissioned state, it cannot be allocated again.<31>