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

# XblUserStatisticsAddStatisticChangedHandler

> XblUserStatisticsAddStatisticChangedHandler

# XblUserStatisticsAddStatisticChangedHandler

註冊統計資料變更通知的事件處理常式。事件處理常式會收到 XblStatisticChangeEventArgs 物件。

## 語法

```cpp theme={null}
XblFunctionContext XblUserStatisticsAddStatisticChangedHandler(  
         XblContextHandle xblContextHandle,  
         XblStatisticChangedHandler handler,  
         void* handlerContext  
)  
```

### 參數

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

本機使用者的 XBOX Live 內容。

*handler*   \_In\_\
類型：XblStatisticChangedHandler

接收通知的回呼函式。

*handlerContext*   \_In\_opt\_\
類型：void\*

要傳回給處理常式的用戶端內容指標。

### 傳回值

類型：XblFunctionContext

可用來取消註冊事件處理常式的 XblFunctionContext 物件。

## 需求

**標頭：** 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

- [XblStatisticChangedHandler](/zh-TW/reference/live/xsapi-c/user_statistics_c/functions/xblstatisticchangedhandler.md)
- [對 RTA 服務進行程式設計](/zh-TW/services/xbox-services/fundamentals/rta/how-to/live-programming-rta.md)
- [處理事件型統計資料變更](/zh-TW/services/xbox-services/player-data/stats-leaderboards/event-based/how-to/live-handling-eb-stat-change.md)
- [XblUserStatisticsRemoveStatisticChangedHandler](/zh-TW/reference/live/xsapi-c/user_statistics_c/functions/xbluserstatisticsremovestatisticchangedhandler.md)
- [XblUserStatisticsTrackStatistics](/zh-TW/reference/live/xsapi-c/user_statistics_c/functions/xbluserstatisticstrackstatistics.md)
