ISimpleSyncEvents::OnConstraintConflict

Called when Sync Framework detects that an item being processed is involved in a constraint conflict.

Syntax

HRESULT OnConstraintConflict(
  const CONFLICT_INFORMATION *pAdditionalConflictInfo,
  const ITEM_FIELDS *pLocalConflictingItem,
  const ITEM_FIELDS *pRemoteItem,
  const CHANGE_UNIT_SET *pChangeUnitsToApply,
  IUnknown *pRemoteConflictingItemData,
  SYNC_CONSTRAINT_RESOLVE_ACTION *pRequestedResolution,
  BOOL *pfForwardToApplication);

Parameters

  • pAdditionalConflictInfo
    [in] A CONFLICT_INFORMATION object that contains information about any item versions that are known to the remote provider for the item that is in conflict.

  • pLocalConflictingItem
    [in] Key and version properties for the local item.

  • pRemoteItem
    [in, unique] Key and version properties of the item that is being modified as a result of the incoming change if that change is an update. Null if the incoming change is an insert.

  • pChangeUnitsToApply
    [in, unique] The set of change units that should be applied during conflict resolution.

  • pRemoteConflictingItemData
    [in] Data that is associated with the remote conflicting item. Null if the incoming change is a delete.

  • pRequestedResolution
    [out] A SYNC_CONSTRAINT_RESOLVE_ACTION enumeration value that represents the options for resolving constraint conflicts.

  • pfForwardToApplication
    [out] Set to TRUE to ignore pRequestedResolution and forward the notification to the application.

Return Value

  • S_OK

Remarks

This event is used for constraint conflicts, which occur when an item cannot be saved because it conflicts with another item in the destination store, such as when the source provider sends a file that has the same name and location as a file that already exists in the destination replica. For more information, see Handling Conflicts for Simple Providers.

See Also

Reference

ISimpleSyncEvents Interface