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

> XGameProtocolUnregisterForActivation (deprecated)

# XGameProtocolUnregisterForActivation (deprecated)

> [!NOTE]
>
> 此 API 现已弃用。请改用 [XGameActivationUnregisterForEvent](https://docs.xbox.com/zh-CN/reference/system/xgameactivation/functions/xgameactivationunregisterforevent.md)。

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

## Syntax

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

### Parameters

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

[XGameInviteRegisterForEvent](https://docs.xbox.com/zh-CN/reference/system/xgameinvite/functions/xgameinviteregisterforevent.md) 返回的令牌。

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

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

### Return value

类型：bool

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

## Remarks

\[!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](https://docs.xbox.com/zh-CN/reference/system/xgameprotocol/xgameprotocol_members.md)


## Related topics

- [XGameProtocolActivationCallbackXGameProtocol (deprecated)](https://docs.xbox.com/zh-CN/reference/system/xgameprotocol/functions/xgameprotocolactivationcallback.md)
- [XGameProtocolRegisterForActivation (deprecated)](https://docs.xbox.com/zh-CN/reference/system/xgameprotocol/functions/xgameprotocolregisterforactivation.md)
- [XGameProtocol (deprecated)](https://docs.xbox.com/zh-CN/reference/system/xgameprotocol/xgameprotocol_members.md)
- [XGameActivation（API 内容）](https://docs.xbox.com/zh-CN/reference/system/xgameactivation/xgameactivation_members.md)
- [XGameInviteUnregisterForEvent (deprecated)](https://docs.xbox.com/zh-CN/reference/system/xgameinvite/functions/xgameinviteunregisterforevent.md)
