This function is called in response to a power event.
Arguments:
aul_event - Power Management Event
Values:
|
PBT_APMBATTERYLOW |
Battery power is low. |
|
PBT_APMOEMEVENT |
OEM-defined event occurred. |
|
PBT_APMPOWERSTATUSCHANGE |
Power status has changed. |
|
PBT_APMQUERYSUSPEND |
Request for permission to suspend. |
|
PBT_APMQUERYSUSPENDFAILED |
Suspension request denied. |
|
PBT_APMRESUMEAUTOMATIC |
Operation resuming automatically after event. |
|
PBT_APMRESUMECRITICAL |
Operation resuming after critical suspension. |
|
PBT_APMRESUMESUSPEND |
Operation resuming after suspension. |
|
PBT_APMSUSPEND |
System is suspending operation. |
Return:
None
Usage:
You would add code to this function if there was something you wanted to do when the power status changed. If the battery power is low, you could set an instance variable that the of_run function could look at and stop the service.