IVdsVolume::AddPlex method (vds.h)
[Beginning with Windows 8 and Windows Server 2012, the Virtual Disk Service COM interface is superseded by the Windows Storage Management API.]
Adds a volume as a plex to the current volume.
Syntax
HRESULT AddPlex(
[in] VDS_OBJECT_ID VolumeId,
[out] IVdsAsync **ppAsync
);
Parameters
[in] VolumeId
The GUID of the volume to be added as a plex.
[out] ppAsync
The address of an IVdsAsync interface pointer, which VDS initializes on return. Callers must release the interface. Use this pointer to cancel, wait for, or query the status of the operation.
Return value
This method can return standard HRESULT values, such as E_INVALIDARG or E_OUTOFMEMORY, and VDS-specific return values. It can also return converted system error codes using the HRESULT_FROM_WIN32 macro. Errors can originate from VDS itself or from the underlying VDS provider that is being used. Possible return values include the following.
Return code/value | Description |
---|---|
|
The plex was added successfully. |
|
The boot volume on a GPT disk has been mirrored to an MBR disk. The new plex cannot be used to boot the computer. |
|
The volume is not accessible. |
|
The volume is failing or has failed. |
|
The volume spans multiple disks. |
|
The volume consists of multiple extents. |
|
The source volume is smaller than the target volume. If the source volume is larger than the target volume, the target volume remains the same size and the operation succeeds. |
Remarks
This operation is not valid for basic volumes, which have exactly one plex.
Use this method to add a volume as a plex to another volume. For example, a caller can create a volume (volume B), specify volume B as a new plex to an existing volume (volume A), then remove volume B. The new plex of Volume A occupies the same disk extents as did volume B.
Implementers must return a pointer to the IVdsAsync interface for this method, regardless of whether the call initiates an asynchronous operation.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | vds.h |
Library | Uuid.lib |