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

# Launch

> IXtfApplicationClient::Launch

# IXtfApplicationClient::Launch

使用指定的 AUMID 和命令行参数启动应用。

## 语法

```cpp theme={null}
public:
HRESULT Launch(
         LPCWSTR pszAumid
)  
```

### 参数

*pszAumid*\
类型：LPCWSTR

指向包含要启动的应用的 AUMID 及任何命令行参数（以空格分隔）的字符串的指针；例如 "myAumid arg1 arg2 arg3"。

### 返回值

类型：HRESULT

如果成功则返回 `S_OK`；否则返回 HRESULT 错误代码。

## 备注

此方法启动 `pszAumid` 中指定 AUMID 的应用。此方法类似于 XBOX Tools Framework (XTF) 中包含的应用程序管理 (xbapp.exe) 工具的 `xbapp launch` 命令。有关 `xbapp launch` 命令的详细信息，请参阅[应用程序管理 (xbapp.exe) (NDA 主题)](https://docs.xbox.com/zh-CN/tools/tools-console/commandlinetools/xbapp.md)。

有关游戏生命周期状态的详细信息，请参阅 [XBOX 游戏生命周期 (NDA 主题)](https://docs.xbox.com/zh-CN/build/console-features/console-workflows/xbox-game-life-cycle.md)。

## 要求

**头文件：** xtfapplication.h

**库：** xtfapplication.lib

**支持的平台：** Windows（用于 XBOX 主机工具）

## 另请参阅

[IXtfApplicationClient Interface](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfapplication/classes/IXtfApplicationClient/ixtfapplicationclient-xtfapplication-xbox-microsoft-t.md)\
[XtfApplication](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfapplication/xtfapplication-xbox-microsoft-n.md)


## Related topics

- [XLaunchUri](https://docs.xbox.com/zh-CN/reference/system/xlauncher/functions/xlaunchuri.md)
- [WdLaunchOptions](https://docs.xbox.com/zh-CN/reference/remoting/structs/wdlaunchoptions.md)
- [XLaunchNewGame](https://docs.xbox.com/zh-CN/reference/system/xgame/functions/xlaunchnewgame.md)
- [XLaunchRestartOnCrash](https://docs.xbox.com/zh-CN/reference/system/xgame/functions/xlaunchrestartoncrash.md)
- [WdLaunchMode](https://docs.xbox.com/zh-CN/reference/remoting/enums/wdlaunchmode.md)
