提供票证 ID。
语法
HRESULT PFMatchmakingTicketGetTicketId(
PFMatchmakingTicketHandle ticket,
const char** id
)
参数
ticket
PFMatchmakingTicketHandle
匹配票证的句柄。
id
char**
库分配的输出
票证 ID。
返回值
类型:HRESULT
如果调用成功,则为 S_OK
,否则为错误代码。 可通过 PFMultiplayerGetErrorMessage() 检索错误代码的可读形式。
备注
票证 ID 将为空字符串(如果尚未设置)。 可能在以下一种情况下发生:
- 票证处于
PFMatchmakingTicketStatus::Creating
状态 - 由于未能将票证提交到匹配服务,票证处于
PFMatchmakingTicketStatus::Failed
状态 - 票证在提交到匹配服务之前已取消
要求
标头: PFMatchmaking.h