Get computer info

Nov 4, 2012 at 11:45pm
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 Nov 4, 2012 at 11:48pm
Nov 5, 2012 at 5:44am
i think u can do 2 with sfml. theres probably a library for the others google it
Nov 5, 2012 at 11:04am
yeah but what i really cant find and need help with is the ram and cpu info
Nov 5, 2012 at 4:15pm
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
Nov 5, 2012 at 4:27pm
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.
Nov 5, 2012 at 10:08pm
thanks and for cpu
Nov 5, 2012 at 11:12pm
How to get the computers current volume
What do you mean by that?
Nov 6, 2012 at 1:44am
i mean the volume of the speakers
Nov 6, 2012 at 5:09am
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 Nov 6, 2012 at 5:22am
Nov 7, 2012 at 1:40am
thanks again
Nov 8, 2012 at 5:06pm
could you give me an example using those apis
Dec 1, 2012 at 3:41pm
hello
Topic archived. No new replies allowed.