XLaunchNewGame
Ends the current game, frees any allocated resources, and launches a new game.Syntax
Parameters
exePath _In_z_Type: char* The path and file name of the new game to launch. This path can be either relative to the current directory or an absolute path. Games that need to know the path to the calling executable can call GetModuleFileNameA with a nullptr for the module handle. args _In_opt_z_
Type: char* Any applicable, game-specific arguments with which to launch the new game. defaultUser _In_opt_
Type: XUserHandle The handle of the user launching the new game. If a value isn’t specified, the current user is specified.
Return value
Type: void This function does not return a value or raise exceptions, even if it’s unable to restart the game.Remarks
This function isn’t safe to call on a time-sensitive thread. For more
When this function is called, all previously mounted DLC will get
If a game is suspended after XLaunchNewGame is called but prior to
Memory transferred to the system using XMemTransferMemory (NDA topic) is persisted.
Requirements
Header: XGame.h Library: xgameruntime.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consolesConceptual documentation
See also
XGameUser identity and XUser
XLaunchUri
