编程找出如果系统支持待机
题
这有时会发生在Windows XP安装。除非安装的显示驱动器,功率节省操作,如待机和休眠不被支持。
是否为系统支持休眠可以检查 - http://pinvoke.net/的Default.aspx / powrprof / IsPwrHibernateAllowed.html
有没有检查待支持类似的东西?
解决方案
检查所有porwer管理功能此处一>
有IsPwrSuspendAllowed其中U可以使用它
其他提示
要发送机到睡眠或休眠使用的Win32 SetSuspendState功能功能
http://msdn.microsoft.com /en-us/library/aa373201%28VS.85%29.aspx
,但我无法找到所有的都告诉我们,如果该模式可用,而不实际调用上述功能&获得使用GetLastError()函数的错误。
编辑:使用GetPwrCapabilities功能
http://msdn.microsoft.com /en-us/library/aa372691%28VS.85%29.aspx
在该结构SYSTEM_POWER_CAPABILITIES回报: SleepButtonPresent
http://msdn.microsoft.com /en-us/library/aa373215%28VS.85%29.aspx 这可以帮助。
不隶属于 StackOverflow