IoCreateDisk - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// ntddk.h

NTSTATUS IoCreateDisk(
  [in]           PDEVICE_OBJECT DeviceObject,
  [in, optional] _CREATE_DISK   *Disk
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-ntddk-iocreatedisk)

IoCreateDisk function

Description

The IoCreateDisk routine initializes a raw disk by creating a new partition table.

Parameters

DeviceObject [in]

Specifies the DEVICE_OBJECT for the raw disk.

Disk [in, optional]

Pointer to a CREATE_DISK structure that specifies the type and parameters for the partition table. If Disk is NULL, the routine deletes the partition table on the disk.

Return value

Returns STATUS_SUCCESS on success, or the appropriate error code on failure.

Remarks

IoCreateDisk must only be used by disk drivers. Other drivers should use the IOCTL_DISK_CREATE_DISK I/O request instead.

See also

CREATE_DISK

IOCTL_DISK_CREATE_DISK