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

# XGameInviteRegisterForEvent (en desuso)

> XGameInviteRegisterForEvent (en desuso)

# XGameInviteRegisterForEvent (en desuso)

<Info>Esta API está ahora en desuso. Use [XGameActivationRegisterForEvent](/reference/system/xgameactivation/functions/xgameactivationregisterforevent) en su lugar.</Info>

Registra una devolución de llamada para un evento de invitación de juego.

## Sintaxis

```cpp theme={null}
HRESULT XGameInviteRegisterForEvent(  
         XTaskQueueHandle queue,  
         void* context,  
         XGameInviteEventCallback* callback,  
         XTaskQueueRegistrationToken* token  
)  
```

### Parámetros

*queue*   \_In\_opt\_\
Tipo: XTaskQueueHandle

La cola de tareas que distribuye la devolución de llamada del evento.

*context*   \_In\_opt\_\
Tipo: void\*

El contexto que pasamos a la devolución de llamada del evento.

*callback*   \_In\_\
Tipo: XGameInviteEventCallback\*

La función de devolución de llamada del evento.

*token*   \_Out\_\
Tipo: [XTaskQueueRegistrationToken\*](/reference/system/xtaskqueue/structs/xtaskqueueregistrationtoken)

Un token de la cola de tareas que representa el registro. Use el token para anular el registro de la devolución de llamada para el evento de invitación de juego.

### Valor devuelto

Tipo: HRESULT

Código HRESULT de éxito o de error.\
Para obtener una lista de códigos de error, consulte [Códigos de error](/reference/errorcodes).

## Comentarios

<Note>No es seguro llamar a esta función en un subproceso sensible al tiempo. Para obtener más información, consulte [Subprocesos sensibles al tiempo](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads).</Note>

La función **XGameInviteRegisterForEvent** usa una [XGameInviteEventCallBack](/reference/system/xgameinvite/functions/xgameinviteeventcallback) como argumento.

Para anular el registro de una devolución de llamada para un evento de invitación de juego, llame a [XGameInviteUnregisterForEvent](/reference/system/xgameinvite/functions/xgameinviteunregisterforevent).

Para ver un ejemplo de llamada a esta función, consulte la sección de comentarios del tema [XGameInviteEventCallback](/reference/system/xgameinvite/functions/xgameinviteeventcallback#ID_XGameInviteEventCallback_Remarks).

## Requisitos

**Encabezado:** XGameInvite.h

**Biblioteca:** xgameruntime.lib

**Plataformas compatibles:** Windows, consolas de la familia XBOX One y consolas XBOX Series

## Documentación conceptual

* [Subprocesos sensibles al tiempo](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## Consulte también

[XGameInvite](/reference/system/xgameinvite/xgameinvite_members)

[XGameInviteEventCallBack](/reference/system/xgameinvite/functions/xgameinviteeventcallback)

[XGameInviteUnregisterForEvent](/reference/system/xgameinvite/functions/xgameinviteunregisterforevent)


## Related topics

- [XGameInviteEventCallback (en desuso)](/es/reference/system/xgameinvite/functions/xgameinviteeventcallback.md)
- [XGameInviteUnregisterForEvent (en desuso)](/es/reference/system/xgameinvite/functions/xgameinviteunregisterforevent.md)
- [XGameInvite (en desuso)](/es/reference/system/xgameinvite/xgameinvite_members.md)
- [XGameProtocolRegisterForActivation (en desuso)](/es/reference/system/xgameprotocol/functions/xgameprotocolregisterforactivation.md)
- [XGameProtocolUnregisterForActivation (en desuso)](/es/reference/system/xgameprotocol/functions/xgameprotocolunregisterforactivation.md)
