Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Monitoring display power events on Windows XP

Tags:

People also ask

Does Windows XP have Event Viewer?

To access the Event Viewer in Windows XP Classic View, from the Start menu, select Settings, and then Control Panel. Double-click Administrative Tools, and then select Event Viewer.

How do I view power events in Event Viewer?

Logging power events is easy with Event viewer.. Under the Filter Tab ; check "By Source" and from the Event sources dropdown select Kernel-Power, Power-Troubleshooter. Also check all the Event Levels.

Where are the event log files kept on a Windows XP System?

By default, Event Viewer log files use the . evt extension and are located in the %SystemRoot%\System32\winevt\Logs folder. Log file name and location information is stored in the registry.

How do I view Windows event history?

Press the Windows key + R on your keyboard to open the run window. In the run dialog box, type in eventvwr and click OK. In the Event Viewer window, expand the Windows Logs menu. Under the Windows Logs menu, you'll notice different categories of event logs—application, security, setup, system, and forwarded events.


On Windows only the focused application receives display power events via the WM_SYSCOMMAND message (with wParam set to SC_MONITORPOWER, and lParam representing the new power state).

On Windows Vista and later, any application can be notified of display power events by calling the RegisterPowerSettingNotification function, using the GUID_SESSION_DISPLAY_STATUS GUID.

Is there a way to achieve the same result on Windows XP, at application level (i.e not using code running at kernel mode)?