开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜