wxWidgets:获取一些唯一的机器 ID 以用于验证/注册
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Mac地址可以被克隆。
就个人而言,在Windows下,我使用WMI来获取硬盘序列号。效果很好:)
Mac addresses can be cloned.
Personally, under windows, I use WMI to obtain the Hard disk serial number. That works well :)
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.