Getting wrong CPU Processor ID with __cpuid() in Win 11 systems

Bhanodaya 0 Reputation points
2024-07-19T10:06:54.6066667+00:00

 

Hello Friends,

 

I am facing an issue in getting CPU Processor ID with C++ code.

I used __cpuid() function as below:

 


#include <iostream>

#include <intrin.h>

 

int main()

{

                unsigned __int32  regs[4];

               

                __cpuid((int *)regs, 1);

               

                std::cout << "Processor ID: " << std::hex << regs[3] << " 000 " << regs[0];

}


 

This code is working in all the Win 10 systems.

But some Win 11 systems are providing EDX data (regs[3] in above code) as BFCBFBFF.

When I use "wmic cpu get processorid" at command prompt, I got BFEBFBFF.

 

Is it issue with Win 11 system or __cpuid function or any mistake in my code?

 

Please guide me.

Thanks in advance.

 

Regards

Udaya

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,628 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,926 questions
0 comments No comments
{count} votes