// wdm.h
NTSTATUS IoGetBootDiskInformation(
[in, out] PBOOTDISK_INFORMATION BootDiskInformation,
[in] ULONG Size
);
View the official Windows Driver Kit DDI referenceNo description available.
The IoGetBootDiskInformation routine returns information describing the boot and system disks.
BootDiskInformation [in, out]Pointer to a caller-allocated buffer that the routine uses to return information about the boot and system disks. The routine fills this buffer in with either a BOOTDISK_INFORMATION or a BOOTDISK_INFORMATION_EX structure.
Size [in]Specifies the size, in bytes, of the buffer specified by BootDiskInformation. Should be either sizeof(BOOTDISK_INFORMATION) or sizeof(BOOTDISK_INFORMATION_EX).
IoGetBootDiskInformation returns one of the following status values:
| Return code | Description |
|---|---|
| STATUS_SUCCESS | The routine successfully returned the requested information in the buffer specified by BootDiskInformation. |
| STATUS_INVALID_PARAMETER | The value of Size is less than the size, in bytes, of a BOOTDISK_INFORMATION structure. |
| STATUS_TOO_LATE | The driver called the routine after the system has already booted. Only boot and system drivers can call IoGetBootDiskInformation, and then only in their DriverEntry or AddDevice routines. |
IoGetBootDiskInformation can be called only by a boot driver. This driver should call IoGetBootDiskInformation in a Reinitialize callback routine that the driver registers by calling the IoRegisterBootDriverReinitialization routine.
On Windows XP and later versions of Windows, if the Size parameter is sizeof(BOOTDISK_INFORMATION_EX) or larger, the routine returns a BOOTDISK_INFORMATION_EX structure in the BootDiskInformation buffer. Otherwise, if Size is at least sizeof(BOOTDISK_INFORMATION), the routine returns a BOOTDISK_INFORMATION structure.
On Windows 2000, the routine returns only the BOOTDISK_INFORMATION structure.
IoRegisterBootDriverReinitialization