> ## 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.

# XAppCaptureCloseLocalStream

> XAppCaptureCloseLocalStream

# XAppCaptureCloseLocalStream

Closes and deletes the specified recording stream.

## Syntax

```cpp theme={null}
HRESULT XAppCaptureCloseLocalStream(
  XAppCaptureLocalStreamHandle handle
)
```

### Parameters

*handle* \_In\_\
Type: XAppCaptureLocalStreamHandle

Handle to the recording stream to close.

### Return value

Type: HRESULT

Function result.

## Remarks

Only two recordings are allowed at any given time, and once two recordings are created any further recording will return a failure until **XAppCaptureCloseLocalStream** is called on one of the streams.

## Requirements

**Header:** XAppCapture.h

**Library:** xgameruntime.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## See also

[XAppCapture members](/reference/system/xappcapture/xappcapture_members)


## Related topics

- [XAppCaptureLocalResult](/reference/system/xappcapture/structs/xappcapturelocalresult.md)
- [XAppCaptureRecordTimespan](/reference/system/xappcapture/functions/xappcapturerecordtimespan.md)
- [XAppCapture](/reference/system/xappcapture/xappcapture_members.md)
- [Unity C# API wrappers for the GDK](/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XAppCaptureReadLocalStream](/reference/system/xappcapture/functions/xappcapturereadlocalstream.md)
