OnInterruptDisable function

[Applies to UMDF 1.x only]

A driver's OnInterruptDisable event callback function disables a specified hardware interrupt.

Syntax


WUDF_INTERRUPT_DISABLE OnInterruptDisable;

HRESULT OnInterruptDisable(
  _In_  IWDFInterrupt *pInterrupt,
  _In_  IWDFDevice *pAssociatedDevice
)
{ ... }

Parameters

pInterrupt [in]

A pointer to the IWDFInterrupt interface.

pAssociatedDevice [in]

A pointer to the IWDFDevice interface that the driver used to call CreateInterrupt.

Return value

OnInterruptDisable must return S_OK if the operation succeeds. Otherwise, the callback should return one of the error codes that are defined in Winerror.h.

Remarks

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

The framework calls the driver's OnInterruptDisable callback function each time the device leaves its working (D0) state. Additionally, a driver can cause the framework to call the OnInterruptDisable callback function by calling IWDFInterrupt::Disable.

Before calling the OnInterruptDisable callback function, the framework calls the driver's OnD0ExitPreInterruptsDisabled event callback function and acquires the user-mode interrupt lock.

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

Examples

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


typedef
__drv_functionClass(WUDF_INTERRUPT_DISABLE)
HRESULT
WUDF_INTERRUPT_DISABLE(
    _In_
    IWDFInterrupt* Interrupt,
    _In_
    IWDFDevice* AssociatedDevice
    );

typedef WUDF_INTERRUPT_DISABLE *PFN_WUDF_INTERRUPT_DISABLE;

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


WUDF_INTERRUPT_DISABLE  MyInterruptDisable;

Then, implement your callback function as follows:


HRESULT
  MyInterruptDisable (
    IN IWDFInterrupt* pInterrupt,
    IN IWDFDevice*  pAssociatedDevice
    )
  {…}



Requirements

End of support

Unavailable in UMDF 2.0 and later.

Minimum UMDF version

1.11

Header

Wudfinterrupt.h

See also

WUDF_INTERRUPT_CONFIG
IWDFDevice::CreateInterrupt
OnInterruptEnable

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft