DelegatesCopyProgressRoutine Delegate

An application-defined callback function used with the CopyFileEx(String, String, DelegatesCopyProgressRoutine, IntPtr, Boolean, CopyFileFlags), MoveFileTransacted, and MoveFileWithProgress functions.

It is called when a portion of a copy or move operation is completed.

The LPPROGRESS_ROUTINE type defines a pointer to this callback function.

DelegatesCopyProgressRoutine is a placeholder for the application-defined function name.

Definition

Namespace: DevCase.Win32.Delegates
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public delegate CopyFileProgressAction CopyProgressRoutine(
	ulong totalFileSize,
	ulong totalBytesTransferred,
	ulong streamSize,
	ulong streamBytesTransferred,
	int streamNumber,
	CopyFileProgressCallbackReason callbackReason,
	IntPtr hSourceFile,
	IntPtr hDestinationFile,
	IntPtr data
)

Parameters

totalFileSize  UInt64
The total size of the file, in bytes.
totalBytesTransferred  UInt64
The total number of bytes transferred from the source file to the destination file since the copy operation began.
streamSize  UInt64
The total size of the current file stream, in bytes.
streamBytesTransferred  UInt64
The total number of bytes in the current stream that have been transferred from the source file to the destination file since the copy operation began.
streamNumber  Int32
A handle to the current stream. The first time DelegatesCopyProgressRoutine is called, the stream number is 1.
callbackReason  CopyFileProgressCallbackReason
The reason that DelegatesCopyProgressRoutine was called.
hSourceFile  IntPtr
A handle to the source file.
hDestinationFile  IntPtr
A handle to the destination file.
data  IntPtr
Argument passed to DelegatesCopyProgressRoutine by CopyFileEx(String, String, DelegatesCopyProgressRoutine, IntPtr, Boolean, CopyFileFlags), MoveFileTransacted, or MoveFileWithProgress functions.

Return Value

CopyFileProgressAction
The DelegatesCopyProgressRoutine function should return one of the following values:

Cancel - Cancel the copy operation and delete the destination file.

Continue - Continue the copy operation.

Quiet - Continue the copy operation, but stop invoking DelegatesCopyProgressRoutine to report progress.

Stop - Stop the copy operation. It can be restarted at a later time.

Remarks

See Also