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

# XGameRuntimeInit (API contents)

> XGameRuntimeInit

Reference material for XGameRuntimeInit APIs.

## Functions

| Function | Description |
| - | - |
| [XGameRuntimeInitialize](https://docs.xbox.com/reference/system/xgameruntimeinit/functions/xgameruntimeinitialize.md) | Initializes the Gaming Runtime. |
| [XGameRuntimeUninitialize](https://docs.xbox.com/reference/system/xgameruntimeinit/functions/xgameruntimeuninitialize.md) | Uninitializes the Gaming Runtime. |

## Error Codes

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

| 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](https://docs.xbox.com/build/gdk-and-engines/unity/unity-api-wrappers.md)

## See also

[System API reference](https://docs.xbox.com/reference/system/gc-reference-system-toc.md)


## Related topics

- [XGameRuntimeFeature (API contents)](https://docs.xbox.com/reference/system/xgameruntimefeature/xgameruntimefeature_members.md)
- [XGameRuntimeTypes (API contents)](https://docs.xbox.com/reference/system/xgameruntimetypes/xgameruntimetypes_members.md)
- [XGameRuntimeInitialize](https://docs.xbox.com/reference/system/xgameruntimeinit/functions/xgameruntimeinitialize.md)
- [XGameRuntimeInitializeWithOptions](https://docs.xbox.com/reference/system/xgameruntimeinit/functions/xgameruntimeinitializewithoptions.md)
- [XGameRuntimeOptions](https://docs.xbox.com/reference/system/xgameruntimeinit/Structures/xgameruntimeoptions.md)
