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

# XblMultiplayerActivityDeleteActivityAsync

> XblMultiplayerActivityDeleteActivityAsync

# XblMultiplayerActivityDeleteActivityAsync

Clears the multiplayer activity for the local user.

## Syntax

```cpp theme={null}
HRESULT XblMultiplayerActivityDeleteActivityAsync(  
         XblContextHandle xblContext,  
         XAsyncBlock* async  
)  
```

### Parameters

*xblContext*   \_In\_\
Type: [XblContextHandle](/reference/live/xsapi-c/types_c/handles/xblcontexthandle)

XBOX Live context for the local user.

*async*   \_In\_\
Type: XAsyncBlock\*

The `XAsyncBlock` for this operation.

### Return value

Type: HRESULT

HRESULT return code for this API operation.

## Remarks

Titles should delete the activity for a user as soon as they leave the multiplayer activity. <br /><br /> If the title does not delete a user's activity, it is automatically cleared by a presence check. <br /><br /> To get the result of the asynchronous operation, call [XAsyncGetStatus](/reference/system/xasync/functions/xasyncgetstatus) inside the `XAsyncBlock` callback or after `XAsyncBlock` is complete. <br /><br /> To see how this function is used, see "Deleting an activity" in the [Activities](/services/xbox-services/multiplayer/mpa/how-to/live-mpa-client-how-to#activities) section of [Example code for Multiplayer Activity](/services/xbox-services/multiplayer/mpa/how-to/live-mpa-client-how-to). <br /><br /> For more information about multiplayer activities, see [Activities](/services/xbox-services/multiplayer/mpa/concepts/live-mpa-activities).

## REST Call

Calls DELETE /titles/{titleId}/users/{xuid}/activites

## Requirements

**Header:** multiplayer\_activity\_c.h

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

## See also

[multiplayer\_activity\_c](/reference/live/xsapi-c/multiplayer_activity_c/multiplayer_activity_c_members)


## Related topics

- [Example code for Multiplayer Activity](/services/xbox-services/multiplayer/mpa/how-to/live-mpa-client-how-to.md)
- [Moving from MPSD to PlayFab Multiplayer and MPA](/services/xbox-services/multiplayer/mpsd/concepts/live-mpsd-to-mlp.md)
- [XblMultiplayerActivityGetActivityAsync](/reference/live/xsapi-c/multiplayer_activity_c/functions/xblmultiplayeractivitygetactivityasync.md)
- [XblMultiplayerActivitySetActivityAsync](/reference/live/xsapi-c/multiplayer_activity_c/functions/xblmultiplayeractivitysetactivityasync.md)
- [XblMultiplayerActivityGetActivityResult](/reference/live/xsapi-c/multiplayer_activity_c/functions/xblmultiplayeractivitygetactivityresult.md)
