void get_cpu_id() { char szBuf[256] = {0}; unsigned int s1 = 0U; unsigned int s2 = 0U; _asm{ MOV EAX,01H XOR EDX,EDX CPUID MOV DWORD PTR[s1],EDX MOV DWORD PTR[s2],EAX } printf(szBuf, "%08X%08X", s1, s2); }
获取CPU编号,布布扣,bubuko.com
获取CPU编号
原文:http://my.oschina.net/mlgb/blog/293663