Share via


IFileSyncProviderCallback::OnFileCopyProgress

Occurs periodically to show progress while a file is being copied.

Syntax

HRESULT OnFileCopyProgress(
  LPCWSTR pcszNewFilePath, 
  DWORD dwPercentCopied);

Parameters

  • pcszNewFilePath
    [in, string] The path of the file that is being copied. The path is relative to the root directory.

  • dwPercentCopied
    [in] The progress of the copy operation. The value is stated as a percentage.

Return Value

  • S_OK

Remarks

This event is fired one time for every 512-KB block that is written to the file.

If the file is less than 512 KB, the event is not raised.

This event is not fired to indicate completion of the file copy operation. Instead, after the file is copied, the IFileSyncProviderCallback::OnChangeApplied event is fired.

If the change type is FILESYNC_CHANGE_TYPE_RENAME, pcszNewFilePath contains the updated file path as it will be after the rename.

If OnFileCopyProgress returns an error, Sync Framework will stop processing the current change batch and return the error from the ProcessChangeBatch method of IFileSyncProvider.

See Also

Reference

IFileSyncProviderCallback Interface