WUDF_INTERRUPT_DISABLE 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 OnInterruptDisable event callback function disables a specified hardware interrupt.
Syntax
WUDF_INTERRUPT_DISABLE WudfInterruptDisable;
HRESULT WudfInterruptDisable(
[in] IWDFInterrupt *Interrupt,
[in] IWDFDevice *AssociatedDevice
)
{...}
Parameters
[in] Interrupt
A pointer to the IWDFInterrupt interface.
[in] AssociatedDevice
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
Requirement | Value |
---|---|
End of support | Unavailable in UMDF 2.0 and later. |
Target Platform | Desktop |
Minimum UMDF version | 1.11 |
Header | wudfinterrupt.h |