Console

The Console interface provides a set of basic console operations.

interface IConsole : IAction

Methods

  • Lock
    Locks the computer.

  • LogOff
    Logs the interactive user off the computer.

  • CriticalLogOff
    Forcefully closes all interactive applications and logs the interactive user off the computer.

  • Shutdown
    Initiates a computer shutdown.

  • CriticalShutdown
    Forcefully closes all interactive applications and initiates a computer shutdown.

  • Reboot
    Initiates a computer restart.

  • CriticalReboot
    Forcefully closes all interactive applications and initiates a computer restart.

  • AbortShutdown
    Stops the computer shutdown that is in progress.

  • SetWakeTimer
    Sets wake timers to wake up the computer as quickly as possible from sleep.

  • Standby
    Put the computer into standby.

  • CriticalStandby
    Forcefully closes all interactive applications and puts the computer into standby.

  • Hibernate
    Puts the computer into hibernation.

  • CriticalHibernate
    Forcefully closes all interactive applications and puts the computer into hibernation.

  • Sleep
    Puts the computer into the desired sleep state and automatically wakes it up after the desired wake-up time.

  • QuickSleep
    Starts multiple wake timers for quick wake-up and sends the computer to sleep.

  • ResetDisplayIdleTimer
    Resets the Display idle timer so that the display will not go into a lower power state.

    Note  This method is obsolete and must not be used.

  • ResetSystemIdleTimer
    Resets the System idle timer so that the computer will not go into a lower power state.

    Note  This method is obsolete and must not be used.

  • GetFirstSleepState
    Returns the first supported sleep state.

  • GetNextSleepState
    Returns the next supported sleep state.

  • SetSleepStateInfo
    Sets the desired sleep state and wake timer (in minutes) that the next SetSleepState method call will use.

  • SetSleepStateInfoEx
    Sets the desired sleep state and wake timer (in seconds) that the next SetSleepState method call will use.

  • SetSleepState
    Starts the wake timer and sends the computer to sleep.

  • EnableAutoWakeIfPossible
    Enables automatic waking from a sleep state.

  • IsRtcWakeSupported
    Determines whether a computer can wake up from a specified sleep state by using Real Time Clock (RTC).

Properties

  • PasswordProtectScreenSaver
    Retrieves or sets the status of password protection for screen savers.

  • PasswordProtectSleep
    Retrieves or sets the status of password protection for the computer when it resumes from sleep.

  • DisableWakeEvents
    Retrieves or sets the DisableWakeEvents option that is used when a computer transitions to a sleep state.

  • ResetOnHibernate
    Sets the ResetOnHibernate option. This option causes a computer to restart instead of shutdown after a computer hibernates.

  • DisplayRequired
    If set, requires that the display be available from now on.

  • SystemRequired
    If set, requires that the computer be available from now on.

  • Console::IsStandbySupported
    Checks whether the system supports Standby. This is defined to be any combination of the S1, S2, or S3 sleep states.

  • Console::IsS1Supported
    Checks whether the system supports the S1 sleep state.

  • IsS2Supported
    Checks whether the system supports the S2 sleep state.

  • IsS3Supported
    Checks whether the system supports the S2 sleep state.

  • IsHibernateSupported
    Checks whether the system supports Hibernate. This is defined to be the S4 sleep state.

  • IsHybridSleepSupported
    Checks whether the system supports the hybrid-sleep. This is defined to be theFastSystemS4 sleep state.

Remarks

The Console action interface acts on an instance of the ITarget interface that is retrieved from the SystemDepot property. You can retrieve a target-specific implementation of an action interface by calling the ITarget::GetInterface method with the desired WDTFProgID.

You can use the methods and properties from the Console interface to create many test scenarios that require control of the system console.

Implementation Details

WDTFProgID: Console

TraceLevel Path: HKCR\WDTFActions.1\System\Console\

Note  The implementation of the Console interface is not thread-safe.

Type Libraries

  • WDTF.tlb

  • WDTFInterfaces.tlb

  • ConsoleAction.tlb

Action Interfaces

ITarget

ITarget::GetInterface

IWDTF::SystemDepot

 

 

Send comments about this topic to Microsoft

Build date: 1/12/2012