2

This happens sometimes with Windows XP installations. Unless the display drivers are installed, power saving actions such as standby and hibernate are not supported.

Whether the system supports hibernate can be checked - http://pinvoke.net/default.aspx/powrprof/IsPwrHibernateAllowed.html

Is there something similar for checking standby support?

Sameet
  • 2,191
  • 7
  • 28
  • 55

2 Answers2

3

check out all the porwer management functions here

there is IsPwrSuspendAllowed which u could use it

Sadegh
  • 6,654
  • 4
  • 34
  • 44
  • I think the return value tells the user if sleep1,sleep2 & sleep3 which are hardware sleep states supported & not whether windows has enabled the Standby Mode. – Ganesh R. Jul 26 '09 at 07:49
3

TO send a machine to sleep or hibernate use Win32 SetSuspendState Function Function

http://msdn.microsoft.com/en-us/library/aa373201%28VS.85%29.aspx

BUT I could not find anything that will tell if that mode is available without actually calling the above function & getting the error using GEtLastError() function.

EDIT: Use GetPwrCapabilities Function

http://msdn.microsoft.com/en-us/library/aa372691%28VS.85%29.aspx

In that the structure SYSTEM_POWER_CAPABILITIES returns: SleepButtonPresent

http://msdn.microsoft.com/en-us/library/aa373215%28VS.85%29.aspx which may help.

Ganesh R.
  • 4,337
  • 3
  • 30
  • 46