PFMultiplayerInitialize
Initializes an instance of the PlayFab Multiplayer library.
Syntax
HRESULT PFMultiplayerInitialize(
const char* playFabTitleId,
PFMultiplayerHandle* handle
)
Parameters
playFabTitleId
char*
is null-terminated
The app's PlayFab Title ID.
handle
PFMultiplayerHandle*
library-allocated output
The output handle of the newly initialized PFMultiplayer API instance.
Return value
Type: HRESULT
S_OK
if the call succeeded or an error code otherwise. The human-readable form of the error code can be retrieved via PFMultiplayerGetErrorMessage().
Remarks
This must be called before any other method, aside from PFMultiplayerSetMemoryCallbacks(), and PFMultiplayerSetThreadAffinityMask(). PFMultiplayerInitialize() cannot be called again without a subsequent PFMultiplayerUninitialize() call.
Every call to PFMultiplayerInitialize() should have a corresponding PFMultiplayerUninitialize() call.
Apps using the Microsoft Game Core version of the Multiplayer library will need to wait for the Game Core Networking stack to be initialized prior to calling this method. Determining the status of the network stack can be done using the Game Core XNetworkingGetConnectivityHint API.
The provided playFabTitleId
must be the same PlayFab Title ID used to acquire the PlayFab Entity Keys and Entity Tokens that will be passed to PFMultiplayerSetEntityToken().
Requirements
Header: PFMultiplayer.h
See also
PFMultiplayer members
PFMultiplayerSetEntityToken
PFMultiplayerUninitialize
PFMultiplayerSetMemoryCallbacks
PFMultiplayerSetThreadAffinityMask
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應