Reputation: 597
How can I tell Windows XP to switch to standby mode programmatically with C/C++ native code?
Upvotes: 1
Views: 1167
Reputation: 13709
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
Upvotes: 4
Reputation: 5239
Try this:
SetSystemPowerState(TRUE, TRUE);
http://msdn.microsoft.com/en-us/library/aa373206.aspx
Upvotes: 1