XblMultiplayerSendInvitesAsync
邀请指定的用户参加会话。 这将导致使用标准邀请文本向每个受邀用户显示通知。 如果用户接受该通知,则将激活游戏。
语法
HRESULT XblMultiplayerSendInvitesAsync(
XblContextHandle xblContext,
const XblMultiplayerSessionReference* sessionReference,
const uint64_t* xuids,
size_t xuidsCount,
uint32_t titleId,
const char* contextStringId,
const char* customActivationContext,
XAsyncBlock* async
)
参数
xblContext _In_
类型:XblContextHandle
本地用户的 Xbox Live 上下文。
sessionReference _In_
类型:XblMultiplayerSessionReference*
一个 XblMultiplayerSessionReference 对象,表示目标用户要被邀请到的会话。
xuids _In_
类型:uint64_t*
将要邀请的 xbox 用户 ID 的列表。
xuidsCount _In_
类型:size_t
xuids 数组的大小。
titleId _In_
类型:uint32_t
受邀用户为加入会话而激活的游戏的 ID。
contextStringId _In_opt_z_
类型:char*
自定义上下文字符串 ID。 在 Xbox Live 引入期间定义此字符串 ID,用于识别标准邀请文本之外的邀请文本。 ID 字符串必须以“///”为前缀。 如果您不希望将自定义字符串添加到邀请,则传递 nullptr。
customActivationContext _In_opt_z_
类型:char*
激活上下文字符串。 游戏定义的字符串,可传递给受邀请的游戏客户端并按需要进行解释。 (可选)
async _In_
类型:XAsyncBlock*
此操作的 AsyncBlock。
返回值
类型:HRESULT
此 API 操作的 HRESULT 返回代码。
要求
头文件:multiplayer_c.h
图书馆: Microsoft.Xbox.Services.14x.GDK.C.lib