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

# Terminate

> IXtfApplicationClient::Terminate

Terminates the app with the specified package moniker.

## Syntax

```cpp theme={null}
public:
HRESULT Terminate(
         LPCWSTR pszPackageMoniker
)  
```

### Parameters

*pszPackageMoniker*\
Type: LPCWSTR

A pointer to the package moniker of the app to terminate.

### Return value

Type: HRESULT

Returns `S_OK` if successful; otherwise, returns an HRESULT error code.

## Remarks

This method terminates the app with the specified package moniker. This method is similar to the `xbapp terminate` command from the Application Management (xbapp.exe) tool, included as part of the XBOX Tools Framework (XTF). For more information about the `xbapp terminate` command, see [Application Management (xbapp.exe) (NDA topic)](https://docs.xbox.com/tools/tools-console/commandlinetools/xbapp.md).

> [!NOTE]
>
> To simulate the termination sequence performed by a development console, suspend the app for at least one second before terminating it. Immediate termination is a non-standard process that should not be used in test scenarios. For more information about game life cycle states, see [XBOX Game Life Cycle (NDA topic)](https://docs.xbox.com/build/console-features/console-workflows/xbox-game-life-cycle.md).

## Requirements

**Header:** xtfapplication.h

**Library:** xtfapplication.lib

**Supported platforms:** Windows (for XBOX console tools)

## See also

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


## Related topics

- [XTaskQueueTerminate](https://docs.xbox.com/reference/system/xtaskqueue/functions/xtaskqueueterminate.md)
- [WdTerminateRemoteGame](https://docs.xbox.com/reference/remoting/functions/wdterminateremotegame.md)
- [XTaskQueueTerminatedCallback](https://docs.xbox.com/reference/system/xtaskqueue/functions/xtaskqueueterminatedcallback.md)
- [ACP_FLOWGRAPH_TERMINATED_REASON](https://docs.xbox.com/reference/audio/acphal/enums/acp_flowgraph_terminated_reason.md)
- [ACP_MESSAGE_FLOWGRAPH_TERMINATED](https://docs.xbox.com/reference/audio/acphal/structs/acp_message_flowgraph_terminated.md)
