Click here to Skip to main content
6,596,602 members and growing! (21,721 online)
Email Password   helpLost your password?
General Reading » Hardware & System » General     Intermediate

System Information

By A. Riazi

Obtaining Information from Computer Hardware/Software
VC6Win2K, WinXP, MFC, Dev
Posted:3 Jan 2003
Updated:19 Aug 2003
Views:257,865
Bookmarked:120 times
Announcements
Loading...
 
Search    
Advanced Search
Add to IE Search
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
46 votes for this article.
Popularity: 6.76 Rating: 4.06 out of 5
6 votes, 13.0%
1
3 votes, 6.5%
2
2 votes, 4.3%
3
6 votes, 13.0%
4
29 votes, 63.0%
5

Screen shot of program

Introduction

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

Program structure

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.

Functions

Below table shows all functions that are used to determine Hardware/Software of the computer.

CString DetermineIEVer(); Determining Internet Explorer Version (Build Number)
CString QueryHardDisks(); 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
CString QueryDriveSpace(); Calculating Drive Space/Free Space/Used Space of All Hard Drives
CString QueryCDDrive(); Determining Number of CD Drives
CString QueryTotalRAM() Calculating Total Physical RAM (Random Access Memory)
CString QueryFreeRAM(); Calculating Free Physical Memory
CString QueryUserName() User Name of current user
CString QueryComputerName(); Computer Name
CString QueryCPUInfo(); Number of CPU Installed on Mother Board
CString QueryCPUSpeed(); Speed of each CPU
CString QueryCPUID(); ID of each CPU
CString QueryCPUVendorID(); ID of CPU Vendor
CString QueryResolution(); Calculating Monitor Resolution in Pixel
CString QueryPixelDepth(); Calculating Color Depth of any Pixel
CString QueryOS(); Determining Operating System Version (Build Number) and it's Service Pack
CString QueryLocalIPAddress(); Determining IP Address of Computer
CString QueryHDDSmartCommand(); 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
CString GetCommandError(); Determining last occurred error

Requirements

  • Latest Platform SDK
  • Visual Studio 6.0 with service pack 5

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

A. Riazi


Member
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


Occupation: Software Developer (Senior)
Company: Misbah3Com
Location: Iran, Islamic Republic Of Iran, Islamic Republic Of

Other popular Hardware & System articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 25 of 125 (Total in Forum: 125) (Refresh)FirstPrevNext
GeneralLittle mistake. PinmemberMember 28441883:18 15 Jul '08  
QuestionClass CPUInfo do not support Chip intel ? PinmemberTo Quang Hiep4:18 5 May '08  
Questionhellp me plz Pinmemberlays0:13 19 Apr '08  
Questionhelp me Pinmemberlays21:32 14 Apr '08  
Questionhelp Pinmemberlays9:38 8 Apr '08  
GeneralYour source is very valueble to me! PinmemberIngenious0012:39 28 Mar '07  
GeneralRe: Your source is very valueble to me! PinmemberA. Riazi1:57 30 Mar '07  
GeneralRe: Your source is very valueble to me! PinmemberIngenious0014:01 3 Apr '07  
GeneralRe: Your source is very valueble to me! PinmemberRarencjusz0:48 11 Jun '07  
GeneralCreating a new partition Pinmember22:11 11 Mar '07  
QuestionHard Disk's Physical Information Pinmember1:34 6 Mar '07  
QuestionUnable to download the source PinmemberNanda Kishore_SGS23:43 29 Oct '06  
GeneralSCSI S.M.A.R.T. info? Pinmembersilikon26:39 5 Oct '06  
QuestionAMD 64 PinmemberRaul Simcic23:54 6 Aug '06  
AnswerRe: AMD 64 PinmemberA. Riazi0:52 7 Aug '06  
GeneralERROR_INSUFFICIENT_BUFFER PinmemberRandor18:40 30 May '06  
GeneralCan you help me. Pinmemberterahez1:32 11 Apr '06  
GeneralRe: Can you help me. PinmemberA. Riazi9:43 11 Apr '06  
GeneralRe: Can you help me. Pinmemberterahez23:12 11 Apr '06  
GeneralRe: Can you help me. PinmemberA. Riazi23:22 11 Apr '06  
GeneralRe: Can you help me. Pinmembericsvoice6:21 1 May '06  
GeneralHard Drive Serial Number Pinmemberabubakar_noman4:32 5 Mar '06  
Generalcompilation error Pinmemberchunnu_805:39 17 Jan '06  
GeneralSmall mistake for Total memory Pinmembercpsworld8:08 11 Jan '06  
GeneralRe: Small mistake for Total memory PinmemberA. Riazi1:10 12 Jan '06  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 19 Aug 2003
Editor: Nishant Sivakumar
Copyright 2003 by A. Riazi
Everything else Copyright © CodeProject, 1999-2009
Web15 | Advertise on the Code Project