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

# XAppCaptureCloseScreenshotStream

> XAppCaptureCloseScreenshotStream

Closes a screenshot stream.

## Syntax

```cpp theme={null}
HRESULT XAppCaptureCloseScreenshotStream(  
         XAppCaptureScreenshotStreamHandle handle  
)  
```

### Parameters

*handle*   \_In\_\
Type: XAppCaptureScreenshotStreamHandle

Handle of the screenshot stream to close.

### Return value

Type: HRESULT

Function result.

## Remarks

> [!NOTE]
>
> This function isn't safe to call on a time-sensitive thread. For more information, see [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads).

Use this function to close the screenshot stream opened by [XAppCaptureOpenScreenShotStream](https://docs.xbox.com/reference/system/xappcapture/functions/xappcaptureopenscreenshotstream.md). Failure to close an opened screenshot stream will result in a memory leak. The handle required to close the stream is returned from the [XAppCaptureOpenScreenShotStream](https://docs.xbox.com/reference/system/xappcapture/functions/xappcaptureopenscreenshotstream.md) that originally opened the stream.

## Requirements

**Header:** XAppCapture.h

**Library:** xgameruntime.lib

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

## Conceptual documentation

* [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## See also

[GameDVR Overview](https://docs.xbox.com/build/console-features/game-dvr/gamedvr-broadcast.md)\
[XAppCapture Members](https://docs.xbox.com/reference/system/xappcapture/xappcapture_members.md)\
[XAppCaptureOpenScreenShotStream](https://docs.xbox.com/reference/system/xappcapture/functions/xappcaptureopenscreenshotstream.md)\
[XAppCaptureReadScreenShotStream](https://docs.xbox.com/reference/system/xappcapture/functions/xappcapturereadscreenshotstream.md)\
[XAppCaptureTakeScreenshot](https://docs.xbox.com/reference/system/xappcapture/functions/xappcapturetakescreenshot.md)


## Related topics

- [XAppCaptureOpenScreenshotStream](https://docs.xbox.com/reference/system/xappcapture/functions/xappcaptureopenscreenshotstream.md)
- [XAppCaptureReadScreenshotStream](https://docs.xbox.com/reference/system/xappcapture/functions/xappcapturereadscreenshotstream.md)
- [XAppCaptureScreenshotStream](https://docs.xbox.com/reference/system/xappcapture/structs/xappcapturescreenshotstream.md)
- [XAppCaptureTakeScreenshot](https://docs.xbox.com/reference/system/xappcapture/functions/xappcapturetakescreenshot.md)
- [XAppCapture (API contents)](https://docs.xbox.com/reference/system/xappcapture/xappcapture_members.md)
