IoCreateDisk function (ntddk.h)
The IoCreateDisk routine initializes a raw disk by creating a new partition table.
Syntax
NTSTATUS IoCreateDisk(
[in] PDEVICE_OBJECT DeviceObject,
[in, optional] _CREATE_DISK *Disk
);
Parameters
[in] DeviceObject
Specifies the DEVICE_OBJECT for the raw disk.
[in, optional] Disk
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.
Requirements
Requirement | Value |
---|---|
Minimum supported client | This routine is only available on Windows XP and later. |
Target Platform | Universal |
Header | ntddk.h (include Ntddk.h) |
Library | NtosKrnl.lib |
DLL | NtosKrnl.exe |