> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XblMultiplayerWriteSessionResult

> XblMultiplayerWriteSessionResult

Gets the result of a XblMultiplayerWriteSessionAsync operation.

## Syntax

```cpp theme={null}
HRESULT XblMultiplayerWriteSessionResult(  
         XAsyncBlock* async,  
         XblMultiplayerSessionHandle* handle  
)  
```

### Parameters

*async*   \_Inout\_\
Type: XAsyncBlock\*

The AsyncBlock for this operation.

*handle*   \_Out\_\
Type: [XblMultiplayerSessionHandle\*](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_c/handles/xblmultiplayersessionhandle.md)

Passes back a handle to a new instance of a local multiplayer session object. The XblMultiplayerSessionHandle must be released by the caller by calling [XblMultiplayerSessionCloseHandle](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayersessionclosehandle.md). Use XblMultiplayerSession\* APIs to get session data from the handle. If the updated session object is not needed, passing nullptr will cause the new multiplayer session object to be cleaned up immediately.

### Return value

Type: HRESULT

HRESULT return code for this API operation. It will be a failure HRESULT if there was a network error or failure HTTP status code unless its a 412 (Precondition Failed). A 412 returns success since the service also returns latest session state, so you must call XblMultiplayerSessionWriteStatus() to get the write status and call XblMultiplayerSession\* APIs to get session data from the handle.

## Remarks

Note that if you leave a session that you are the last member of and the sessionEmptyTimeout is equal to 0, then the session will be deleted immediately. Call XblMultiplayerSessionWriteStatus() to get the write status.

## Requirements

**Header:** multiplayer\_c.h

**Library:** Microsoft.Xbox.Services.142.C.lib or Microsoft.Xbox.Services.143.C.lib

## See also

[multiplayer\_c](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_c/multiplayer_c_members.md)


## Related topics

- [XblMultiplayerWriteSessionAsync](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayerwritesessionasync.md)
- [Multiplayer tasks](https://docs.xbox.com/services/xbox-services/multiplayer/mpsd/how-to/live-mpsd-how-tos.md)
- [multiplayer_c (contents)](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_c/multiplayer_c_members.md)
- [XblMultiplayerWriteSessionByHandleResult](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayerwritesessionbyhandleresult.md)
- [XblMultiplayerQuerySessionsResult](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayerquerysessionsresult.md)
