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

在複製作業期間呼叫，以回報檔案複製進度。

## 語法

```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
);
```

### 參數

`fileProgressCount _In_`\
類型：**size\_t**

自上次叫用回呼以來有進度更新的檔案數目。

`fileUpdates _In_reads_opt_(fileProgressCount)`\
類型：**const [WdCopyFileProgressInfo](/zh-TW/reference/remoting/structs/wdcopyfileprogressinfo)\***

指向 [WdCopyFileProgressInfo](/zh-TW/reference/remoting/structs/wdcopyfileprogressinfo) 結構陣列的指標，每個結構都包含個別檔案的進度資訊。如果 `fileProgressCount` 為 0，則可能為 `nullptr`。

`copyUpdates _In_`\
類型：**const [WdCopyOperationSummary](/zh-TW/reference/remoting/structs/wdcopyoperationsummary)\***

指向 [WdCopyOperationSummary](/zh-TW/reference/remoting/structs/wdcopyoperationsummary) 結構的指標，其中包含整體複製作業進度的摘要。

`context _In_opt_`
類型：**void\***

在 [WdCopyStatusCallbacks](/zh-TW/reference/remoting/structs/wdcopystatuscallbacks) 結構中指定的使用者定義內容指標。

### 傳回值

類型：**HRESULT**

失敗的回呼 HRESULT 會被記錄，但不會中止複製，也不會變更 [WdRemoteCopy](/zh-TW/reference/remoting/functions/wdremotecopy) 傳回的結果。

## 備註

[WdRemoteCopy](/zh-TW/reference/remoting/functions/wdremotecopy) 會叫用此回呼，以在複製作業期間回報個別檔案的進度。叫用頻率由 [WdCopyStatusCallbacks](/zh-TW/reference/remoting/structs/wdcopystatuscallbacks) 的 `refreshRateMs` 成員控制。

此回呼會在與 `WdRemoteCopy` 呼叫相同的執行緒上叫用。`fileUpdates` 陣列、`copyUpdates` 結構及其內容只在回呼叫用期間有效。

## 需求

| 需求 | 值 |
| - | - |
| **標頭** | WdRemoteIteration.h |
| **程式庫** | wdremoteapi.lib |
| **支援的作業系統** | Windows 11 及更新版本 |
| **支援的架構** | x64、ARM64 |

## 另請參閱

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


## Related topics

- [WdCopyFilesStatusCallback](/ko/reference/remoting/callbacks/wdcopyfilesstatuscallback.md)
- [WdCopyStatusCallbacks](/reference/remoting/structs/wdcopystatuscallbacks.md)
