获取序列号
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
void GetMac_SN() { char strID[MAX_PATH]; unsigned long s1,s2; __asm { mov eax,0x01 xor edx,edx cpuid mov s1,edx mov s2,eax } sprintf(strID,"CPU ID: %08X%08X",s1,s2); printf("%s\n",strID); } |
获取Mac地址
转载请注明:exchen's blog » 获取CPU序列号和MAC地址