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

# XblMultiplayerSessionHostCandidates

> 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](/reference/live/xsapi-c/multiplayer_c/handles/xblmultiplayersessionhandle)

Handle to the multiplayer session.

*deviceTokens*   \_Out\_\
Type: [XblDeviceToken\*\*](/reference/live/xsapi-c/multiplayer_c/structs/xbldevicetoken)

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.14x.GDK.C.lib

## See also

[multiplayer\_c](/reference/live/xsapi-c/multiplayer_c/multiplayer_c_members)


## Related topics

- [Multiplayer tasks](/services/xbox-services/multiplayer/mpsd/how-to/live-mpsd-how-tos.md)
- [XblMultiplayerSessionConstantsSetPeerToHostRequirements](/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayersessionconstantssetpeertohostrequirements.md)
- [XblMultiplayerSessionSetServerConnectionStringCandidates](/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayersessionsetserverconnectionstringcandidates.md)
- [XblMultiplayerManagerGameSessionIsHost](/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagergamesessionishost.md)
- [XblMultiplayerManagerLobbySessionIsHost](/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagerlobbysessionishost.md)
