#include <windows.h> #include <stdio.h>
int main() { get_cpu_info(); return 0; } This sample code uses the CPUID instruction to gather information about the CPU and prints the CPU name to the console. cpu-z source code
// Get CPUID asm volatile("cpuid" : "=a" (cpu_info[0]), "=b" (cpu_info[1]), "=c" (cpu_info[2]), "=d" (cpu_info[3]) : "a" (1)); #include <windows