IOCTL_DISK_SET_PARTITION_INFO IOCTL

Sets partition information for the specified disk partition.

To perform this operation, call the DeviceIoControl function with the following parameters.

IOCTL_DISK_SET_PARTITION_INFO has been superseded by IOCTL_DISK_SET_PARTITION_INFO_EX, which retrieves layout information for AT and EFI (Extensible Firmware Interface) partitions.

C++
BOOL DeviceIoControl(
  (HANDLE) hDevice,                // handle to device
  IOCTL_DISK_SET_PARTITION_INFO,   // dwIoControlCode(LPVOID) lpInBuffer,             // input buffer 
  (DWORD) nInBufferSize,           // size of input buffer 
  NULL,                            // lpOutBuffer0,                               // nOutBufferSize(LPDWORD) lpBytesReturned,       // number of bytes returned
  (LPOVERLAPPED) lpOverlapped      // OVERLAPPED structure
);

Major code

IRP_MJ_DEVICE_CONTROL

Input buffer

Input buffer length

Output buffer

Output buffer length

Input / Output buffer

Input / Output buffer length

Status block

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.

Remarks

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.

Requirements

   
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Header winioctl.h (include Windows.h)

See also

DeviceIoControl

Disk Management Control Codes

IOCTL_DISK_GET_PARTITION_INFO

IOCTL_DISK_SET_PARTITION_INFO_EX

SET_PARTITION_INFORMATION