I need to wirte a program that will display the degration of a battery as it's nature of reducing its effective capacity during continous charging and discharging cycles. I looked at Microsoft website and I was able to locate this API called "CallNtPowerInformation". This will be very helpful. However, I have not done any windows programming before. Can someone recommend a book on that. Do i need to need to create a Win32 app for that matter. Thanks
You might also see if GetSystemPowerStatus might be simpler... If the API calls do not need a HWND parameter, then you can probably use them without creating any windows. (within reason...) Code: #include <windows> int main() { SYSTEM_POWER_STATUS sps; GetSystemPowerStatus(&sps); } I say to use getsystempowerstatus because in order to use CallNtPowerInformation you have to include another header and a library file as dictated in the requirements section of this page -> http://msdn2.microsoft.com/en-US/library/aa372675.aspx