Bewerken

Delen via


EVT_WDF_DEVICE_D0_EXIT_PRE_INTERRUPTS_DISABLED callback function (wdfdevice.h)

[Applies to KMDF and UMDF]

A driver's EvtDeviceD0ExitPreInterruptsDisabled event callback function performs device-specific operations that are required before the driver disables the device's hardware interrupts.

Syntax

EVT_WDF_DEVICE_D0_EXIT_PRE_INTERRUPTS_DISABLED EvtWdfDeviceD0ExitPreInterruptsDisabled;

NTSTATUS EvtWdfDeviceD0ExitPreInterruptsDisabled(
  [in] WDFDEVICE Device,
  [in] WDF_POWER_DEVICE_STATE TargetState
)
{...}

Parameters

[in] Device

A handle to a framework device object.

[in] TargetState

A WDF_POWER_DEVICE_STATE-typed enumerator that identifies the device power state that the device is about to enter.

Return value

If the EvtDeviceD0ExitPreInterruptsDisabled callback function encounters no errors, it must return STATUS_SUCCESS or another status value for which NT_SUCCESS(status) equals TRUE. Otherwise, it must return a status value for which NT_SUCCESS(status) equals FALSE.

For more information about this callback function's return values, see Reporting Device Failures.

Remarks

To register an EvtDeviceD0ExitPreInterruptsDisabled callback function, a driver must call WdfDeviceInitSetPnpPowerEventCallbacks.

The EvtDeviceD0ExitPreInterruptsDisabled callback function is called at IRQL = PASSIVE_LEVEL, before the framework calls the driver's EvtInterruptDisable callback function. A driver can provide this function if it must perform device-specific operations before disables an interrupt, if those operations should not be performed at IRQL = DIRQL in the EvtInterruptDisable callback function.

For more information about when the framework calls this callback function, see PnP and Power Management Scenarios.

For more information about handling interrupts, see Handling Hardware Interrupts.

Requirements

Requirement Value
Target Platform Universal
Minimum KMDF version 1.0
Minimum UMDF version 2.0
Header wdfdevice.h (include Wdf.h)
IRQL PASSIVE_LEVEL (see Remarks section)

See also

EvtDeviceD0EntryPostInterruptsEnabled