MoveToNtmsMediaPool function (ntmsapi.h)
[Removable Storage Manager is no longer available as of Windows 7 and Windows Server 2008 R2.]
The MoveToNtmsMediaPool function moves the specified medium from its current media pool to the specified media pool.
Syntax
DWORD MoveToNtmsMediaPool(
[in] HANDLE hSession,
[in] LPNTMS_GUID lpMediaId,
[in] LPNTMS_GUID lpPoolId
);
Parameters
[in] hSession
Handle to the session returned by the OpenNtmsSession function.
[in] lpMediaId
Unique identifier of a piece of physical media.
[in] lpPoolId
Unique identifier of the destination media pool.
Return value
This function returns one of the following values.
Value | Meaning |
---|---|
|
NTMS_CONTROL_ACCESS to the media's media pool is denied. Other security errors are also possible, but they would indicate a security subsystem error.
Windows XP: NTMS_MODIFY_ACCESS to the 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. |
|
At least one side of the media is in use or currently unavailable. |
|
The database is inaccessible or damaged. |
|
The database is full. |
|
The session handle is missing or is not valid. |
|
The destination media pool is not valid; the media pool is nonexistent; or the media in the unrecognized or import pool may only be moved to the free pool. |
|
The source media or implied source media pool is not valid. |
|
The media ID or media pool ID is missing. |
|
The media type of the source differs from the media type of the destination media pool. |
|
An allocation failure occurred during processing. |
|
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 free media pool.
A medium having a partition in the Completed, Allocated, or Reserved state may 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.
Windows Server 2003: If the free pool is the source pool, NTMS_USE_ACCESS to the free pool and NTMS_CONTROL_ACCESS to the destination pool is required. Otherwise, NTMS_CONTROL_ACCESS is required on both source and destination pool. If the free pool is the destination pool, NTMS_CONTROL_ACCESS to the source pool and NTMS_USER_ACCESS to the free pool is required. Otherwise, NTMS_CONTROL_ACCESS is required on both source and destination pools.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | ntmsapi.h |
Library | Ntmsapi.lib |
DLL | Ntmsapi.dll |