Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Create a GUID to uniquely identify a machine.

Create a GUID to uniquely identify a machine.

Scheduled Pinned Locked Moved C / C++ / MFC
questionsysadminhardwarejsontutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 1149186
    wrote on last edited by
    #1

    Sir, I am trying to find a unique machine of the computers listed in my network. I can do it in 2 ways:By obtaining 1.IPAddress 2.MAC Address Since IPAddress is subject to change and MAC address changes if there is change in the hardware configuration. So the only way is to create a GUID of that machine. The question is how one should go about in creating GUID. I mean what are the functions should I use? Is there any API? I know that 2 utilities like GuidGen.exe and uuidGen.exe create unique GUIDS. Pls guide Regards

    A J 2 Replies Last reply
    0
    • U User 1149186

      Sir, I am trying to find a unique machine of the computers listed in my network. I can do it in 2 ways:By obtaining 1.IPAddress 2.MAC Address Since IPAddress is subject to change and MAC address changes if there is change in the hardware configuration. So the only way is to create a GUID of that machine. The question is how one should go about in creating GUID. I mean what are the functions should I use? Is there any API? I know that 2 utilities like GuidGen.exe and uuidGen.exe create unique GUIDS. Pls guide Regards

      A Offline
      A Offline
      Anonymous
      wrote on last edited by
      #2

      To programmatically create a GUID try calling CoCreateGUID() which can be found in objbase.h.

      HRESULT CoCreateGuid(GUID* pguid);
      

      Regards,

      1 Reply Last reply
      0
      • U User 1149186

        Sir, I am trying to find a unique machine of the computers listed in my network. I can do it in 2 ways:By obtaining 1.IPAddress 2.MAC Address Since IPAddress is subject to change and MAC address changes if there is change in the hardware configuration. So the only way is to create a GUID of that machine. The question is how one should go about in creating GUID. I mean what are the functions should I use? Is there any API? I know that 2 utilities like GuidGen.exe and uuidGen.exe create unique GUIDS. Pls guide Regards

        J Offline
        J Offline
        Joel Lucsy
        wrote on last edited by
        #3

        I hate to say this, but I fail to see how a GUID will uniquely identify a machine. In the past, GUID's were based on the MAC address. For security reasons, this is no longer true. As far as I know, it's based off the time and random values. -- Joel Lucsy

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups