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

# XblUserStatisticsGetSingleUserStatisticAsync

> XblUserStatisticsGetSingleUserStatisticAsync

# XblUserStatisticsGetSingleUserStatisticAsync

获取指定用户的指定统计信息。

## 语法

```cpp theme={null}
HRESULT XblUserStatisticsGetSingleUserStatisticAsync(  
         XblContextHandle xblContextHandle,  
         uint64_t xboxUserId,  
         const char* serviceConfigurationId,  
         const char* statisticName,  
         XAsyncBlock* async  
)  
```

### 参数

*xblContextHandle*   \_In\_\
类型：[XblContextHandle](/reference/live/xsapi-c/types_c/handles/xblcontexthandle)

本地用户的 XBOX Live 上下文。

*xboxUserId*   \_In\_\
类型：uint64\_t

要获取统计信息的玩家的 XBOX 用户 ID。

*serviceConfigurationId*   \_In\_z\_\
类型：char\*

标题的服务配置 ID (SCID)。SCID 区分大小写，因此请直接从合作伙伴中心粘贴。

*statisticName*   \_In\_z\_\
类型：char\*

要返回的统计信息的名称。

*async*   \_In\_\
类型：XAsyncBlock\*

此操作的 AsyncBlock。

### 返回值

类型：HRESULT

此 API 操作的 HRESULT 返回代码。

## 备注

完成后调用 [XblUserStatisticsGetSingleUserStatisticResultSize](/reference/live/xsapi-c/user_statistics_c/functions/xbluserstatisticsgetsingleuserstatisticresultsize) 和 [XblUserStatisticsGetSingleUserStatisticResult](/reference/live/xsapi-c/user_statistics_c/functions/xbluserstatisticsgetsingleuserstatisticresult) 以获取结果。

如果使用[基于事件的统计信息](/services/xbox-services/player-data/stats-leaderboards/event-based/live-stats-eb-overview)，统计信息名称将与每个统计信息的[统计信息实例](/services/xbox-services/player-data/stats-leaderboards/event-based/live-stats-eb-overview#defining-stat-instances)一致。如果使用[基于标题托管的统计信息](/services/xbox-services/player-data/stats-leaderboards/title-managed/live-stats-tm-overview)，统计信息名称将与每个统计信息的 ID 一致。

## REST 调用

V1 GET /users/xuid({xuid})/scids/{scid}/stats/{statname1}

## 要求

**头文件：** user\_statistics\_c.h

**库：** Microsoft.Xbox.Services.14x.GDK.C.lib

## 另请参阅

[user\_statistics\_c](/reference/live/xsapi-c/user_statistics_c/user_statistics_c_members)


## Related topics

- [XblUserStatisticsGetSingleUserStatisticResult](/zh-CN/reference/live/xsapi-c/user_statistics_c/functions/xbluserstatisticsgetsingleuserstatisticresult.md)
- [获取基于事件的统计信息](/zh-CN/services/xbox-services/player-data/stats-leaderboards/event-based/how-to/live-getting-eb-stat.md)
- [XblUserStatisticsGetSingleUserStatisticsAsync](/zh-CN/reference/live/xsapi-c/user_statistics_c/functions/xbluserstatisticsgetsingleuserstatisticsasync.md)
- [XblUserStatisticsGetSingleUserStatisticsResult](/zh-CN/reference/live/xsapi-c/user_statistics_c/functions/xbluserstatisticsgetsingleuserstatisticsresult.md)
- [XblUserStatisticsGetSingleUserStatisticsResultSize](/zh-CN/reference/live/xsapi-c/user_statistics_c/functions/xbluserstatisticsgetsingleuserstatisticsresultsize.md)
