> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IXtfConsoleControlClient::GetRunningProcesses

> IXtfConsoleControlClient::GetRunningProcesses

# IXtfConsoleControlClient::GetRunningProcesses

Causes all running processes to be enumerated, invoking a callback for each running process.

<a id="syntaxSection" />

## Syntax

```cpp theme={null}
HRESULT GetRunningProcesses(
         IXtfRunningProcessCallback *pCallback
)  
```

<a id="parametersSection" />

### Parameters

*pCallback*\
Type: IXtfRunningProcessCallback\*

A pointer to the [IXtfRunningProcessCallback](/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfRunningProcessCallback/ixtfrunningprocesscallback) interface, invoked when a running process is discovered.

<a id="retvalSection" />

### Return value

Type: HRESULT

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

<a id="remarksSection" />

## Remarks

This function causes the XBOX Tools Framework (XTF) API to enumerate all of the running processes on the current development console. When a running process is found, the XTF API invokes the [OnFoundProcess](/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfRunningProcessCallback/methods/ixtfrunningprocesscallback_onfoundprocess) callback function of the [IXtfRunningProcessCallback](/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfRunningProcessCallback/ixtfrunningprocesscallback) interface implemented in your app and specified in `pCallback`. The XTF API passes a pointer to an [XTFPROCESSINFO](/reference/tools/xtf/xtfconsolecontrol/structs/xtfprocessinfo) structure, describing the running process, when it invokes your implemented `OnFoundProcess` function.

<Note>Memory for the [XTFPROCESSINFO](/reference/tools/xtf/xtfconsolecontrol/structs/xtfprocessinfo) structure is owned by the XBOX Tools Framework (XTF) API and is invalidated after each invocation of your [IXtfRunningProcessCallback::OnFoundProcess](/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfRunningProcessCallback/methods/ixtfrunningprocesscallback_onfoundprocess) callback function. You must copy the information in the structure if you need it for later use.</Note>

<Note>To get the list of processes running in the title partition you need to append `/title` to the address given in [XtfCreateConsoleClient](/reference/tools/xtf/xtfconsolecontrol/functions/xtfcreateconsolecontrolclient-xtfconsolecontrol-xbox-microsoft-m) when creating the [IXtfConsoleControlClient](/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/ixtfconsolecontrolclient) instance, otherwise this function will return the list of processes running in the system partition.</Note>

For more information about listing running processes using XBOX Tools Framework (XTF), see [Process list (xbtlist.exe) (NDA topic)](/tools/tools-console/commandlinetools/xbtlist).

<a id="requirementsSection" />

## Requirements

**Header:** xtfconsolecontrol.h

**Library:** xtfconsolecontrol.lib

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

<a id="seealsoSection" />

## See also

[IXtfConsoleControlClient](/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/ixtfconsolecontrolclient)\
[XtfConsoleControl](/reference/tools/xtf/xtfconsolecontrol/xtfconsolecontrol_members)


## Related topics

- [IXtfRunningProcessCallback](/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfRunningProcessCallback/ixtfrunningprocesscallback.md)
- [IXtfRunningProcessCallback::OnFoundProcess](/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfRunningProcessCallback/methods/ixtfrunningprocesscallback_onfoundprocess.md)
- [XTFPROCESSINFO](/reference/tools/xtf/xtfconsolecontrol/structs/xtfprocessinfo.md)
- [IXtfConsoleControlClient](/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/ixtfconsolecontrolclient.md)
- [IXtfConsoleControlClient::GenerateStackDump](/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/methods/ixtfconsolecontrolclient_generatestackdump.md)
