判断设备是笔记本,还是台式机
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 是台式机
但是当笔记本电池被拨下后,就无法判断了