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

# XGameUiShowPlayerPickerResultCount

> XGameUiShowPlayerPickerResultCount

# XGameUiShowPlayerPickerResultCount

获取 [XGameUiShowPlayerPickerAsync](/reference/system/xgameui/functions/xgameuishowplayerpickerasync) 调用的结果计数。

## 语法

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

### 参数

*async*   \_In\_\
类型：[XAsyncBlock\*](/reference/system/xasync/structs/xasyncblock)

指向传递给 [XGameUiShowPlayerPickerAsync](/reference/system/xgameui/functions/xgameuishowplayerpickerasync) 的 [XAsyncBlock](/reference/system/xasync/structs/xasyncblock) 的指针。

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

结果计数。

### 返回值

类型：HRESULT

HRESULT 成功或错误代码。

## 备注

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

## 要求

**标头：** XGameUI.h

**库：** xgameruntime.lib

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

## 另请参阅

[XGameUI](/reference/system/xgameui/xgameui_members)\
[XGameUiShowPlayerPickerAsync](/reference/system/xgameui/functions/xgameuishowplayerpickerasync)\
[XGameUiShowPlayerPickerResult](/reference/system/xgameui/functions/xgameuishowplayerpickerresult)


## Related topics

- [XGameUiShowPlayerPickerResult](/zh-CN/reference/system/xgameui/functions/xgameuishowplayerpickerresult.md)
- [XGameUiShowPlayerPickerAsync](/zh-CN/reference/system/xgameui/functions/xgameuishowplayerpickerasync.md)
- [XGameUiSetPlayerPickerUiResponse](/zh-CN/reference/system/xgameui/functions/xgameuisetplayerpickeruiresponse.md)
- [XGameUI](/zh-CN/reference/system/xgameui/xgameui_members.md)
- [XGameUiShowPlayerPickerUiCallback](/zh-CN/reference/system/xgameui/functions/xgameuishowplayerpickeruicallback.md)
