// wdfdevice.h
EVT_WDF_DEVICE_SELF_MANAGED_IO_SUSPEND EvtWdfDeviceSelfManagedIoSuspend;
NTSTATUS EvtWdfDeviceSelfManagedIoSuspend(
[in] WDFDEVICE Device
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
[Applies to KMDF and UMDF]
A driver's EvtDeviceSelfManagedIoSuspend event callback function suspends a device's self-managed I/O operations.
Device [in]A handle to a framework device object.
If the operation is successful, the EvtDeviceSelfManagedIoSuspend callback function 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. If NT_SUCCESS(status) equals FALSE, the framework stops the device and removes its device objects.
If NT_SUCCESS(status) equals FALSE, the framework calls the driver's EvtDeviceSelfManagedIoFlush and EvtDeviceSelfManagedIoCleanup callback functions.
For more information about this callback function's return values, see Reporting Device Failures.
To register an EvtDeviceSelfManagedIoSuspend callback function, a driver must call WdfDeviceInitSetPnpPowerEventCallbacks.
If the driver has registered an EvtDeviceSelfManagedIoSuspend callback function, the framework calls it for one of the following reasons:
Because you do not know which of these events causes the framework to call your driver, you must assume that the device might return to its working (D0) state.
If the device is about to enter a low-power state, the framework calls the driver's EvtDeviceSelfManagedIoSuspend callback function before it calls the driver's EvtDeviceD0Exit callback function.
If the callback function returns a status value for which NT_SUCCESS(status) equals FALSE, and if the framework is attempting to lower the device's power, the framework stops the device and removes its device objects.
The EvtDeviceSelfManagedIoSuspend callback function must do whatever is needed to stop the device's self-managed I/O operations.
For more information about when the framework calls this callback function, see PnP and Power Management Scenarios.
For more information about drivers that provide this callback function, see Using Self-Managed I/O.