How do I get battery information in windows?

后端 未结 4 1285
清酒与你
清酒与你 2021-01-02 10:57

I have two laptops here. One is running Vista, the other Windows 7. I need to get the specifications on the batteries in both, how do I go about that?

The reason I\

4条回答
  •  感动是毒
    2021-01-02 11:17

    The IOCTL_BATTERY_QUERY_INFORMATION info from DeviceIOControl can tell you the following info:

    Information level

    • BatteryDeviceName
    • BatteryEstimatedTime
    • BatteryGranularityInformation
    • BatteryInformation
    • BatteryManufactureDate
    • BatteryManufactureName
    • BatterySerialNumber
    • BatteryTemperature
    • BatteryUniqueID

    The BatteryInformation structure contains the Chemistry field which describes this info you require.

    • PbAc : Lead Acid
    • LION : Lithium Ion
    • Li-I : Lithium Ion
    • NiCd : Nickel Cadmium
    • NiMH : Nickel Metal Hydride
    • NiZn : Nickel Zinc
    • RAM : Rechargeable Alkaline-Manganese

    There is an example here: http://msdn.microsoft.com/en-us/library/bb204769(v=VS.85).aspx

提交回复
热议问题