Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
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 fLockto FALSE will apply the user-selected timeouts that are normally used when the device is unlocked. Setting fLockto 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 fLockset to FALSE to override the reduced timeout, and once with fLockset 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