Results 1 to 6 of 6

Thread: What's a guid?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2008
    Posts
    407

    What's a guid?

    Anyone know what a guid structure is? When its defined like this:

    Private hdrGUID As Guid = New Guid("75B22630-668E-11CF-A6D9-00AA0062CE6C")

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: What's a guid?

    Anyone know what MSDN is?

    http://msdn.microsoft.com/en-us/libr...stem.guid.aspx

    The idea of a GUID is that you can generate such a value on a single system and then use that as an ID across multiple systems because the likelihood of another system generating the same value is negligible.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2008
    Posts
    407

    Re: What's a guid?

    What I was hoping for Jc was for someone to have an example of it that I could actually follow. Like what exactly is the
    "75B22630-668E-11CF-A6D9-00AA0062CE6C"?
    Now I'm assuming that's the unique identifier but how do you use that?

    I'm actually trying to parse .wma files and get the meta data out of them. They use these guid structures.

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: What's a guid?

    Moved To General Developer

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: What's a guid?

    Did anyone else read that as "What's a quid?" ?

    You would generally use a GUID when you need a unique string to represent 'something' in your application. Its applications are... limitless. As an example, I wrote a file service that accepts files and stores it... a content delivery system, if you will.

    Thing is, I can't store the file to disk as is. So each file name needs to be unique. Two people could upload the same file name. I could append the current datetime but that doesn't stop two people from uploading "resume.doc" at the same time. For that purpose, there's the GUID - it's a generated string which is thought to be sufficiently unique in its range to be considered truly random and unique.

    Because there are 2128 possible combinations, you can let your application believe that the string generated will be unique.

    In and of itself,

    75B22630-668E-11CF-A6D9-00AA0062CE6C

    means nothing. It is just a reference, or a key, to a certain piece of data you may have stored somewhere.

  6. #6
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: What's a guid?

    GUIDs/UUIDs are just "unique" values.

    Think of them as something like a database table's Counter/AutoNumber ID field primary key, or Enum values, etc. Each one simply stands in for something else, sometimes conceptual.

    Like an Enum value, each one is assigned a "meaning" someplace else. Usually in some purpose-oriented directory. XML namespaces use URIs in much the same way.

    You'd need to find the appropriate dictionary of WMA GUIDs and their meanings.


    It's like the old bit about some guys stranded on an island for years who have told every joke everyone knows time after time. So now every so often somebody just calls out "37!" and everyone chuckles just a little bit.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width