KBUGCHECK_REASON_CALLBACK_ROUTINE callback function

Driver-implemented callback functions that the system executes when it issues a bug check.

The KbCallbackAddPages routine adds one or more pages of data to the crash dump file when the operating system issues a bug check.

The KbCallbackDumpIo routine is executed each time the system writes data to a crash dump file.

The KbCallbackSecondaryDumpData routine provides data to the system to append to the crash dump file when the system issues a bug check.

Syntax

KBUGCHECK_REASON_CALLBACK_ROUTINE KbugcheckReasonCallbackRoutine;

void KbugcheckReasonCallbackRoutine(
  KBUGCHECK_CALLBACK_REASON Reason,
  _KBUGCHECK_REASON_CALLBACK_RECORD *Record,
  PVOID ReasonSpecificData,
  ULONG ReasonSpecificDataLength
)
{...}

Parameters

Reason

Specifies the reason for the call to the callback routine. This value can be one of the following as defined in KBUGCHECK_CALLBACK_REASON

  • KbCallbackAddPages: The purpose of the callback function is to enable the driver to add pages of data to the crash dump file.
  • KbCallbackDumpIo: This callback function is executed each time the system writes data to a crash dump file.
  • KbCallbackSecondaryDumpData: This callback function provides data to the system to append to the crash dump file when the system issues a bug check.

Record

A pointer to the KBUGCHECK_REASON_CALLBACK_RECORD structure that the driver supplied when it registered this callback. For more information, see the description of the CallbackRecord parameter in KeRegisterBugCheckCallback.

ReasonSpecificData

A pointer to a KBUGCHECK_ADD_PAGES structure. This pointer is cast to type PVOID. Certain members of this structure are filled in by the operating system before it calls the callback routine, and other members must be filled in by the callback routine. For more information, see the following Remarks section.

ReasonSpecificDataLength

Specifies the size, in bytes, of the buffer that the ReasonSpecificData parameter points to.

  • KbCallbackAddPages: sizeof(KBUGCHECK_ADD_PAGES).
  • KbCallbackDumpIo: sizeof(KBUGCHECK_DUMP_IO).
  • KbCallbackSecondaryDumpData: sizeof(KBUGCHECK_SECONDARY_DUMP_DATA).

Return Value

None.

Remarks

For information about how to implement this callback routine, see Writing a Bug Check Callback Routine.

Requirements

   
Minimum supported client Supported starting with Windows Server 2008.
Target Platform Desktop
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
IRQL Called at HIGH_LEVEL.

See Also

KBUGCHECK_ADD_PAGES

KBUGCHECK_CALLBACK_REASON

KBUGCHECK_REASON_CALLBACK_RECORD

KeDeregisterBugCheckReasonCallback

KeRegisterBugCheckReasonCallback

Writing a Bug Check Callback Routine.