WdfInterruptGetDevice method

[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.

Syntax


WDFDEVICE WdfInterruptGetDevice(
  [in]  WDFINTERRUPT Interrupt
);

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));
...
}

Requirements

Minimum KMDF version

1.0

Minimum UMDF version

2.0

Header

Wdfinterrupt.h (include Wdf.h)

Library

Wdf01000.sys (KMDF);
WUDFx02000.dll (UMDF)

IRQL

<= DIRQL

DDI compliance rules

DriverCreate

See also

EvtInterruptIsr

 

 

Send comments about this topic to Microsoft

Mostra:
© 2014 Microsoft