Object Identifiers

Each object must bear an identifier, which is a value that uniquely identifies the object instance. Internally, object identifiers are 20 bytes long. They contain two components: a GUID (also known as a UUID) in the first 16 bytes, and a 32-bit unsigned integer suffix in the last 4 bytes.

A GUID contains the following components:

  • One 32-bit unsigned integer
  • Two 16-bit unsigned integers
  • Eight 8-bit unsigned integers (represented as unsigned characters)

These components total of 128 bits, or 16 bytes. Therefore, an object identifier contains an extra 32-bit unsigned integer (the 4 byte suffix) at the end for a total of 160 bits, or 20 bytes.

To simplify working with object identifiers and due to COM automation limitations on datatypes, the API uses a string to represent object identifiers.

The following table lists aliases used in this guide and in the interface definitions:

Type Name

Format

Use

SC_OBJID

{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}+suffix

Object identifier

SC_CLSID

{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}+suffix

Class (object, property type, and so on) identifier

SC_MODELTYPEID

{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}+suffix

Model type identifier

SC_CREATORID

{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}

Creator identifier

The identifiers whose GUID component contains zero is one set of object identifiers that is predefined. If the final 4 bytes of the identifier also contain zero, the identifier represents a null identifier. Other values of the offset are reserved for future use.