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

# WdCancelRemoteCopy

> WdCancelRemoteCopy

# WdCancelRemoteCopy

Annule une opération de copie en cours.

## Syntaxe

```cpp theme={null}
HRESULT WdCancelRemoteCopy(  
         _In_ WdCancellationHandle cancellationHandle  
);  
```

### Paramètres

`_In_ cancellationHandle`\
Type : **[WdCancellationHandle](/fr/reference/remoting/structs/wdcancellationhandle)**

Handle d'annulation créé par [WdCreateCancellationHandle](/fr/reference/remoting/functions/wdcreatecancellationhandle) et passé à [WdRemoteCopy](/fr/reference/remoting/functions/wdremotecopy). La signalisation de ce handle entraîne l'annulation de la copie en cours.

### Valeur renvoyée

Type : **HRESULT**

Renvoie `S_OK` en cas de réussite ; sinon, renvoie un code d'erreur.

## Remarques

Appelez `WdCancelRemoteCopy` depuis un thread distinct pour annuler un appel bloquant à [WdRemoteCopy](/fr/reference/remoting/functions/wdremotecopy). `WdCancelRemoteCopy` est une fonction non bloquante qui signale l'annulation ; `WdRemoteCopy` peut renvoyer `S_OK` ou un échec.

Étant donné que `WdRemoteCopy` peut renvoyer l'un ou l'autre résultat une fois l'annulation observée, la valeur renvoyée à elle seule n'indique pas si l'opération a été annulée ou s'est exécutée jusqu'à son terme. Suivez l'état d'annulation dans votre propre code si vous devez distinguer les deux cas, par exemple pour supprimer un message d'erreur ou ignorer une nouvelle tentative après une annulation initiée par l'utilisateur.

## Configuration requise

| Exigence | Valeur |
| - | - |
| **En-tête** | WdRemoteIteration.h |
| **Bibliothèque** | wdremoteapi.lib |
| **Système d'exploitation pris en charge** | Windows 11 et versions ultérieures |
| **Architectures prises en charge** | x64, ARM64 |

## Voir aussi

* [WdRemoteCopy](/fr/reference/remoting/functions/wdremotecopy)
* [WdCancellationHandle](/fr/reference/remoting/structs/wdcancellationhandle)
* [WdCreateCancellationHandle](/fr/reference/remoting/functions/wdcreatecancellationhandle)
* [WdCloseCancellationHandle](/fr/reference/remoting/functions/wdclosecancellationhandle)
* [API XBOX PC Remote Iteration](/fr/reference/remoting/remoteiteration_members)


## Related topics

- [WdRemoteCopy](/fr/reference/remoting/functions/wdremotecopy.md)
- [WdCancellationHandle](/fr/reference/remoting/structs/wdcancellationhandle.md)
- [WdCreateCancellationHandle](/fr/reference/remoting/functions/wdcreatecancellationhandle.md)
- [WdDuplicateCancellationHandle](/fr/reference/remoting/functions/wdduplicatecancellationhandle.md)
- [API XBOX PC Remote Iteration](/fr/reference/remoting/remoteiteration_members.md)
