如何编程得到系统可不可以休眠?(谢谢)
主要是指的在电源管理选项中的休眠选项是否被选中?谢谢!

解决方案 »

  1.   

    IsPwrHibernateAllowedThe IsPwrHibernateAllowed function determines whether the computer supports hibernation.
    BOOLEAN IsPwrHibernateAllowed(void);Parameters
    This function has no parameters. 
    Return Values
    If the computer supports hibernation (power state S4) and the file Hiberfil.sys is present on the system, the function returns TRUE. Otherwise, the function returns FALSE.Res
    This information is also available through the CallNtPowerInformation function. The value is returned in the SystemS4 member of the SYSTEM_POWER_CAPABILITIES structure.Requirements
    Client: Included in Windows XP, Windows 2000 Professional, Windows Me, and Windows 98.
    Server: Included in Windows Server 2003 and Windows 2000 Server.
    Header: Declared in Powrprof.h.
    Library: Use Powrprof.lib.