IoGetBootDiskInformation function (wdm.h)

The IoGetBootDiskInformation routine returns information describing the boot and system disks.

Syntax

NTSTATUS IoGetBootDiskInformation(
  [in, out] PBOOTDISK_INFORMATION BootDiskInformation,
  [in]      ULONG                 Size
);

Parameters

[in, out] BootDiskInformation

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.

[in] Size

Specifies the size, in bytes, of the buffer specified by BootDiskInformation. Should be either sizeof(BOOTDISK_INFORMATION) or sizeof(BOOTDISK_INFORMATION_EX).

Return value

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.

Remarks

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.

Requirements

Requirement Value
Minimum supported client Available starting with Windows 2000.
Target Platform Universal
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <= APC_LEVEL

See also

BOOTDISK_INFORMATION

BOOTDISK_INFORMATION_EX

IoRegisterBootDriverReinitialization

Reinitialize