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

# XUserDeviceAssociationChangedCallback

> XUserDeviceAssociationChangedCallback

# XUserDeviceAssociationChangedCallback

Una devolución de llamada que se invoca cuando cambia la asociación entre usuario y dispositivo.

## Sintaxis

```cpp theme={null}
void XUserDeviceAssociationChangedCallback(  
         void* context,  
         const XUserDeviceAssociationChange* change  
)  
```

### Parámetros

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

El contexto que la aplicación define y envía a [XUserRegisterForDeviceAssociationChanged](https://docs.xbox.com/es/reference/system/xuser/functions/xuserregisterfordeviceassociationchanged.md) durante el registro de la devolución de llamada.

*change*   \_In\_\
Tipo: [XUserDeviceAssociationChange\*](https://docs.xbox.com/es/reference/system/xuser/structs/xuserdeviceassociationchange.md)

Una estructura que contiene las asociaciones de dispositivos antigua y nueva.

### Valor devuelto

Tipo: void

## Comentarios

Para registrar una devolución de llamada para eventos de cambio de asociación de dispositivos de usuario, llame a [XUserRegisterForDeviceAssociationChanged](https://docs.xbox.com/es/reference/system/xuser/functions/xuserregisterfordeviceassociationchanged.md). La función toma como argumento un puntero a una función **XUserDeviceAssociationChangedCallback**. La función devuelve el puntero a la función de devolución de llamada.

## Requisitos

**Encabezado:** XUser.h

**Biblioteca:** xgameruntime.lib

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

## Consulte también

[XUser](https://docs.xbox.com/es/reference/system/xuser/xuser_members.md)

[XUserRegisterForDeviceAssociationChanged](https://docs.xbox.com/es/reference/system/xuser/functions/xuserregisterfordeviceassociationchanged.md)


## Related topics

- [XUserDeviceAssociationChange](https://docs.xbox.com/es/reference/system/xuser/structs/xuserdeviceassociationchange.md)
- [XUserFindForDevice](https://docs.xbox.com/es/reference/system/xuser/functions/xuserfindfordevice.md)
- [XUserRegisterForDeviceAssociationChanged](https://docs.xbox.com/es/reference/system/xuser/functions/xuserregisterfordeviceassociationchanged.md)
- [¿Cuándo se producen las asociaciones de usuario a mando?](https://docs.xbox.com/es/build/core-features/common/user/users-timing-of-user-to-device-association.md)
- [XUserFindControllerForUserWithUiAsync](https://docs.xbox.com/es/reference/system/xuser/functions/xuserfindcontrollerforuserwithuiasync.md)
