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

# XAppCaptureStopUserRecord

> XAppCaptureStopUserRecord

# XAppCaptureStopUserRecord

Stop an ongoing user recording started via [XAppCaptureStartUserRecord](/reference/system/xappcapture/functions/xappcapturestartuserrecord) and specified by the inputted ID. Users will receive a toast to indicate a recording has been saved and the recording will be accessible by the user. Windows support for this API will be added in a future release.

## Syntax

```cpp theme={null}
HRESULT XAppCaptureStopUserRecord(
    const char* localId,
    XAppCaptureUserRecordingResult* result
)
```

### Parameters

*localId* \_In\_\
Type: const char\*

Handle representing the user requesting the recording.

*result* \_Out\_\
Type: [XAppCaptureUserRecordingResult](/reference/system/xappcapture/structs/xappcaptureuserrecordingresult)\*

On successful function completion, contains information for the recorded clip.

### Return value

Type: HRESULT

Function result. See [XAppCapture Error Codes](/reference/system/xappcapture/xappcapture_errors) for non-`S_OK` return values.

## Remarks

Assumes localIdOfUserRecording holds a local ID returned from [XAppCaptureStartUserRecord](/reference/system/xappcapture/functions/xappcapturestartuserrecord).

<Note>If this API is not called before the recording hits its maximum time limit, the recording will be stopped and deleted (not saved). Calling this API to stop the recording after the time limit has passed will return an error code.</Note>

```cpp theme={null}
XAppCaptureUserRecordingResult userRecording = { 0 };

if (FAILED_LOG(XAppCaptureStopUserRecord(localIdOfUserRecording, &userRecording)))
{
    return;
}

appLog.AddLog("Recording stopped: Start timestamp: %llu, Duration (ms): %llu, File Size (bytes): %llu, Width: %d, Height: %d, Encoding: %d, Color Format: %d\n",
    userRecording.clipStartTimestamp, userRecording.durationInMilliseconds, userRecording.fileSizeInBytes, userRecording.width, userRecording.height, userRecording.encoding, userRecording.colorFormat);
```

## Requirements

**Header:** XAppCapture.h

**Library:** xgameruntime.lib

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

## See also

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


## Related topics

- [XAppCaptureStartUserRecord](/reference/system/xappcapture/functions/xappcapturestartuserrecord.md)
- [XAppCaptureUserRecordingResult](/reference/system/xappcapture/structs/xappcaptureuserrecordingresult.md)
- [XAppCapture](/reference/system/xappcapture/xappcapture_members.md)
- [XAppCaptureCancelUserRecord](/reference/system/xappcapture/functions/xappcapturecanceluserrecord.md)
- [XAppCapture Error Codes](/reference/system/xappcapture/xappcapture_errors.md)
