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

# XblMatchmakingCreateMatchTicketAsync

> XblMatchmakingCreateMatchTicketAsync

# XblMatchmakingCreateMatchTicketAsync

Envía una solicitud de emparejamiento al servidor y devuelve el vale de partida con un identificador de vale. Llame a XblMatchmakingCreateMatchTicketResult al finalizar para obtener el resultado.

## Sintaxis

```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  
)  
```

### Parámetros

*xboxLiveContext*   \_In\_\
Tipo: [XblContextHandle](https://docs.xbox.com/es/reference/live/xsapi-c/types_c/handles/xblcontexthandle.md)

Contexto de XBOX Live para el usuario local.

*ticketSessionReference*   \_In\_\
Tipo: [XblMultiplayerSessionReference](https://docs.xbox.com/es/reference/live/xsapi-c/multiplayer_c/structs/xblmultiplayersessionreference.md)

La sesión multijugador que se va a usar para la partida.

*matchmakingServiceConfigurationId*   \_In\_\
Tipo: char\*

El identificador de configuración de servicio para la partida.

*hopperName*   \_In\_\
Tipo: char\*

El nombre del hopper.

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

El tiempo máximo de espera para que los jugadores se unan a la sesión.

*preserveSession*   \_In\_\
Tipo: [XblPreserveSessionMode](https://docs.xbox.com/es/reference/live/xsapi-c/matchmaking_c/enums/xblpreservesessionmode.md)

Indica si se debe conservar la sesión.

*ticketAttributesJson*   \_In\_\
Tipo: char\*

Los atributos del vale para la sesión. (Opcional)

*asyncBlock*   \_In\_\
Tipo: XAsyncBlock\*

El AsyncBlock de esta operación.

### Valor devuelto

Tipo: HRESULT

Código de retorno HRESULT para esta operación de API.

## Comentarios

El objeto de vale de partida contiene información devuelta por el servidor, como el identificador del vale y el tiempo de espera, y también contiene copias de los datos especificados por el título del objeto de datos del vale.

## Llamada REST

Llama a V103 POST /serviceconfigs/{serviceConfigId}/hoppers/{hopperName}

## Requisitos

**Encabezado:** matchmaking\_c.h

**Biblioteca:** Microsoft.Xbox.Services.14x.GDK.C.lib

## Consulte también

[matchmaking\_c](https://docs.xbox.com/es/reference/live/xsapi-c/matchmaking_c/matchmaking_c_members.md)


## Related topics

- [XblMatchmakingCreateMatchTicketResult](https://docs.xbox.com/es/reference/live/xsapi-c/matchmaking_c/functions/xblmatchmakingcreatematchticketresult.md)
- [matchmaking_c](https://docs.xbox.com/es/reference/live/xsapi-c/matchmaking_c/matchmaking_c_members.md)
- [Migración de MPSD a PlayFab Multiplayer y MPA](https://docs.xbox.com/es/services/xbox-services/multiplayer/mpsd/concepts/live-mpsd-to-mlp.md)
- [Uso del emparejamiento de SmartMatch](https://docs.xbox.com/es/services/xbox-services/multiplayer/matchmaking/concepts/live-matchmaking-how-tos.md)
- [Configuración del emparejamiento en Partner Center](https://docs.xbox.com/es/services/xbox-services/multiplayer/matchmaking/config/live-matchmaking-config.md)
