> ## 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 (已淘汰)

> XGameProtocolActivationCallbackXGameProtocol (已淘汰)

# XGameProtocolActivationCallbackXGameProtocol (已淘汰)

<Info>此 API 現已淘汰。請改用 [XGameActivationCallback](/zh-TW/reference/system/xgameactivation/functions/xgameactivationcallback)。</Info>

應用程式為通訊協定啟用事件定義的回呼。

## 語法

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

### 參數

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

我們傳遞給 [XGameProtocolRegisterForActivation](/zh-TW/reference/system/xgameprotocol/functions/xgameprotocolregisterforactivation) 的內容。

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

用來叫用通訊協定啟用的 URI。遊戲可以剖析此 URI，以判斷傳遞給遊戲的參數。

### 傳回值

類型：void

## 備註

若要註冊遊戲邀請事件的回呼，請呼叫
[XGameProtocolRegisterForActivation](/zh-TW/reference/system/xgameprotocol/functions/xgameprotocolregisterforactivation)。若要取消註冊通訊協定
啟用的回呼，請呼叫 [XGameProtocolUnregisterForEvent](/zh-TW/reference/system/xgameprotocol/functions/xgameprotocolunregisterforactivation)。

## 需求

**標頭：** XGameProtocol.h

**程式庫：** xgameruntime.lib

**支援的平台：** Windows、XBOX One 系列主機和 XBOX Series 主機

## 另請參閱

[XGameProtocol 成員](/zh-TW/reference/system/xgameprotocol/xgameprotocol_members)


## Related topics

- [XGameProtocolActivationCallbackXGameProtocol (deprecated)](/reference/system/xgameprotocol/functions/xgameprotocolactivationcallback.md)
- [XGameProtocolActivationCallbackXGameProtocol (en desuso)](/es/reference/system/xgameprotocol/functions/xgameprotocolactivationcallback.md)
- [XGameProtocolRegisterForActivation (deprecated)](/reference/system/xgameprotocol/functions/xgameprotocolregisterforactivation.md)
- [XGameProtocolUnregisterForActivation (deprecated)](/reference/system/xgameprotocol/functions/xgameprotocolunregisterforactivation.md)
