> ## 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](/zh-TW/reference/live/xsapi-c/types_c/handles/xblcontexthandle)

本機使用者的 XBOX Live 內容。

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

要取得統計資料之玩家的 XBOX 使用者識別碼。

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

遊戲的服務設定識別碼 (SCID)。SCID 會區分大小寫，因此請直接從 Partner Center 貼上。

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

要傳回的統計資料名稱。

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

此作業的 AsyncBlock。

### 傳回值

類型：HRESULT

此 API 作業的 HRESULT 傳回碼。

## 備註

完成時呼叫 [XblUserStatisticsGetSingleUserStatisticResultSize](/zh-TW/reference/live/xsapi-c/user_statistics_c/functions/xbluserstatisticsgetsingleuserstatisticresultsize) 和 [XblUserStatisticsGetSingleUserStatisticResult](/zh-TW/reference/live/xsapi-c/user_statistics_c/functions/xbluserstatisticsgetsingleuserstatisticresult) 以取得結果。

如果使用[以事件為基礎的統計資料](/zh-TW/services/xbox-services/player-data/stats-leaderboards/event-based/live-stats-eb-overview)，統計資料名稱會與每個統計資料的[統計資料執行個體](/zh-TW/services/xbox-services/player-data/stats-leaderboards/event-based/live-stats-eb-overview#defining-stat-instances)一致。如果使用[遊戲管理的統計資料](/zh-TW/services/xbox-services/player-data/stats-leaderboards/title-managed/live-stats-tm-overview)，統計資料名稱會與每個統計資料的識別碼一致。

## REST 呼叫

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

## 需求

**標頭：** user\_statistics\_c.h

**程式庫：** Microsoft.Xbox.Services.14x.GDK.C.lib

## 另請參閱

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


## Related topics

- [XblUserStatisticsGetSingleUserStatisticResult](/zh-TW/reference/live/xsapi-c/user_statistics_c/functions/xbluserstatisticsgetsingleuserstatisticresult.md)
- [取得事件型統計資料](/zh-TW/services/xbox-services/player-data/stats-leaderboards/event-based/how-to/live-getting-eb-stat.md)
- [XblUserStatisticsGetSingleUserStatisticsAsync](/zh-TW/reference/live/xsapi-c/user_statistics_c/functions/xbluserstatisticsgetsingleuserstatisticsasync.md)
- [XblUserStatisticsGetSingleUserStatisticsResult](/zh-TW/reference/live/xsapi-c/user_statistics_c/functions/xbluserstatisticsgetsingleuserstatisticsresult.md)
- [XblUserStatisticsGetSingleUserStatisticResultSize](/zh-TW/reference/live/xsapi-c/user_statistics_c/functions/xbluserstatisticsgetsingleuserstatisticresultsize.md)
