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

# XGameProtocolUnregisterForActivation (已淘汰)

> XGameProtocolUnregisterForActivation (已淘汰)

# XGameProtocolUnregisterForActivation (已淘汰)

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

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

## 語法

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

### 參數

*token*   \_In\_\
類型：[XTaskQueueRegistrationToken](/zh-TW/reference/system/xtaskqueue/structs/xtaskqueueregistrationtoken)

[XGameInviteRegisterForEvent](/zh-TW/reference/system/xgameinvite/functions/xgameinviteregisterforevent) 傳回的權杖。

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

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

### 傳回值

類型：bool

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

## 備註

<Note>在時間敏感的執行緒上呼叫此函式並不安全。如需</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 成員](/zh-TW/reference/system/xgameprotocol/xgameprotocol_members)


## Related topics

- [XGameProtocolUnregisterForActivation (deprecated)](/reference/system/xgameprotocol/functions/xgameprotocolunregisterforactivation.md)
- [XGameProtocolUnregisterForActivation (en desuso)](/es/reference/system/xgameprotocol/functions/xgameprotocolunregisterforactivation.md)
- [XGameProtocol (deprecated)](/reference/system/xgameprotocol/xgameprotocol_members.md)
- [XGameActivation](/reference/system/xgameactivation/xgameactivation_members.md)
