본문 바로가기

OS/ETC

Check Battery

SYSTEM_POWER_STATUS_EX2 pstatus;

GetSystemPowerStatusEx2(&pstatus, sizeof(SYSTEM_POWER_STATUS_EX2), true);
 
(int)pstatus.BatteryLifePercent