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

# XUserUnregisterForDeviceAssociationChanged

> XUserUnregisterForDeviceAssociationChanged

# XUserUnregisterForDeviceAssociationChanged

Cancela o registro de um retorno de chamada de alteração de associação de dispositivo do usuário registrado anteriormente.

## Sintaxe

```cpp theme={null}
bool XUserUnregisterForDeviceAssociationChanged(  
         XTaskQueueRegistrationToken token,  
         bool wait  
)  
```

### Parâmetros

*token*   \
Tipo: [XTaskQueueRegistrationToken](/pt-BR/reference/system/xtaskqueue/structs/xtaskqueueregistrationtoken)

O token que [XUserRegisterForDeviceAssociationChanged](/pt-BR/reference/system/xuser/functions/xuserregisterfordeviceassociationchanged) retorna ao registrar o retorno de chamada.

*wait*   \
Tipo: bool

Especifique **true** para aguardar até que o registro do retorno de chamada seja cancelado; **false** para retornar imediatamente.

### Valor retornado

Tipo: bool

Retorna **true** se o registro do retorno de chamada for cancelado com êxito; caso contrário, **false**.

## Comentários

<Note>Não é seguro chamar esta função em um thread sensível ao tempo. Para obter mais informações, consulte [Threads sensíveis ao tempo](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads).</Note>

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

Para registrar um retorno de chamada que um aplicativo define e invoca quando o ponto de extremidade de áudio padrão é alterado, chame [XUserRegisterForDefaultAudioEndpointUtf16Changed](/pt-BR/reference/system/xuser/functions/xuserregisterfordefaultaudioendpointutf16changed).

Para cancelar o registro de um retorno de chamada de alteração do ponto de extremidade de áudio padrão registrado anteriormente, chame [XUserUnregisterForDefaultAudioEndpointUtf16Changed](/pt-BR/reference/system/xuser/functions/xuserunregisterfordefaultaudioendpointutf16changed).

## Requisitos

**Cabeçalho:** XUser.h

**Biblioteca:** xgameruntime.lib

**Plataformas compatíveis:** Windows, consoles da família XBOX One e consoles XBOX Series

## Documentação conceitual

* [Threads sensíveis ao tempo](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## Confira também

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

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

[XUserRegisterForDefaultAudioEndpointUtf16Changed](/pt-BR/reference/system/xuser/functions/xuserregisterfordefaultaudioendpointutf16changed)

[XUserUnregisterForDefaultAudioEndpointUtf16Changed](/pt-BR/reference/system/xuser/functions/xuserunregisterfordefaultaudioendpointutf16changed)


## Related topics

- [XUserRegisterForDeviceAssociationChanged](/pt-BR/reference/system/xuser/functions/xuserregisterfordeviceassociationchanged.md)
- [XUserRegisterForDefaultAudioEndpointUtf16Changed](/pt-BR/reference/system/xuser/functions/xuserregisterfordefaultaudioendpointutf16changed.md)
- [XTaskQueueRegistrationToken](/pt-BR/reference/system/xtaskqueue/structs/xtaskqueueregistrationtoken.md)
- [XUser](/pt-BR/reference/system/xuser/xuser_members.md)
- [Wrappers de API C# do Unity para o GDK](/pt-BR/build/gdk-and-engines/unity/unity-api-wrappers.md)
