WdfInterruptGetDevice - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdfinterrupt.h

WDFDEVICE WdfInterruptGetDevice(
  [in] WDFINTERRUPT Interrupt
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdfinterrupt-wdfinterruptgetdevice)

WdfInterruptGetDevice function

Description

[Applies to KMDF and UMDF]

The WdfInterruptGetDevice method returns a handle to the framework device object that is associated with a specified framework interrupt object.

Parameters

Interrupt [in]

A handle to a framework interrupt object.

Return value

WdfInterruptGetDevice returns a handle to a framework device object.

A bug check occurs if the driver supplies an invalid object handle.

Remarks

For more information about handling interrupts in framework-based drivers, see Handling Hardware Interrupts.

Examples

The following code example shows how an EvtInterruptIsr callback function can obtain a pointer to driver-defined context space for the device object that an interrupt object belongs to.

BOOLEAN
MyEvtInterruptIsr(
    IN WDFINTERRUPT Interrupt,
    IN ULONG  MessageID
    )
{
    PDEVICE_EXTENSION  devExt;

    devExt = GetMyDeviceContext(WdfInterruptGetDevice(Interrupt));
...
}

See also

EvtInterruptIsr