Share via


GUIDs and UUIDs (Windows Embedded CE 6.0)

1/6/2010

The globally unique identifier (GUID) is also known as the universally unique identifier (UUID). The GUID, or UUID, is a unique, 128-bit value used to identify objects.

Objects — such as OLE servers, interfaces, manager entry-point vectors, and client objects — are each assigned a GUID or UUID. Thereafter, the object is identified by that value.

Typically, the GUID or UUID is represented as a string of hexadecimal numbers with the following format:

{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}

For example, {4208fb66-e22a-11d1-a7d7-00a0c982c00d}.

Microsoft has defined the following structure as a container for the 16 bytes that are required by a UUID or by a /GUID.

typedef struct _GUID
{
  DWORD Data1;
  WORD Data2;
  WORD Data3;
  BYTE Data4[8];
} GUID;

You can use the GUIDGEN tool to create a GUID. GUIDGEN.exe is in the %_WINCEROOT%\Sdk\Bin\i386 directory.

You can dynamically generate a GUID on a device that supports COM. To do so, call CoCreateGuid.

See Also

Concepts

Guidgen Tool

Other Resources

COM and DCOM OS Design Development