PPC - Determine Battery Status
From YYpBD's MediaWiki
PSYSTEM_POWER_STATUS_EX2 pwrstat=0;
if (!GetSystemPowerStatusEx2(pwrstat,sizeof(pwrstat),FALSE))
{
MessageBox(hWnd,_T("Couldn't get power state"),
_T("Error"),MB_OK);
}
else
{
// Extract the power status information you need.
}
