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

# Méthode IXtfCopyFileCallback::OnFileCopyProgress

> Méthode IXtfCopyFileCallback::OnFileCopyProgress

# Méthode IXtfCopyFileCallback::OnFileCopyProgress

Appelée lorsque la progression d'une copie de fichier change.

<a id="syntaxSection" />

## Syntaxe

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

<a id="parametersSection" />

### Paramètres

*pszSrcFileName*\
Type : LPCWSTR

Pointeur vers le nom du fichier source. Ce paramètre est déconseillé et sa valeur est désormais une copie de pszDstFileName.

*pszDstFileName*\
Type : LPCWSTR

Pointeur vers le nom du fichier cible.

*ullFileSize*\
Type : ULONGLONG

Taille totale du fichier source, en octets.

*ullBytesCopied*\
Type : ULONGLONG

Nombre d'octets du fichier copiés jusqu'à présent.

<a id="retvalSection" />

### Valeur de retour

Type : HRESULT

Retourne `S_OK` en cas de réussite ; sinon, retourne un code d'erreur HRESULT.

<a id="remarksSection" />

## Remarques

Cette fonction est appelée par la méthode [IXtfFileIOClient::CopyFiles](/fr/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/copyfiles-ixtffileioclient-xtffileio-xbox-microsoft-m) pour chaque paquet transféré pendant l'opération de copie de fichiers. L'appel initial à **IXtfCopyFileCallback::OnFileCopyProgress** pour un fichier spécifie 0 octet dans `ullBytesCopied` et MAX\_FILE\_SIZE octets dans `ullFileSize`. Cet appel initial indique que vous avez commencé à copier un nouveau fichier. Vous pouvez ensuite utiliser les informations de fichier spécifiées dans les appels suivants à **IXtfCopyFileCallback::OnFileCopyProgress** pour suivre et afficher la progression pendant l'opération de copie de fichiers. Si cette fonction de rappel retourne un code d'erreur HRESULT, l'opération de copie de fichiers est abandonnée.

<a id="requirementsSection" />

## Configuration requise

**En-tête :** xtffileio.h

**Bibliothèque :** xtffileio.lib

**Plateformes prises en charge :** Windows (pour les outils de console XBOX)

<a id="seealsoSection" />

## Voir aussi

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


## Related topics

- [IXtfCopyFileCallback::OnFileCopyProgress Method](/reference/tools/xtf/xtffileio/classes/IXtfCopyFileCallback/methods/onfilecopyprogress-ixtfcopyfilecallback-xtffileio-xbox-microsoft-m.md)
- [IXtfCopyFileCallback::OnFileCopyProgress (método)](/es/reference/tools/xtf/xtffileio/classes/IXtfCopyFileCallback/methods/onfilecopyprogress-ixtfcopyfilecallback-xtffileio-xbox-microsoft-m.md)
- [IXtfCopyFileCallback::OnFileCopyProgress 메서드](/ko/reference/tools/xtf/xtffileio/classes/IXtfCopyFileCallback/methods/onfilecopyprogress-ixtfcopyfilecallback-xtffileio-xbox-microsoft-m.md)
- [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)
