Windows Driver Kit: Kernel-Mode Driver Framework
EvtDeviceSelfManagedIoFlush
A driver's EvtDeviceSelfManagedIoFlush event callback function handles flush activity for the device's self-managed I/O operations.
EVT_WDF_DEVICE_SELF_MANAGED_IO_FLUSH EvtDeviceSelfManagedIoFlush;
VOID
EvtDeviceSelfManagedIoFlush (
IN WDFDEVICE Device
)
{…}
You must declare the function by using the EVT_WDF_DEVICE_SELF_MANAGED_IO_FLUSH type. For more information, see the following Example section.
Parameters
- Device
- A handle to a framework device object.
Return Value
None
Comments
To register an EvtDeviceSelfManagedIoFlush callback function, a driver must call WdfDeviceInitSetPnpPowerEventCallbacks.
If the driver has registered an EvtDeviceSelfManagedIoFlush callback function, the framework calls it after the device has been removed. The driver should flush (that is, remove) I/O requests that are associated with 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.
Example
To define an EvtDeviceSelfManagedIoFlush callback function that is named MyDeviceSelfManagedIoFlush, you must first provide a function declaration that SDV and other verification tools require, as follows:
EVT_WDF_DEVICE_SELF_MANAGED_IO_FLUSH MyDeviceSelfManagedIoFlush;
Then, implement your callback function as follows:
VOID
MyDeviceSelfManagedIoFlush (
IN WDFDEVICE Device
)
{…}
Requirements
Versions: The EvtDeviceSelfManagedIoFlush callback function is supported by version 1.0 and later versions of KMDF.
IRQL: PASSIVE_LEVEL
Headers: Defined in Wdfdevice.h, as follows:
typedef VOID
(EVT_WDF_DEVICE_SELF_MANAGED_IO_FLUSH)(
IN WDFDEVICE Device
);
Include Wdf.h.
See Also
EvtDeviceSelfManagedIoCleanup, EvtDeviceSelfManagedIoInit, EvtDeviceSelfManagedIoRestart, EvtDeviceSelfManagedIoSuspend