Re: Refresh battery status for GetSystemPowerStatusEx()

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Paul G. Tobey [eMVP] (ptobey)
Date: 11/30/04


Date: Tue, 30 Nov 2004 16:48:17 -0700

I've never seen that sort of problem on any of our devices. You should be
setting the last parameter to TRUE. When you make the call, it should be
forwarded to the battery driver. At that point, you should get the same
information as is used to display the power status via the standard shell.
Are you checking the return value of the call? Is it always TRUE?

Paul T.

"Mike D Sutton" <EDais@mvps.org> wrote in message
news:%23EM8JZz1EHA.3840@tk2msftngp13.phx.gbl...
> I'm calling the GetSystemPowerStatusEx() API in a class from a Timer
> object's Tick event hander about once every 30 seconds. The
> call itself works fine and I get back valid data however it always seems
> to return the same value until opening Start -> Settings ->
> Power, which somehow refreshes the battery status and I start getting that
> value back in my application. Is there some way I can do
> whatever the power screen is doing to refresh the status (I've tried both
> true and false as the last parameter, but no
> difference?..)
> Also is there a more accurate way of establishing the battery level, it
> seems it stays at 100% for a while then 'jumps' to about 80%
> and so on rather than being a smooth progression, or is this a 'feature'
> of the memory/OS?
> This is being written in C# 2003 for a Pocket PC.
> Cheers,
>
> Mike
>
>



Relevant Pages

  • Re: Minimal size 5V/100mA power supply
    ... be draining battery power in idle state. ... Can you come with some cunning sort of power supply? ... Now I'm wondering if I make the LED indication blinking about 100 ...
    (sci.electronics.basics)
  • Re: power conditioner or battery back-up?
    ... I mean, beside the obvious, that a battery back-up allows you to shut ... things down properly rather than having the power cut-off suddenly. ... some sort of protection on it, or can its motor handle the sort of ...
    (alt.home.repair)
  • Re: power conditioner or battery back-up?
    ... I mean, beside the obvious, that a battery back-up allows you to shut ... things down properly rather than having the power cut-off suddenly. ... some sort of protection on it, or can its motor handle the sort of ...
    (alt.home.repair)
  • Re: Probably a dumb question....but
    ... generator is 100% efficient you will always consume more power than ... and attached some sort of generator or dynamo to the ... battery, but ...
    (alt.autos.toyota)
  • What I learned from Hurricane Charley
    ... Since we never lost power, I'm not sure about the level of our food and ... Since emergency shelter in the county in which I work (and to which I must ... In the late spring we had pulled out our battery operated drill and used it ... we could safely handle the panels without injury to our hands. ...
    (misc.survivalism)