> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XGameProtocolActivationCallbackXGameProtocol (已淘汰)

> XGameProtocolActivationCallbackXGameProtocol (已淘汰)

# XGameProtocolActivationCallbackXGameProtocol (已淘汰)

> [!NOTE]
>
> 此 API 現已淘汰。請改用 [XGameActivationCallback](https://docs.xbox.com/zh-TW/reference/system/xgameactivation/functions/xgameactivationcallback.md)。

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

## 語法

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

### 參數

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

我們傳遞給 [XGameProtocolRegisterForActivation](https://docs.xbox.com/zh-TW/reference/system/xgameprotocol/functions/xgameprotocolregisterforactivation.md) 的內容。

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

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

### 傳回值

類型：void

## 備註

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

## 需求

**標頭：** XGameProtocol.h

**程式庫：** xgameruntime.lib

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

## 另請參閱

[XGameProtocol 成員](https://docs.xbox.com/zh-TW/reference/system/xgameprotocol/xgameprotocol_members.md)


## Related topics

- [XGameProtocol (已淘汰)](https://docs.xbox.com/zh-TW/reference/system/xgameprotocol/xgameprotocol_members.md)
- [XGameProtocolRegisterForActivation (已淘汰)](https://docs.xbox.com/zh-TW/reference/system/xgameprotocol/functions/xgameprotocolregisterforactivation.md)
- [XGameProtocolUnregisterForActivation (已淘汰)](https://docs.xbox.com/zh-TW/reference/system/xgameprotocol/functions/xgameprotocolunregisterforactivation.md)
- [XGameInviteEventCallback (已淘汰)](https://docs.xbox.com/zh-TW/reference/system/xgameinvite/functions/xgameinviteeventcallback.md)
- [GameInputGuidButtonCallback (已淘汰)](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/functions/gameinputguidebuttoncallback.md)
