This function adjusts the power timeout when the device is locked or unlocked.
HRESULT SHSetPowerTimeoutForLock( BOOL fLock );
[in] The lock state for which the power timeout should be applied.
This function returns an HRESULT value.
Positive HRESULT values indicate success. Negative HRESULT values indicate an error.
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.
|Windows Embedded CE||Windows CE 5.0 and later|
|Windows Mobile||Windows Mobile Version 5.0 and later|