1  我调用SetSystemPowerState将系统设置为suspend状态,当系统恢复到正常模式时我的程序是否会收到些消息? 如果会的话会收到什么消息?2  在挂起状态我的程序是否仍然在允许,我是否可以继续做我的事情。例如:系统挂起后一个小时我想让我的程序自动做某件事情,这样能否实现

解决方案 »

  1.   

    可以看看这个代码:http://www.vckbase.com/code/winsys/othersys/ShutdownComputer.zip
      

  2.   

    Suspend State
    In the suspend state, an H/PC uses minimal power to maintain its clock, its applications, and the persistent data stored in RAM. To reduce power requirements, an H/PC removes power from unneeded circuits and devices, such as the keyboard decoder, display, scratch-pad memory, and processor. A PC Card storage device driver determines the power that it uses when the device is in the suspend state. The processor might take as long as 100 milliseconds to wake up from this state.An H/PC switches to the suspend state when the following events occur: The user selects the Suspend command. 
    The device detects a critical-power condition. 
    The activity timer performs a time-out. 供你参考一下。