Skip to main content

XAppCaptureTakeScreenshot

Takes a screenshot.

Syntax

Parameters

requestingUser   _In_
Type: XUserHandle
Handle representing the user requesting the screenshot. result   _Out_
Type: XAppCaptureTakeScreenshotResult*
Results of the screenshot returned.

Return value

Type: HRESULT Function result.

Remarks

This function isn’t safe to call on a time-sensitive thread. For more information, see Time-sensitive threads.
[!NOTE] This function isn’t supported on XBOX Game Streaming. See the Requirements section below to see which platforms support it.
[!NOTE] Older screenshots will be deleted when allotted space is filled to make room for new screenshots. Use PLS (Persistent Local Storage), connected storage (e.g. XGameSave or XGameSaveFiles), or a similar storage system in order to retain screenshots for a set period of time.
XAppCaptureTakeScreenshot takes a screenshot as if the user triggered it. This will show a toast and save the game screenshot. If the game is running in SDR, a single file is generated. If the game is running in HDR, two files are generated, one in HDR and one in SDR format. The screenshot(s) may be uploaded automatically to XBOX Live depending on the user preference. Once the screenshot was taken successfully, the resulting file can be read by opening the screenshot stream with XAppCaptureOpenScreenShotStream and reading the screenshot with XAppCaptureReadScreenshotStream. Both of these function will require that you use the local Id returned in the XAppCaptureTakeScreenshotResult returned from this function.

Requirements

Header: XAppCapture.h Library: xgameruntime.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consoles

Conceptual documentation

See also

GameDVR Overview
XAppCapture Members
XAppCaptureOpenScreenShotStream
XAppCaptureReadScreenShotStream
XAppCaptureCloseScreenshotStream
XAppCaptureTakeScreenshotResult
Last modified on August 20, 2026