Hi,
I am working on an application which must run all the time after it has
started. Essentially this would mean that device should never suspend/power
off when on battery. This is very critical to the functionality of the
application. The targetted device is Motorola HDT600 based on WinCE 4.2.
I have identified a few options that could prevent the device from sleeping:
Option-1
----------
Under "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\" key set
"DisableGwesPowerOff" to non-zero. As per the documentation, if
DisableGwesPowerOff is set to non-zero, Power Manager will ignore the
settings described in Option-2.
Option-2
------------
Under "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Power" key, set
"BattPowerOff" to zero. This is similar to changing the Control Panel Power
applet setting to "Never".
Option-3
------------
Under "HKEY_LOCAL_MACHINE \System\CurrentControlSet\Control\Power\Timeouts"
key, set "BattSuspend" to zero.
Now my doubts are:
1) Why do we have so many different options for this?
2) What would be the tradeoff between option 2 and option 3? i.e. if we
programatically go for option 3 but user goes to control panel power applet
and makes changes there?
3) What would be the better way of doing it?
We have already decided NOT to use other methods like periodically calling
SystemIdlePowerReset() and sending fake keyboard events from a different
thread.
Thanks in advance.
regards,
Dapi