Share via


SHSetPowerTimeoutForLock

4/8/2010

This function adjusts the power timeout when the device is locked or unlocked.

Syntax

HRESULT SHSetPowerTimeoutForLock(
   BOOL fLock
);

Parameters

  • fLock
    [in] The lock state for which the power timeout should be applied.

Return Value

This function returns an HRESULT value.

Positive HRESULT values indicate success. Negative HRESULT values indicate an error.

Remarks

Setting fLock to FALSE will apply the user-selected timeouts that are normally used when the device is unlocked. Setting fLock to TRUE will apply the shorter timeouts that are normally used when the device is locked.

This function is used to adjust the power timeout when the device is locked. It is primarily called by the Shell when locking and unlocking the device but can also be called by applications to temporarily override the shorter power timeout when the device is locked.

This function must be called in matched pairs, once with fLock set to FALSE to override the reduced timeout, and once with fLock set to TRUE to restore it.

Requirements

Header aygshell.h
Library aygshell.lib
Windows Embedded CE Windows CE 5.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

Shell Functions

Other Resources

Power Manager Suspend Timeouts