Platform SDK: Removable Storage Manager |
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 );
Value | Meaning |
---|---|
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 side 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 unrecognized or import pool may only be moved to the free 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. |
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 free media pool.
Windows NT/2000: Requires Windows 2000.
Header: Declared in Ntmsapi.h.
Library: Use Ntmsapi.lib.
Media Services Functions, AllocateNtmsMedia, CreateNtmsMediaPool