Share via


ISyncChangeBatchBase::AddItemMetadataToGroup

Adds a specified item change to the group that is currently open.

Syntax

HRESULT AddItemMetadataToGroup(
  const BYTE * pbOwnerReplicaId, 
  const BYTE * pbItemId, 
  const SYNC_VERSION * pChangeVersion,
  const SYNC_VERSION * pCreationVersion, 
  DWORD dwFlags,
  DWORD dwWorkForChange,
  ISyncChangeBuilder ** ppChangeBuilder);

Parameters

  • pbOwnerReplicaId
    [in] The replica ID of the replica where pChangeVersion and pCreationVersion are valid. The ID format must match the format that is specified by the ID_PARAMETERS structure of the provider.

  • pbItemId
    [in] The ID of the item. The ID format must match the format that is specified by the ID_PARAMETERS structure of the provider.

  • pChangeVersion
    [in] The version of this change.

  • pCreationVersion
    [in] The creation version of the item.

  • dwFlags
    [in] Flags that specify the state of the item change. For the flag values, see SYNC_CHANGE_FLAG Flags.

  • dwWorkForChange
    [in] The work estimate for the change. This value is used during change application to report completed work to the application.

  • ppChangeBuilder
    [in, out, unique] Returns an object that can be used to add change unit information to the change.

Return Value

  • S_OK

  • E_INVALIDARG when dwFlags contains a flag value that is not valid.

  • SYNC_E_INVALID_OPERATION when no group is open or an empty group was previously added to the batch.

  • SYNC_E_RANGE_OUT_OF_ORDER when an ordered group is open and pbItemId is less than the item ID of the previous item that was added to the group, or less than the item ID that was specified when the group was opened.

  • SYNC_E_CHANGE_BATCH_IS_READ_ONLY when the ISyncChangeBatchBase object has been sent to a change applier or to the synchronization session, or when the object was created by using IProviderSyncServices::DeserializeChangeBatch or IProviderSyncServices::DeserializeFullEnumerationChangeBatch.

See Also

Reference

ISyncChangeBatchBase Interface

SYNC_VERSION Structure

Concepts

Reporting Synchronization Progress