> ## 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-TW/reference/system/xgameui/functions/xgameuishowplayerpickerasync.md) 呼叫的結果數目。

## 語法

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

### 參數

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

指向傳遞給 [XGameUiShowPlayerPickerAsync](https://docs.xbox.com/zh-TW/reference/system/xgameui/functions/xgameuishowplayerpickerasync.md) 之 [XAsyncBlock](https://docs.xbox.com/zh-TW/reference/system/xasync/structs/xasyncblock.md) 的指標。

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

結果的數目。

### 傳回值

類型：HRESULT

HRESULT 成功或錯誤碼。

## 備註

此函式通常會在 [XGameUiShowPlayerPickerAsync](https://docs.xbox.com/zh-TW/reference/system/xgameui/functions/xgameuishowplayerpickerasync.md) 的 **XAsyncBlock** 中呼叫。此函式可讓您擷取傳回至清單的玩家數目。若要取得實際的玩家清單，您需要呼叫 [XGameUiShowPlayerPickerResult](https://docs.xbox.com/zh-TW/reference/system/xgameui/functions/xgameuishowplayerpickerresult.md)。\
您也可以在非同步函式完成之後隨時呼叫此函式，以擷取函式結果。

## 需求

**標頭：** XGameUI.h

**程式庫：** xgameruntime.lib

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

## 另請參閱

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


## Related topics

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