// ntddk.h
NTSTATUS IoCreateDisk(
[in] PDEVICE_OBJECT DeviceObject,
[in, optional] _CREATE_DISK *Disk
);
View the official Windows Driver Kit DDI referenceNo description available.
The IoCreateDisk routine initializes a raw disk by creating a new partition table.
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.
Returns STATUS_SUCCESS on success, or the appropriate error code on failure.
IoCreateDisk must only be used by disk drivers. Other drivers should use the IOCTL_DISK_CREATE_DISK I/O request instead.