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

# XGameUiShowPlayerPickerResultCount

> XGameUiShowPlayerPickerResultCount

# XGameUiShowPlayerPickerResultCount

获取 [XGameUiShowPlayerPickerAsync](https://docs.xbox.com/zh-CN/reference/system/xgameui/functions/xgameuishowplayerpickerasync.md) 调用的结果计数。

## 语法

```cpp theme={null}
HRESULT XGameUiShowPlayerPickerResultCount(  
         XAsyncBlock* async,  
         uint32_t* resultPlayersCount  
)  
```

### 参数

*async*   \_In\_\
类型：[XAsyncBlock\*](https://docs.xbox.com/zh-CN/reference/system/xasync/structs/xasyncblock.md)

指向传递给 [XGameUiShowPlayerPickerAsync](https://docs.xbox.com/zh-CN/reference/system/xgameui/functions/xgameuishowplayerpickerasync.md) 的 [XAsyncBlock](https://docs.xbox.com/zh-CN/reference/system/xasync/structs/xasyncblock.md) 的指针。

*resultPlayersCount*   \_Out\_\
类型：uint32\_t\*

结果计数。

### 返回值

类型：HRESULT

HRESULT 成功或错误代码。

## 备注

通常，此函数应在 [XGameUiShowPlayerPickerAsync 的](https://docs.xbox.com/zh-CN/reference/system/xgameui/functions/xgameuishowplayerpickerasync.md) **XAsyncBlock** 中调用。此函数允许你检索返回到列表中的玩家数量。要获取实际的玩家列表，你需要调用 [XGameUiShowPlayerPickerResult](https://docs.xbox.com/zh-CN/reference/system/xgameui/functions/xgameuishowplayerpickerresult.md)。\
你也可以在异步函数完成后随时调用此函数以检索函数结果。

## 要求

**标头：** XGameUI.h

**库：** xgameruntime.lib

**支持的平台：** Windows、Steam Deck、XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

[XGameUI](https://docs.xbox.com/zh-CN/reference/system/xgameui/xgameui_members.md)\
[XGameUiShowPlayerPickerAsync](https://docs.xbox.com/zh-CN/reference/system/xgameui/functions/xgameuishowplayerpickerasync.md)\
[XGameUiShowPlayerPickerResult](https://docs.xbox.com/zh-CN/reference/system/xgameui/functions/xgameuishowplayerpickerresult.md)


## Related topics

- [XGameUiShowPlayerPickerResult](https://docs.xbox.com/zh-CN/reference/system/xgameui/functions/xgameuishowplayerpickerresult.md)
- [XGameUiShowPlayerPickerAsync](https://docs.xbox.com/zh-CN/reference/system/xgameui/functions/xgameuishowplayerpickerasync.md)
- [XGameUiSetPlayerPickerUiResponse](https://docs.xbox.com/zh-CN/reference/system/xgameui/functions/xgameuisetplayerpickeruiresponse.md)
- [XGameUI（API 内容）](https://docs.xbox.com/zh-CN/reference/system/xgameui/xgameui_members.md)
- [XGameUiShowPlayerPickerUiCallback](https://docs.xbox.com/zh-CN/reference/system/xgameui/functions/xgameuishowplayerpickeruicallback.md)
