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

Gets the count of results from a [XGameUiShowPlayerPickerAsync](https://docs.xbox.com/reference/system/xgameui/functions/xgameuishowplayerpickerasync.md) call.

## Syntax

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

### Parameters

*async*   \_In\_\
Type: [XAsyncBlock\*](https://docs.xbox.com/reference/system/xasync/structs/xasyncblock.md)

A pointer to the [XAsyncBlock](https://docs.xbox.com/reference/system/xasync/structs/xasyncblock.md) that was passed to [XGameUiShowPlayerPickerAsync](https://docs.xbox.com/reference/system/xgameui/functions/xgameuishowplayerpickerasync.md).

*resultPlayersCount*   \_Out\_\
Type: uint32\_t\*

The count of results.

### Return value

Type: HRESULT

HRESULT success or error code.

## Remarks

Typically this function is to be called in [XGameUiShowPlayerPickerAsync's](https://docs.xbox.com/reference/system/xgameui/functions/xgameuishowplayerpickerasync.md) **XAsyncBlock**. This function will allow you to retrieve the number of players returned to the list. To get the actual list of players you will need to call [XGameUiShowPlayerPickerResult](https://docs.xbox.com/reference/system/xgameui/functions/xgameuishowplayerpickerresult.md).\
You may also call this function anytime after the async function completes in order to retrieve the function result.

## Requirements

**Header:** XGameUI.h

**Library:** xgameruntime.lib

**Supported platforms:** Windows, Steam Deck, XBOX One family consoles and XBOX Series consoles

## See also

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


## Related topics

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