
Manuel Fiorelli wrote:
Why not leaving the burden of retrieving the MAC address to the user, then?
For Windows user I found the article
http://www.codeguru.com/cpp/i-n/network/networkinformation/article.php/c5451
with a warning
http://www.codeguru.com/cpp/i-n/network/networkinformation/comments.php/c545...
I can add another one (although I'm not sure how the OS behaves in that case): if you actually want something unique, you cannot blindly take the first MAC you get, you need to be smarter (and unfortunately I don't know how to do that). I recently saw the case where a developer thought he was getting something unique by retrieving the first MAC address of the machine... only to discover that on machines with VMWare installed, the first two returned MAC addresses are actually the MAC addresses of VMWare's virtual network adapters, which are (by default) the same everywhere. IOW, his code was returning the same MAC address on every PC with VMWare installed. François