Archived

This topic is now archived and is closed to further replies.

duckykim

meaning of GUID ?

Recommended Posts

Zenroth    127
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.

Share this post


Link to post
Share on other sites
jaxson    127
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.

Share this post


Link to post
Share on other sites
TheHermit    122
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?

Share this post


Link to post
Share on other sites
jaxson    127
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

Share this post


Link to post
Share on other sites