IoRegisterBootDriverCallback function (ntddk.h)

The IoRegisterBootDriverCallback routine registers a BOOT_DRIVER_CALLBACK_FUNCTION routine to be called during the initialization of a boot-start driver and its dependent DLLs.

Syntax

PVOID IoRegisterBootDriverCallback(
  [in]           PBOOT_DRIVER_CALLBACK_FUNCTION CallbackFunction,
  [in, optional] PVOID                          CallbackContext
);

Parameters

[in] CallbackFunction

A pointer to the BOOT_DRIVER_CALLBACK_FUNCTION routine to be called when initializing a boot-start driver or DLL.

[in, optional] CallbackContext

A driver-defined context to be passed to the BOOT_DRIVER_CALLBACK_FUNCTION routine pointed to by CallbackFunction.

Return value

A handle that represents the registration. This handle must be supplied as an input parameter in the call to the IoUnRegisterBootDriverCallback routine that unregisters the BOOT_DRIVER_CALLBACK_FUNCTION routine.

Remarks

Boot-start drivers must call IoUnRegisterBootDriverCallback and pass the returned handle to unregister the boot-start driver callback before Windows unloads them.

Any error returned from a status update callback is treated as fatal and leads to a system bug check. Additionally, if an initialize image callback returns an error, the driver's image is treated as unknown. To be notified of boot-start driver initialization operations, an early launch anti-malware (ELAM) driver can call IoRegisterBootDriverCallback to register a BOOT_DRIVER_CALLBACK_FUNCTION routine.

Requirements

Requirement Value
Minimum supported client Available starting with Windows 8.
Target Platform Universal
Header ntddk.h (include Ntddk.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL PASSIVE_LEVEL

See also

BDCB_CALLBACK_TYPE

BDCB_IMAGE_INFORMATION

IoUnRegisterBootDriverCallback