Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I was trying to make an hwid checker, i use this code from msdn to get the hwid or szHwProfileGuid of the user

C++
int main() 
{
   HW_PROFILE_INFO HwProfInfo;
   if(GetCurrentHwProfile(&HwProfInfo) != NULL)
   {
       printf("DockInfo = %d\n", HwProfInfo.dwDockInfo);
       printf("Profile Guid = %s\n", HwProfInfo.szHwProfileGuid);
       printf("Friendly Name = %s\n", HwProfInfo.szHwProfileName);
   }
   
}



so i gave this file that grab their supposedly hwid, but now i have like 10 users having the same profileguid which is {846ee340-7039-11de-9d20-806e6f6e6963}

any reason why ? or is there something wrong with the code above ?

thanks in advance,
Posted

Form the documentation[^], I guess the GUID is specific of the hardware, not of the user.
 
Share this answer
 
In short, the API
C++
GetCurrentHwProfile()
does not return an unique id to distinguish between different PC/User account. Just google that GUID you posted.

If you want to have an unique id, call
C++
CoCreateGuid()
and store it at client PC for later checking.

Another way is combining net card MAC, disk serial number, and other things to form an unique id.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900