Export (0) Print
Expand All
Expand Minimize

KeRegisterNmiCallback routine

The KeRegisterNmiCallback routine registers a routine to be called whenever a nonmaskable interrupt (NMI) occurs.

Syntax


PVOID KeRegisterNmiCallback(
  _In_      PNMI_CALLBACK CallbackRoutine,
  _In_opt_  PVOID Context
);

Parameters

CallbackRoutine [in]

Pointer to a function of the form:


BOOLEAN
 XxxNmiCallback(
 IN PVOID Context,
  IN BOOLEAN Handled
 );

Context [in, optional]

Specifies the value to be passed as the Context parameter of XxxNmiCallback when it is called.

Return value

On success, KeRegisterNmiCallback returns an opaque pointer that the caller passes to KeDeregisterNmiCallback to deregister the callback. The routine returns NULL if it is unable to register the callback.

Remarks

When a nonmaskable interrupt occurs, the system calls each registered callback in reverse order from the order in which they were registered. For the first callback, the system passes FALSE as the Handled parameter. For each subsequent callback, if any previous callback returned TRUE, the system passes TRUE as the Handled parameter, otherwise it passes FALSE. If any callback returns a value of TRUE, the system considers the interrupt to have been handled. Otherwise, the system calls the HAL's default handler for the interrupt, which normally causes the system to bug check.

The callback routine must be able to be run at IRQL = HIGH_LEVEL.

Requirements

Version

Available in Windows Server 2003 and later versions of Windows.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

Library

Ntoskrnl.lib

IRQL

<= APC_LEVEL (see Remarks section)

DDI compliance rules

IrqlKeApcLte2, HwStorPortProhibitedDDIs

See also

KeDeregisterNmiCallback

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft