0

Possible Duplicate:
Getting battery information of a windows CE 5.0 device

I need to check the battery level in a Windows CE device using c#. I need something like the Win32_Battery class but for Mobile Devices.

Thanks for any help!

Community
  • 1
  • 1
Ignacio Gómez
  • 1,587
  • 4
  • 23
  • 41
  • http://stackoverflow.com/questions/5415622/getting-battery-information-of-a-windows-ce-5-0-device .. there are several other links on stackoverflow alone, did you look through them yet? – Thousand Sep 26 '12 at 19:14

1 Answers1

1

You can p/invoke the GetSystemPowerStatusEx API to get battery status, see http://msdn.microsoft.com/en-us/library/aa453172.aspx for the details.

A quick google search also yields a samples:

http://www.microsoft.com/en-us/download/details.aspx?id=11736

and a tutorial:

http://msdn.microsoft.com/en-us/library/aa446550.aspx

tcarvin
  • 10,715
  • 3
  • 31
  • 52