Sdílet prostřednictvím


IConstraintConflict::GetDestinationProviderOriginalData

Gets an object that can be use to retrieve item data for the item in the destination replica that originally caused the conflict.

HRESULT GetDestinationProviderOriginalData(
  IUnknown ** ppOriginalData);

Parameters

  • ppOriginalData
    [out] Returns an object that can be use to retrieve item data for the item in the destination replica that originally caused the conflict.

Return Value

  • S_OK.

  • S_FALSE when no original change exists. In this case, ppOriginalData is NULL.

  • E_POINTER.

Remarks

The item data returned by this method is the data for the destination item that originally caused a change to be made that, when applied, caused a constraint conflict. For example, consider a replica that uses a name field to identify its item. The source replica contains an item with ID id1 and a name field of "John". The destination replica contains an item with ID id1 and a name field of "Joe", as well as an item with ID id2 and a name field of "John". When item id1 is applied from the source replica to the destination replica, the name field of item id1 is changed to "John". This causes a constraint conflict with item id2 in the destination replica, because item id2 already has a name field of "John". In this case, the IConstraintConflict methods return the following values:

  • GetDestinationProviderConflictingData returns item data for item id2 in the destination replica.

  • GetSourceProviderConflictingData returns item data for item id1 in the source replica.

  • GetDestinationProviderOriginalData returns item data for item id1 in the destination replica.

See Also

Reference

IConstraintConflict Interface