Fonction IoGetBootDiskInformation (wdm.h)

La routine IoGetBootDiskInformation retourne des informations décrivant les disques de démarrage et système.

Syntaxe

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

Paramètres

[in, out] BootDiskInformation

Pointeur vers une mémoire tampon allouée à l’appelant que la routine utilise pour retourner des informations sur les disques de démarrage et système. La routine remplit cette mémoire tampon avec une structure BOOTDISK_INFORMATION ou BOOTDISK_INFORMATION_EX .

[in] Size

Spécifie la taille, en octets, de la mémoire tampon spécifiée par BootDiskInformation. Doit être sizeof(BOOTDISK_INFORMATION) ou sizeof(BOOTDISK_INFORMATION_EX).

Valeur retournée

IoGetBootDiskInformation retourne l’une des valeurs status suivantes :

Code de retour Description
STATUS_SUCCESS
La routine a correctement retourné les informations demandées dans la mémoire tampon spécifiée par BootDiskInformation.
STATUS_INVALID_PARAMETER
La valeur de Size est inférieure à la taille, en octets, d’une structure BOOTDISK_INFORMATION .
STATUS_TOO_LATE
Le pilote a appelé la routine une fois que le système a déjà démarré. Seuls les pilotes système et de démarrage peuvent appeler IoGetBootDiskInformation, puis uniquement dans leurs routines DriverEntry ou AddDevice .

Remarques

IoGetBootDiskInformation ne peut être appelé que par un pilote de démarrage. Ce pilote doit appeler IoGetBootDiskInformation dans une routine de rappel Reinitialize que le pilote inscrit en appelant la routine IoRegisterBootDriverReinitialization .

Sur Windows XP et les versions ultérieures de Windows, si le paramètre Size est sizeof(BOOTDISK_INFORMATION_EX) ou plus, la routine retourne une structure BOOTDISK_INFORMATION_EX dans la mémoire tampon BootDiskInformation . Sinon, si size est au moins sizeof(BOOTDISK_INFORMATION), la routine retourne une structure BOOTDISK_INFORMATION .

Sur Windows 2000, la routine retourne uniquement la structure BOOTDISK_INFORMATION .

Configuration requise

Condition requise Valeur
Client minimal pris en charge Disponible à partir de Windows 2000.
Plateforme cible Universal
En-tête wdm.h (inclure Wdm.h, Ntddk.h, Ntifs.h)
Bibliothèque NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <= APC_LEVEL

Voir aussi

BOOTDISK_INFORMATION

BOOTDISK_INFORMATION_EX

IoRegisterBootDriverReinitialization

Réinitialiser