|
|
想必搞XXX辅助的时候都用得到吧,用内联汇编强大,稳定,源码如下:
void CCUPDlg::OnButton1()
{
char h1[260];
unsigned long s1,s2,s3,s4;
__asm
{
mov eax,00h
xor edx,edx
cpuid
mov s1, edx
mov s2, eax
}
__asm
{
mov eax,01h
xor ecx,ecx
xor edx,edx
cpuid
mov s3, edx
mov s4, ecx
}
sprintf(h1,"%X%X%X%X",s1,s2,s3,s4);
UpdateData(TRUE);
m_cpu_id=h1;
UpdateData(FALSE);
}
[attachment=828]
注:原文请参考http://www.51xue8xue8.com/thread-418-1-1.html
|
|