> ## 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 (deprecated)

> XGameProtocolUnregisterForActivation (deprecated)

# XGameProtocolUnregisterForActivation (deprecated)

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

取消注册协议激活的回调。

## Syntax

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

### Parameters

*token*   \_In\_\
类型：[XTaskQueueRegistrationToken](/reference/system/xtaskqueue/structs/xtaskqueueregistrationtoken)

[XGameInviteRegisterForEvent](/reference/system/xgameinvite/functions/xgameinviteregisterforevent) 返回的令牌。

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

等待挂起的事件回调完成。

### Return value

类型：bool

如果 *wait* 为 false 且取消注册正在挂起，则返回 false。否则返回 true。

## Remarks

<Note>此函数在时间敏感型线程上调用是不安全的。有关详细</Note>
信息，请参阅[时间敏感型线程](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)。

## Requirements

**头文件：** XGameProtocol.h

**库：** xgameruntime.lib

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

## See also

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


## Related topics

- [XGameProtocolActivationCallbackXGameProtocol (deprecated)](/zh-CN/reference/system/xgameprotocol/functions/xgameprotocolactivationcallback.md)
- [XGameProtocolRegisterForActivation (deprecated)](/zh-CN/reference/system/xgameprotocol/functions/xgameprotocolregisterforactivation.md)
- [XGameProtocol (deprecated)](/zh-CN/reference/system/xgameprotocol/xgameprotocol_members.md)
- [XGameActivation](/zh-CN/reference/system/xgameactivation/xgameactivation_members.md)
- [XGameInviteUnregisterForEvent (deprecated)](/zh-CN/reference/system/xgameinvite/functions/xgameinviteunregisterforevent.md)
