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

# 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](https://docs.xbox.com/reference/system/xappcapture/xappcapture_members.md)


## Related topics

- [XAppCaptureLocalResult](https://docs.xbox.com/reference/system/xappcapture/structs/xappcapturelocalresult.md)
- [XAppCaptureRecordTimespan](https://docs.xbox.com/reference/system/xappcapture/functions/xappcapturerecordtimespan.md)
- [XAppCapture (API contents)](https://docs.xbox.com/reference/system/xappcapture/xappcapture_members.md)
- [Using C# wrappers for GDK APIs in your Unity project](https://docs.xbox.com/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XAppCaptureReadLocalStream](https://docs.xbox.com/reference/system/xappcapture/functions/xappcapturereadlocalstream.md)
