> ## 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](/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](/reference/live/xsapi-c/user_statistics_c/user_statistics_c_members)


## Related topics

- [XblStatisticChangedHandler](/zh-CN/reference/live/xsapi-c/user_statistics_c/functions/xblstatisticchangedhandler.md)
- [对 RTA 服务进行编程](/zh-CN/services/xbox-services/fundamentals/rta/how-to/live-programming-rta.md)
- [处理基于事件的统计信息变更](/zh-CN/services/xbox-services/player-data/stats-leaderboards/event-based/how-to/live-handling-eb-stat-change.md)
- [XblUserStatisticsRemoveStatisticChangedHandler](/zh-CN/reference/live/xsapi-c/user_statistics_c/functions/xbluserstatisticsremovestatisticchangedhandler.md)
- [XblUserStatisticsTrackStatistics](/zh-CN/reference/live/xsapi-c/user_statistics_c/functions/xbluserstatisticstrackstatistics.md)
