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() can't be called again without a subsequent Cleanup() call.

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

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 reinitialize 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(), CreateLocalUserWithEntityType(), and PartyLocalUser::UpdateEntityToken().

Requirements

Header: Party.h

See also

PartyManager
PartyManager::CreateLocalUser
PartyManager::CreateLocalUserWithEntityType
PartyManager::Cleanup
PartyManager::GetSingleton
PartyManager::SetMemoryCallbacks
PartyManager::GetMemoryCallbacks
PartyManager::SetThreadAffinityMask
PartyManager::GetThreadAffinityMask
PartyManager::SerializeNetworkDescriptor
PartyManager::DeserializeNetworkDescriptor
PartyLocalUser::UpdateEntityToken