views:

214

answers:

2

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 #?

A: 

Mac addresses can be cloned.

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

Goz
Can be maliciously? Or might happen under normal usage? The former is probably not too big a deal in this case.
John
Maliciously though it can be handy when you have a network card set as your ISP interface. Clone the mac address on a diff card to maintain access with minimal troubles. Its VERY easy to do.
Goz
HDD serial number can be changed even easier.
Milan Babuškov
A HDD can crash. What will happen to your customer ? Will he have to buy a new licence ? If so, how to distinguish people that really crashed their HDD and people that just want a free licence ?
ereOn
A: 

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.

ablaeul