I've wrote a small piece of code that reads the current battery charge/discharge on my laptop. I followed the example code on this MSDN page.
My program updates the information every 100ms (by calling the DeviceIoControl function with IOCTL_BATTERY_QUERY_STATUS as control code) but the read value changes only after 5-10 seconds. For example if I change the screen brightness from the minimum value to the maximum the rate is updated only 5-10 seconds later. I've used Visual C++ 2010 on Windows 7 32-bit.
Does anybody knows how to get a real-time reading of the charge/discharge rate?