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

# IXtfRunningProcessCallback::OnFoundProcess

> IXtfRunningProcessCallback::OnFoundProcess

# IXtfRunningProcessCallback::OnFoundProcess

Called when a running process is found.

<a id="syntaxSection" />

## Syntax

```cpp theme={null}
HRESULT OnFoundProcess(
         LPCXTFPROCESSINFO pProcessData
)  
```

<a id="parametersSection" />

### Parameters

*pProcessData*\
Type: LPCXTFPROCESSINFO

Pointer to an [XTFPROCESSINFO](/reference/tools/xtf/xtfconsolecontrol/structs/xtfprocessinfo) structure that contains information about the running process.

<a id="retvalSection" />

### Return value

Type: HRESULT

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

<a id="remarksSection" />

## Remarks

This callback function is invoked by [IXtfConsoleControlClient::GetRunningProcesses](/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/methods/ixtfconsolecontrolclient_getrunningprocesses) for each running process found on the development console. This function receives a pointer to an [XTFPROCESSINFO](/reference/tools/xtf/xtfconsolecontrol/structs/xtfprocessinfo) structure that contains the process ID and process image file name of a running process. For more information about listing running processes using XBOX Tools Framework (XTF), see [Process list (xbtlist.exe) (NDA topic)](/tools/tools-console/commandlinetools/xbtlist).

<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 this callback function. You must copy the information in the structure if you need it for later use.</Note>

<a id="requirementsSection" />

## Requirements

**Header:** xtfconsolecontrol.h

**Library:** xtfconsolecontrol.lib

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

<a id="seealsoSection" />

## See also

[IXtfRunningProcessCallback](/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfRunningProcessCallback/ixtfrunningprocesscallback)\
[XtfConsoleControl](/reference/tools/xtf/xtfconsolecontrol/xtfconsolecontrol_members)\
[XBOX Tools Framework native API reference](/reference/tools/xtf/atoc-xtf-native)


## Related topics

- [IXtfConsoleControlClient::GetRunningProcesses](/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/methods/ixtfconsolecontrolclient_getrunningprocesses.md)
- [XTFPROCESSINFO](/reference/tools/xtf/xtfconsolecontrol/structs/xtfprocessinfo.md)
- [IXtfRunningProcessCallback](/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfRunningProcessCallback/ixtfrunningprocesscallback.md)
- [IXtfFindFileCallback::OnFoundFile Method](/reference/tools/xtf/xtffileio/classes/IXtfFindFileCallback/methods/onfoundfile-ixtffindfilecallback-xtffileio-xbox-microsoft-m.md)
- [IXtfConsoleControlClient](/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/ixtfconsolecontrolclient.md)
