Detect Hardware information in C++ application? -


i want determine hardware information cpu, ram, hard disk, gpu, etc. application in c++ built on qt. how information? thank you.

edit: looks there no platform independent way this. please can list code prominent os windows, osx & ubuntu?

edit: talking basic information processor speed, amount of ram available, hard disk speed, gpu speed & memory.

ms provides functions these informations programmatically (include windows.h):

bool winapi getphysicallyinstalledsystemmemory(  _out_  pulonglong totalmemoryinkilobytes ); 

retrieves informations ram, see documentation.

bool winapi getdiskfreespaceex(  _in_opt_   lpctstr lpdirectoryname,  _out_opt_  pularge_integer lpfreebytesavailable,  _out_opt_  pularge_integer lptotalnumberofbytes,  _out_opt_  pularge_integer lptotalnumberoffreebytes ); 

retrieves information amount of space available on disk volume, see documentation.

system_info sisysinfo;  // copy hardware information system_info structure.   getsysteminfo(&sisysinfo);  

contains information current computer system. includes architecture , type of processor, number of processors in system, page size, , other such information, see ms site.


Comments

Popular posts from this blog

java - JavaFX 2 slider labelFormatter not being used -

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -