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

# XUserDeviceAssociationChangedCallback

> XUserDeviceAssociationChangedCallback

# XUserDeviceAssociationChangedCallback

Um retorno de chamada invocado quando a associação entre usuário e dispositivo é alterada.

## Sintaxe

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

### Parâmetros

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

O contexto que o aplicativo define e envia para [XUserRegisterForDeviceAssociationChanged](/pt-BR/reference/system/xuser/functions/xuserregisterfordeviceassociationchanged) durante o registro do retorno de chamada.

*change*   \_In\_\
Tipo: [XUserDeviceAssociationChange\*](/pt-BR/reference/system/xuser/structs/xuserdeviceassociationchange)

Uma estrutura que contém as associações de dispositivo antigas e novas.

### Valor retornado

Tipo: void

## Comentários

Para registrar um retorno de chamada para eventos de alteração de associação de dispositivo do usuário, chame [XUserRegisterForDeviceAssociationChanged](/pt-BR/reference/system/xuser/functions/xuserregisterfordeviceassociationchanged). A função recebe um ponteiro para uma função **XUserDeviceAssociationChangedCallback** como argumento. A função retorna o ponteiro para a função de retorno de chamada.

## Requisitos

**Cabeçalho:** XUser.h

**Biblioteca:** xgameruntime.lib

**Plataformas com suporte:** Windows, consoles da família XBOX One e consoles XBOX Series

## Confira também

[XUser](/pt-BR/reference/system/xuser/xuser_members)

[XUserRegisterForDeviceAssociationChanged](/pt-BR/reference/system/xuser/functions/xuserregisterfordeviceassociationchanged)


## Related topics

- [XUserDeviceAssociationChangedCallback](/reference/system/xuser/functions/xuserdeviceassociationchangedcallback.md)
- [XUserDeviceAssociationChange](/reference/system/xuser/structs/xuserdeviceassociationchange.md)
