Bewerken

Delen via


IOCTL_DISK_GET_DRIVE_LAYOUT_EX IOCTL (ntdddisk.h)

Returns information about the number of partitions, disk signature, and features of each partition on a disk. (Floppy drivers need not handle this request.)

Major code

IRP_MJ_DEVICE_CONTROL

Input buffer

None.

Input buffer length

None.

Output buffer

The driver returns the DRIVE_LAYOUT_INFORMATION_EX data in the buffer at Irp->AssociatedIrp.SystemBuffer.

Output buffer length

Parameters.DeviceIoControl.OutputBufferLength in the I/O stack location of the IRP indicates the size, in bytes, of the buffer, which must be >= sizeof(DRIVE_LAYOUT_INFORMATION_EX). Note that this structure contains a variable-sized array of PARTITION_INFORMATION_EX elements.

To determine the size of output buffer that is required, caller should send this IOCTL request in a loop. Every time the storage stack rejects the IOCTL with an error message indicating that the buffer was too small, caller should double the buffer size.

Status block

The Information field is set to the size, in bytes, of the returned data. The Status field can be set to STATUS_SUCCESS, or possibly to STATUS_INFO_LENGTH_MISMATCH, STATUS_INSUFFICIENT_RESOURCES, or STATUS_BUFFER_TOO_SMALL.

Requirements

Requirement Value
Header ntdddisk.h (include Ntdddisk.h)

See also

DRIVE_LAYOUT_INFORMATION

PARTITION_INFORMATION

PARTITION_INFORMATION_EX