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

# WdCopyFilesStatusCallback

> WdCopyFilesStatusCallback

# WdCopyFilesStatusCallback

Called to report file copy progress during a copy operation.

## Syntax

```cpp theme={null}
typedef HRESULT (*WdCopyFilesStatusCallback)(
    _In_ size_t fileProgressCount,
    _In_reads_opt_(fileProgressCount) const WdCopyFileProgressInfo* fileUpdates,
    _In_ const WdCopyOperationSummary* copyUpdates,
    _In_opt_ void* context
);
```

### Parameters

`fileProgressCount _In_`\
Type: **size\_t**

The number of files that have progress updates since the last callback invocation.

`fileUpdates _In_reads_opt_(fileProgressCount)`\
Type: **const [WdCopyFileProgressInfo](/reference/remoting/structs/wdcopyfileprogressinfo)\***

A pointer to an array of [WdCopyFileProgressInfo](/reference/remoting/structs/wdcopyfileprogressinfo) structures, each containing progress information for an individual file. May be `nullptr` if `fileProgressCount` is 0.

`copyUpdates _In_`\
Type: **const [WdCopyOperationSummary](/reference/remoting/structs/wdcopyoperationsummary)\***

A pointer to a [WdCopyOperationSummary](/reference/remoting/structs/wdcopyoperationsummary) structure containing a summary of the overall copy operation progress.

`context _In_opt_`
Type: **void\***

The user-defined context pointer that was specified in the [WdCopyStatusCallbacks](/reference/remoting/structs/wdcopystatuscallbacks) structure.

### Return value

Type: **HRESULT**

Return `S_OK` to continue the copy operation. Return a failure HRESULT to abort the copy.

## Remarks

This callback is invoked by [WdRemoteCopy](/reference/remoting/functions/wdremotecopy) to report progress on individual files during a copy operation. The frequency of invocations is controlled by the `refreshRateMs` member of [WdCopyStatusCallbacks](/reference/remoting/structs/wdcopystatuscallbacks).

Returning a failed HRESULT from this callback will abort the copy operation and return that error from `WdRemoteCopy`.

The callback is invoked on the same thread as the `WdRemoteCopy` call. The `fileUpdates` array, `copyUpdates` structure, and their contents are only valid for the duration of the callback invocation.

## Requirements

| Requirement                 | Value                |
| --------------------------- | -------------------- |
| **Header**                  | WdRemoteIteration.h  |
| **Library**                 | wdremoteapi.lib      |
| **Supported OS**            | Windows 11 and later |
| **Supported architectures** | x64, ARM64           |

## See also

* [WdRemoteCopy](/reference/remoting/functions/wdremotecopy)
* [WdCopyFileProgressInfo](/reference/remoting/structs/wdcopyfileprogressinfo)
* [WdCopyOperationSummary](/reference/remoting/structs/wdcopyoperationsummary)
* [WdCopyStatusCallbacks](/reference/remoting/structs/wdcopystatuscallbacks)
* [XBOX PC Remote Iteration API](/reference/remoting/remoteiteration_members)


## Related topics

- [WdCopyStatusCallbacks](/reference/remoting/structs/wdcopystatuscallbacks.md)
- [WdCopyFileProgressInfo](/reference/remoting/structs/wdcopyfileprogressinfo.md)
- [WdCopyOperationSummary](/reference/remoting/structs/wdcopyoperationsummary.md)
- [XBOX PC Remote Iteration API](/reference/remoting/remoteiteration_members.md)
- [WdRemoteCopy](/reference/remoting/functions/wdremotecopy.md)
