Click to Rate and Give Feedback
MSDN
MSDN Library
Windows Driver Kit
Reference
 KeRegisterBugCheckReasonCallback

  Switch on low bandwidth view
Windows Driver Kit: Kernel-Mode Driver Architecture
KeRegisterBugCheckReasonCallback

The KeRegisterBugCheckReasonCallback routine registers BugCheckDumpIoCallback and BugCheckSecondaryDumpDataCallback routines, which execute when the system issues a bug check.

BOOLEAN
  KeRegisterBugCheckReasonCallback(
    IN PKBUGCHECK_REASON_CALLBACK_RECORD  CallbackRecord,
    IN PKBUGCHECK_REASON_CALLBACK_ROUTINE  CallbackRoutine,
    IN KBUGCHECK_CALLBACK_REASON  Reason,
    IN PUCHAR  Component
    );

Parameters

CallbackRecord
Pointer to a KBUGCHECK_REASON_CALLBACK_RECORD structure that was initialized by KeInitializeCallbackRecord.
CallbackRoutine
Pointer to the BugCheckDumpIoCallback or BugCheckSecondaryDumpDataCallback routine to register.
Reason
Specifies a KBUGCHECK_CALLBACK_REASON value that determines when the callback is called. Use KbCallbackDumpIo to specify a BugCheckDumpIoCallback routine, or KbCallbackSecondaryDumpData to specify a BugCheckSecondaryDumpDataCallback routine.
Component
Pointer to a null-terminated ANSI string that identifies the caller. This string usually describes the name of the device driver, or possibly of its device.

Return Value

KeRegisterBugCheckReasonCallback returns TRUE if the callback is successfully registered; otherwise, this routine returns FALSE.

Comments

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.

Requirements

Versions: Available in Microsoft Windows XP Service Pack 1 (SP1), Windows Server 2003, and later versions of the Windows operating system.

IRQL: Any level

Headers: Declared in Ntddk.h. Include Ntddk.h.

See Also

KeDeregisterBugCheckReasonCallback, KeInitializeCallbackRecord, KeRegisterBugCheckCallback, BugCheckCallback, BugCheckDumpIoCallback, BugCheckSecondaryDumpDataCallback


Send feedback on this topic
Built on May 20, 2009
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker