MarkCluster
MarkCluster

Reputation: 11

How to generate unique hardware id on windows

I'm trying to generate a unique hardware id for my application and I saw something simple but it's from autoit, the function is _WinAPI_UniqueHardwareID() which generate unique id base on hardware and changes every time you change/add something on your computer. My question is there a similar function in c++ or simplest way to generate similar output.

NOTE: for windows only and as I said, if there is no similar , how to do this in c++?

Upvotes: 0

Views: 1863

Answers (1)

Wagner Patriota
Wagner Patriota

Reputation: 5684

There's no way to do that in C++ itself. This feature is completely platform dependent. On Windows, you got some way to do with _WinAPI_UniqueHardwareID. Other systems you need to do this "analog function by yourself"... example: getting CPU id + Network MAC Address + Harddrive size + memory size + ... + whatever the platform delivers to you!

Some systems you can be UNABLE to do that... for example, iOS you just can't grab any information from hardware ENOUGH to identify the device as that particular device...

in other words: isn't not related to C/C++... it's completely related to the platform!

Upvotes: 2

Related Questions