Re: Refresh battery status for GetSystemPowerStatusEx()
From: Paul G. Tobey [eMVP] (ptobey)
Date: 11/30/04
- Next message: Drak: "Re: SE problems with storage card removal and open files"
- Previous message: Mike D Sutton: "Refresh battery status for GetSystemPowerStatusEx()"
- In reply to: Mike D Sutton: "Refresh battery status for GetSystemPowerStatusEx()"
- Next in thread: Mike D Sutton: "Re: Refresh battery status for GetSystemPowerStatusEx()"
- Reply: Mike D Sutton: "Re: Refresh battery status for GetSystemPowerStatusEx()"
- Messages sorted by: [ date ] [ thread ]
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
>
>
- Next message: Drak: "Re: SE problems with storage card removal and open files"
- Previous message: Mike D Sutton: "Refresh battery status for GetSystemPowerStatusEx()"
- In reply to: Mike D Sutton: "Refresh battery status for GetSystemPowerStatusEx()"
- Next in thread: Mike D Sutton: "Re: Refresh battery status for GetSystemPowerStatusEx()"
- Reply: Mike D Sutton: "Re: Refresh battery status for GetSystemPowerStatusEx()"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|