IItemMetadata2::GetMergeWinnerId

Gets the winning ID value of a merge tombstone.

HRESULT GetMergeWinnerId(
  BYTE * pbWinnerId,
  ULONG * pcbWinnerId);

Parameters

  • pbWinnerId
    [in, out, size_is(*pcbWinnerId), unique] Returns the winning ID value of a merge tombstone.
  • pcbWinnerId
    [in, out] Specifies the number of bytes in pbWinnerId. Returns the number of bytes required to retrieve the ID when pbWinnerId is too small, or returns the number of bytes written.

Return Value

  • S_OK.

  • S_FALSE when this item is not a merge tombstone.

  • E_POINTER.

  • HRESULT_FROM_WIN32(ERROR_MORE_DATA) when pbWinnerId is too small. In this case, the required number of bytes is returned in pcbWinnerId.

Remarks

A merge tombstone is created when a constraint conflict is resolved by merging the two items in conflict. When a constraint conflict is resolved by merging, the smaller of the item IDs is chosen as the winning item ID and the larger is the losing item ID. The winning item ID is used to identify the merged item. The merge tombstone tracks that the losing item ID identifies the same item as the winning item ID in the synchronization community. The metadata for a merge tombstone is the same as that for a deleted item tombstone, with the addition of the winning item ID.

See Also

Reference

IItemMetadata2 Interface

Concepts

Detecting and Resolving Constraint Conflicts