Afterglow

Hello,

I am looking to write a small monitoring application that can provide system information such as: battery, cpu load, free memory, free disk, network bandwidth usage (bytes in and out) etc.

I was wondering if anyone could point me in the right direction, in terms of APIs.


Thank you.


Re: Smart Devices Native C++ Development system info on smartphones

Saravanan V V

Hi
You can use the following apis to collect the below details.

Battery - GetSystemPowerStatusEx2()
Memory - GlobalMemoryStatus()




Re: Smart Devices Native C++ Development system info on smartphones

Zero Dai - MSFT

Hi Afterglow,

In addition to the Saravanan's suggestion,

For free disk: GetDiskFreeSpaceEx

For CPU load: We cannot get the information of it directly, you need to write your own code to implement it with GetSystemTimes() and GetProcessTimes(). You may like to read the following article from Code Project: http://www.codeproject.com/threads/Get_CPU_Usage.asp df=100&forumid=136773&exp=0&select=1564225

Regards,

Zero Dai - MSFT