Trying to implement HWID Checker
Jul 28, 2021 at 10:14pm Jul 28, 2021 at 10:14pm UTC
I want to check if hwid serial code (HWID) is valid from std::vector<std::string> list but I can't get it to work. Here is what I have tried.
however, it does not seem to work. It does not return it false even if hwid is not found.
any better methods (open source)?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
HW_PROFILE_INFO hwProfileInfo; // GET HWID
if (GetCurrentHwProfile(&hwProfileInfo))
printf("HWID: %sn" , hwProfileInfo.szHwProfileGuid);
std::vector<std::string> vKeyUser = {
"" ,
"f8d56296-a455-11eb-9669-80646f676963" ,
"f8d5d90w6-a125-11eb-9629-89d06f6e6963" ,
"etc" ,
"etc" ,
"etc"
};
bool checkHwid()
{
bool status= false ;
std::string system_key = hwProfileInfo.szHwProfileGuid;
for (size_t i = 0; i < vKeyUser.size(); i++)
{
if (vKeyUser[i] == system_key){
status= true ;
break ;
}
}
return status;
}
int main()
{
if (!checkHwid())
return NULL;
}
Jul 28, 2021 at 11:31pm Jul 28, 2021 at 11:31pm UTC
Last edited on Jul 28, 2021 at 11:31pm Jul 28, 2021 at 11:31pm UTC
Topic archived. No new replies allowed.