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

# XGameProtocolUnregisterForActivation (已淘汰)

> XGameProtocolUnregisterForActivation (已淘汰)

# XGameProtocolUnregisterForActivation (已淘汰)

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

取消註冊通訊協定啟用的回呼。

## 語法

```cpp theme={null}
STDAPI_(bool) XGameProtocolUnregisterForActivation(
    _In_ XTaskQueueRegistrationToken token,
    _In_ bool wait
    ) noexcept;
```

### 參數

*token*   \_In\_\
類型：[XTaskQueueRegistrationToken](https://docs.xbox.com/zh-TW/reference/system/xtaskqueue/structs/xtaskqueueregistrationtoken.md)

[XGameInviteRegisterForEvent](https://docs.xbox.com/zh-TW/reference/system/xgameinvite/functions/xgameinviteregisterforevent.md) 傳回的權杖。

*wait*   \_In\_\
類型：bool

等候擱置中的事件回呼完成。

### 傳回值

類型：bool

如果 *wait* 為 false 且取消註冊仍在擱置中，則傳回 false。否則傳回 true。

## 備註

\[!NOTE] 在時間敏感的執行緒上呼叫此函式並不安全。如需
詳細資訊，請參閱[時間敏感的執行緒](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)。

## 需求

**標頭：** 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)
- [XGameProtocolActivationCallbackXGameProtocol (已淘汰)](https://docs.xbox.com/zh-TW/reference/system/xgameprotocol/functions/xgameprotocolactivationcallback.md)
- [XGameProtocolRegisterForActivation (已淘汰)](https://docs.xbox.com/zh-TW/reference/system/xgameprotocol/functions/xgameprotocolregisterforactivation.md)
- [XGameInviteUnregisterForEvent (已淘汰)](https://docs.xbox.com/zh-TW/reference/system/xgameinvite/functions/xgameinviteunregisterforevent.md)
- [XGameActivation (API 內容)](https://docs.xbox.com/zh-TW/reference/system/xgameactivation/xgameactivation_members.md)
