Getting hold of a unique identifier for a device

This is a discussion on Getting hold of a unique identifier for a device within the C++ Programming forums, part of the General Programming Boards category; Hi How do I get hold of a unique identifier for a device - be it a computer or a ...

  1. #1
    Registered User
    Join Date
    Jul 2004
    Posts
    5

    Question Getting hold of a unique identifier for a device

    Hi

    How do I get hold of a unique identifier for a device - be it a computer or a PDA? The only thing I can think of is the MACaddress - but how do I get hold of that? Should I even be trying to use the MAcaddress? What I am wanting to do is be able to is uniquely identify a device without any user input.

    Thanks for all the help.

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    Quote Originally Posted by adamK
    Hi

    How do I get hold of a unique identifier for a device - be it a computer or a PDA? The only thing I can think of is the MACaddress - but how do I get hold of that? Should I even be trying to use the MAcaddress? What I am wanting to do is be able to is uniquely identify a device without any user input.

    Thanks for all the help.
    How about a GUID?

    You can do this easilly enough on a windows machine usinag a few APIs

  3. #3
    Registered User
    Join Date
    Jul 2004
    Posts
    5
    From what I understand about GUID's they are something the program makes to get a unique identifier - so the next time I ask for a GUID on the same device I will get a different one. Am I right? I want to access some id from the hardware to be able to say that that device will have a id of, say, x - and evey time I ask the device for its id it will return x.
    Or are you suggesting the program assigns the device a GUID and keeps that as the device's id? In that case once the program ends or the device is turned off the device will get a new GUID. Am I right?
    Thanks for the help

  4. #4
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    Would IP addresses work?

  5. #5
    Registered User
    Join Date
    Jul 2004
    Posts
    5
    Don't think so. I need something a little closer to the hardware than that.

  6. #6
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    >> From what I understand about GUID's they are something the program makes to get a unique identifier - so the next time I ask for a GUID on the same device I will get a different one. <<

    The idea is that you generate the uuid once and store it somewhere(file, registry, user) for subsequent use.

    Hardware IDs may be available in the form of a MAC address or hard disk serial number. However, a PDA may have neither.

    If you are using windows the functions you should look at are UuidCreate() and GetIfTable().

    Many users do not like the idea of being uniquely identified.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. An error is driving me nuts!
    By ulillillia in forum C Programming
    Replies: 5
    Last Post: 04-04-2009, 10:15 PM
  2. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 02:01 AM
  3. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 02:53 AM
  4. Why wont my function exit correctly?
    By LightsOut06 in forum C Programming
    Replies: 2
    Last Post: 10-09-2005, 10:23 PM
  5. Resource ICONs
    By gbaker in forum Windows Programming
    Replies: 4
    Last Post: 12-15-2003, 07:18 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21