3.2.5.2.2.13 INtmsMediaServices1::MoveToNtmsMediaPool (Opnum 16)
The MoveToNtmsMediaPool method moves a medium from its current media pool to another media pool.
-
HRESULT MoveToNtmsMediaPool( [in] LPNTMS_GUID lpMediaId, [in] LPNTMS_GUID lpPoolId );
lpMediaId: A pointer to the identifier of a physical medium.
lpPoolId: A pointer to the identifier of a media pool to which the medium is to be moved.
-
Return value/code
Description
0x00000000
S_OK
The call was successful.
0x80070005
ERROR_ACCESS_DENIED
NTMS_MODIFY_ACCESS to the library is denied; other security errors are possible, but indicate a security subsystem error.
0x80070008
ERROR_NOT_ENOUGH_MEMORY
An allocation failure occurred during processing.
0x80070057
ERROR_INVALID_PARAMETER
The parameter is missing or invalid.
0x800700AA
ERROR_BUSY
A side of the media is in use or currently unavailable.
0x800710CC
ERROR_INVALID_MEDIA
The source media or implied source media pool is invalid.
0x800710CE
ERROR_INVALID_MEDIA_POOL
Either the destination media pool is invalid, or media in the unrecognized or import pool can be moved only to the free pool.
0x800710D9
ERROR_DATABASE_FAILURE
The database is inaccessible or damaged.
0x800710DA
ERROR_DATABASE_FULL
The database is full.
0x800710DB
ERROR_MEDIA_INCOMPATIBLE
The source media type differs from the media type of the destination pool.
Upon receiving this message, the server MUST verify that lpMediaId and lpPoolId are 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 check that the user has the required access rights, ensure that all the partitions of the media about to be moved are currently available, and then MUST move the specified medium from its current media pool to the specified media pool. If the client does not have the required access rights, the server MUST return ERROR_ACCESS_DENIED (0x80070005).
The destination pool specified in the MoveToNtmsMediaPool method MUST be of the same media type and have compatible security.
The server MUST write an on-media identifier to media before moving the media into the free media pool.
A medium having a partition in the completed, allocated, or reserved state MUST NOT be moved to the free media pool. A medium MAY be moved to an import pool only if all the partitions of the medium are in the import state.<32>
On completion of an asynchronous operation, notification will be sent with the identifier lpPoolId.