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

# XLaunchRestartOnCrash

> XLaunchRestartOnCrash

# XLaunchRestartOnCrash

Reinicia automáticamente el juego cuando la instancia del juego actualmente en ejecución termina de forma anómala debido a un bloqueo.

## Sintaxis

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

### Parámetros

*args*   \_In\_opt\_z\_\
Tipo: char\*

Los argumentos aplicables específicos del juego con los que se debe reiniciar el juego.

*reserved*   \_In\_\
Tipo: uint32\_t

Reservado. Debe establecerse en 0.

### Valor devuelto

Tipo: HRESULT

Código HRESULT de éxito o de error.

## Comentarios

Al igual que [XLaunchNewGame](https://docs.xbox.com/es/reference/system/xgame/functions/xlaunchnewgame.md), **XLaunchRestartOnCrash** garantiza que solo se ejecute un ejecutable del juego
a la vez. El estado interno que determina si se debe iniciar un nuevo ejecutable cuando se detecta un bloqueo
está vinculado a la duración de la instancia actual del juego. Las instancias del juego reiniciadas también deben llamar
de nuevo a **XLaunchRestartOnCrash** si se sigue deseando el comportamiento de reinicio.

\[!NOTE] Si un título llama a **XLaunchRestartOnCrash** y más tarde a
[XLaunchNewGame](https://docs.xbox.com/es/reference/system/xgame/functions/xlaunchnewgame.md) y posteriormente se bloquea antes de que se inicie el nuevo juego, el juego
que realiza la llamada se reiniciará en lugar del nuevo inicio especificado mediante [XLaunchNewGame](https://docs.xbox.com/es/reference/system/xgame/functions/xlaunchnewgame.md).

\[!NOTE] Esta API no está pensada para usarse en escenarios comerciales y devolverá E\_NOTIMPL
si se invoca en una consola que no sea un kit de desarrollo.

## Requisitos

**Encabezado:** XGame.h

**Biblioteca:** xgameruntime.lib

**Plataformas compatibles:** consolas de la familia XBOX One y consolas XBOX Series

## Consulte también

[XGame](https://docs.xbox.com/es/reference/system/xgame/xgame_members.md)


## Related topics

- [XGame (contenido de la API)](https://docs.xbox.com/es/reference/system/xgame/xgame_members.md)
- [Launch](https://docs.xbox.com/es/reference/tools/xtf/xtfapplication/classes/IXtfApplicationClient/methods/launch-ixtfapplicationclient-xtfapplication-xbox-microsoft-m.md)
- [crash_detected](https://docs.xbox.com/es/services/playfab/api-references/events/MultiplayerServers/crash-detected.md)
- [Página principal (Dev Home)](https://docs.xbox.com/es/tools/tools-console/devhome/devhome-home.md)
- [CrashDetectedEventPayload](https://docs.xbox.com/es/services/playfab/api-references/events/data-types/crashdetectedeventpayload.md)
