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/14/2010
Handling Low Memory States
How to: Determine Available Memory
How to: Determine Battery Status
Preventing Automatic Power Down
How to: Program an Application for Windows Mobile Standard to Turn the Backlight On or Off
Managing Variables, Stacks, and Heaps on Windows Mobile Devices
Getting Memory Status and Processor Information
System Out of Memory Dialog Box
Applications can cause the device to suspend by simulating a press of the Power key, which makes two calls to the Windows Embedded CE keybd_eventfunction, as shown in the following code:
Copy Code | |
---|---|
keybd_event(VK_OFF,0,KEYEVENTF_SILENT,0); keybd_event(VK_OFF,0,KEYEVENTF_SILENT | KEYEVENTF_KEYUP,0); sleep(60); |
The sleep statement allows time for the system to suspend and prevents your application from executing further.
See Also
Concepts
Handling Application HibernationHandling Low Memory States
How to: Determine Available Memory
How to: Determine Battery Status
Preventing Automatic Power Down
How to: Program an Application for Windows Mobile Standard to Turn the Backlight On or Off
Managing Variables, Stacks, and Heaps on Windows Mobile Devices
Getting Memory Status and Processor Information
System Out of Memory Dialog Box