State Machines in the Framework
To keep track of each device's state, the framework uses a PnP state machine, a power state machine, and a power policy state machine. The framework creates an instance of each state machine for each device that is plugged into a system.
Note
This functionality is for Microsoft-internal use only.
For drivers that do need to know this information, the framework provides two sets of interfaces:
A set of driver-supplied event callback functions.
The driver can request that the framework call one of the following callback functions whenever one of the state machines enters or exits a particular state:
- EvtDevicePnpStateChange, which the driver registers by calling WdfDeviceInitRegisterPnpStateChangeCallback.
- EvtDevicePowerStateChange, which the driver registers by calling WdfDeviceInitRegisterPowerStateChangeCallback.
- EvtDevicePowerPolicyStateChange, which the driver registers by calling WdfDeviceInitRegisterPowerPolicyStateChangeCallback.
A set of methods that return the current state of the state machines.
The driver can call one of the following methods to determine the current state of one of the state machines for a particular device:
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin