meaning of GUID ?

Started by
3 comments, last by duckykim 22 years, 8 months ago
plz explain me GUID (globally unique identifier) in detail.
Advertisement
If I recall its basiclly just a uniqe number generated via a complex math formula, the main use of GUIDS and directx that I know of is with directplay, because each GUID represents one game basiclly. Also GUID''s I belive are used in COM.
Like Zenroth said, GUIDs are unique numbers (generated by a formula that takes into account things like your machine''s ethernet card number, if present). It is used frequently in COM. It is a way to have a unique ID number that any application anywhere can use to represent a specific interface without having to worry about someone else on the planet (literally) making an interface that uses the same number.
Does that mean that used in conjuction with a random number generator - GUID''s generated numbers could be used as near undeterminable random numbers?

I know this isn;''t related to it''s intended purpose - but i thought it may interest some?
Well, unfortunately, although they are unique, they are not random. If you create a whole bunch of GUIDs at virtually the same time, they will be in sequence. (There is an internal counter used to make sure that you do not generate the same GUID twice even if two GUIDs are requested are virtually the same moment in time)

A large part of the GUID is not different at all from other GUIDs on the same machine. For example, I think the first 6 bytes or so are just your Ethernet adapter address (which is unique in the world because of the way addresses are allocated at the factory).

So, basically, I don''t think a GUID would be very useful for anything more than a random number seed and even then you might as just well use the system clock because a GUID is many more bytes long than you are probably going to need for your seed

This topic is closed to new replies.

Advertisement