How to get the battery status? RRS feed

  • Question

  • Hi there,

    I've been reading about how to get the battery status with C++ in a Windows Mobile Device, I have found the GetDevicePower method, but the returned structure does noy say anything about the battery level (a percentage) or battery type (LiIon/NiMH) or if it's the main or backup one.
    I also found the DeviceIoControl with the IOCTL_BATTERY_QUERY_STATUS parameter and I think the returned structure (BATTERY_STATUS) contains more useful information but it looks like the BatClass.h is not available in Windows Mobile.

    Any suggestion about how to get the information I need?

    Javier Andrés Cáceres Alvis
    Blog Personal: http://speechflow.spaces.live.com/
    Blog Intel: http://software.intel.com/en-us/blogs/author/javierandrescaceres/
    Thursday, July 9, 2009 3:17 PM


All replies