Επεξεργασία

Κοινή χρήση μέσω


ITransferAdviseSink::FileFailure method (shobjidl_core.h)

Called when there is a failure and user interaction is needed.

Syntax

HRESULT FileFailure(
  [in]      IShellItem *psi,
  [in]      LPCWSTR    pszItem,
  [in]      HRESULT    hrError,
  [in, out] LPWSTR     pszRename,
  [in]      ULONG      cchRename
);

Parameters

[in] psi

Type: IShellItem*

The IShellItem on which the operation failed.

[in] pszItem

Type: LPCWSTR

Optional. A pointer to a null-terminated buffer that contains the name of the file. If this value is NULL, the name given by the psi parameter is used.

[in] hrError

Type: HRESULT

The error code generated by the failure. This error must be handled by the copy engine.

[in, out] pszRename

Type: LPWSTR

Optional. When this method returns, contains a pointer to a null-terminated buffer that contains a new name for the file. The name cannot exceed length cchRename. If this parameter is NULL, no option to rename will be available.

[in] cchRename

Type: ULONG

The size of the pszRename buffer, in characters.

Return value

Type: HRESULT

Any other HRESULT should be returned to the calling process. If the failure is not handled, the return value should be hrError.

Return code Description
COPYENGINE_S_USER_RETRY
The user clicked Retry. The handler should retry the file operation.
COPYENGINE_E_USERCANCELLED
The user clicked Cancel. The entire copy job is being terminated. The handler should return this code back to the copy engine.
COPYENGINE_S_USER_IGNORED
The user clicked Ignore. The handler should skip creating the item and return this code back to the copy engine.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)