Battery Status in Percent

V

verenadoll

Hello NG,

how can i get the battery status in percent? I am using Windows Mobile
6.

Regards, Verena
 
C

Carsten Unterberg

Hi Verena,

Hello NG,

how can i get the battery status in percent? I am using Windows Mobile
6.


with Microsoft.WindosMobile.Status /
System.state.PowerBatteryStrengthProperty you don't get the exact value, you
get just a range. Maybe the GetSystemPowerStatusEx from coredll.dll helps
you.

[System.State.PowerBatteryStrength Property]
http://msdn.microsoft.com/en-us/lib....status.systemstate.powerbatterystrength.aspx

[GetSystemPowerStatusEx (coredll)]
http://www.pinvoke.net/default.aspx/coredll/GetSystemPowerStatusEx.html


Regards,

Carsten Unterberg | Test-Framework
http://test-framework.blogspot.com/
 
L

Lcubed

P/invoke GetSystemPowerStatusEx, you'll also need to create a
SYSTEM_POWER_STATUS_EX structure. If you google "C# pinvoke
GetSystemPowerStatusEx", there are plenty of examples of how to do
this.


Hi Verena,

Hello NG,
how can i get the battery status in percent? I am using Windows Mobile
6.

with Microsoft.WindosMobile.Status /
System.state.PowerBatteryStrengthProperty you don't get the exact value, you
get just a range. Maybe the GetSystemPowerStatusEx from coredll.dll helps
you.

[System.State.PowerBatteryStrength Property]http://msdn.microsoft.com/en-us/library/microsoft.windowsmobile.statu...

[GetSystemPowerStatusEx (coredll)]http://www.pinvoke.net/default.aspx/coredll/GetSystemPowerStatusEx.html

Regards,

Carsten Unterberg | Test-Frameworkhttp://test-framework.blogspot.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

HP Elitebook 840 G3 not seeing battery. 19
Set File Time 3
Install CAB File 1
Change Key 2
Save Screenshot to jpg 2
Write log file using Thread 16
Create WLAN profile (Symbol MC55) 1
Stop Debugger --> Event 1

Top