Get Battery Status: High, Low & Very Low

G

Guest

Hi,
I am working on a PPC 2003 Device.
I want to get the Battery Status that is displayed in the Control Panel as
High, Low or Very Low.

Can some one tell me how i can get that.
I am using the below API Call to get the Percentage of Battery Charge left.
[DllImport("coredll")]
public extern static bool GetSystemPowerStatusEx(ref YSTEM_POWER_STATUS_EX
sps, bool fUpdate);

In one of our PPC 2003 Devices the Percentage of Battery Charge is displayed
as "Unknown". What is the Reason and Can something be done to get the
Percentage Battery charge.
 
P

Peter Foot [MVP]

The device may show Unknown shortly after turned on before it is able to
properly update, or when the device is charging on external power...

Peter
 
P

Paul G. Tobey [eMVP]

The reason is that the device/battery driver doesn't know. If the hardware
doesn't know, no, you can't magically determine that.

Paul T.
 
G

Guest

Hi,
But the Battery Status is showing as High or Low or Very Low is there any
way i can get that Status.

Thanks for your Prompt Response.

Paul G. Tobey said:
The reason is that the device/battery driver doesn't know. If the hardware
doesn't know, no, you can't magically determine that.

Paul T.

Murthy said:
Hi,
I am working on a PPC 2003 Device.
I want to get the Battery Status that is displayed in the Control Panel as
High, Low or Very Low.

Can some one tell me how i can get that.
I am using the below API Call to get the Percentage of Battery Charge
left.
[DllImport("coredll")]
public extern static bool GetSystemPowerStatusEx(ref YSTEM_POWER_STATUS_EX
sps, bool fUpdate);

In one of our PPC 2003 Devices the Percentage of Battery Charge is
displayed
as "Unknown". What is the Reason and Can something be done to get the
Percentage Battery charge.
 
P

Paul G. Tobey [eMVP]

It's showing somewhere. You don't necessarily know that the battery driver
is providing that information. The OEM for the device can do *anything*
they want to. The two things that I can think of are a) you're doing
something wrong in your declaration of the type passed to that call, b) the
OEM doesn't use that call to report battery status. If a), fix it. If b),
there's nothing you can do unless you can find what call the OEM *is* using
and use that yourself.

Paul T.

Murthy said:
Hi,
But the Battery Status is showing as High or Low or Very Low is there any
way i can get that Status.

Thanks for your Prompt Response.

Paul G. Tobey said:
The reason is that the device/battery driver doesn't know. If the
hardware
doesn't know, no, you can't magically determine that.

Paul T.

Murthy said:
Hi,
I am working on a PPC 2003 Device.
I want to get the Battery Status that is displayed in the Control Panel
as
High, Low or Very Low.

Can some one tell me how i can get that.
I am using the below API Call to get the Percentage of Battery Charge
left.
[DllImport("coredll")]
public extern static bool GetSystemPowerStatusEx(ref
YSTEM_POWER_STATUS_EX
sps, bool fUpdate);

In one of our PPC 2003 Devices the Percentage of Battery Charge is
displayed
as "Unknown". What is the Reason and Can something be done to get the
Percentage Battery charge.
 
P

Paul G. Tobey [eMVP]

And I guess I should say that the best way to decide whether the problem is
a) or b) is to write the code in C/C++ and see if you get the right answer
*that* way.

Paul T.

"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:eMNR84d%[email protected]...
It's showing somewhere. You don't necessarily know that the battery
driver is providing that information. The OEM for the device can do
*anything* they want to. The two things that I can think of are a) you're
doing something wrong in your declaration of the type passed to that call,
b) the OEM doesn't use that call to report battery status. If a), fix it.
If b), there's nothing you can do unless you can find what call the OEM
*is* using and use that yourself.

Paul T.

Murthy said:
Hi,
But the Battery Status is showing as High or Low or Very Low is there any
way i can get that Status.

Thanks for your Prompt Response.

Paul G. Tobey said:
The reason is that the device/battery driver doesn't know. If the
hardware
doesn't know, no, you can't magically determine that.

Paul T.

Hi,
I am working on a PPC 2003 Device.
I want to get the Battery Status that is displayed in the Control
Panel as
High, Low or Very Low.

Can some one tell me how i can get that.
I am using the below API Call to get the Percentage of Battery Charge
left.
[DllImport("coredll")]
public extern static bool GetSystemPowerStatusEx(ref
YSTEM_POWER_STATUS_EX
sps, bool fUpdate);

In one of our PPC 2003 Devices the Percentage of Battery Charge is
displayed
as "Unknown". What is the Reason and Can something be done to get the
Percentage Battery charge.
 

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

Top