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

# XtfCaptureOutputBegin

> XtfCaptureOutputBegin

# XtfCaptureOutputBegin

디버그 출력 캡처를 시작합니다.

## Syntax

```cpp theme={null}
void XtfCaptureOutputBegin(
         PCWSTR address,
         XtfDebugStringCallback debugStringCallback,
         XtfDebugStringErrorCallback debugStringErrorCallback,
         PVOID context,
         PHANDLE hListen
)  
```

### Parameters

*address*\
Type: PCWSTR

\[in] 콘솔의 IP 주소입니다.

*debugStringCallback*\
Type: [XtfDebugStringCallback](https://docs.xbox.com/ko/reference/tools/xtf/xtfapi/functions/xtfdebugstringcallback-xtfapi-xbox-windows-m.md)

\[in, optional] 각 출력 디버그 문자열에 대해 호출되는 선택적 콜백입니다.

*debugStringErrorCallback*\
Type: [XtfDebugStringErrorCallback](https://docs.xbox.com/ko/reference/tools/xtf/xtfapi/functions/xtfdebugstringerrorcallback-xtfapi-xbox-windows-m.md)

\[in, optional] 발생한 각 오류에 대해 호출되는 선택적 콜백입니다.

*context*\
Type: PVOID

\[in, optional] 콜백 함수에 전달되는 개체에 대한 포인터입니다. 이 개체를 통해 각 콜백 호출을 이 캡처 세션과 연결할 수 있습니다.

*hListen*\
Type: PHANDLE

\[out] 이 캡처 세션을 나타내는 핸들입니다.

### Return value

없음.

## Remarks

이 함수와 [XtfCaptureOutputEnd](https://docs.xbox.com/ko/reference/tools/xtf/xtfapi/functions/xtfcaptureoutputend-xtfapi-xbox-windows-m.md) 함수를 사용하여 개발 콘솔에서 일반 디버그 출력 캡처를 시작하고 중지합니다. 개발 콘솔의 특정 프로세스 ID에서 디버그 출력을 모니터링하려면 디버그 모니터 클라이언트를 사용합니다. 디버그 모니터 클라이언트 사용에 대한 자세한 내용은 [XtfCreateDebugMonitorClient](https://docs.xbox.com/ko/reference/tools/xtf/xtfdebugmonitor/methods/xtfcreatedebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m.md)를 참조하세요.

캡처 세션의 디버그 문자열을 캡처하려면 `debugStringCallback`에 `XtfDebugStringCallback` 함수를 구현하고 지정해야 합니다. 마찬가지로, 캡처 세션 중에 발생한 오류를 캡처하려면 `debugStringErrorCallback`에 `XtfDebugStringErrorCallback` 함수를 구현하고 지정해야 합니다. 다만 두 콜백 함수 모두 필수는 아닙니다.

디버그 출력 캡처를 중지하고 캡처 세션과 연결된 리소스를 해제하려면 [XtfCaptureOutputEnd](https://docs.xbox.com/ko/reference/tools/xtf/xtfapi/functions/xtfcaptureoutputend-xtfapi-xbox-windows-m.md)를 호출하고 해당 캡처 세션에 대해 `hListen`에 반환된 핸들을 지정합니다.

> [!NOTE]
>
> 캡처 세션을 중지하려면 `XtfCaptureOutputEnd`를 호출해야 합니다. 그렇지 않으면 캡처 세션이 고아 상태가 되고 캡처 세션과 연결된 리소스가 해제되지 않아 메모리 누수가 발생합니다.

## Requirements

**Header:** xtfapi.h

**Library:** XtfApi.lib

**Supported platforms:** Windows(XBOX 콘솔 도구용)

## See also

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


## Related topics

- [XtfCaptureOutputEnd](https://docs.xbox.com/ko/reference/tools/xtf/xtfapi/functions/xtfcaptureoutputend-xtfapi-xbox-windows-m.md)
- [추가 Xtf API (API 콘텐츠)](https://docs.xbox.com/ko/reference/tools/xtf/xtfapi/atoc-xtfapi.md)
- [XtfDebugStringErrorCallback](https://docs.xbox.com/ko/reference/tools/xtf/xtfapi/functions/xtfdebugstringerrorcallback-xtfapi-xbox-windows-m.md)
- [XtfDebugStringCallback](https://docs.xbox.com/ko/reference/tools/xtf/xtfapi/functions/xtfdebugstringcallback-xtfapi-xbox-windows-m.md)
- [IXtfDebugMonitorClient 인터페이스 (인터페이스 콘텐츠)](https://docs.xbox.com/ko/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-t.md)
