XblMultiplayerWriteSessionAsync

Writes a new or updated multiplayer session to the service. The session must have a valid session reference. If it was not created with one, use XblMultiplayerWriteSessionByHandleAsync instead.

Syntax

HRESULT XblMultiplayerWriteSessionAsync(  
         XblContextHandle xblContext,  
         XblMultiplayerSessionHandle multiplayerSession,  
         XblMultiplayerSessionWriteMode writeMode,  
         XAsyncBlock* async  
)  

Parameters

xblContext   _In_
Type: XblContextHandle

Xbox live context for the local user.

multiplayerSession   _In_
Type: XblMultiplayerSessionHandle

A MultiplayerSession object that has been modified with the changes to write.

writeMode   _In_
Type: XblMultiplayerSessionWriteMode

The type of write operation.

async   _Inout_
Type: XAsyncBlock*

The AsyncBlock for this operation.

Return value

Type: HRESULT

HRESULT return code for this API operation.

Remarks

In the async callback, call XblMultiplayerWriteSessionResult() to get a XblMultiplayerSessionHandle handle. Use that handle to call XblMultiplayerSessionWriteStatus() to get the write status. The call to XblMultiplayerWriteSessionAsync() will only fail if the args passed to it are invalid or in very rare cases where it could not start the async task.

REST Call

Calls V105 PUT /serviceconfigs/{serviceConfigurationId}/sessionTemplates/{sessiontemplateName}/sessions/{sessionName}

Requirements

Header: multiplayer_c.h

Library: Microsoft.Xbox.Services.14x.GDK.C.lib

See also

multiplayer_c