> ## 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 的應用程式。此方法類似於應用程式管理 (xbapp.exe) 工具中的 `xbapp launch` 命令，該工具隨附於 XBOX Tools Framework (XTF) 中。如需 `xbapp launch` 命令的詳細資訊，請參閱[應用程式管理 (xbapp.exe) (NDA 主題)](https://docs.xbox.com/zh-TW/tools/tools-console/commandlinetools/xbapp.md)。

如需遊戲生命週期狀態的詳細資訊，請參閱 [XBOX 遊戲生命週期 (NDA 主題)](https://docs.xbox.com/zh-TW/build/console-features/console-workflows/xbox-game-life-cycle.md)。

## 需求

**標頭：** xtfapplication.h

**程式庫：** xtfapplication.lib

**支援的平台：** Windows (適用於 XBOX 主機工具)

## 另請參閱

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


## Related topics

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