Possible Duplicate:
Reliable way of generating unique hardware ID
I would like to retrieve an unique hardware identifier for a single machine in C++. Any suggestions? I need this software working in Windows XP, Vista, 7, 8. I just need a few system calls to retrieve MAC address, hard disk serial number, or something like this.
Encrypt any value with the machine’s DPAPI key and use the encrypted value as your ID.
Note: I copied my original answer to the question that this one duplicates.