A Device Returns to Its Working State (UMDF 1)
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.
The archived UMDF 1 samples can be found in the Windows 11, version 22H2 - May 2022 Driver Samples Update.
For more info, see Getting Started with UMDF.
A device that is in a low-power state returns to its working state if one of the following occurs:
The device detects an external event and triggers a wake signal on its bus. The kernel-mode bus driver detects the wake signal.
The device has been idle and a driver calls IWDFDevice2::StopIdle.
The system's power state has changed from a low-power state to its working (S0) state.
In each of these situations, the kernel-mode bus driver restores the device (a child device of the bus) to its working (D0) state.
For each UMDF-based function and filter driver that supports the device, the framework does the following, in sequence, one driver at a time, starting with the driver that is lowest in the driver stack:
The framework calls the driver's IPnpCallback::OnD0Entry callback function (if it exists).
If the driver is the device's power policy owner, the framework calls its IPowerPolicyCallbackWakeFromS0::OnDisarmWakeFromS0 or IPowerPolicyCallbackWakeFromSx::OnDisarmWakeFromSx callback function.
The framework restarts all of the device's power-managed I/O queues and calls their IQueueCallbackIoResume::OnIoResume callback functions (if necessary).
If the driver is using self-managed I/O, the framework calls the driver's IPnpCallbackSelfManagedIo::OnSelfManagedIoRestart callback function.
To see a diagram that shows these steps, see A User Plugs in a Device.