3.4.5.2.20.1 IVdsPack2::CreateVolume2 (Opnum 3)

The CreateVolume2 method creates a volume in a disk pack with an optional alignment parameter.

 HRESULT CreateVolume2(
   [in] VDS_VOLUME_TYPE type,
   [in, size_is(lNumberOfDisks)] VDS_INPUT_DISK* pInputDiskArray,
   [in] long lNumberOfDisks,
   [in] unsigned long ulStripeSize,
   [in] unsigned long ulAlign,
   [out] IVdsAsync** ppAsync
 );

type: A value from the VDS_VOLUME_TYPE enumeration that indicates the type of volume to create.

pInputDiskArray: An array of VDS_INPUT_DISK structures that indicate the disks on which to create the volume.<86>

lNumberOfDisks: The number of elements in pInputDiskArray.

ulStripeSize: The stripe size, in bytes, of the new volume.<87>

ulAlign: The number of bytes for the volume alignment. If zero is specified, the server determines the alignment value based on the size of the disk on which the volume is created.<88>

ppAsync: A pointer to an IVdsAsync interface that, if the operation is successfully completed, receives the IVdsAsync interface to monitor and control this operation. Callers MUST release the interface when they are done with it. If the IVdsAsync::Wait (Opnum 4) method is called on the interface, the interfaces returned in the VDS_ASYNC_OUTPUT structure MUST be released as well. For details on handling asynchronous tasks, see section 3.4.5.1.9.

Return Values: The method MUST return zero or a non-error HRESULT (as specified in [MS-ERREF]) to indicate success, or return an implementation-specific nonzero error code to indicate failure. For the HRESULT values predefined by the Virtual Disk Service Remote Protocol, see section 2.2.3.

IVdsPack2::CreateVolume2 has the same sequencing rules as IVdsPack::CreateVolume (Opnum 7), as specified in section 3.4.5.2.19.5.