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

# XNetworkingQueryStatistics

> XNetworkingQueryStatistics

# XNetworkingQueryStatistics

Recupera as estatísticas de rede especificadas em um buffer fornecido pelo chamador.

## Sintaxe

```cpp theme={null}
HRESULT XNetworkingQueryStatistics(  
         XNetworkingStatisticsType statisticsType,  
         XNetworkingStatisticsBuffer* statisticsBuffer
)  
```

### Parâmetros

*statisticsType*   \_In\_\
Tipo: [XNetworkingStatisticsType](/pt-BR/reference/networking/xnetworking/enums/xnetworkingstatisticstype)

O valor enumerado que identifica as estatísticas específicas a serem recuperadas.

*statisticsBuffer*    \_Out\_\
Tipo: [XNetworkingStatisticsBuffer](/pt-BR/reference/networking/xnetworking/structs/xnetworkingstatisticsbuffer)

Um ponteiro para uma estrutura fornecida pelo chamador na qual as estatísticas solicitadas serão gravadas. O campo exato da subestrutura dentro do buffer de união que é gravado depende do tipo de estatística solicitado.

### Valor retornado

Tipo: HRESULT

S\_OK se a recuperação das estatísticas tiver sido bem-sucedida. E\_NOTIMPL se a recuperação do tipo de estatística especificado não tiver suporte na plataforma atual. E\_INVALIDARG se o tipo de estatística especificado não for reconhecido pelo Gaming Runtime.

## Comentários

Essa função recupera um instantâneo das estatísticas relacionadas à rede especificadas no buffer fornecido pelo chamador. Observe que não há garantia de que a maioria das estatísticas informe o mesmo valor em várias chamadas a essa função.

Somente o campo de subestrutura específico da estatística dentro da união do buffer de saída será gravado. Qualquer memória adicional no buffer de saída do chamador que seja definida pela união como um todo, mas que esteja além do fim da subestrutura, não é modificada de forma alguma por essa função.

## Requisitos

**Cabeçalho:** XNetworking.h

**Biblioteca:** xgameruntime.lib

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

## Confira também

[XNetworking](/pt-BR/reference/networking/xnetworking/xnetworking_members)


## Related topics

- [XNetworkingQueryStatistics](/reference/networking/xnetworking/functions/xnetworkingquerystatistics.md)
- [XNetworkingStatisticsBuffer](/reference/networking/xnetworking/structs/xnetworkingstatisticsbuffer.md)
- [XNetworkingStatisticsType](/reference/networking/xnetworking/enums/xnetworkingstatisticstype.md)
- [XNetworking](/reference/networking/xnetworking/xnetworking_members.md)
- [XNetworkingTcpQueuedReceivedBufferUsageStatistics](/reference/networking/xnetworking/structs/xnetworkingtcpqueuedreceivedbufferusagestatistics.md)
