SetSleepStateInfo method
The SetSleepStateInfo method sets the sleep state and wake timer parameters that the Console::SetSleepState method uses.
Syntax
HRESULT SetSleepStateInfo(
[in] LONG WakeTimeInMinutes,
[in] LONG SleepState
);
Parameters
WakeTimeInMinutes [in]
The amount of time, in minutes, that must pass before the Real Time Clock (RTC) will wake up the computer. This value must be in the range of 0 to 20,160 inclusive.SleepState [in]
The desired sleep state for the computer. This value must be in the range 1 (S1) to 4 (S4) inclusive.
Return value
SetSleepStateInfo returns a standard HRESULT value.
Remarks
The SetSleepStateInfo method requires the wake-up time to be nonnegative. The maximum wake-up time is a 14-day period, which is equal to 1,209,600 seconds. If you want to specify wake time in seconds, use the Console::SetSleepStateInfoEx method instead.
For more information about the wake up timer, see Console::SetWakeTimer.
See also
Send comments about this topic to Microsoft
Build date: 1/12/2012