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

# XtfCreateDebugMonitorClient

> XtfCreateDebugMonitorClient

# XtfCreateDebugMonitorClient

初始化 [IXtfDebugMonitorClient](/zh-TW/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-t) 介面的新執行個體。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
HRESULT XtfCreateDebugMonitorClient(
         LPCWSTR pszAddress,
         REFIID riid,
         void **ppvObject
)  
```

<a id="ID4EL" />

### 參數

*pszAddress*\
類型：LPCWSTR

指向要從中接收偵錯輸出之開發主機的工具 IP 位址的指標。

*riid*\
類型：REFIID

接收新建立之 [IXtfDebugMonitorClient](/zh-TW/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-t) 之執行個體識別碼的指標。

*ppvObject*\
類型：void \*\*

接收新建立之 [IXtfDebugMonitorClient](/zh-TW/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-t) 參考的指標。

<a id="ID4ES" />

### 傳回值

類型：HRESULT

HRESULT 成功或錯誤碼。

<a id="requirements" />

## 備註

[IXtfDebugMonitorClient](/zh-TW/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-t) 介面可讓您接收來自開發主機上遊戲的偵錯輸出。建立用戶端之後，您可以使用其 [start](/zh-TW/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/methods/start-ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m) 和 [stop](/zh-TW/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/methods/stop-ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m) 函式來決定何時接聽來自開發主機的偵錯輸出。此外，您還需要定義 [IXtfDebugMonitorCallback](/zh-TW/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorCallback/ixtfdebugmonitorcallback-xtfdebugmonitor-xbox-microsoft-t)，以便在開發主機有要擷取的輸出時呼叫它。

## 需求

**標頭：** xtfdebugmonitor.h

**程式庫：** xtfdebugmonitor.lib

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

<a id="ID4ETB" />

## 另請參閱

<a id="ID4EVB" />

[XtfDebugMonitor](/zh-TW/reference/tools/xtf/xtfdebugmonitor/xtfdebugmonitor-xbox-microsoft-n)\
[IXtfDebugMonitorClient](/zh-TW/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-t)\
[start](/zh-TW/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/methods/start-ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m)\
[stop](/zh-TW/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/methods/stop-ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m)


## Related topics

- [XtfDebugStringCallback](/zh-TW/reference/tools/xtf/xtfapi/functions/xtfdebugstringcallback-xtfapi-xbox-windows-m.md)
- [XtfDebugStringErrorCallback](/zh-TW/reference/tools/xtf/xtfapi/functions/xtfdebugstringerrorcallback-xtfapi-xbox-windows-m.md)
- [XtfCaptureOutputBegin](/zh-TW/reference/tools/xtf/xtfapi/functions/xtfcaptureoutputbegin-xtfapi-xbox-windows-m.md)
- [XtfCaptureOutputEnd](/zh-TW/reference/tools/xtf/xtfapi/functions/xtfcaptureoutputend-xtfapi-xbox-windows-m.md)
- [IXtfDebugMonitorClient::Start 方法](/zh-TW/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/methods/start-ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m.md)
