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

# XblMultiplayerSessionHostCandidates

> XblMultiplayerSessionHostCandidates

Host candidates are an ordered list of device tokens, ordered by preference as specified by XblMultiplayerMetrics in the session constants.

## Syntax

```cpp theme={null}
HRESULT XblMultiplayerSessionHostCandidates(  
         XblMultiplayerSessionHandle handle,  
         const XblDeviceToken** deviceTokens,  
         size_t* deviceTokensCount  
)  
```

### Parameters

*handle*   \_In\_\
Type: [XblMultiplayerSessionHandle](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_c/handles/xblmultiplayersessionhandle.md)

Handle to the multiplayer session.

*deviceTokens*   \_Out\_\
Type: [XblDeviceToken\*\*](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_c/structs/xbldevicetoken.md)

Passes back a pointer to the array of candidate device tokens. The memory for the pointer will remain valid for the life of the XblMultiplayerSessionHandle object until it is closed.

*deviceTokensCount*   \_Out\_\
Type: size\_t\*

Passes back the size of the deviceTokens array.

### Return value

Type: HRESULT

HRESULT return code for this API operation.

## Requirements

**Header:** multiplayer\_c.h

**Library:** Microsoft.Xbox.Services.142.C.lib or Microsoft.Xbox.Services.143.C.lib

## See also

[multiplayer\_c](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_c/multiplayer_c_members.md)


## Related topics

- [Multiplayer tasks](https://docs.xbox.com/services/xbox-services/multiplayer/mpsd/how-to/live-mpsd-how-tos.md)
- [multiplayer_c (contents)](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_c/multiplayer_c_members.md)
- [XblMultiplayerSessionConstantsSetPeerToHostRequirements](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayersessionconstantssetpeertohostrequirements.md)
- [XblMultiplayerSessionSetServerConnectionStringCandidates](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayersessionsetserverconnectionstringcandidates.md)
- [XblMultiplayerManagerGameSessionIsHost](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagergamesessionishost.md)
