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?
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?