Click here to Skip to main content
Click here to Skip to main content

Getting System Information

By , 11 Jun 2001
 

Sample Image - SysInfo--Processor.jpg

Introduction

Have you ever wanted to get system information on the WIN32 platform, but you just want a C++ console interface? Now you can with SysInfo and its related classes.

The class itself is really easy to use. SysInfo has a number of helper classes that do all of the work. SysInfo itself is just the interface to these other classes. If your needs dictate only a subset of what SysInfo provides, you don't have to use SysInfo. The other classes are in the global namespace so you can access them as well. Full source code is included.

Revision History

19 Jun 2002 - Initial Revision
19 Jun 2002 - Resized Graphic

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

PaulWendt
Software Developer (Senior)
United States United States
Member
No Biography provided

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
Questionhow using the dll with ansi C exe ?membercsdc9 Mar '12 - 22:18 
Hi,
How can I use the SysInfo.dll with an ANSI C executable ?
 
=> How to convert .h to be ANSI C compliant and used by ANSI C exe source code ?
 
If someone already done this task, please contact or post here !
 
Thanks for your precious help !
GeneralMissing licencememberFrederic Souchu25 Oct '10 - 22:30 
Hi,
Would it be possible to precise the licence for this article?
This is increasingly necessary if source code is to used in another product (commercial or not)!
Regards
Frederic
Generalhard drive informationmemberMember 502642223 Apr '08 - 0:55 
Please provide me Visual C++ code that tell which hard drive is primary master, which is primary slave, which is secondary master and which one is secondary slave.
 
I really need that. Thanks in advance.
GeneralSome more featuresmembertyjjrtruy4teqye7nyue7qay9 Feb '07 - 1:23 
Hello sir,
First of all i would like to thank you for posting such a wonderful article with a code of great modularity.
I am developing an application to retrieve all hardware information as much as it is possible.Can you mail me revised version which includes information about motherboard,keyboard,mouse,PCI,ISA cards,network cards,usb devices,serial ports,parrelel ports etc..
Can u suggest me the books through which i can learn all these things?
Your help will be greatly helpful to me.
Thank you again.
Dhiren.
GeneralRe: Some more featuresmemberPaulWendt9 Feb '07 - 4:21 
When this was written, many years ago, there was no built-in support for determining a lot of this stuff with an easy-to-use API. Nowadays, that's not entirely true and I feel there are probably better ways to do a lot of this. There's a motherboard/CPU detection library free for the taking [as far as I know]; check out CPU-Z.
 
The main reason I stopped working on this is that WMI provides most, if not all, of this information and since Windows 2000, this is on every Windows machine. So, check out WMI for your hardware-detection needs.
 
The best part of this project is that it can be used as a demonstration for how to wrap inline assembly into function calls so that the __asm doesn't have to be looked at by people who'd get confused by it [like me Smile | :) ].
GeneralRe: Some more featuresmembertyjjrtruy4teqye7nyue7qay12 Feb '07 - 2:12 
Thank you sir,
I have already tried WMI to find all these information,but some information like-motherboard's manufacturer,version no.,serial no.,HDD's serial no.,revision no.,Floppy drive's serial no,manufacturer. etc. are not reliable through WMI. It doesn't give consistency in performance in large network. so can u suggest me some other way to look through??I want the direction to get ahead only.
 
Thanking you.
Waiting for reply.
 

Dhiren.
GeneralRe: Some more featuresmemberPaulWendt12 Feb '07 - 10:59 
Sorry, I don't know of a way to get the things you need. I know CPU-Z gets some of it, but not all. I've seen posts on here and CodeGuru regarding getting a hard drive's serial #.
 
Good luck to you.
GeneralErrorsmemberMrSmiley323 Jul '05 - 17:35 
SysInfoTester.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall SysInfo::getCpuSpeed(void)const " (__imp_?getCpuS
peed@SysInfo@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
SysInfoTester.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall SysInfo::getCpuIdentification(void)const " (__imp
_?getCpuIdentification@SysInfo@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
SysInfoTester.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall SysInfo::SysInfo(bool const &,unsigned int const &,int const &,int const &)" (__imp_??0SysInfo@@QAE@AB_NABIABH2@Z)
Debug/SysInfoTester.exe : fatal error LNK1120: 26 unresolved externals
Error executing link.exe.
 
SysInfoTester.exe - 27 error(s), 0 warning(s)
 
That is just 2 of the 27... all I have to say "What is going on guys?"
GeneralBug Drive InformationmemberJimmyO23 Jun '04 - 23:21 
Hello,
 
i think there is a bug on free Network Space
 
Name: R:\ Type: Fixed drive Total: 114.46 GB Free: 5.11 GB
Name: T:\ Type: Network drive Total: 488.28 MB Free: 226.75 GB
 
That must be MB
 
Jimmy
Generalsystem informationmemberpradeepvarghesek31 Mar '04 - 19:32 
hi,
 
anyone know how to retrieve system information of remote client in a network.
 
Pradeep

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web03 | 2.6.130523.1 | Last Updated 12 Jun 2001
Article Copyright 2001 by PaulWendt
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid