IFileSyncProviderCallback::OnChangeApplied

Occurs when a file change has been applied.

HRESULT OnChangeApplied(
  LPCWSTR pcszNewFilePath,
  LPCWSTR pcszOldFilePath,
  DWORD dwChangeType);

Parameters

  • pcszNewFilePath
    [in, string] The new path for the file that was changed. The path is relative to the root directory. If dwChangeType is FILESYNC_CHANGE_TYPE_RENAME, this is the new path after the new name is applied. If dwChangeType is FILESYNC_CHANGE_TYPE_DELETE, this value is NULL.
  • pcszOldFilePath
    [in, string] The previous path for the file that was changed. The path is relative to the root directory. If dwChangeType is FILESYNC_CHANGE_TYPE_RENAME, this is the previous path before the new name is applied. If dwChangeType is FILESYNC_CHANGE_TYPE_CREATE, this value is NULL.
  • dwChangeType
    [in] The type of change that was applied. This value is from the FILESYNC_CHANGE_TYPE enumeration.

Return Value

  • S_OK

Remarks

This event will be raised only when a change affects file data on the destination replica and not when a change affects only the metadata for a file. For example, if an update-update conflict is detected and the file on the destination system is picked as the winner, no change is applied to the destination and this event will not be fired. Similarly, propagating a tombstone from the source to the destination causes only a metadata update and no change to the destination file system. In this case, this event will not be fired.

If OnChangeApplied returns an error, Sync Framework stops the current change batch and returns the error from the ProcessChangeBatch method of IFileSyncProvider.

See Also

Reference

IFileSyncProviderCallback Interface
FILESYNC_CHANGE_TYPE Enumeration