Preventing Automatic Power Down

Send Feedback

You can override the automatic suspend that occurs when no user input has occurred for a period of time. To prevent automatic power down, call the SystemIdleTimerReset function more frequently than the minimum suspend timeout values.

On a Pocket PC, the minimum timeout value can be retrieved from the registry at HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Power\Timeouts. The keys BattSuspendTimeout and ACSuspendTimeout contain the timeout values when on battery or AC power.

For a Smartphone, the minimum timeout values can be retrieved from the metabase by using the following xml:

<wap-provisioningdoc>
    <characteristic type="DeviceInformation">
            <parm-query name="[name]"/>
    </characteristic>
</wap-provisioningdoc>

Where "[name]" is either "BacklightBatteryTimeout" or "BacklightACTimeout"

To conserve resources, only call SystemIdleTimerReset as often as absolutely necessary. Calling SystemIdleTimerReset too often will reduce battery life due to excessive CPU use.

See Also

Handling Application Hibernation | Handling Low Memory States | How to: Determine Available Memory | How to: Determine Battery Status | How to: Program Applications to Turn the Smartphone Backlight Off and On | How to: Suspend the Device | Managing Variables, Stacks, and Heaps on Mobile Devices | Memory and Power Management | Getting Memory Status and Processor Information | System Out of Memory Dialog Box

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.