跳轉到主要內容
從外部伺服器後端使用該玩家的自訂識別碼,安全地登入遊戲用戶端。Server Custom ID 與 Client Custom ID 互斥,不能用來擷取相同的玩家帳戶。

語法

參數

serviceConfigHandle   PFServiceConfigHandle 從 PFServiceConfigCreateHandle 呼叫傳回的 PFServiceConfigHandle。 secretKey   char*
In_z
用於驗證服務要求的遊戲祕密金鑰。 request   PFAuthenticationLoginWithServerCustomIdRequest* 已填入的要求物件。 async   XAsyncBlock*
Inout
用於非同步作業的 XAsyncBlock。

傳回值

類型:HRESULT 此 API 作業的結果代碼。

備註

此 API 適用於 Win32、Linux 和 macOS。非同步工作完成時,請呼叫 PFAuthenticationServerLoginWithServerCustomIdGetResult 以取得結果。

需求

標頭: PFAuthentication.h

另請參閱

PFAuthentication 成員
最後修改於 2026年10月6日