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

# XLaunchRestartOnCrash

> XLaunchRestartOnCrash

# XLaunchRestartOnCrash

현재 실행 중인 게임 인스턴스가 크래시로 인해 비정상적으로 종료될 때 게임을 자동으로 다시 시작합니다.

## 구문

```cpp theme={null}
HRESULT XLaunchRestartOnCrash(  
         const char* args,  
         uint32_t reserved  
)  
```

### 매개 변수

*args*   \_In\_opt\_z\_\
형식: char\*

게임을 다시 시작하는 데 사용되는 해당 게임 관련 인수입니다.

*reserved*   \_In\_\
형식: uint32\_t

예약되어 있습니다. 0으로 설정해야 합니다.

### 반환 값

형식: HRESULT

HRESULT 성공 또는 오류 코드입니다.

## 설명

[XLaunchNewGame](/reference/system/xgame/functions/xlaunchnewgame)과 마찬가지로, **XLaunchRestartOnCrash**는 한 번에 하나의 게임 실행 파일만 실행되도록 보장합니다. 크래시가 감지될 때 새 실행 파일을 실행할지를 결정하는 내부 상태는 현재 게임 인스턴스의 수명에 연결됩니다. 다시 시작된 게임 인스턴스에서도 다시 시작 동작이 계속 원하는 경우 **XLaunchRestartOnCrash**를 다시 호출해야 합니다.

<Note>타이틀이 **XLaunchRestartOnCrash**를 호출한 후 나중에</Note>
[XLaunchNewGame](/reference/system/xgame/functions/xlaunchnewgame)을 호출하고 후속으로 새 게임을 시작하기 전에 크래시가 발생하면, 호출 게임이 [XLaunchNewGame](/reference/system/xgame/functions/xlaunchnewgame)을 통해 지정된 새 실행 대신 다시 시작됩니다.

<Note>이 API는 소매 시나리오에서 사용되도록 의도되지 않았으며,</Note>
devkit이 아닌 콘솔에서 호출되면 E\_NOTIMPL을 반환합니다.

## 요구 사항

**헤더:** XGame.h

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

**지원 플랫폼:** XBOX One 계열 콘솔 및 XBOX Series 콘솔

## 함께 보기

[XGame](/reference/system/xgame/xgame_members)


## Related topics

- [XGame](/ko/reference/system/xgame/xgame_members.md)
- [crash_detected](/ko/services/playfab/api-references/events/MultiplayerServers/crash-detected.md)
- [XBOX 인증 개요](/ko/publishing/certification/overview.md)
- [PC 및 모바일 게임용 XBOX Requirement 테스트 케이스](/ko/publishing/certification/pc-policy-tests.md)
- [Crash data 페이지](/ko/tools/tools-console/wdp/windows-device-portal-on-xbox-crash-data.md)
