<!-- Article image -->
<!-- Add the rest of your HTML here -->
This program shows you a very simple way to determine your PC hardware and software. It queries operating system for the following Hardware/Software:
- Operating System Version (Thanks to PJ Naughter)
- Computer Name
- IP Address of Computer
- User Name
- Internet Explorer Version
- Total RAM
- Free Memory
- Number of Hard Disk Drives
- Hard Disk Total Space/Free Space/Used Space
- CDROM Drives
- Monitor Resolution
- Color Depth
- Number of CPUs (Thanks to Iain Chesworth)
- CPU Speed
- CPU Identifier
- CPU Vendor Identifier
- Operating System Folder
- System Folder
By clicking the combo box and changing it's item, selected item is determined and it's ID passed to
Process member function of dialog. The
Process member function takes ID of query and returns the proper result. Body of
Process has a lot of code to prepares result and if any error has occurred, the error string will be returned.
How to use
Add the following header and implementation files to your project:
- cup_info.h, cpu_info.cpp: For CPU Information like Speed, ID, Vendor ID,...
- dtwinver.h, dtwinver.cpp: For Operating System Version (e.g. Build Number and Service Packs)
- SysInfoDefs.h, SysInfoDefs.cpp: For General System Information like Total RAM, Number of Hard Disk Drives, Disk Space/Free Space/Used Space
- SmartDef.h: For IDE S.M.A.R.T. commands to query from IDE hard disks that support SMART.
Below table shows all functions that are used to determine Hardware/Software of the computer.
|Determining Internet Explorer Version (Build Number)|
|Calculating Number of Hard Disks and Number of Cylinders, Tracks per Cylinders, Sectors per Tracks, Bytes per Sector and Total Capacity for each Hard Disks|
|Calculating Drive Space/Free Space/Used Space of All Hard Drives|
|Determining Number of CD Drives|
|Calculating Total Physical RAM (Random Access Memory)|
|Calculating Free Physical Memory|
|User Name of current user|
|Number of CPU Installed on Mother Board|
|Speed of each CPU|
|ID of each CPU|
|ID of CPU Vendor|
|Calculating Monitor Resolution in Pixel|
|Calculating Color Depth of any Pixel|
|Determining Operating System Version (Build Number) and it's Service Pack|
|Determining IP Address of Computer|
|Query IDE hard disks that support SMART (Self-Monitoring Analysis & Reporting Technology).|
CString QueryDirectory(char* sFolder,int iFolder);
|Determining Full Path of Specified Folder where |
sFolder is Folder Name and
iFolder is Folder Shell ID Number
|Determining last occurred error|
- Latest Platform SDK
- Visual Studio 6.0 with service pack 5
Iran (Islamic Republic Of)
I was born in Shiraz
, a very beautiful famous city in Iran. I started programming when I was 12 years old with GWBASIC. Since now, I worked with various programming languages from Basic, Foxpro, C/C++, Visual Basic, Pascal to MATLAB and now Visual C++.
I graduated from Iran University of Science & Technology
in Communication Eng., and now work as a system programmer for a telecommunication industry.
I wrote several programs and drivers for Synthesizers, Power Amplifiers, GPIB, GPS devices, Radio cards, Data Acqusition cards and so many related devices.
I'm author of several books like Learning C (primary and advanced), Learning Visual Basic, API application for VB, Teach Yourself Object Oriented Programming (OOP) and etc.
I'm winner of January, May, August 2003 and April 2005 best article of month competetion, my articles are:
You can see list of my articles, by clicking here