I'm new to vc++ language so I want to get system unique id using vc++ language. so please can anybody help me in coding how to get system unique id?
You want to look at CoCreateGuid
(http://msdn.microsoft.com/en-us/library/ms688568(VS.85).aspx).
Why not use the MAC address from the network card. This should be unique but will change if your change the network card.
See the api GetAdaptersInfo. reference http://msdn.microsoft.com/en-us/library/aa365917(VS.85).aspx
IF you're looking to create a unique ID based on a specific machine, one of the ways I can think of is using good old boost.
For instance, you can look up one of the boost candidate libraries called UUID (GUID generation) and you could look up boost::filesystem. Using the filesystem you could get creation dates on some of the system files, and use those strings to generate a GUID.
Just a thought, hope it helps
One value that I've seen used is the hard disk volume ID of the C-drive. It will change when you swap the drive though.
As I think the answers so far and the responses to them indicate, the real answer is not to write code that requires a unique system ID. This is very easy to do, in fact (as there is no such ID) it is the only sensible way to write applications. Anything that depends on drive serial number, MAC addresses etc. will inevitably break when the system is changed or upgraded.