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

# XGameRuntimeInit

> XGameRuntimeInit

# XGameRuntimeInit

Reference material for XGameRuntimeInit APIs.

## Functions

| Function                                                                                          | Description                       |
| ------------------------------------------------------------------------------------------------- | --------------------------------- |
| [XGameRuntimeInitialize](/reference/system/xgameruntimeinit/functions/xgameruntimeinitialize)     | Initializes the Gaming Runtime.   |
| [XGameRuntimeUninitialize](/reference/system/xgameruntimeinit/functions/xgameruntimeuninitialize) | Uninitializes the Gaming Runtime. |

## Error Codes

The following error codes may be returned by XGameRuntime APIs. For a complete list, see [Error codes](/reference/errorcodes).

| Code                                         | Value      | Description                                                                                                               |
| -------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------- |
| E\_GAMERUNTIME\_NOT\_INITIALIZED             | 0x89240100 | The game runtime is not initialized.                                                                                      |
| E\_GAMERUNTIME\_DLL\_NOT\_FOUND              | 0x89240101 | The game runtime DLL was not found.                                                                                       |
| E\_GAMERUNTIME\_VERSION\_MISMATCH            | 0x89240102 | The game runtime DLL does not support this version of the GDK.                                                            |
| E\_GAMERUNTIME\_WINDOW\_NOT\_FOREGROUND      | 0x89240103 | The operation requires the application window to be in the foreground.                                                    |
| E\_GAMERUNTIME\_SUSPENDED                    | 0x89240104 | The game runtime is in a suspended state.                                                                                 |
| E\_GAMERUNTIME\_UNINITIALIZE\_ACTIVEOBJECTS  | 0x89240105 | The game runtime has active objects at XGameRuntimeUninitialize.                                                          |
| E\_GAMERUNTIME\_MULTIPLAYER\_NOT\_CONFIGURED | 0x89240106 | No multiplayer activity is set on the service for this user on this title.                                                |
| E\_GAMERUNTIME\_OPTIONS\_MISMATCH            | 0x89240109 | The runtime was already initialized with a different set of options. Uninitialize before reinitializing with new options. |
| E\_GAMERUNTIME\_OPTIONS\_NOT\_SUPPORTED      | 0x8924010A | The options passed are not compatible with the game's package. The game config information must match the package.        |
| E\_GAMERUNTIME\_GAMECONFIG\_BAD\_FORMAT      | 0x8924010B | The game config passed to Initialize cannot be parsed.                                                                    |
| E\_GAMERUNTIME\_INVALID\_HANDLE              | 0x8924010C | Handles are not valid for use across runtime initializations.                                                             |

## Conceptual documentation

* [Using C# wrappers for GDK APIs in your Unity project](/build/gdk-and-engines/unity/unity-api-wrappers)

## See also

[System API reference](/reference/system/gc-reference-system-toc)


## Related topics

- [XGameRuntimeInitialize](/reference/system/xgameruntimeinit/functions/xgameruntimeinitialize.md)
- [XGameRuntimeInitializeWithOptions](/reference/system/xgameruntimeinit/functions/xgameruntimeinitializewithoptions.md)
- [XGameRuntimeUninitialize](/reference/system/xgameruntimeinit/functions/xgameruntimeuninitialize.md)
- [XGameRuntimeOptions](/reference/system/xgameruntimeinit/Structures/xgameruntimeoptions.md)
- [XGameRuntimeGameConfigSource](/reference/system/xgameruntimeinit/Enumerations/xgameruntimegameconfigsource.md)
