Get computer info

I need to know how to get the following information about my computer using c++

1. How to get the computers current volume
2. Check if the computers connected to the internet and if so how
3. The computers available and total ram
4. The cpu usage
5. The computers brightness
Last edited on
i think u can do 2 with sfml. theres probably a library for the others google it
yeah but what i really cant find and need help with is the ram and cpu info
GlobalMemoryStatusEx for total RAM information:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa366589(v=vs.85).aspx

GetProcessMemoryInfo for RAM regarding your process only:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms683219(v=vs.85).aspx
Also note that brightness is not a property of the computer but of the monitor.

You could also look up some of this data using WMI.
thanks and for cpu
How to get the computers current volume
What do you mean by that?
i mean the volume of the speakers
Use IAudioEndpointVolume COM inteface if you want global information:
http://msdn.microsoft.com/en-us/library/aa964574.aspx

As for CPU usage, use process related functions (loop through them), there is no dedicated API for this. There is NtQuerySystemInformation, but that is very tricky to use it.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724509(v=vs.85).aspx
Last edited on
thanks again
could you give me an example using those apis
hello
Topic archived. No new replies allowed.