COPYFILE2_MESSAGE_ACTION enumeration (winbase.h)

Returned by the CopyFile2ProgressRoutine callback function to indicate what action should be taken for the pending copy operation.

Syntax

typedef enum _COPYFILE2_MESSAGE_ACTION {
  COPYFILE2_PROGRESS_CONTINUE = 0,
  COPYFILE2_PROGRESS_CANCEL,
  COPYFILE2_PROGRESS_STOP,
  COPYFILE2_PROGRESS_QUIET,
  COPYFILE2_PROGRESS_PAUSE
} COPYFILE2_MESSAGE_ACTION;

Constants

 
COPYFILE2_PROGRESS_CONTINUE
Value: 0
Continue the copy operation.
COPYFILE2_PROGRESS_CANCEL
Cancel the copy operation. The CopyFile2 call will fail
and return HRESULT_FROM_WIN32(ERROR_REQUEST_ABORTED) and
any partially copied fragments will be deleted.
COPYFILE2_PROGRESS_STOP
Stop the copy operation. The CopyFile2 call will fail
and return HRESULT_FROM_WIN32(ERROR_REQUEST_ABORTED) and
any partially copied fragments will be left intact. The operation can be restarted using the
COPY_FILE_RESUME_FROM_PAUSE flag only if the
COPY_FILE_RESTARTABLE flag was set in the dwCopyFlags
member of the
COPYFILE2_EXTENDED_PARAMETERS structure
passed to the CopyFile2 function.
COPYFILE2_PROGRESS_QUIET
Continue the copy operation but do not call the
CopyFile2ProgressRoutine callback function
again for this operation.
COPYFILE2_PROGRESS_PAUSE
Pause the copy operation and write a restart header. This value is not compatible with the
COPY_FILE_RESTARTABLE flag for the dwCopyFlags member of
the COPYFILE2_EXTENDED_PARAMETERS
structure. In most cases the CopyFile2 call will fail and
return HRESULT_FROM_WIN32(ERROR_REQUEST_PAUSED) and any
partially copied fragments will be left intact (except for the header written that is used to resume the copy
operation later.) In case the copy operation was complete at the time the pause request is processed the
CopyFile2 call will complete successfully and no resume
header will be written. After this value is processed one more callback will be made to the
CopyFile2ProgressRoutine with the message
specifying a COPYFILE2_CALLBACK_STREAM_FINISHED (4) value in the
Type member of the
COPYFILE2_MESSAGE structure. After the callback has
returned CopyFile2 will fail with
HRESULT_FROM_WIN32(ERROR_REQUEST_PAUSED).

Remarks

To compile an application that uses this enumeration, define the _WIN32_WINNT macro as 0x0601 or later. For more information, see Using the Windows Headers.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 [desktop apps | UWP apps]
Header winbase.h (include Windows.h)

See also

CopyFile2

CopyFile2ProgressRoutine

File Management Enumerations