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

# PFMatchmakingTicketSetCustomContext

> Asocia un valor de contexto personalizado opcional del tamaño de un puntero a un vale de emparejamiento de PlayFab Multiplayer para su posterior recuperación por parte de la aplicación.

Configura un valor de contexto opcional y personalizado del tamaño de un puntero con este objeto de vale.

## Sintaxis

```cpp theme={null}
HRESULT PFMatchmakingTicketSetCustomContext(  
    PFMatchmakingTicketHandle ticket,  
    void* customContext  
)  
```

### Parámetros

**`ticket`**   PFMatchmakingTicketHandle

El identificador del vale de emparejamiento.

**`customContext`**   void\*\
*opcional*

Un valor arbitrario del tamaño de un puntero que se almacena con el objeto de jugador.

### Valor devuelto

Tipo: HRESULT

`S_OK` si la configuración del contexto personalizado se realizó correctamente o un código de error en caso contrario. La forma legible del código de error se puede recuperar mediante [PFMultiplayerGetErrorMessage()](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmultiplayer/functions/pfmultiplayergeterrormessage).

## Comentarios

El contexto personalizado se usa normalmente como un "atajo" que simplifica el acceso a la memoria local específica del título asociada al vale de emparejamiento sin necesidad de una búsqueda de asignación. El valor se recupera mediante el método [PFMatchmakingTicketGetCustomContext()](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/functions/pfmatchmakingticketgetcustomcontext). <br /><br /> La biblioteca trata cualquier valor configurado como opaco y solo es válido en el dispositivo local; no se transmite a través de la red.

## Requisitos

**Encabezado:** PFMatchmaking.h

## Consulte también

[Miembros de PFMatchmaking](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/pfmatchmaking_members)\
[PFMatchmakingTicketGetCustomContext](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/functions/pfmatchmakingticketgetcustomcontext)


## Related topics

- [PFMatchmakingTicketGetCustomContext](/es/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/functions/pfmatchmakingticketgetcustomcontext.md)
- [Notas de la versión del SDK de C++ de PlayFab Multiplayer](/es/services/playfab/multiplayer/lobby/lobby-matchmaking-sdks/lobby-and-matchmaking-release-notes.md)
- [Información general de la API de C/C++ de PFMultiplayer - PFMatchmaking.h](/es/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/pfmatchmaking_members.md)
- [XblMatchmakingCreateMatchTicketAsync](/es/reference/live/xsapi-c/matchmaking_c/functions/xblmatchmakingcreatematchticketasync.md)
- [PFMatchmakingTicketCompletedStateChange](/es/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/structs/pfmatchmakingticketcompletedstatechange.md)
