wxWidgets:获取一些唯一的机器 ID 以用于验证/注册

发布于 2024-09-01 16:40:09 字数 155 浏览 3 评论 0原文

wx 是否提供了一种方便的方法来以独立于平台的方式获得类似的东西?我不认为 C++ 库本身提供任何东西。 我不知道应该使用什么作为唯一 ID...MAC 地址很常见,但还可以使用什么?

如果我们针对 Windows 进行操作,有没有办法获取实际的 Windows 标识符/序列号?

Does wx provide a handy way to get anything like this in a platform-independent way? I don't think C++ libs themselves provide anything.
I don't have a definite idea what should be used for the unique ID... MAC address is common but what else could be used?

If we were doing it Windows-specific, is there a way to get the actual Windows indentifier/serial #?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

不知所踪 2024-09-08 16:40:09

Mac地址可以被克隆。

就个人而言,在Windows下,我使用WMI来获取硬盘序列号。效果很好:)

Mac addresses can be cloned.

Personally, under windows, I use WMI to obtain the Hard disk serial number. That works well :)

一江春梦 2024-09-08 16:40:09

wxWidgets 框架内没有提供 UID 生成的预定义类。该框架主要提供与平台无关的 GUI 对象定义。如果你查看 wxWidgets 提供的类列表,你会发现没有类,这将允许您读取 MAC 地址或 HDD 序列号。您必须编写自己的方法来确定唯一标识符。似乎有针对 unix 类系统 的解决方案对于Windows

There is no predefined class inside the wxWidgets framework, that offers an UID generation. The framework offers mostly the platform independent definition of GUI objects. If you look inside the class list offered by wxWidgets you will find no classes, that will allow you to read a MAC address or a HDD serial number. You will have to write your own method to determine a unique identifier. There seem to be solutions for unix like systems and for windows.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文