[C#] – PC Power Detect

Registering for Power Events

Applications can better adapt their behavior to the current power state of the computer by registering for power events. An application should register for each power change event that might impact its behavior.

An application or service uses the RegisterPowerSettingNotification function to register for notifications. When the corresponding power setting changes, the system sends notifications as follows:

In the POWERBROADCAST_SETTING structure, the PowerSetting member contains the GUID that identifies the notification and the Data member contains the new value of the power setting.

For a list of power setting GUIDs for notifications that are most useful to applications, see Power Setting GUIDs.


댓글 남기기

이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다