SetSleepStateInfoEx method

The SetSleepStateInfoEx method sets the sleep state and wake timer parameters that the Console::SetSleepState method uses to put the computer into the sleep state.

Syntax

HRESULT SetSleepStateInfoEx(
  [in]  LONG WakeTimeInSeconds,
  [in]  LONG SleepState
);

Parameters

  • WakeTimeInSeconds [in]
    The amount of time, in seconds, that must pass before the Real Time Clock (RTC) will wake up the computer. This value must be in the range of 0 to 1,209,600 inclusive.

  • SleepState [in]
    The desired sleep state. This value must be in the range 1 (S1) to 4 (S4) inclusive.

Return value

SetSleepStateInfoEx returns a standard HRESULT value.

Remarks

The SetSleepStateInfoEx 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. The SetSleepStateInfoEx method and the Console::SetSleepStateInfo method differ only in the units that are used for the WakeTime parameter. SetSleepStateInfo specifies wake time in minutes.

See also

Console

Console::SetSleepState

Console::SetSleepStateInfo

 

 

Send comments about this topic to Microsoft

Build date: 1/12/2012