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

# WdDeviceInfoCallback

> WdDeviceInfoCallback

接收一个枚举出的已保存设备。

**引入版本：** [RIT 0.0.14-preview](https://docs.xbox.com/zh-CN/reference/remoting/release-versions.md#release-versions)。

## 语法

```cpp theme={null}
typedef HRESULT(WD_REMOTE_ITERATION_CALL* WdDeviceInfoCallback)(
    _In_ const WdDeviceInfo* device,
    _In_opt_ void* context
);
```

### 参数

`device`\
类型：**const WdDeviceInfo\***

借用的已保存设备记录。

`context`\
类型：**void\***

提供给 API 的、由调用方拥有的指针。

### 返回值

返回 `S_OK` 以继续。失败的 HRESULT 会停止枚举，并由 API 返回。

## 备注

返回 S\_OK 以继续；失败的 HRESULT 会停止枚举，并由 API 返回。

回调会在 API 处理其结果或快照期间、API 调用返回之前传递。指向结构体和字符串的指针仅在回调期间借用；如果之后还需要这些值，请复制它们。`context` 是提供给 API 的、由调用方拥有的指针。

## 要求

| 要求 | 值 |
| - | - |
| **头文件** | WdRemoteIteration.h |
| **库** | wdremoteapi.lib |
| **NuGet 包** | [Microsoft.GDK.RemoteIterationClientApi](https://aka.ms/GameDevRemoteAPI) |

## 另请参阅

* [XBOX PC 远程迭代 API](https://docs.xbox.com/zh-CN/reference/remoting/remoteiteration_members.md)


## Related topics

- [WdEnumDevices](https://docs.xbox.com/zh-CN/reference/remoting/functions/wdenumdevices.md)
- [XBOX PC Remote Iteration API](https://docs.xbox.com/zh-CN/reference/remoting/remoteiteration_members.md)
- [WdDeviceInfoResultCallback](https://docs.xbox.com/zh-CN/reference/remoting/callbacks/wddeviceinforesultcallback.md)
- [WdDeviceInfo](https://docs.xbox.com/zh-CN/reference/remoting/structs/wddeviceinfo.md)
- [WdDeviceIdCallback](https://docs.xbox.com/zh-CN/reference/remoting/callbacks/wddeviceidcallback.md)
