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:

GetProcessMemoryInfo for RAM regarding your process only:
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:

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.
Last edited on
thanks again
could you give me an example using those apis
Topic archived. No new replies allowed.