UUIDs

UUIDs (Universally Unique Identifiers), also known as GUIDs (Globally Unique Identifiers) or IIDs (Interface Identifiers), are 128-bit values guaranteed to be unique. A UUID is made unique over both space and time by combining a value unique to the computer on which it was generated--usually the Ethernet hardware address--and a value representing the number of 100-nanosecond intervals since October 15, 1582 at 00:00:00.

You can generate UUIDs using the functions defined in CFUUID.h . Listing 1-12 shows you how to do this. The standard format for UUIDs represented in ASCII is a string punctuated by hyphens, for example 68753A44-4D6F-1226-9C60-0050E4C00067 . The hex representation looks, as you might expect, like a list of numerical values preceded by 0x . For example, 0xD7, 0x36, 0x95, 0x0A, 0x4D, 0x6E, 0x12, 0x26, 0x80, 0x3A, 0x00, 0x50, 0xE4, 0xC0, 0x00, 0x67 . In order to use a UUID, you simply create it and then copy the resulting strings into your header and C language source files. See the chapter Core Foundation Plug-in Services for more information about using UUIDs when defining Core Foundation plug-ins. Note that Core Foundation's UUID API is available only on Mac OS X.


© 2000 Apple Computer, Inc. (Last Updated 04 April 00)