标签:
typedef struct _SYSTEM_POWER_STATUS {
BYTE ACLineStatus;
BYTE BatteryFlag;
BYTE BatteryLifePercent;
BYTE Reserved1;
DWORD BatteryLifeTime;
DWORD BatteryFullLifeTime;
} SYSTEM_POWER_STATUS, *LPSYSTEM_POWER_STATUS;
SYSTEM_POWER_STATUS sps;
GetSystemPowerStatus(&sps);
BatteryFlag == 128 && BatteryLifePercent > 100 是台式机
但是当笔记本电池被拨下后,就无法判断了
标签:
原文地址:http://www.cnblogs.com/jackieron/p/5978127.html