Article ID: 920782 - Last Review: December 13, 2006 - Revision: 1.0

You may have to return Windows XP to a low-power state manually after you use code to resume Windows from a low-power state

System TipThis article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.
Expand all | Collapse all

SYMPTOMS

After you use code to resume Microsoft Windows XP from a low-power state programmatically, you may have to return Windows to a low-power state manually. For example, after a program causes Windows to resume from Suspend or Hibernate mode, you may have to provide mouse or keyboard activity before Windows can return to Suspend or Hibernate mode. This problem may occur when you use any of the following methods:
  • SetActivePwrScheme
  • WriteGlobalPwrPolicy
  • CallNtPowerInformation

CAUSE

This problem occurs because an application changes the system power policy when Windows is in the Automatic Resume power state. The timer that Windows uses to resume the previous power state is cleared and does not reset. Therefore, Windows remains active until user activity is detected. When user activity is detected, the regular power policy settings that you define in Control Panel are used.

RESOLUTION

To resolve this problem, do not use code to modify the active power policy when Windows is in the Automatic Resume power state.

Notes
  • We recommend that applications use the SetThreadExecutionState method instead of modifying the active power policy.
  • You can use the IsSystemResumeAutomatic method to determine the current Windows power state.

APPLIES TO
  • Microsoft Windows XP Home Edition
  • Microsoft Windows XP Professional
  • Microsoft Windows XP Starter Edition
  • Microsoft Windows XP Tablet PC Edition
Keywords: 
kbinfo kbtshoot kbprb KB920782