The KeRegisterBugCheckReasonCallback routine registers BugCheckDumpIoCallback and BugCheckSecondaryDumpDataCallback routines, which execute when the system issues a bug check.
NTKERNELAPI
BOOLEAN
KeRegisterBugCheckReasonCallback (
IN PKBUGCHECK_REASON_CALLBACK_RECORD CallbackRecord,
IN PKBUGCHECK_REASON_CALLBACK_ROUTINE CallbackRoutine,
IN KBUGCHECK_CALLBACK_REASON Reason,
IN PUCHAR Component
);
KeRegisterBugCheckReasonCallback returns TRUE if the callback is successfully registered; otherwise, this routine returns FALSE.
Declared in ntddk.h. Include ntddk.h.
This routine is only available in Windows XP Service Pack 1 (SP1), Windows Server 2003, and later operating systems.
Drivers can use KeRegisterBugCheckReasonCallback to register routines that execute during a system bug check. BugCheckSecondaryDumpDataCallback routines are called to poll drivers for any device-specific information that should be attached to the crash dump file. BugCheckDumpIoCallback routines are called each time data is written to the crash dump file. Drivers for devices that monitor the system state can register a BugCheckDumpIoCallback routine to copy the crash dump data to the monitoring device.
Drivers can use the KeDeregisterBugCheckReasonCallback routine to remove the callback. Any driver that can be unloaded must remove all of its callbacks in its Unload routine.
To display secondary dump data, you can use the .enumtag command or the IDebugDataSpaces3::ReadTagged method in a debugger extension. It is also possible to debug the bug check callback routine itself. For information about debuggers and debugger extensions, see Debugging Tools for NT-Based Operating Systems.
Callers of KeRegisterBugCheckReasonCallback can be running at any IRQL.
KeDeregisterBugCheckReasonCallback, KeInitializeCallbackRecord, KeRegisterBugCheckCallback, BugCheckCallback, BugCheckDumpIoCallback, BugCheckSecondaryDumpDataCallback