IXtfCopyFileCallback::OnFileCopyProgress Method

Called when the progress of a file copy changes.

Syntax

public:
HRESULT OnFileCopyProgress(
         LPCWSTR pszSrcFileName,
         LPCWSTR pszDstFileName,
         ULONGLONG ullFileSize,
         ULONGLONG ullBytesCopied
)  

Parameters

pszSrcFileName
Type: LPCWSTR

A pointer to the filename of the source file. This parameter has been deprecated and the value is now a copy of pszDstFileName.

pszDstFileName
Type: LPCWSTR

A pointer to the filename of the target file.

ullFileSize
Type: ULONGLONG

The total size of the source file, in bytes.

ullBytesCopied
Type: ULONGLONG

The number of bytes of the file that have been copied so far.

Return value

Type: HRESULT

Returns S_OK if successful; otherwise, returns an HRESULT error code.

Remarks

This function is called by the IXtfFileIOClient::CopyFiles method for each packet transferred during the file copying operation. The initial call to IXtfCopyFileCallback::OnFileCopyProgress for a file specifies 0 bytes in ullBytesCopied and MAX_FILE_SIZE bytes in ullFileSize. This initial call indicates that you have started copying a new file. You can then use the file information specified in subsequent IXtfCopyFileCallback::OnFileCopyProgress calls to track and display progress during the file copying operation. If this callback function returns an HRESULT error code, the file copying operation is aborted.

Requirements

Header: xtffileio.h

Library: xtffileio.lib

Supported platforms: Windows (for Xbox console tools)

See also

IXtfCopyFileCallback Interface
XtfFileIO