HOWTO: Keep a Windows CE Device Alive while CommunicatingLast reviewed: February 11, 1998Article ID: Q180898 |
The information in this article applies to:
SUMMARYWhen you are doing serial communications, a device may suspend power based upon a time limit configured by the user. The operating system determines idle time based only upon any type of keyboard entry on the device. This article explains how to keep a Windows CE device alive while you are communicating.
MORE INFORMATIONTo avoid device suspension, an application may send a key stroke using keybd_event(). You need to send a UP keystroke to prevent a keyboard click from occurring. You should send a key that is currently not being used by the Windows CE operating system so that you can eliminate any potential keyboard conflict. In the following example, an F4 UP keystroke is sent:
keybd_event(VK_F4, 0, KEYEVENTF_KEYUP,0);To determine the time limit that has been configured by the user, you can query the following registry key:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Power\BattPowerOffThe BattPowerOff value is a DWORD that represents how long (in seconds) the HPC device will wait before suspending itself.
|
Additional query words: Advanced Power Management Sleep
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |