Click to See Complete Forum and Search --> : How to get System Information


aijazasoomro
October 12th, 2008, 04:51 PM
Can Any one suggest me some simple c/c++ code to get the following information of a System:


<------TNTSYSTEM INFORMATION------>
Windows Version: Windows NT, 5.1.Build: 2600

I. PROCESSOR
Type: GenuineIntel
MMX compatible
2000 MHz
CoProcessor Presents
Number of CPUs: 2

II. NETWORKING
Computer/Host Name: AIJAZ
User Name: AIJAZ
User Name: Aijaz
Domain Name: AIJAZ

Ethernet:
NIC Address: FE.DD.1A.B1.B9.FB

IP Address: 192.168.0.2

Modems installed: 1
Info of Modem #1
Port: COM3
PortSubClass: COM2
Speed: 115200bps
Driver: Conexant HDA D330 MDC V.92 Modem
Manufacturer: Conexant
Model: Conexant HDA D330 MDC V.92 Modem

Browser Information:
Version: 7.0.5730.13
Start page:
NetClient:

Network Protocols:

III. DIRECTORIES
Windows Directory: C:\WINDOWS
System Directory: C:\WINDOWS\system32
Temp Directory: C:\DOCUME~1\Aijaz\LOCALS~1\Temp\

IV. DISK INFORMATION
Drive C: Fixed Disk
Volume Name: (NTFS)
Volume Serial: 876117455
Total Space: 41,940,668,416 bytes
Free Space: 19,648,421,888 bytes
Drive D: Fixed Disk
Volume Name: (NTFS)
Volume Serial: 3927967701
Total Space: 41,940,668,416 bytes
Free Space: 30,719,963,136 bytes
Drive E: Fixed Disk
Volume Name: (NTFS)
Volume Serial: 1379278076
Total Space: 41,940,668,416 bytes
Free Space: 29,554,700,288 bytes
Drive F: Fixed Disk
Volume Name: (NTFS)
Volume Serial: 2963967003
Total Space: 34,208,903,168 bytes
Free Space: 22,074,626,048 bytes

V. DISPLAY
Display Adapter:
Display Resolution: 1280 x 800
Display Colors: 0 -32bits VGA

VI. MEMORY
Total Physical RAM: 2,147,483,647 bytes
Free Physical RAM: 2,147,483,647 bytes
Total Page File: -1 bytes
Free Page File: -1 bytes
Total Virtual Memory: 2,147,352,576 bytes
Free Virtual Memory: 2,113,105,920 bytes

VII. DEFAULT PRINTER:
ServerName:
PrinterName: Lexmark 2400 Series
ShareName: Printer2
PortName: USB001
DriverName: Lexmark 2400 Series
Description:
Location:
Processor: Lexmark 2400 Series Print Processor
Processor param:
DataType: LEMF
Status: UNKNOWN
Current jobs: 0
Current printing speed: 0 Page(s)/minute
Print to the following port: LOCAL USB00
</TNT12/10/2008-21:43:28>

ovidiucucu
October 13th, 2008, 11:14 AM
Quite many issues to be solved in one discussion thread / one simple C/C++ code...

You can start by checking-out Three Ways to Retrieve Processor Information (http://www.codeguru.com/cpp/w-p/system/hardwareinformation/article.php/c9087/) and other related Codeguru articles (http://www.codeguru.com/cpp/w-p/system/).
The rest is just a little sweat...

fred100
October 14th, 2008, 02:52 AM
Everything is in MSDN and PSDK (getting system information, etc)
Just copy and paste code..