[仅适用于 KMDF]
WdfInterruptReportInactive 方法通知系统中断不再处于活动状态,并且驱动程序不会在关联的行上收到中断请求。
语法
VOID WdfInterruptReportInactive(
  [in] WDFINTERRUPT Interrupt
);
参数
[in] Interrupt
框架中断对象的句柄。
返回值
没有
注解
只有实现功能状态电源管理调用的驱动程序 WdfInterruptReportInactive。
当驱动程序调用 WdfInterruptReportInactive时,电源管理框架(PoFx)可以执行相关的电源管理任务。
通常,驱动程序从 ComponentIdleConditionCallback 例程调用 WdfInterruptReportInactive,或者在 状态 大于零时从 ComponentIdleStateCallback(指示低功率 Fx 状态) 调用 WdfInterruptReportInactive。
如果驱动程序在早于 Windows 8 的作系统上调用此方法,框架的验证程序 报告错误。
例子
以下示例演示驱动程序如何从 KMDF 驱动程序的 ComponentIdleStateCallback 例程调用 WdfInterruptReportInactive。 驱动程序通过调用 WdfDeviceWdmAssignPowerFrameworkSettings注册单个组件。
VOID
MyComponentIdleStateCallback(
    _In_ PVOID Context,
    _In_ ULONG Component,
    _In_ ULONG State
    )
{
    PFDO_DEVICE_DATA deviceData;
    PFDO_INTERRUPT_CONTEXT interruptContext;
    deviceData = FdoGetData((WDFDEVICE)Context);
    interruptContext = InterruptGetData(deviceData->Interrupt);
    switch (State) {
        case 0:
             …
            break;
        //
        // PoFx may make us go to any of the F-states directly, hence we execute
        // F0Exit code for all of the Fx states. Note that transition to any Fx 
        // state happens from F0 (and not another Fx state).
        //
        default:
            //
            // Disable interrupt generation at hardware if needed.
            // 
            WdfInterruptAcquireLock(deviceData->Interrupt);
            DisableInterruptInHardware();
            WdfInterruptReleaseLock(deviceData->Interrupt);
            //
            // Report that interrupt is now inactive.
            //
            WdfInterruptReportInactive(deviceData->Interrupt);
            interruptContext->ReportedInactive = TRUE;
        break;
    …
}
要求
| 要求 | 价值 | 
|---|---|
| 最低支持的客户端 | Windows 8 | 
| 目标平台 | 普遍 | 
| 最低 KMDF 版本 | 1.11 | 
| 标头 | wdfinterrupt.h (包括 Wdf.h) | 
| 图书馆 | Wdf01000.sys(请参阅框架库版本控制。 | 
| IRQL | <=DISPATCH_LEVEL | 
| DDI 符合性规则 | DriverCreate(kmdf) |