KBUGCHECK_REASON_CALLBACK_ROUTINE callback function (wdm.h)

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

See KBUGCHECK_CALLBACK_REASON for information on available callback types.

Syntax

KBUGCHECK_REASON_CALLBACK_ROUTINE KbugcheckReasonCallbackRoutine;

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

Parameters

[in] Reason

An enumeration of type KBUGCHECK_CALLBACK_REASON that specifies the reason for the call to the callback routine.

[in] 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 KeRegisterBugCheckReasonCallback.

[in, out] ReasonSpecificData

Pointer to a buffer that contains a structure of type determined by the table below. 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 Writing a Bug Check Callback Routine.

Value Data structure
KbCallbackSecondaryDumpData KBUGCHECK_SECONDARY_DUMP_DATA
KbCallbackDumpIo KBUGCHECK_DUMP_IO
KbCallbackAddPages KBUGCHECK_ADD_PAGES
KbCallbackSecondaryMultiPartDumpData KBUGCHECK_SECONDARY_DUMP_DATA_EX
KbCallbackRemovePages KBUGCHECK_REMOVE_PAGES
KbCallbackTriageDumpData KBUGCHECK_TRIAGE_DUMP_DATA

[in] ReasonSpecificDataLength

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

Return value

None

Remarks

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

For sample code that shows how to write data to the crash dump file, see DMF_CrashDump.

Requirements

Requirement Value
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

KeRegisterBugCheckReasonCallback

KeDeregisterBugCheckReasonCallback

Writing a Bug Check Callback Routine.