The IOCTL_DISK_SET_DRIVE_LAYOUT DeviceIoControl
operation partitions a disk as specified by drive layout and partition
dwIoControlCode = IOCTL_DISK_SET_DRIVE_LAYOUT; // operation code
lpInBuffer; // address of input buffer
nInBufferSize; // size of input buffer
lpOutBuffer = NULL; // address of output buffer; not used; must be NULL
nOutBufferSize = 0; // size of output buffer; not used; must be zero
lpBytesReturned; // address of actual bytes of output
Points to a buffer that contains drive layout and partition information data.
The data exists as a DRIVE_LAYOUT_INFORMATION
data structure and a series of PARTITION_INFORMATION
data structures, one of the latter for each proposed partition on the drive.
Specifies the size, in bytes, of the buffer pointed to by lpInBuffer
, which must be large enough to contain one DRIVE_LAYOUT_INFORMATION
data structure and as many PARTITION_INFORMATION
data structures as there are proposed partitions on the drive.
Points to an output buffer. Not used with this operation. Set to NULL.
Specifies the size, in bytes, of the buffer pointed to by lpOutBuffer
. Not used with this operation. Set to zero.
Points to a DWORD
that receives the actual size, in bytes, of the data stored into lpOutBuffer
If the operation succeeds, DeviceIoControl
If the operation fails, DeviceIoControl
returns FALSE. To get extended error information, call GetLastError
This device I/O control operation is for disk devices. Floppy disk drivers,
however, need not handle this operation.
- Software for developers
Software for Android Developers
- More information resources
Unix Manual Pages