ITransferAdviseSink::FileFailure method

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

psi [in]

Type: IShellItem*

The IShellItem on which the operation failed.

pszItem [in]

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.

hrError [in]

Type: HRESULT

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

pszRename [in, out]

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.

cchRename [in]

Type: ULONG

The size of the pszRenamebuffer, 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 codeDescription
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

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

 

 

Show: