Partager via


XblMultiplayerManagerLobbySessionRemoveLocalUser

Removes the local user from both the lobby session and game session.

Syntax

HRESULT XblMultiplayerManagerLobbySessionRemoveLocalUser(  
         XblUserHandle user  
)  

Parameters

user   _In_
Type: XblUserHandle

The local user to be removed.

Return value

Type: HRESULT

HRESULT return code for this API operation.

Remarks

If there are no local users remaining after this function is called, the title cannot perform any further multiplayer operations. Changes are batched and written to the service when XblMultiplayerManagerDoWork is called.
The result of this function is delivered as a multiplayer event with an event type set to XblMultiplayerEventType::UserRemoved. You can call XblMultiplayerManagerDoWork to retrieve multiplayer events.
After leaving, you can join a different game by calling either XblMultiplayerManagerJoinGame or XblMultiplayerManagerJoinGameFromLobby, or you can re-add the local user by calling XblMultiplayerManagerLobbySessionAddLocalUser.

Requirements

Header: multiplayer_manager_c.h

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

See also

multiplayer_manager_c
XblMultiplayerManagerJoinLobby
XblMultiplayerManagerLobbySessionInviteFriends
XblMultiplayerManagerLobbySessionInviteUsers