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

Gets the count of results from a [XGameUiShowPlayerPickerAsync](/reference/system/xgameui/functions/xgameuishowplayerpickerasync) call.

## Syntax

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

### Parameters

*async*   \_In\_\
Type: [XAsyncBlock\*](/reference/system/xasync/structs/xasyncblock)

A pointer to the [XAsyncBlock](/reference/system/xasync/structs/xasyncblock) that was passed to [XGameUiShowPlayerPickerAsync](/reference/system/xgameui/functions/xgameuishowplayerpickerasync).

*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](/reference/system/xgameui/functions/xgameuishowplayerpickerasync) **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](/reference/system/xgameui/functions/xgameuishowplayerpickerresult).\
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](/reference/system/xgameui/xgameui_members)\
[XGameUiShowPlayerPickerAsync](/reference/system/xgameui/functions/xgameuishowplayerpickerasync)\
[XGameUiShowPlayerPickerResult](/reference/system/xgameui/functions/xgameuishowplayerpickerresult)


## Related topics

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