CodeGuru
Earthweb Search
Login Forums Wireless Jars Gamelan Developer.com
CodeGuru Navigation
RSS Feeds

RSSAll

RSSVC++/C++

RSS.NET/C#

RSSVB

See more EarthWeb Network feeds

follow us on Twitter

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
















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


Three Ways to Retrieve Processor Information
Determine CPU name, vendor, speed, and supported features
Rating:

Marius Bancila (view profile)
January 28, 2005

Environment:  VC++6.0

Go to page: 1  2  Next

If you are looking for processor information, there are several ways to get them. In this article, I'll show how to use assembly, Registry information, or Platform SDK functions to retrieve information about CPU. You can also get processor information using WMI (Windows Management Instrumentation) or Active Directory. The methods I present work for systems with one processor from Intel or AMD.

CPU Models


(continued)




Each processor model is identified by a series of numbers returned by CPUID (see below) function 1. The bits returned in EAX are:

Bits Description
0 - 3 Stepping
4 - 7 Model
8 - 11 Family
12 - 13 Processor Type
16 - 19 Extended Model
20 - 27 Exdented Family

If you know the family and model and the processor vendor, you can determine what processor you do have. The vendor name, a 12-byte string, is "GenuineIntel" for Intel's processors and "AuthenticAMD" for AMD's processor. Both family and model are 4-bit integers. The tables below show the family and model for AMD's and Intel's processors.

AMD

Family Model Name
4 3 486 DX2
  7 486 DX2-WB
  8 486 DX4
  9 486 DX4-WB
  14 Am5x86-WT
  15 Am5x86-WB
5 0 K5 SSA5
  1 - 3 K5
  6 - 7 K6
  8 K6-2
  9 K6-3
  13 K6-3+
6 0-1 Athlon (0.25um)
  2 Athlon (0.18um)
  3 Duron
  4 Athlon Thunderbird
  6 Athlon Palamino
  7 Duron Morgan
  8 Athlon Thoroughbred
  10 Athlon Barton
15   Extended family table must be used

Extended Family Model Name
0 4 Athlon 64
  5 Athlon 64FX Operon

INTEL

Family Model Name
4 0 486DX-25/33
  1 486DX-50
  2 486SX
  3 486DX2
  4 486SL
  5 486SX2
  7 486DX2-WB
  8 486DX4
  9 486DX4-WB
5 0 Pentium 60/66 A-step
  1 Pentium 60/66
  2 Pentium 75-200
  3 OverDrive PODP5V83
  4 Pentium MMX
  7 Mobile Pentium 75-200
  8 Mobile Pentium MMX
6 1 Pentium Pro A-Step
  2 Pentium Pro
  3 Pentium II Klamath
  5 Pentium II Deschutes
  6 Celeron Mendocino
  7 Pentium III Katmai
  8 Pentium III Coppermine
  9 Mobile Pentium III
  10 Pentium III (0.18um)
  11 Pentium III (0.13um)
7   Itanium
15   Extended family table must be used

Extended Family Model Name
0 0-1 Pentium IV (0.18um)
  2 Pentium IV (0.13um)
  3 Pentium IV (0.09um)
1   Itanium 2

To see the table with family and model numbers for other companies, see:

To learn more about AMD processor recognition, see:

About the Author
Marius Bancila is a Microsoft MVP for VC++. He works as a software developer for a Norwegian-based company. He is mainly focused on building desktop applications with MFC and VC#. He keeps a blog at www.mariusbancila.ro/blog, focused on Windows programming. In July 2007 together with two other Romanian MVPs he created codexpert.ro, a community for Romanian C++/VC++ programmers.

Go to page: 1  2  Next

Downloads

  • CPUInfo_demo.zip - demo project
  • CPUInfo_src.zip - source files

    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:
    How to get the Processor "Bits" - manas4u (08/07/2007)
    Require more information - vidyam (05/19/2005)
    Hi - vidyam (05/19/2005)
    Failed to compile demo code - elinap (02/14/2005)
    Very Good! - cdguru (02/03/2005)

    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)

    internet.commediabistro.comJusttechjobs.comGraphics.com

    Search:

    WebMediaBrands Corporate Info

    Legal Notices, Licensing, Permissions, Privacy Policy.
    Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs