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

# XblMatchmakingCreateMatchTicketAsync

> XblMatchmakingCreateMatchTicketAsync

# XblMatchmakingCreateMatchTicketAsync

Envoie une demande de jumelage au serveur et retourne le ticket de partie avec un identifiant de ticket. Appelez XblMatchmakingCreateMatchTicketResult à la fin de l'opération pour obtenir le résultat.

## Syntaxe

```cpp theme={null}
HRESULT XblMatchmakingCreateMatchTicketAsync(  
         XblContextHandle xboxLiveContext,  
         XblMultiplayerSessionReference ticketSessionReference,  
         const char* matchmakingServiceConfigurationId,  
         const char* hopperName,  
         const uint64_t ticketTimeout,  
         XblPreserveSessionMode preserveSession,  
         const char* ticketAttributesJson,  
         XAsyncBlock* asyncBlock  
)  
```

### Paramètres

*xboxLiveContext*   \_In\_\
Type : [XblContextHandle](/fr-CA/reference/live/xsapi-c/types_c/handles/xblcontexthandle)

Contexte XBOX Live pour l'utilisateur local.

*ticketSessionReference*   \_In\_\
Type : [XblMultiplayerSessionReference](/fr-CA/reference/live/xsapi-c/multiplayer_c/structs/xblmultiplayersessionreference)

Session multijoueur à utiliser pour la partie.

*matchmakingServiceConfigurationId*   \_In\_\
Type : char\*

Identifiant de configuration de service pour la partie.

*hopperName*   \_In\_\
Type : char\*

Nom de la trémie (hopper).

*ticketTimeout*   \_In\_\
Type : uint64\_t

Délai maximal d'attente pour que les joueurs rejoignent la session.

*preserveSession*   \_In\_\
Type : [XblPreserveSessionMode](/fr-CA/reference/live/xsapi-c/matchmaking_c/enums/xblpreservesessionmode)

Indique si la session doit être conservée.

*ticketAttributesJson*   \_In\_\
Type : char\*

Attributs du ticket pour la session. (Facultatif)

*asyncBlock*   \_In\_\
Type : XAsyncBlock\*

AsyncBlock pour cette opération.

### Valeur de retour

Type : HRESULT

Code de retour HRESULT pour cette opération d'API.

## Remarques

L'objet ticket de partie contient des informations retournées par le serveur, comme l'identifiant du ticket et le temps d'attente, ainsi que des copies des données spécifiées par le titre provenant de l'objet de données du ticket.

## Appel REST

Calls V103 POST /serviceconfigs/{serviceConfigId}/hoppers/{hopperName}

## Configuration requise

**En-tête :** matchmaking\_c.h

**Bibliothèque :** Microsoft.Xbox.Services.14x.GDK.C.lib

## Voir aussi

[matchmaking\_c](/fr-CA/reference/live/xsapi-c/matchmaking_c/matchmaking_c_members)


## Related topics

- [XblMatchmakingCreateMatchTicketResult](/fr-CA/reference/live/xsapi-c/matchmaking_c/functions/xblmatchmakingcreatematchticketresult.md)
- [Utilisation du matchmaking SmartMatch](/fr-CA/services/xbox-services/multiplayer/matchmaking/concepts/live-matchmaking-how-tos.md)
- [Passer de MPSD à PlayFab Multiplayer et MPA](/fr-CA/services/xbox-services/multiplayer/mpsd/concepts/live-mpsd-to-mlp.md)
- [Configuration du matchmaking dans Partner Center](/fr-CA/services/xbox-services/multiplayer/matchmaking/config/live-matchmaking-config.md)
- [Tâches multijoueurs](/fr-CA/services/xbox-services/multiplayer/mpsd/how-to/live-mpsd-how-tos.md)
