> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XblUserStatisticsGetMultipleUserStatisticsAsync

> XblUserStatisticsGetMultipleUserStatisticsAsync

# XblUserStatisticsGetMultipleUserStatisticsAsync

获取多个用户的统计信息。

## 语法

```cpp theme={null}
HRESULT XblUserStatisticsGetMultipleUserStatisticsAsync(  
         XblContextHandle xblContextHandle,  
         uint64_t* xboxUserIds,  
         size_t xboxUserIdsCount,  
         const char* serviceConfigurationId,  
         const char** statisticNames,  
         size_t statisticNamesCount,  
         XAsyncBlock* async  
)  
```

### 参数

*xblContextHandle*   \_In\_\
类型：[XblContextHandle](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/types_c/handles/xblcontexthandle.md)

本地用户的 XBOX Live 上下文。

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

要获取统计信息的用户 XBOX 用户 ID 列表。

*xboxUserIdsCount*   \_In\_\
类型：size\_t

XBOX 用户 ID 的数量。

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

标题的服务配置 ID (SCID)。SCID 区分大小写，因此请直接从 Partner Center 粘贴。

*statisticNames*   \_In\_\
类型：char\*\*

要查找的统计信息名称集合。

*statisticNamesCount*   \_In\_\
类型：size\_t

统计信息名称的数量。

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

此操作的 AsyncBlock。

### 返回值

类型：HRESULT

此 API 操作的 HRESULT 返回代码。

## 备注

完成后调用 [XblUserStatisticsGetMultipleUserStatisticsResultSize](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/user_statistics_c/functions/xbluserstatisticsgetmultipleuserstatisticsresultsize.md) 和 [XblUserStatisticsGetMultipleUserStatisticsResult](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/user_statistics_c/functions/xbluserstatisticsgetmultipleuserstatisticsresult.md) 以获取结果。仅返回具有值的统计信息。例如，如果请求 3 个统计信息名称但只有 2 个具有值，则服务只返回 2 个统计信息。

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

## REST 调用

V1 POST /batch

## 要求

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

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

## 另请参阅

[user\_statistics\_c](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/user_statistics_c/user_statistics_c_members.md)


## Related topics

- [user_statistics_c](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/user_statistics_c/user_statistics_c_members.md)
- [XblUserStatisticsGetMultipleUserStatisticsResult](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/user_statistics_c/functions/xbluserstatisticsgetmultipleuserstatisticsresult.md)
- [XblUserStatisticsGetMultipleUserStatisticsResultSize](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/user_statistics_c/functions/xbluserstatisticsgetmultipleuserstatisticsresultsize.md)
- [获取基于事件的统计信息](https://docs.xbox.com/zh-CN/services/xbox-services/player-data/stats-leaderboards/event-based/how-to/live-getting-eb-stat.md)
- [XblUserStatisticsGetMultipleUserStatisticsForMultipleServiceConfigurationsAsync](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/user_statistics_c/functions/xbluserstatisticsgetmultipleuserstatisticsformultipleserviceconfigurationsasync.md)
