đây là code lấy HWID:
Code:
#define _WIN32_WINNT 0x0400
#include <windows.h>
#include <stdio.h>
#ifdef UNICODE
#define GetCurrentHwProfile GetCurrentHwProfileW
#else
#define GetCurrentHwProfile GetCurrentHwProfileA
#endif
int main()
{
HW_PROFILE_INFO hwProfileInfo;
if(GetCurrentHwProfile(&hwProfileInfo) != NULL){
printf("Hardware GUID: %s\n", hwProfileInfo.szHwProfileGuid);
printf("Hardware Profile: %s\n", hwProfileInfo.szHwProfileName);
}else{
return 0;
}
getchar();
return 0;
}
bạn có thể xem thêm tại đây: http://blog.phuongnam.org/2013/05/lay-hardware-id-bang-c.html