POWERRET VPowerHandlerProc(POWERFUNC PowerFunc, ULONG Flags);
A driver-supplied callback function that receives notifications of power management events. This function must be registered using the _VPOWERD_Register_Power_Handler service and must be in locked code.
This is intended for use by Configuration Manager only. Virtual devices that require notification of power changes should install a message hook procedure using the _SHELL_HookSystemBroadcast service.
PowerFunc
Power function. Can be one of these values:
PF_SUSPEND_PHASE1 | |
PF_SUSPEND_PHASE2 | |
PF_RESUME_PHASE2 | |
PF_RESUME_PHASE1 | |
PF_BATTERY_LOW | |
PF_POWER_STATUS_CHANGE | |
PF_UPDATE_TIME |
Flags
Power flags. Can be one of these values:
PFG_UI_ALLOWED (0x00000001) | |
PFG_CANNOT_FAIL (0X00000002) | |
PFG_REQUEST_VETOED (0X00000004) | Indicates that the user may not be available to answer questions prior to the suspend operation. If this value is not given, higher levels of software may attempt some user interaction prior to accepting a suspend request. |
PFG_REVERSE (0x00000008) | Clear for suspend operations, set on resume. |
PFG_STANDBY (0x00000010) | Indicates a standby request when set as opposed to a suspend request. |
PFG_CRITICAL (0x00000020) | Set to notify power handlers of critical resume operations so that they may attempt to resume their clients as best as possible. Critical suspends do not reach the power handlers in order to maintain compliance with the APM 1.1 specification. |
Although the callback function is called from within application time, the function must not use application-time services when interrupts are disabled.