SYSTEM_POWER_STATUS_EX

S

Simone

I have a problem on the object to retreive battery status of WM5.0 platform.
I use thid code to retreive information:

ps = new SYSTEM_POWER_STATUS_EX();

bool bRet = GetSystemPowerStatusEx(ref sps);

if (!bRet)

return;

if (sps.BatteryLifePercent == 255 | sps.BackupBatteryLifePercent == 255)

{

BA_label.Text = "Unknown";

}

else

{

Bar_bs1.Value = Convert.ToInt32(sps.BatteryLifePercent);

Bar_bs2.Value = Convert.ToInt32(sps.BackupBatteryLifePercent);

}

In my PPC2003 this code run ok but in WM 5.0 (JasJar or emulator)
sps.BatteryLifePercent return me always 255.

Can anyone help me?
 

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