Share via


SYNC_GID Structure

Represents an identifier for an item that is unique throughout the synchronization community.

typedef struct _SYNC_GID
{
  ULONGLONG ullGidPrefix;
  GUID guidUniqueId;
} SYNC_GID;

Members

  • ullGidPrefix
    The prefix component of the global ID.
  • guidUniqueId
    The GUID component of the global ID.

Remarks

The GUID component must be unique. This can be accomplished by using CoCreateGuid to generate a new GUID.

Item IDs are not required to be in this format. However, for systems that do not have an intrinsic unique ID for items, we recommend that you use this format.

In situations in which the items that are being synchronized have a hierarchy, it can be useful to place a monotonically increasing number, such as a clock time, in the ID prefix. For more information, see Flexible IDs.

Requirements

Header: Synchronization.h

Example

The following example shows how to get an item ID that is stored as a SYNC_GID.

SYNC_GID gidItem;
DWORD cbID = sizeof(gidItem);
hr = pChange->GetRootItemId((BYTE*)&gidItem, &cbID);

See Also

Concepts

Sync Framework Core Components
Flexible IDs