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

# 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](https://docs.xbox.com/reference/remoting/structs/wdcopyfileprogressinfo.md)\***

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

`copyUpdates _In_`\
Type: **const [WdCopyOperationSummary](https://docs.xbox.com/reference/remoting/structs/wdcopyoperationsummary.md)\***

A pointer to a [WdCopyOperationSummary](https://docs.xbox.com/reference/remoting/structs/wdcopyoperationsummary.md) 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](https://docs.xbox.com/reference/remoting/structs/wdcopystatuscallbacks.md) structure.

### Return value

Type: **HRESULT**

A failed callback HRESULT is logged but does not abort the copy or change the result returned by [WdRemoteCopy](https://docs.xbox.com/reference/remoting/functions/wdremotecopy.md).

## Remarks

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

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](https://docs.xbox.com/reference/remoting/functions/wdremotecopy.md)
* [WdCopyFileProgressInfo](https://docs.xbox.com/reference/remoting/structs/wdcopyfileprogressinfo.md)
* [WdCopyOperationSummary](https://docs.xbox.com/reference/remoting/structs/wdcopyoperationsummary.md)
* [WdCopyStatusCallbacks](https://docs.xbox.com/reference/remoting/structs/wdcopystatuscallbacks.md)
* [XBOX PC Remote Iteration API](https://docs.xbox.com/reference/remoting/remoteiteration_members.md)


## Related topics

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