IVdsVolume::RemovePlex 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.]

Removes one or more specified plexes from the current volume, releasing the extents.

Syntax

HRESULT RemovePlex(
  [in]  VDS_OBJECT_ID plexId,
  [out] IVdsAsync     **ppAsync
);

Parameters

[in] plexId

The GUID of the plex to be removed.

[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
S_OK
The plex was removed successfully.
VDS_E_VOLUME_NOT_ONLINE
0x8004243DL
The volume is not accessible.
VDS_E_VOLUME_NOT_A_MIRROR
0x80042445L
The volume is not a mirror.

Remarks

This operation cannot remove the last plex of a volume. Instead, use the IVdsVolume::Delete method to remove the last remaining volume (the sole plex). This method is not valid for basic volumes, which have exactly one plex.

VDS does not dismount the volume when it removes a plex.

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

See also

IVdsAsync

IVdsVolume

IVdsVolume::Delete