CodeGuru
Earthweb Search
Forums Wireless Jars Gamelan Developer.com
CodeGuru Navigation
Member Sign In
User ID:
Password:
Remember Me:
Forgot Password?
Not a member?
Click here for more information and to register.

Become a Marketplace Partner

jobs.internet.com

internet.commerce
Partners & Affiliates
















RSS Feeds

RSSAll

RSSVC++/C++

RSS.NET/C#

RSSVB

See more EarthWeb Network feeds

Home >> Visual C++ / C++ >> Windows Programming >> System >> Hardware Information


System Information Class
Rating:

Tien Tran Ngoc (view profile)
March 28, 2001

Environment:Windows 9x, Visual C++ 5.0

This is my class for getting almost all the information in your system with only two lines of code. The returned information includes:

Information returned via the SysInfo class

  • Windows Version
  • Processor Information
    • Type
    • MMX compatible?
    • MHZ
    • CoProcessor Presents?
    • Number of CPUs
  • Communications
    • Computer Name
    • User Name
    • Modems installed
    • Info of Modem #1
    • PortSubClass
    • Driver
    • Manufacturer
    • Model
    • Info of Modem #2
    • LANcard:
    • NIC Address
    • Name
    • InfFile
    • NetClient
    • Network Protocols
    • TCP/IP (the protocol you use to connect to the Internet and wide-area networks)
    • IPX/SPX-compatible Protocol (the protocol NetWare and Windows NT servers, and Windows 95 computers use to communicate)
  • Directories
    • Windows Directory
    • System Directory
    • Temp Directory
  • Disk Information
    • Drive Type (e.g., Fixed Disk, etc.)
    • Volume Name
    • Volume Serial
    • Total Space
    • Free Space
  • Display Information
    • Display Resolution: 640 x 480
    • Display Colors: 65536 -16bits HighColor
  • Memory Information
    • Total Physical RAM
    • Free Physical RAM
    • Total Page File
    • Free Page File
    • Total Virtual Memory
    • Free Virtual Memory
  • Printer Information
    • ServerName
    • PrinterName
    • ShareName
    • PortName
    • DriverName
    • Description
    • Location
    • Processor
    • Processor param
    • DataType
    • Status
    • Current jobs
    • Current printing speed: ? Page(s)/minute
    • Print to the following port: \\YOURSERVER\.Print_Queue.???

Using the SysInfo class

  1. Just copy the Sysinfo.h file to your project
  2. Add #include "Sysinfo.h" to the header of your dialog class
  3. Create an object of Sysinfo and just call the member function: TNTGetInfo().

Example

The TNTGetInfo function returns a CString object containing all of the information (with line break). And then you can save/copy or send them.
Sysinfo m_system;
CString m_content=m_system.TNTGetInfo();

Downloads

Download source (including demo) - 30 Kb

Tools:
Add www.codeguru.com to your favorites
Add www.codeguru.com to your browser search box
IE 7 | Firefox 2.0 | Firefox 1.5.x
Receive news via our XML/RSS feed







RATE THIS ARTICLE:   Excellent  Very Good  Average  Below Average  Poor  

(You must be signed in to rank an article. Not a member? Click here to register)

Latest Comments:
소스좀 줘요... - Legacy CodeGuru (04/16/2003)
Source Code - Legacy CodeGuru (04/03/2003)
Windows NT Server Faults - Legacy CodeGuru (02/18/2003)
DLL - Legacy CodeGuru (12/09/2002)
How to get upload speed - Legacy CodeGuru (11/21/2002)

View All Comments
Add a Comment:
Title:
Comment:
Pre-Formatted: Check this if you want the text to display with the formatting as typed (good for source code)



(You must be signed in to comment on an article. Not a member? Click here to register)


JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers