3.2.4.4.3.28 IVolumeClient3::CreateVolumeAssignAndFormatEx (Opnum 31)
The CreateVolumeAssignAndFormatEx method creates a dynamic volume on the specified list of disks, assigns a drive letter and/or a mount point to it, and formats it with a file system.
-
HRESULT CreateVolumeAssignAndFormatEx( [in] VOLUME_SPEC volumeSpec, [in] unsigned long diskCount, [in, size_is(diskCount)] DISK_SPEC* diskList, [in] wchar_t letter, [in] hyper letterLastKnownState, [in] int cchAccessPath, [in, size_is(cchAccessPath)] wchar_t* AccessPath, [in] FILE_SYSTEM_INFO fsSpec, [in] boolean quickFormat, [in] DWORD dwFlags, [out] TASK_INFO* tinfo );
volumeSpec: A VOLUME_SPEC structure that defines the volume to create.
diskCount: Number of elements passed in diskList.
diskList: Array of DISK_SPEC structures that specifies the disk to be used by the volume. Memory for the array is allocated and freed by the client.
letter: Drive letter to assign to the new volume. Pass the zero value or the SPACE character if no drive letter is needed.
letterLastKnownState: Drive letter's last known modification sequence number.
cchAccessPath: Length of AccessPath including the terminating null character.
AccessPath: Null-terminated path in which the new file system is being mounted. The server MUST ignore this parameter if the CREATE_ASSIGN_ACCESS_PATH bit is not set in dwFlags.
fsSpec: A FILE_SYSTEM_INFO structure that defines the file system to create.
quickFormat: Value that indicates whether the server will fully format or quickly format the file system.
-
Value
Meaning
FALSE
0
File system will be fully formatted. Full format requires verifying the accessibility of all sectors on the volume.
TRUE
1
File system will be quickly formatted.
dwFlags: Bitmap of volume creation flags. The value of this field is generated by combining zero or more of the following applicable flags with a logical OR operation.
-
Value
Meaning
CREATE_ASSIGN_ACCESS_PATH
0x00000001
Assign the mount point AccessPath to the new volume. If the flag is not set, the parameter AccessPath is ignored.
tinfo: Pointer to a TASK_INFO structure that the client can use to track the request's progress.
Return Values: The method MUST return 0 or a nonerror HRESULT on success, or an implementation-specific nonzero error code on failure (as specified in [MS-ERREF]; see also section 2.2.1 for HRESULT values predefined by the Disk Management Remote Protocol).
When the server receives an IVolumeClient3::CreateVolumeAssignAndFormatEx message, it MUST process that message, as specified in IVolumeClient::CreateVolumeAssignAndFormatEx (section 3.2.4.4.1.28).