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

# XGameStreamingUnregisterConnectionStateChanged

> XGameStreamingUnregisterConnectionStateChanged

# XGameStreamingUnregisterConnectionStateChanged

Cancela o registro de um [XGameStreamingConnectionStateChangedCallback](/pt-BR/reference/system/xgamestreaming/functions/xgamestreamingconnectionstatechangedcallback) registrado anteriormente.

## Sintaxe

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

### Parâmetros

*token*   \_In\_
Tipo: XTaskQueueRegistrationToken

Token correspondente ao registro de retorno de chamada feito por meio de [XGameStreamingRegisterConnectionStateChanged](/pt-BR/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged).

*wait*   \
Tipo: bool

Se `wait` for definido como true, `XGameStreamingUnregisterConnectionStateChanged` não retornará até que o registro tenha sido revogado e todos os retornos de chamada pendentes tenham sido concluídos.

Se `wait` for definido como false, `XGameStreamingUnregisterConnectionStateChanged` retornará assim que o registro for revogado. Embora nenhum novo retorno de chamada seja entregue, um retorno de chamada em andamento ainda pode estar em execução quando a função retornar.

### Valor retornado

Tipo: bool

Retornará true se o cancelamento do registro tiver sido bem-sucedido ou false se não tiver sido.

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

Esta API pode ser usada para parar de escutar as alterações de conexão dos dispositivos cliente de streaming.

Isso deve ser feito quando o jogo for apenas fazer uma verificação geral de se algum cliente está fazendo streaming, utilizando [XGameStreamingIsStreaming](/pt-BR/reference/system/xgamestreaming/functions/xgamestreamingisstreaming), ou quando não for mais fazer nenhuma otimização da experiência em função dos clientes de streaming.

## Requisitos

**Cabeçalho:** xgamestreaming.h

**Biblioteca:** xgameruntime.lib

**Plataformas com suporte:** 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

[XGameStreamingConnectionStateChangedCallback](/pt-BR/reference/system/xgamestreaming/functions/xgamestreamingconnectionstatechangedcallback)\
[XGameStreamingRegisterConnectionStateChanged](/pt-BR/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged)\
[XGameStreaming](/pt-BR/reference/system/xgamestreaming/xgamestreaming_members)


## Related topics

- [XGameStreamingUnregisterConnectionStateChanged](/reference/system/xgamestreaming/functions/xgamestreamingunregisterconnectionstatechanged.md)
- [XGameStreamingRegisterConnectionStateChanged](/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged.md)
- [XGameStreamingConnectionStateChangedCallback](/reference/system/xgamestreaming/functions/xgamestreamingconnectionstatechangedcallback.md)
- [XGameStreamingConnectionState](/reference/system/xgamestreaming/enums/xgamestreamingconnectionstate.md)
