The KeRegisterBugCheckReasonCallback function registers one of the callback routines defined in defined in the KBUGCHECK_CALLBACK_REASON enumeration, which executes when the operating system issues a bug check.
BOOLEAN KeRegisterBugCheckReasonCallback( PKBUGCHECK_REASON_CALLBACK_RECORD CallbackRecord, PKBUGCHECK_REASON_CALLBACK_ROUTINE CallbackRoutine, KBUGCHECK_CALLBACK_REASON Reason, PUCHAR Component );
A pointer to the callback routine to register. This parameter points to one of the types of driver-implemented routine defined in the KBUGCHECK_CALLBACK_REASON enumeration. For information about how to implement this callback routine, see Writing a Bug Check Callback Routine.
Specifies the type of callback routine that CallbackRoutine points to. Set Reason to one of the KBUGCHECK_CALLBACK_REASON enumeration values in the following table.
A pointer to a null-terminated ANSI string that identifies the caller. For example, you can select a string that describes the device driver, or that contains the device name. You can use the !bugdump debugger extension to display the crash dump data that is associated with this string.
KeRegisterBugCheckReasonCallback returns TRUE if the callback routine is successfully registered; otherwise, it returns FALSE.
Drivers can use KeRegisterBugCheckReasonCallback to register routines that execute during a system bug check.
KbCallbackDumpIo routines are called each time data is written to the crash dump file. Drivers for devices that monitor the system state can register a KbCallbackDumpIo routine to copy the crash dump data to the monitoring device.
KbCallbackSecondaryDumpData routines are called to poll drivers for any device-specific information that should be added to the secondary data area of a crash dump file.
KbCallbackAddPages routines are called to enable drivers to add pages of driver-specific data to the primary data area of a crash dump file. They are supported in Windows Server 2008 and later versions of Windows.
Drivers can use the KeDeregisterBugCheckReasonCallback routine to remove the bug check callback registration. Any driver that can be unloaded must remove the registrations of all of its callbacks in its Unload routine.
For information about how to implement these callback routines, see Writing a Bug Check Callback Routine.
To display secondary dump data, you can use the .enumtag command or the IDebugDataSpaces3::ReadTagged method in a debugger extension. Another option is to debug the bug check callback routine itself. For more information about debuggers and debugger extensions, see Windows Debugging.
|Minimum supported client||Available in Windows XP Service Pack 1 (SP1), Windows Server 2003, and later versions of Windows.|
|Header||wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)|
Send feedback about: