Alright, wouldn't BatteryLifeTime, and BatteryFullTime be apart of WMI? I know these are the member I need to use, although I don't know how to implement them into my code correctly. (I sadly can't even seem to find a download)
Maybe I'm exploding with newbiness, in any case, thank you for taking my a step ahead.
Also, I have attempted to use the SYSTEM_POWER_STATUS, here is my code.
1 2 3 4 5 6 7 8 9 10 11 12 13
|
#include <iostream>
#include <windows.h>
using namespace std;
void main()
{
SYSTEM_POWER_STATUS pwr;
GetSystemPowerStatus(&pwr);
cout << pwr.BatteryLifeTime << endl;
cout << pwr.BatteryFullLifeTime << endl;
cout << pwr.BatteryLifePercent << endl;
}
|
Which outputs
When my battery is at 69%..
There are two issues, 20923/4294967295!=.69
and "E" instead of an integral value from 1-100. (FIXED)
Even with this resolved, my ultimate issue of trying to find a more precise battery reading remains.