IVdsVolume::BreakPlex method (vds.h)
Removes a specified plex from the current volume. The interface pointer for the new volume object can be retrieved by calling IVdsAsync::Wait through the ppAsync parameter. The VDS_ASYNC_OUTPUT structure returned contains the volume object interface pointer in the bvp.pVolumeUnk member.
HRESULT BreakPlex( VDS_OBJECT_ID plexId, IVdsAsync **ppAsync );
The GUID of the plex to be broken.
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.
If you call IVdsAsync::Wait on this method and a success HRESULT value is returned, you must release the interfaces returned in the VDS_ASYNC_OUTPUT structure by calling the IUnknown::Release method on each interface pointer. However, if Wait returns a failure HRESULT value, or if the pHrResult parameter of Wait receives a failure HRESULT value, the interface pointers in the VDS_ASYNC_OUTPUT structure are NULL and do not need to be released. You can test for success or failure HRESULT values by using the SUCCEEDED and FAILED macros defined in Winerror.h.
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.
||The plex was broken successfully.|
||The volume is not available.|
||The volume is not a mirror.|
This operation is not valid for basic volumes, which have exactly one plex.
Use this method to break a mirror. The broken plex becomes a new volume. If the remaining plex is stale or missing, VDS stops the operation and returns an error. Note that VDS dismounts the volume during the operation.
A boot or system plex—essentially, the plex used to boot the computer—is not valid for plexId. When passed such a plex, VDS stops the operation and returns an error.
Implementers must return a pointer to the IVdsAsync interface for this method, regardless of whether the call initiates an asynchronous operation.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|