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

# XAppCaptureTakeDiagnosticScreenshot

> XAppCaptureTakeDiagnosticScreenshot

# XAppCaptureTakeDiagnosticScreenshot

앱에서 진단 스크린샷을 촬영합니다.

## 구문

```cpp theme={null}
HRESULT XAppCaptureTakeDiagnosticScreenshot(  
         bool gamescreenOnly,  
         XAppCaptureScreenshotFormatFlag captureFlags,  
         const char* filenamePrefix,  
         XAppCaptureDiagnosticScreenshotResult* result  
)  
```

### 매개 변수

*gamescreenOnly*   \_In\_\
형식: bool

게임 화면만 캡처할지 여부를 결정합니다. false로 설정하면 게임 화면 외에 화면상의 키보드와 같은 일부 UI가 캡처될 수 있습니다.

*captureFlags*   \_In\_\
형식: [XAppCaptureScreenshotFormatFlag](/reference/system/xappcapture/enums/xappcapturescreenshotformatflag)

캡처가 SDR 또는 HDR 캡처인지 결정합니다.

*filenamePrefix*   \_In\_opt\_\
형식: char\*

파일 이름에 원하는 접두사(선택 사항)로, 진단 파일 이름의 앞에 추가됩니다.

*result*   \_Out\_\
형식: [XAppCaptureDiagnosticScreenshotResult\*](/reference/system/xappcapture/structs/xappcapturediagnosticscreenshotresult)

결과로 캡처된 스크린샷입니다.

### 반환 값

형식: HRESULT

함수 결과입니다.

## 설명

<Note>이 함수는 시간에 민감한 스레드에서 호출하기에 안전하지 않습니다. 자세한 내용은 [시간에 민감한 스레드](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)를 참조하세요.</Note>

[XAppCaptureTakeScreenshot](/reference/system/xappcapture/functions/xappcapturetakescreenshot)과 달리 이 함수를 호출해도 UI 알림은 트리거되지 않습니다. **XAppCaptureTakeDiagnosticScreenshot**은 [XAppCaptureScreenshotFormatFlag](/reference/system/xappcapture/enums/xappcapturescreenshotformatflag)를 사용하여 화면 캡처가 SDR, HDR 또는 둘 다인지 지정합니다. 그러나 HDR 캡처를 수행하려면 여전히 HDR로 실행 중이어야 합니다. 스크린샷은 게임에서 접근 가능한 파티션에 저장됩니다. [XAppCaptureDiagnosticScreenshotResult](/reference/system/xappcapture/structs/xappcapturediagnosticscreenshotresult)에는 [XAppCaptureScreenshotFile](/reference/system/xappcapture/structs/xappcapturescreenshotfile) 배열이 포함되며, 각 구조체에는 스크린샷 파일 경로가 포함되어 있습니다.

이 함수는 개발 키트에서만 사용할 수 있습니다. 리테일 키트에서는 이 API가 즉시 오류를 반환합니다.

## 요구 사항

**헤더:** XAppCapture.h

**라이브러리:** xgameruntime.lib

**지원되는 플랫폼:** Windows, XBOX One 제품군 콘솔 및 XBOX Series 콘솔

## 개념 설명서

* [시간에 민감한 스레드](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## 함께 보기

[GameDVR 개요](/build/console-features/game-dvr/gamedvr-broadcast)\
[XAppCapture 멤버](/reference/system/xappcapture/xappcapture_members)\
[XAppCaptureDiagnosticScreenshotResult](/reference/system/xappcapture/structs/xappcapturediagnosticscreenshotresult)\
[XAppCaptureScreenshotFormatFlag](/reference/system/xappcapture/enums/xappcapturescreenshotformatflag)\
[XAppCaptureDiagnosticScreenshotResult](/reference/system/xappcapture/structs/xappcapturediagnosticscreenshotresult)\
[XAppCaptureScreenshotFile](/reference/system/xappcapture/structs/xappcapturescreenshotfile)


## Related topics

- [XAppCaptureDiagnosticScreenshotResult](/ko/reference/system/xappcapture/structs/xappcapturediagnosticscreenshotresult.md)
- [XAppCaptureScreenshotFile](/ko/reference/system/xappcapture/structs/xappcapturescreenshotfile.md)
- [XAppCaptureScreenshotFormatFlag](/ko/reference/system/xappcapture/enums/xappcapturescreenshotformatflag.md)
- [XAppCapture](/ko/reference/system/xappcapture/xappcapture_members.md)
- [GDK용 Unity C# API 래퍼](/ko/build/gdk-and-engines/unity/unity-api-wrappers.md)
