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

# XblAddServiceCallRoutedHandler

> XblAddServiceCallRoutedHandler

# XblAddServiceCallRoutedHandler

注册以接收所有服务调用通知。

## 语法

```cpp theme={null}
XblFunctionContext XblAddServiceCallRoutedHandler(  
         XblCallRoutedHandler handler,  
         void* context  
)  
```

### 参数

*handler*   \_In\_\
类型：XblCallRoutedHandler

要调用的事件处理程序函数。

*context*   \_In\_opt\_\
类型：void\*

要传回处理程序的调用方上下文。

### 返回值

类型：XblFunctionContext

可用于取消注册事件处理程序的 XblFunctionContext。

## 要求

**头文件：** xbox\_live\_global\_c.h

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

## 另请参阅

[xbox\_live\_global\_c](/reference/live/xsapi-c/xbox_live_global_c/xbox_live_global_c_members)


## Related topics

- [HCAddCallRoutedHandler](/zh-CN/reference/live/httpclient/httpclient/functions/hcaddcallroutedhandler.md)
- [XblRemoveServiceCallRoutedHandler](/zh-CN/reference/live/xsapi-c/xbox_live_global_c/functions/xblremoveservicecallroutedhandler.md)
- [XblServiceCallRoutedArgs](/zh-CN/reference/live/xsapi-c/xbox_live_global_c/structs/xblservicecallroutedargs.md)
- [HCRemoveCallRoutedHandler](/zh-CN/reference/live/httpclient/httpclient/functions/hcremovecallroutedhandler.md)
- [HCAddWebSocketRoutedHandler](/zh-CN/reference/live/httpclient/httpclient/functions/hcaddwebsocketroutedhandler.md)
