A Globally Unique Identifier or GUID is a pseudo-random number used in software applications. While each generated GUID is not guaranteed to be unique, the total number of unique keys (2128 or 3.4028×1038) is so large that the possibility of the same number being generated twice is very small.
GUIDs are used in many pieces of software, including Oracle Database and Novell eDirectory, but the most high-profile GUID implementation may be Microsoft's. There is a standard called Universally Unique Identifier (UUID), specified by the Open Software Foundation (OSF).
While a GUID strictly has no formal substructure, they may be written in text in varying ways depending on the implementation. In one such method GUIDs are written using the hexadecimal representation of a four-byte word, 2 two-byte words, and a eight-byte word separate by hyphens, such as:
However, the most commonly used structure of the data type is:
GUID STRUCT Data1 dd Data2 dw Data3 dw Data4 db 8 GUID ENDS
The definition of guid from guidef.h is as shown below:
typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data48 ; } GUID;
Using the above structure definitions, a hexadecimal representation could also be:
In the Microsoft component object model, GUIDs are used to uniquely distinguish different software component interfaces. This means that two (possibly incompatible) versions of a component can have exactly the same name but still be distinguishable by their GUIDs.
GUIDs are also inserted into documents from Microsoft Office programs, as these are regarded as objects as well. Even audio or video streams in the Advanced Streaming Format (ASF) are identified by their GUIDs.
In Advanced Streaming Format (ASF) files at least, and probably in general, the GUID data is stored in little endian format as a 32-bit unsigned integer, followed by 2 16-bit unsigned integers, followed by 8 unsigned bytes. Software on hardware with a big endian CPU must reverse the bytes in the first 32-bit, and both 16-bit quantities, the remaining 8 bytes are fine as is. (The display format is somewhat misleading.)
V1 GUIDs which contain a MAC address can be identified by the digit "1" in the first position of the third group of digits, for example {2f1e4fc0-81fd-11da-9156-00036a0f876a}. GUIDs using the later algorithm, which has a random suffix have a "4" in the same position, for example {38a52be4-9352-453e-af97-5c3b448652f0}.
DCOM introduces many additional GUID subtypes:
These GUID subspaces may overlap, as the context of GUID usage defines its subtype. For example, there might be a class using same GUID for its CLSID as another class is using for its IID –- all without a problem. On the other hand, two classes using same CLSID couldn't co-exist.
Microsoft Windows | Identifiers
Globally Unique Identifier | Globally Unique Identifier | Globally Unique Identifier | GUID | Globally Unique Identifier | Globálisan egyedi azonosító | Globally Unique Identifier | GUID
This article is licensed under the GNU Free Documentation License.
It uses material from the
"Globally Unique Identifier".
Home Page • arts • business • computers • games • health • hospitals • home • kids & teens • news • physicians • recreation• reference • regional • science • shopping • society • sports • world