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;
}
{
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;
}