开车轧耗子吧 关注:22贴子:291
  • 0回复贴,共1

读取CPU ID值

只看楼主收藏回复

CString mm::cpu_id()
{
int s1,s2;
CString CPUID_1,CPUID_2;
__asm{
mov eax,01h
xor edx,edx
cpuid
mov s1,edx
mov s2,eax
}
CPUID_1.Format("%08X%08X",s1,s2);
__asm{
mov eax,03h
xor ecx,ecx
xor edx,edx
cpuid
mov s1,edx
mov s2,ecx
}
CPUID_2.Format("%08X%08X",s1,s2);
return CPUID_1+CPUID_2;
}


IP属地:山东1楼2023-06-18 14:15回复