COPYFILE2_MESSAGE_ACTION enumeration

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    = 1,
  COPYFILE2_PROGRESS_STOP      = 2,
  COPYFILE2_PROGRESS_QUIET     = 3,
  COPYFILE2_PROGRESS_PAUSE     = 4
} COPYFILE2_MESSAGE_ACTION;

Constants

COPYFILE2_PROGRESS_CONTINUE

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

Minimum supported client

Windows 8 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 [desktop apps | Windows Store apps]

Header

WinBase.h (include Windows.h)

See also

File Management Enumerations
CopyFile2
CopyFile2ProgressRoutine

 

 

Community Additions

ADD
Show:
© 2014 Microsoft