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

# XtfCaptureOutputEnd

> XtfCaptureOutputEnd

# XtfCaptureOutputEnd

Stop capture of debug output.

<a id="syntaxSection" />

## Syntax

```cpp theme={null}
void XtfCaptureOutputEnd(
         HANDLE hListen
)  
```

<a id="parametersSection" />

### Parameters

*hListen*\
Type: HANDLE

\[in] Listener handle returned by [XtfCaptureOutputBegin](/reference/tools/xtf/xtfapi/functions/xtfcaptureoutputbegin-xtfapi-xbox-windows-m).

<a id="retvalSection" />

### Return value

None.

<a id="remarksSection" />

## Remarks

Use the [XtfCaptureOutputBegin](/reference/tools/xtf/xtfapi/functions/xtfcaptureoutputbegin-xtfapi-xbox-windows-m) function and this function to start and stop capturing general debug output from a development console. If you want to monitor debug output from a specific process ID on a development console, use a debug monitor client. For more information about using a debug monitor client, see [XtfCreateDebugMonitorClient](/reference/tools/xtf/xtfdebugmonitor/methods/xtfcreatedebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m).

Call this function and specify the handle returned in `hListen` from the `XtfCaptureOutputBegin` function to stop capturing debug output and free the resources associated with the capture session.

<Note>You must call this function to stop a capture session. Otherwise, the capture session is orphaned and the resources associated with the capture session are not freed, causing a memory leak.</Note>

<a id="requirements" />

## Requirements

**Header:** xtfapi.h

**Library:** XtfApi.lib

**Supported platforms:** Windows (for XBOX console tools)

<a id="seealsoSection" />

## See also

[IXtfDebugMonitorClient Interface](/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-t)\
[XTF Transport Errors (NDA topic)](/tools/tools-console/commandlinetools/xtf-transport-errors)\
[Additional Xtf APIs](/reference/tools/xtf/xtfapi/atoc-xtfapi)


## Related topics

- [XtfCaptureOutputBegin](/reference/tools/xtf/xtfapi/functions/xtfcaptureoutputbegin-xtfapi-xbox-windows-m.md)
- [XtfCaptureScreenshot](/reference/tools/xtf/xtfconsolecontrol/functions/xtfcapturescreenshot.md)
- [XtfDebugStringCallback](/reference/tools/xtf/xtfapi/functions/xtfdebugstringcallback-xtfapi-xbox-windows-m.md)
- [XtfDebugStringErrorCallback](/reference/tools/xtf/xtfapi/functions/xtfdebugstringerrorcallback-xtfapi-xbox-windows-m.md)
- [PIXEndCapture](/reference/tools/pix3/functions/pixendcapture.md)
