views:

88

answers:

2

How can I tell Windows XP to switch to standby mode programmatically with C/C++ native code?

+1  A: 

Try this:

SetSystemPowerState(TRUE, TRUE);

http://msdn.microsoft.com/en-us/library/aa373206.aspx

loentar
Seems this call has been superseded by SetSuspendState
Elemental
+3  A: 

A likely function in the Win32 API is SetSuspendState:

SetSuspendState(TRUE, FALSE, FALSE);

From: http://msdn.microsoft.com/en-us/library/aa373201(VS.85).aspx

mattbasta