Skip to main content

XGameProtocolRegisterForActivation (deprecated)

此 API 现已弃用。请改用 XGameActivationRegisterForEvent
为协议激活注册回调。

Syntax

Parameters

queue   _In_opt_
类型:XTaskQueueHandle
用于调度事件回调的任务队列。 context   _In_opt_
类型:void*
传递给事件回调的上下文。 callback   _In_
类型:XGameProtocolActivationCallback*
事件回调函数。 token   _Out_
类型:XTaskQueueRegistrationToken*
来自任务队列的令牌,表示此次注册。使用该令牌取消注册协议激活的回调。

Return value

类型:HRESULT HRESULT 成功或错误代码。 有关错误代码的列表,请参阅错误代码

Remarks

此函数在时间敏感型线程上调用是不安全的。有关详细
信息,请参阅时间敏感型线程
XGameProtocolRegisterForActivation 函数使用 XGameProtocolActivationCallback 作为参数。 若要取消注册游戏邀请事件的回调,请调用 XGameProtocolUnregisterForEvent

Requirements

头文件: XGameProtocol.h 库: xgameruntime.lib 受支持的平台: Windows、XBOX One 系列主机和 XBOX Series 主机

See also

XGameProtocol members
最后修改于 2026年8月24日