Group: Power Management - Library: kernel32
Retrieves the power status of the system. The status indicates whether the system is running on AC or DC power, whether the battery is currently charging, and how much battery life remains.
Get the power status of your laptop computer
BOOL GetSystemPowerStatus(
LPSYSTEM_POWER_STATUS lpSystemPowerStatus
); DECLARE INTEGER GetSystemPowerStatus IN kernel32;
STRING @lpSystemPowerStatus
lpSystemPowerStatus [out] Pointer to a SYSTEM_POWER_STATUS structure that receives status information.
If the function succeeds, the return value is nonzero.
Home