184.108.40.206.2.17 INtmsMediaServices1::ChangeNtmsMediaType (Opnum 20)
The ChangeNtmsMediaType method moves a physical media identifier to a new media pool and sets the media type of the medium to that of the pool.
HRESULT ChangeNtmsMediaType( [in] LPNTMS_GUID lpMediaId, [in] LPNTMS_GUID lpPoolId );
lpMediaId: A pointer to the identifier of the physical media to be moved.
lpPoolId: A pointer to the identifier of the media pool to which the media will be allocated.
The call was successful.
NTMS_MODIFY_ACCESS to the media pool of the media is denied.
An allocation failure occurred during processing.
The media pool or media identifiers are missing.
The media identifier is not valid.
The identifier of the media pool is invalid.
The database is inaccessible or damaged.
The database is full.
Upon receiving this message, the server MUST verify that both 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 verify that the user has the required access rights and that the library is enabled and online. If the client does not have the required access rights, the server MUST return ERROR_ACCESS_DENIED (0x80070005). If the library is offline, the server MUST return ERROR_LIBRARY_OFFLINE (0x800710D1).
The ChangeNtmsMediaType method uses the same policy for moving media as the method specified in [MSDN-MoveToNtmsMediaPool]. A medium having a partition in the completed, allocated, or reserved state MUST NOT be moved to the free media pool. A medium can be moved to an import pool only if all the partitions of the medium are in the import state.
Unrecognized media can only be moved to the free pool.
If moving the given media to specified media pool is an invalid operation, it MUST return ERROR_INVALID_MEDIA_POOL (0x800710CE).
On completion of an asynchronous operation, notification is sent with the identifier lpMediaId.