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

# XGameProtocolActivationCallbackXGameProtocol (deprecated)

> XGameProtocolActivationCallbackXGameProtocol (deprecated)

# XGameProtocolActivationCallbackXGameProtocol (deprecated)

<Info>此 API 现已弃用。请改用 [XGameActivationCallback](/reference/system/xgameactivation/functions/xgameactivationcallback)。</Info>

应用程序为协议激活事件定义的回调。

## Syntax

```cpp theme={null}
typedef void CALLBACK XGameProtocolActivationCallback(
    _In_opt_ void* context,
    _In_ const char* protocolUri
    );
```

### Parameters

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

传递给 [XGameProtocolRegisterForActivation](/reference/system/xgameprotocol/functions/xgameprotocolregisterforactivation) 的上下文。

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

用于调用协议激活的 URI。游戏可以解析该 URI 以确定传递给游戏的参数。

### Return value

类型：void

## Remarks

若要为游戏邀请事件注册回调，请调用
[XGameProtocolRegisterForActivation](/reference/system/xgameprotocol/functions/xgameprotocolregisterforactivation)。若要取消注册协议激活的回调，请调用 [XGameProtocolUnregisterForEvent](/reference/system/xgameprotocol/functions/xgameprotocolunregisterforactivation)。

## Requirements

**头文件：** XGameProtocol.h

**库：** xgameruntime.lib

**受支持的平台：** Windows、XBOX One 系列主机和 XBOX Series 主机

## See also

[XGameProtocol members](/reference/system/xgameprotocol/xgameprotocol_members)


## Related topics

- [XGameProtocol (deprecated)](/zh-CN/reference/system/xgameprotocol/xgameprotocol_members.md)
- [XGameProtocolRegisterForActivation (deprecated)](/zh-CN/reference/system/xgameprotocol/functions/xgameprotocolregisterforactivation.md)
- [XGameProtocolUnregisterForActivation (deprecated)](/zh-CN/reference/system/xgameprotocol/functions/xgameprotocolunregisterforactivation.md)
- [XGameActivation](/zh-CN/reference/system/xgameactivation/xgameactivation_members.md)
- [XGameActivationCallback](/zh-CN/reference/system/xgameactivation/functions/xgameactivationcallback.md)
