开发者

wxWidgets: Get some unique machine ID to use in validation/registration

开发者 https://www.devze.com 2022-12-30 01:58 出处:网络
Does wx provide a handy way to get anything like this in a platform-independent way? I don\'t thinkC++ libs themselves provide anything.

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 W开发者_JAVA技巧indows-specific, is there a way to get the actual Windows indentifier/serial #?


Mac addresses can be cloned.

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消