> ## 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 matchmaking au serveur et renvoie le ticket de match avec un ID de ticket. Appelez XblMatchmakingCreateMatchTicketResult une fois l'opération terminée 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/reference/live/xsapi-c/types_c/handles/xblcontexthandle)

Contexte XBOX Live de l'utilisateur local.

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

Session multijoueur à utiliser pour le match.

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

ID de configuration de service pour le match.

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

Nom de la trémie (hopper).

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

Durée maximale d'attente pour que les joueurs rejoignent la session.

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

Indique si la session doit être conservée.

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

Attributs de 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 match contient des informations renvoyées par le serveur, telles que l'ID de 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

Appelle 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/reference/live/xsapi-c/matchmaking_c/matchmaking_c_members)


## Related topics

- [XblMatchmakingCreateMatchTicketAsync](/reference/live/xsapi-c/matchmaking_c/functions/xblmatchmakingcreatematchticketasync.md)
- [XblMatchmakingCreateMatchTicketResult](/reference/live/xsapi-c/matchmaking_c/functions/xblmatchmakingcreatematchticketresult.md)
