The Windows Embedded CE
To produce accurate and complete information, device manufacturers must populate this data from their battery drivers, as shown in the following code:
Copy Code | |
|---|---|
PSYSTEM_POWER_STATUS_EX2 pwrstat=0;
if (!GetSystemPowerStatusEx2(pwrstat,sizeof(pwrstat),FALSE))
{
MessageBox(hWnd,_T("Couldn't get power state"),
_T("Error"),MB_OK);
}
else
{
// Extract the power status information you need.
} | |
See Also
Concepts
Handling Application HibernationHandling Low Memory States
How to: Determine Available Memory
Preventing Automatic Power Down
How to: Program an Application for Windows Mobile 6 Standard to Turn the Backlight On or Off
How to: Suspend the Device
Managing Variables, Stacks, and Heaps on Mobile Devices
Getting Memory Status and Processor Information
System Out of Memory Dialog Box
See Also