Share via


ISimpleSyncProvider::UpdateItem

Called by the Sync Framework runtime to update an item in the destination store.

HRESULT UpdateItem(
  IUnknown *pItemData,
  const CHANGE_UNIT_SET *pChangeUnitsToUpdate,
  const ITEM_FIELDS *pKeyAndExpectedVersionInfo,
  IRecoverableErrorCallback *pRecoverableErrorCallback,
  ITEM_FIELDS **ppUpdatedKeyAndVersionInfo,
  BOOL *pfCommitKnowledgeAfterThisItem);

Parameters

  • pItemData
    [in] Data for the item in provider-specific format.
  • pChangeUnitsToUpdate
    [in, unique] A CHANGE_UNIT_SET object that contains the change units to update for an item. The parameter should be null (not empty) if no change units are specified.
  • pKeyAndExpectedVersionInfo
    [in] The key and expected version properties of the item to be updated.

    The provider must perform an optimistic concurrency check to verify that the version of the item on the destination corresponds to the values found in pKeyAndExpectedVersionInfo. If this check fails, provider should report a recoverable error.

  • pRecoverableErrorCallback
    [in] An IRecoverableErrorCallback object that contains methods that can be called if a recoverable error occurs during an item update.
  • ppUpdatedKeyAndVersionInfo
    [out] Returns the key and updated version properties of the updated items. If the return value is not valid, the Sync Framework runtime terminates the session.
  • pfCommitKnowledgeAfterThisItem
    [out] Returns whether the Sync Framework runtime should commit knowledge to the metadata store after processing is complete for the specified item.

Return Value

  • S_OK

See Also

Reference

ISimpleSyncProvider Interface