Share via


ISaveChangeContext::GetChangeFromDestinationVersions

Gets an object that contains the original version that the destination provider supplied to the change applier.

Syntax

HRESULT GetChangeFromDestinationVersions(
  ISyncChange ** ppChangeFromDestinationVersions);

Parameters

  • ppChangeFromDestinationVersions
    [out] Returns an object that contains the original version that the destination provider supplied to the change applier.

Return Value

  • S_OK

  • E_POINTER

  • SYNC_E_INTERNAL_ERROR

Remarks

This method can be used to implement an optimistic concurrency check. To do this, the destination provider compares the version that is contained in ppChangeFromDestinationVersions to the current version in its metadata. If the versions are not the same, the item has been changed on the destination replica between the time that the change application was started and the time ISynchronousNotifyingChangeApplierTarget::SaveChange was called. If this occurs, the destination provider must report an error by using ISaveChangeContext::SetRecoverableErrorOnChange, and the metadata and data for this change must not be applied. Be aware that this concurrency check is effective only if versions are updated in the metadata store before this concurrency check is performed, such as on a system on which versions are updated in the metadata store while item changes are made in the item store.

See Also

Reference

ISaveChangeContext Interface