> ## 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](/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](/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-t) 的实例标识符的指针。

*ppvObject*\
类型：void \*\*

接收对新创建的 [IXtfDebugMonitorClient](/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-t) 的引用的指针。

<a id="ID4ES" />

### 返回值

类型：HRESULT

HRESULT 成功或错误代码。

<a id="requirements" />

## 备注

[IXtfDebugMonitorClient](/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-t) 接口允许你从开发主机上的游戏接收调试输出。创建客户端后，你可以使用其 [start](/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/methods/start-ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m) 和 [stop](/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/methods/stop-ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m) 函数来决定何时侦听来自开发主机的调试输出。此外，你还需要定义一个 [IXtfDebugMonitorCallback](/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorCallback/ixtfdebugmonitorcallback-xtfdebugmonitor-xbox-microsoft-t)，以便在有来自开发主机的输出需要捕获时进行调用。

## 要求

**头文件：** xtfdebugmonitor.h

**库：** xtfdebugmonitor.lib

**支持的平台：** Windows（适用于 XBOX 主机工具）

<a id="ID4ETB" />

## 另请参阅

<a id="ID4EVB" />

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


## Related topics

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