> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IXtfCopyFileCallback::OnFileCopyProgress Method

> IXtfCopyFileCallback::OnFileCopyProgress Method

# IXtfCopyFileCallback::OnFileCopyProgress Method

Called when the progress of a file copy changes.

<a id="syntaxSection" />

## Syntax

```cpp theme={null}
public:
HRESULT OnFileCopyProgress(
         LPCWSTR pszSrcFileName,
         LPCWSTR pszDstFileName,
         ULONGLONG ullFileSize,
         ULONGLONG ullBytesCopied
)  
```

<a id="parametersSection" />

### 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.

<a id="retvalSection" />

### Return value

Type: HRESULT

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

<a id="remarksSection" />

## Remarks

This function is called by the [IXtfFileIOClient::CopyFiles](/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/copyfiles-ixtffileioclient-xtffileio-xbox-microsoft-m) 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.

<a id="requirementsSection" />

## Requirements

**Header:** xtffileio.h

**Library:** xtffileio.lib

**Supported platforms:** Windows (for XBOX console tools)

<a id="seealsoSection" />

## See also

[IXtfCopyFileCallback Interface](/reference/tools/xtf/xtffileio/classes/IXtfCopyFileCallback/ixtfcopyfilecallback-xtffileio-xbox-microsoft-t)\
[XtfFileIO](/reference/tools/xtf/xtffileio/xtffileio-xbox-microsoft-n)


## Related topics

- [IXtfCopyFileCallback::OnStartFileCopy Method](/reference/tools/xtf/xtffileio/classes/IXtfCopyFileCallback/methods/onstartfilecopy-ixtfcopyfilecallback-xtffileio-xbox-microsoft-m.md)
- [IXtfCopyFileCallback::OnEndFileCopy Method](/reference/tools/xtf/xtffileio/classes/IXtfCopyFileCallback/methods/onendfilecopy-ixtfcopyfilecallback-xtffileio-xbox-microsoft-m.md)
- [IXtfFileIOClient::CopyFiles Method](/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/copyfiles-ixtffileioclient-xtffileio-xbox-microsoft-m.md)
- [IXtfBatchFileIOClient::CopyFiles Method](/reference/tools/xtf/xtffileio/classes/IXtfBatchFileIOClient/methods/copyfiles-ixtfbatchfileioclient-xtffileio-xbox-microsoft-m.md)
- [XTFFILEINFO](/reference/tools/xtf/xtffileio/structures/xtffileinfo-xtffileio-xbox-microsoft-t.md)
