ShowFunctionErrorDlg(
     LPVOID:lpFuncData,
     UINT:uiType,
     int:iErrorCode,
     UINT:uiAction,
     LPTSTR:lpszName,
     LPTSTR:lpszErrMsg
)
→ int

Arguments

lpFuncData

[in] The value of the lpFuncData member of the VFSBATCHDATA structure

uiType

[in] The type of error dialog to display. This determines the choices the user has for dealing with the error. Valid values are:

ERRORTYPE_RETRY_SKIP_CANCEL
ERRORTYPE_RETRY_CANCEL
ERRORTYPE_SKIP_CANCEL
ERRORTYPE_OK
ERRORTYPE_OK_SKIP_CANCEL
ERRORTYPE_SCHEDULE_RETRY_SKIP_CANCEL

iErrorCode

[in] The code for the error that occurred. This can either be one of the standard system error codes or one of the special Opus error codes defined in vfs plugins.h. Set to 0 if you wish to provide your own error message.

uiAction

[in] The type of batch operation taking place when the error occurred. Valid values are:

ERRORACTION_COPY
ERRORACTION_MOVE
ERRORACTION_DELETE

lpszName

[in] The name of the file that experienced the error. Set to NULL to have no filename displayed to the user.

lpszErrMsg

[in] If non-NULL this must point to a null-terminated error message string that will be displayed to the user instead of the automatically generated message.

Return value

The return value depends upon the choice made by the user. Valid return values are:

ERRORRESULT_ABORTBatch operation should be aborted
ERRORRESULT_RETRYRetry the operation
ERRORRESULT_SKIPSkip the current file and continue with the next
ERRORRESULT_SKIP_ALLSkip all errors that occur in future
ERRORRESULT_SCHEDULESchedule for later copying
ERRORRESULT_SCHEDULE_ALLSchedule all files that fail for later copying
ERRORRESULT_OKUser acknowledges the error

Description

The ShowFunctionErrorDlg function lets you more fully emulate Opus when performing a batch operation. It displays the standard error dialog.

If the return value is ERRORRESULT_SKIP_ALL you should store this and not display any further error dialogs for the duration of this batch operation - instead, any files that fail should be silently skipped over.

If the return value is ERRORRESULT_SCHEDULE then you should attempt to schedule the file for later copying, if possible (this will only be returned if you specified the dialog type of ERRORTYPE_SCHEDULE_RETRY_SKIP_CANCEL, which you should not do unless you actually are able to schedule files for later copying.)