WUDF_INTERRUPT_WORKITEM callback function (wudfinterrupt.h)

[Warning: UMDF 2 is the latest version of UMDF and supersedes UMDF 1. All new UMDF drivers should be written using UMDF 2. No new features are being added to UMDF 1 and there is limited support for UMDF 1 on newer versions of Windows 10. Universal Windows drivers must use UMDF 2. For more info, see Getting Started with UMDF.]

A driver's OnInterruptWorkItem event callback function processes interrupt information that the driver's OnInterruptIsr callback function has stored.

Syntax

WUDF_INTERRUPT_WORKITEM WudfInterruptWorkitem;

void WudfInterruptWorkitem(
  [in] IWDFInterrupt *Interrupt,
  [in] IWDFObject *AssociatedObject
)
{...}

Parameters

[in] Interrupt

A pointer to the interrupt object interface associated with the work item.

[in] AssociatedObject

A pointer to the associated object.

Return value

None

Remarks

To register an OnInterruptWorkItem callback function, your driver must place the callback function's address in a WUDF_INTERRUPT_CONFIG structure before calling IWDFDevice3::CreateInterrupt.

After stopping and acknowledging the interrupt, the driver should return quickly from its OnInterruptIsr callback, postponing any additional processing to a OnInterruptWorkItem callback.

For more information about handling interrupts in UMDF drivers, see Accessing Hardware and Handling Interrupts.

Examples

The function type is declared in Wudfworkitem.h, as follows.

typedef
_Function_class_(WUDF_INTERRUPT_WORKITEM)
VOID
WUDF_INTERRUPT_WORKITEM(
    _In_
    IWDFInterrupt* Interrupt,
    _In_
    IWDFObject* AssociatedObject
    );

typedef WUDF_INTERRUPT_WORKITEM *PFN_WUDF_INTERRUPT_WORKITEM;

To define an OnInterruptWorkItem callback function that is named MyInterruptWorkItem, you must first provide a function declaration that SDV and other verification tools require, as follows:

WUDF_INTERRUPT_WORKITEM  MyInterruptWorkItem;

Then, implement your callback function as follows:

VOID
  MyInterruptWorkItem (
    _In_
    IWDFInterrupt* Interrupt,
    _In_
    IWDFObject* AssociatedObject
    )
  {…}

Requirements

Requirement Value
End of support Unavailable in UMDF 2.0 and later.
Target Platform Desktop
Minimum UMDF version 1.11
Header wudfinterrupt.h

See also

IWDFDevice3::CreateInterrupt

WUDF_INTERRUPT_CONFIG