XblMultiplayerManagerJoinLobby

Joins an Xbox user to a lobby session.

Syntax

HRESULT XblMultiplayerManagerJoinLobby(  
         const char* handleId,  
         XblUserHandle user  
)  

Parameters

handleId   _In_z_
Type: char*

The activity handle for the lobby session.

user   _In_
Type: XblUserHandle

The user handle of the user joining the lobby session.

Return value

Type: HRESULT

HRESULT return code for this API operation.

Remarks

This function joins the Xbox user specified in user to the lobby session specified in handleId. The activity handle for the lobby session is typically retrieved either from a game invite or from the HandleId value of another user's XblMultiplayerActivityDetails, by calling XblMultiplayerGetActivitiesForUsersAsync. For more information about multiplayer activities, see Activities.
The result of this function is delivered as a multiplayer event with an event type set to XblMultiplayerEventType::JoinLobbyCompleted. You can call XblMultiplayerManagerDoWork to retrieve multiplayer events.
When attempting to join a lobby session, the service returns HTTP_E_STATUS_BAD_REQUEST if the server is full.
After joining, you can set the properties for the lobby session by calling XblMultiplayerManagerLobbySessionSetSynchronizedProperties, or you can set the host for the lobby session by calling XblMultiplayerManagerLobbySessionSetSynchronizedHost if the lobby session doesn't already have a host.
You can also send an invite to another user by calling either XblMultiplayerManagerLobbySessionInviteUsers or XblMultiplayerManagerLobbySessionInviteFriends. If you don't need a lobby session, and if you haven't added local users by calling XblMultiplayerManagerLobbySessionAddLocalUser, you can instead call XblMultiplayerManagerJoinGame and specify the list of users to join the game.

Requirements

Header: multiplayer_manager_c.h

Library: Microsoft.Xbox.Services.141.GSDK.C.lib

See also

multiplayer_manager_c
XblMultiplayerManagerJoinability
XblMultiplayerManagerJoinGameFromLobby