Battery Status in Percent

  • Thread starter Thread starter verenadoll
  • Start date Start date
V

verenadoll

Hello NG,

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

Regards, Verena
 
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/
 
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/
 
Back
Top