PartyManager::Initialize

Initializes the PartyManager object instance.

Syntax

PartyError Initialize(  
    PartyString titleId  
)  

Parameters

titleId   PartyString

The app's PlayFab Title ID.

Return value

PartyError

c_partyErrorSuccess if the call succeeded or an error code otherwise. The human-readable form of the error code can be retrieved via GetErrorMessage().

Remarks

This must be called before any other method, aside from the static methods GetSingleton(), SetMemoryCallbacks(), GetMemoryCallbacks(), SetThreadAffinityMask(), GetThreadAffinityMask(), SerializeNetworkDescriptor(), DeserializeNetworkDescriptor(), SetWorkMode(), and GetWorkMode(). Initialize() cannot be called again without a subsequent Cleanup() call.

Every call to Initialize() should have a corresponding Cleanup() call.

It is recommended for apps using the Xbox One XDK version of the Party library to wait until the platform is ready for networking operations before calling this method. Please refer to the XDK documentation about networking and secure device associations best practices for more information.

Apps using the Microsoft Game Core version of the Party 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.

Apps using the Microsoft Game Core version of the Party library must listen for app state notifications via the RegisterAppStateChangeNotification API. When the app is suspended, the app must call PartyManager::Cleanup(). When the app is resumed, the title must wait for the Game Core networking stack to ready and then re-initialize the Party library by calling PartyManager::Initialize().

The provided titleId must be the same Title ID used to acquire the PlayFab Entity IDs and Entity Tokens that will be passed to CreateLocalUser().

Requirements

Header: Party.h

See also

PartyManager
PartyManager::CreateLocalUser
PartyManager::Cleanup
PartyManager::GetSingleton
PartyManager::SetMemoryCallbacks
PartyManager::GetMemoryCallbacks
PartyManager::SetThreadAffinityMask
PartyManager::GetThreadAffinityMask
PartyManager::SerializeNetworkDescriptor
PartyManager::DeserializeNetworkDescriptor