CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: How to get correct family, model and stepping of CPU

  1. #1
    Join Date
    Jun 2011

    How to get correct family, model and stepping of CPU


    I am using code posted here
    to get family, model and stepping of CPU. My CPU is:
    AMD Athlon(tm) 64 Processor 3200+

    The code returns for CPU above:
    Family 15, Model 15, Stepping 0

    When I check using WMIC (wmic cpu get caption), I get:
    Family 15 Model 31 Stepping 0

    The CPU model is different. I have found an another article to get CPU info here:
    This tool has three different methods to get CPU info and my results are:
    Registry: Family: 15 Model: 31 Stepping: 0
    SDK: Family: 15 Model: 31 Stepping: 0
    Assembly: Family 15, Model 15, Stepping 0

    As you can see that results of Registry and SDK methods are same but Assembly method is returning incorrect model.

    It seems when value of model or family is 15, then you have to check for extended model & extended family also. After adding few extra lines at code posted here:

    cpu_extended_model = 0xf &(cpuid_registers.eax >> 16);
    cpu_extended_family = 0xf &(cpuid_registers.eax >> 20);

    I am getting:
    extended family : 0
    extended model : 1

    My question is how do you get correct model, family and stepping of a CPU?


  2. #2
    Join Date
    Jun 2010

    Re: How to get correct family, model and stepping of CPU

    Perhaps the Windows API returns a somewhat "adjusted" model identifier, maybe to circumvent problems with (whatever) certain software? In this case I'd suppose the identifier obtained via the assembly method to be the correct one, at least when it comes to the real hardware.

    Ah, and... Welcome to CodeGuru!
    Last edited by Eri523; June 22nd, 2011 at 02:31 PM.
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

  3. #3
    Join Date
    Apr 2009

    Re: How to get correct family, model and stepping of CPU

    Maybe it would be interesting to see what model number is returned by a freeware named Speccy, see http://www.piriform.com/speccy
    It was developped by the team who wrote ccleaner.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)