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

在找到執行中的處理序時呼叫。

<a id="syntaxSection" />

## 語法

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

<a id="parametersSection" />

### 參數

*pProcessData*\
類型：LPCXTFPROCESSINFO

指向 [XTFPROCESSINFO](/zh-TW/reference/tools/xtf/xtfconsolecontrol/structs/xtfprocessinfo) 結構的指標，該結構包含執行中處理序的相關資訊。

<a id="retvalSection" />

### 傳回值

類型：HRESULT

如果成功，則傳回 `S_OK`；否則傳回 HRESULT 錯誤碼。

<a id="remarksSection" />

## 備註

[IXtfConsoleControlClient::GetRunningProcesses](/zh-TW/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/methods/ixtfconsolecontrolclient_getrunningprocesses) 會針對在開發主機上找到的每個執行中處理序叫用此回呼函式。此函式會接收指向 [XTFPROCESSINFO](/zh-TW/reference/tools/xtf/xtfconsolecontrol/structs/xtfprocessinfo) 結構的指標，該結構包含執行中處理序的處理序識別碼和處理序映像檔案名稱。如需使用 XBOX Tools Framework (XTF) 列出執行中處理序的詳細資訊，請參閱[處理序清單 (xbtlist.exe) (NDA 主題)](/zh-TW/tools/tools-console/commandlinetools/xbtlist)。

<Note>[XTFPROCESSINFO](/zh-TW/reference/tools/xtf/xtfconsolecontrol/structs/xtfprocessinfo) 結構的記憶體由 XBOX Tools Framework (XTF) API 擁有，並會在每次叫用此回呼函式之後失效。如果您之後需要使用結構中的資訊，必須先複製這些資訊。</Note>

<a id="requirementsSection" />

## 需求

**標頭：** xtfconsolecontrol.h

**程式庫：** xtfconsolecontrol.lib

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

<a id="seealsoSection" />

## 另請參閱

[IXtfRunningProcessCallback](/zh-TW/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfRunningProcessCallback/ixtfrunningprocesscallback)\
[XtfConsoleControl](/zh-TW/reference/tools/xtf/xtfconsolecontrol/xtfconsolecontrol_members)\
[XBOX Tools Framework 原生 API 參考](/zh-TW/reference/tools/xtf/atoc-xtf-native)


## Related topics

- [IXtfConsoleControlClient::GetRunningProcesses](/zh-TW/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/methods/ixtfconsolecontrolclient_getrunningprocesses.md)
- [XTFPROCESSINFO](/zh-TW/reference/tools/xtf/xtfconsolecontrol/structs/xtfprocessinfo.md)
- [IXtfRunningProcessCallback](/zh-TW/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfRunningProcessCallback/ixtfrunningprocesscallback.md)
- [XtfGetTitleProcessMemoryReports](/zh-TW/reference/tools/xtf/xtfapi/functions/xtfgettitleprocessmemoryreports-xtfapi-xbox-windows-m.md)
- [Create Build With Process Based Server](/api-reference/multiplayerserver/create-build-with-process-based-server.md)
