主要用到获取CPU ID值的汇编指令: CString CGetCPUIDDlg::GetCPUID() { CString strCPUID; unsigned long s1, s2; __asm{ mov eax, 01h xor edx, edx cpuid mov s1, edx mov s2, eax } strCPUID.Format("%08X%08X", s1, s2); return strCPUID; }