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.
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.
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.
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)?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With