| popgalop (10) | |
|
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
|
|
| Aramil of Elixia (772) | |
| i think u can do 2 with sfml. theres probably a library for the others google it | |
|
|
|
| popgalop (10) | |
| yeah but what i really cant find and need help with is the ram and cpu info | |
|
|
|
| modoran (1245) | |
|
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 | |
|
|
|
| webJose (2948) | |
|
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. | |
|
|
|
| popgalop (10) | |
| thanks and for cpu | |
|
|
|
| hanst99 (2845) | ||
| ||
|
|
||
| popgalop (10) | |
| i mean the volume of the speakers | |
|
|
|
| modoran (1245) | |
|
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
|
|
| popgalop (10) | |
| thanks again | |
|
|
|
| popgalop (10) | |
| could you give me an example using those apis | |
|
|
|
| popgalop (10) | |
| hello | |
|
|
|