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

# IXtfConsoleControlClient::GenerateStackDump

> IXtfConsoleControlClient::GenerateStackDump

# IXtfConsoleControlClient::GenerateStackDump

스택 덤프를 생성합니다.

<a id="syntaxSection" />

## 구문

```cpp theme={null}
HRESULT GenerateStackDump(
         UINT32 ProcessId,
         UINT32 DumpType,
         LPCWSTR ImageName,
         LPBSTR FilePath  
)  
```

<a id="parametersSection" />

### 매개 변수

*ProcessId*\
형식: UINT32

스택 덤프를 생성할 프로세스의 식별자입니다.

*DumpType*\
형식: UINT32

생성할 스택 덤프의 유형입니다. 유효한 덤프 유형은 다음과 같습니다.

| 값 | 설명     |
| - | ------ |
| 0 | Triage |
| 1 | Mini   |
| 2 | Heap   |

*ImageName*\
형식: LPCWSTR

이미지의 이름입니다.

*FilePath*\
형식: LPBSTR

생성된 스택 덤프 파일의 파일 경로를 받는 문자열에 대한 포인터입니다.

<a id="retvalSection" />

### 반환 값

형식: HRESULT

성공하면 `S_OK`를 반환하고, 그렇지 않으면 HRESULT 오류 코드를 반환합니다. 스택 덤프가 완료될 때까지 대기하는 동안 함수가 시간 초과되면 이 함수는 `E_MESSAGE_TIMED_OUT`을 반환합니다.

<a id="remarksSection" />

## 설명

이 함수는 개발 콘솔에서 실행 파일 이미지에 대해 지정된 프로세스에서 스택 덤프를 생성합니다. 스택 덤프는 `FilePath`에 반환된 파일 경로에서 콘솔의 스크래치 드라이브에 파일로 저장됩니다.

스택 덤프에서 캡처되는 정보와 해당 정보를 캡처하는 데 걸리는 시간은 `DumpType`에 지정된 덤프 유형에 따라 다릅니다. 이 함수는 5분 후에 시간 초과됩니다. 함수가 시간 초과되기 전에 콘솔에서 스택 덤프가 반환되지 않으면 이 함수는 `E_MESSAGE_TIMED_OUT`을 반환합니다. 다음 표에서는 각 스택 덤프 유형에서 반환되는 정보를 설명합니다.

| 덤프 유형  | 설명                                                                                                        |
| ------ | --------------------------------------------------------------------------------------------------------- |
| Triage | 모든 스레드의 스택 추적, 활성 OS 핸들, 스레드 정보 및 언로드된 모듈 정보를 수집합니다. Triage 덤프는 개인 식별 정보(PII)가 제거되어 있습니다.                 |
| Mini   | 모든 로드된 모듈의 데이터 세그먼트, 보안 토큰 관련 데이터, 스레드 정보 및 언로드된 모듈 정보를 수집합니다. Mini 덤프는 PII가 제거되지 않습니다.                   |
| Heap   | 게임 OS에서 실행 중인 모든 프로세스와 메모리의 전체 사용자 모드 크래시 덤프를 제공합니다. 이 옵션은 가장 많은 정보를 제공하지만 모든 데이터를 기록하는 데 몇 분이 걸릴 수 있습니다. |

XBOX Tools Framework(XTF)와 같은 사용 가능한 도구 및 자동화 API에 대한 자세한 내용은 [도구 및 자동화 API(NDA 항목)](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/debug/atoc-api-tools-dev-env)를 참조하세요.

<a id="remarks_output" />

### LPBSTR 포인터 처리

이 함수에서 반환된 LPBSTR 포인터 처리에 대한 자세한 내용은 [BSTR에 대한 메모리 할당 및 해제](https://learn.microsoft.com/cpp/atl-mfc-shared/allocating-and-releasing-memory-for-a-bstr?view=vs-2019)를 참조하세요.

<a id="requirementsSection" />

## 요구 사항

**헤더:** xtfconsolecontrol.h

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

**지원 플랫폼:** Windows(XBOX 콘솔 도구용)

<a id="seealsoSection" />

## 함께 보기

[XtfConsoleControl](/reference/tools/xtf/xtfconsolecontrol/xtfconsolecontrol_members)\
[XBOX Tools Framework](/reference/tools/xtf/atoc-xbox-tools-framework)


## Related topics

- [IXtfConsoleControlClient](/ko/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/ixtfconsolecontrolclient.md)
- [IXtfConsoleControlClient::ShutdownConsole](/ko/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/methods/ixtfconsolecontrolclient_shutdownconsole.md)
- [IXtfConsoleControlClient::UpdatesPending](/ko/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/methods/ixtfconsolecontrolclient_updatespending.md)
- [IXtfConsoleControlClient::SetConfigValue](/ko/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/methods/ixtfconsolecontrolclient_setconfigvalue.md)
- [IXtfConsoleControlClient::GetAllSettings](/ko/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/methods/ixtfconsolecontrolclient_getallsettings.md)
