MoveToNtmsMediaPool

[This is preliminary documentation and subject to change.]

The MoveToNtmsMediaPool function moves the specified medium from its current media pool to the specified media pool.

DWORD WINAPI MoveToNtmsMediaPool(
  HANDLE hSession,
  LPNTMS_GUID lpMediaId,
  LPNTMS_GUID lpPoolId
);
 

Parameters

hSession
Handle to the session returned by the OpenNtmsSession function.
lpMediaId
Specifies the unique identifier of a piece of physical media. A medium must not have a partition in the Completed, Allocated, or Reserved state to be moved to another media pool.
lpPoolId
Specifies the unique identifier of the destination media pool.

Return Values

ERROR_ACCESS_DENIED
NTMS_MODIFY_ACCESS to source media's media pool or the destination media pool is denied. Other security errors are also possible, but they would indicate a security subsystem error.
ERROR_BUSY
At least one partition of the media is in use or currently unavailable.
ERROR_DATABASE_FAILURE
The database is inaccessible or damaged.
ERROR_DATABASE_FULL
The database is full.
ERROR_INVALID_HANDLE
The session handle is invalid or missing.
ERROR_INVALID_MEDIA_POOL
The destination media pool is invalid. The media pool is nonexistent. The media in the foreign or import pool may only be moved to the scratch pool.
ERROR_INVALID_MEDIA
The source media or implied source media pool is invalid.
ERROR_INVALID_PARAMETER
The media ID or media pool ID is missing.
ERROR_MEDIA_INCOMPATIBLE
The source media type differs from the destination media pool's media type.
ERROR_NOT_ENOUGH_MEMORY
An allocation failure occurred during processing.
ERROR_SUCCESS
The function was successful.

Remarks

The destination pool specified in the MoveToNtmsMediaPool function must be of the same media type and have compatible security.

RSM writes an on-media identifier to media before moving the media into the scratch media pool from the foreign media pool.

QuickInfo

  Windows NT: Requires version 5.0 or later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in ntmsapi.h.
  Import Library: Use ntmsapi.lib.

See Also

Media Services Functions, AllocateNtmsMedia, CreateNtmsMediaPool