Click to Rate and Give Feedback
MSDN
MSDN Library
Windows Driver Kit
Reference
 KeRegisterBugCheckCallback
Windows Driver Kit: Kernel-Mode Driver Architecture
KeRegisterBugCheckCallback

The KeRegisterBugCheckCallback routine registers a BugCheckCallback routine, which executes when the operating system issues a bug check.

BOOLEAN 
  KeRegisterBugCheckCallback(
    IN PKBUGCHECK_CALLBACK_RECORD  CallbackRecord,
    IN PKBUGCHECK_CALLBACK_ROUTINE  CallbackRoutine,
    IN PVOID  Buffer,
    IN ULONG  Length,
    IN PUCHAR  Component
    );

Parameters

CallbackRecord
Pointer to a callback record that was previously initialized by KeInitializeCallbackRecord, for which the caller provides nonpaged storage.
CallbackRoutine
Pointer to the driver-supplied BugCheckCallback routine.
Buffer
Pointer to a caller-supplied buffer, which must be in resident memory, such as nonpaged pool.
Length
Specifies the size in bytes of the caller-allocated buffer.
Component
Pointer to a null-terminated ANSI string that identifies the caller. This string usually contains the name of the device driver, or possibly of its device.

Return Value

KeRegisterBugCheckCallback returns TRUE if the caller-supplied routine is successfully added to the set of registered bug-check callbacks; otherwise, it returns FALSE.

Comments

The KeRegisterBugCheckCallback routine registers a BugCheckCallback routine, the simplest kind of bug-check callback routine. To register other kinds of bug-check callbacks, such as BugCheckDumpIoCallback and BugCheckAddPagesCallback routines, use the KeRegisterBugCheckReasonCallback routine instead.

The BugCheckCallback routine is executed when the system issues a bug check. A driver can use the routine to reset the device to a known state. For more information, see BugCheckCallback.

Drivers can use the KeDeregisterBugCheckCallback routine to remove the callback. Any driver that can be unloaded must remove all of its callbacks in its Unload routine.

The Component string is used to identify the driver during crash-dump debugging. To display the crash dump data corresponding to any specified Component string, you can use the !bugdump 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

IRQL: Any level

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

See Also

KeDeregisterBugCheckCallback, KeInitializeCallbackRecord, KeRegisterBugCheckReasonCallback, BugCheckAddPagesCallback, BugCheckCallback, BugCheckDumpIoCallback


Send feedback on this topic
Built on October 01, 2009
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker