Based on which parameter does Windows determine the presence of a battery at the bottom layer?

hualong zhang 0 Reputation points
2024-01-22T06:37:32.3+00:00

Dear MSFT, We are working on a battery free Windows laptop product, but the upper layer can still see information related to battery configuration and battery level icons. I need to know which of the following parameters Windows uses to determine if a device has a battery present? typedef struct { BOOLEAN AcOnLine; BOOLEAN BatteryPresent; BOOLEAN Charging; BOOLEAN Discharging; BOOLEAN Spare1[3]; BYTE Tag; DWORD MaxCapacity; DWORD RemainingCapacity; DWORD Rate; DWORD EstimatedTime; DWORD DefaultAlert1; DWORD DefaultAlert2; } SYSTEM_BATTERY_STATE, *PSYSTEM_BATTERY_STATE; Looking forward to your reply. Thanks

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,748 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Wesley Li 11,085 Reputation points
    2024-01-24T10:21:03.4133333+00:00

    Hello In the SYSTEM_BATTERY_STATE structure you provided, the BatteryPresent field is a BOOLEAN that indicates whether a battery is currently installed on the system. If BatteryPresent is TRUE, it means a battery is present. If BatteryPresent is FALSE, it means no battery is present.   Windows uses this BatteryPresent field to determine if a device has a battery present. If you’re working on a battery-free Windows laptop product, you might want to ensure that BatteryPresent is consistently set to FALSE to avoid any confusion at the upper layer.   Please note that this is a simplified explanation and the actual implementation may involve additional checks and balances. Always refer to the official Microsoft documentation for the most accurate information.

    0 comments No comments

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.