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.
PVOID IoRegisterBootDriverCallback( _In_ PBOOT_DRIVER_CALLBACK_FUNCTION CallbackFunction, _In_opt_ PVOID CallbackContext );
- CallbackFunction [in]
A pointer to the BOOT_DRIVER_CALLBACK_FUNCTION routine to be called when initializing a boot-start driver or DLL.
- CallbackContext [in, optional]
A driver-defined context to be passed to the BOOT_DRIVER_CALLBACK_FUNCTION routine pointed to by CallbackFunction.
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.
Boot-start drivers must call IoUnRegisterBootDriverCallback and pass the returned handle to unregister the boot-start driver callback before Windows unloads them.
A boot-start driver's BOOT_DRIVER_CALLBACK_FUNCTION routine can monitor boot-start driver initialization events and return data to the kernel to enable the kernel to decide whether to initialize each boot-start driver. The function prototype to register a boot-start driver callback routine is as follows.
typedef VOID BOOT_DRIVER_CALLBACK_FUNCTION ( _in_opt_ PVOID CallbackContext, _in_ BDCB_CALLBACK_TYPE CallbackType, _in_opt_ PBDCB_IMAGE_INFORMATION CallbackTypeContext );
The boot-start callback parameters are as follows:
The value that the driver passed as the CallbackContext parameter to IoRegisterBootDriverCallback when it registered this BOOT_DRIVER_CALLBACK_FUNCTION routine.
A BDCB_CALLBACK_TYPE enumeration value that either identifies the status of boot-start driver initialization or indicates that a boot-start driver is about to be initialized.
A pointer to a structure that contains information that is specific to the type of callback. The structure type depends on the value passed for CallbackType, as shown in the following table.
Value of CallbackType Corresponding structure to use
If the BOOT_DRIVER_CALLBACK_FUNCTION routine returns STATUS_SUCCESS, the boot-start driver was able to perform all necessary actions in response to the specific callback.
Any error returned from a status update callback is treated as fatal and leads to a system bug check.
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.
|Available starting with Windows 8.|
Build date: 12/5/2013