// ntdddisk.h
// CTL_CODE(0x0007, 0x013, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_DISK_SET_PARTITION_INFO_EX 0x0007C04C
View the official Windows Driver Kit DDI reference
// winioctl.h
// CTL_CODE(0x0007, 0x013, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_DISK_SET_PARTITION_INFO_EX 0x0007C04C
View the official Win32 API reference
No description available.
Changes the partition type of the specified disk partition. (Floppy drivers need not handle this request.)
The buffer at Irp->AssociatedIrp.SystemBuffer contains the SET_PARTITION_INFORMATION_EX to be set.
Parameters.DeviceIoControl.InputBufferLength in the I/O stack location of the IRP indicates the size, in bytes, of the buffer, which must be >= sizeof(SET_PARTITION_INFORMATION_EX).
None.
None.
The Information field is set to zero. The Status field can be set to STATUS_SUCCESS, or possibly to STATUS_INVALID_PARAMETER, STATUS_INVALID_DEVICE_REQUEST, STATUS_UNSUCCESSFUL, STATUS_INFO_LENGTH_MISMATCH, STATUS_INSUFFICIENT_RESOURCES, or STATUS_BUFFER_TOO_SMALL.
Sets partition information for the specified disk partition, including layout information for AT and EFI (Extensible Firmware Interface) partitions.
To perform this operation, call the DeviceIoControl function with the following parameters.
BOOL DeviceIoControl(
(HANDLE) hDevice, // handle to device
IOCTL_DISK_SET_PARTITION_INFO_EX, // dwIoControlCode
(LPVOID) lpInBuffer, // input buffer
(DWORD) nInBufferSize, // size of input buffer
NULL, // lpOutBuffer
0, // nOutBufferSize
(LPDWORD) lpBytesReturned, // number of bytes returned
(LPOVERLAPPED) lpOverlapped // OVERLAPPED structure
);
Irp->IoStatus.Status is set to STATUS_SUCCESS if the request is successful.
Otherwise, Status to the appropriate error condition as a NTSTATUS code.
For more information, see NTSTATUS Values.
If the partition is on a disk formatted as type master boot record (MBR), partition size totals are limited. For more information, see the Remarks section of IOCTL_DISK_SET_DRIVE_LAYOUT.