GetCurrentHwProfile不是唯一的吗? [英] GetCurrentHwProfile is not unique ?

查看:62
本文介绍了GetCurrentHwProfile不是唯一的吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试制作一个hwid检查器,我使用msdn的代码来获取用户的hwid或szHwProfileGuid



I was trying to make an hwid checker, i use this code from msdn to get the hwid or szHwProfileGuid of the user

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);
   }
   
}







所以我给了这个档案抓住他们所谓的hwid,但现在我有10个用户拥有相同的profileguid {846ee340-7039-11de-9d20-806e6f6e6963}



任何理由?或者上面的代码有什么问题吗?



提前感谢,




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,

推荐答案

形成< a href =http://msdn.microsoft.com/en-us/library/windows/desktop/ms724479(v=vs.85).aspx>文档 [ ^ ],我猜 GUID 特定于硬件,而不是用户。
Form the documentation[^], I guess the GUID is specific of the hardware, not of the user.


简而言之,API
GetCurrentHwProfile()

不会返回唯一ID来区分不同的PC /用户帐户。只是谷歌你发布的GUID。



如果你想拥有一个唯一的ID,请致电

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

CoCreateGuid()

并将其存储在客户端PC上供以后检查。



另一种方法是结合网卡MAC,磁盘序列号和其他东西形成一个独特的身份。

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.


这篇关于GetCurrentHwProfile不是唯一的吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆