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

# XtfCreateDebugMonitorClient

> XtfCreateDebugMonitorClient

# XtfCreateDebugMonitorClient

初始化 [IXtfDebugMonitorClient](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-t.md) 接口的新实例。

## 语法

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

### 参数

*pszAddress*\
类型：LPCWSTR

指向要从中接收调试输出的开发主机的工具 IP 地址的指针。

*riid*\
类型：REFIID

接收新创建的 [IXtfDebugMonitorClient](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-t.md) 的实例标识符的指针。

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

接收对新创建的 [IXtfDebugMonitorClient](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-t.md) 的引用的指针。

### 返回值

类型：HRESULT

HRESULT 成功或错误代码。

## 备注

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

## 要求

**头文件：** xtfdebugmonitor.h

**库：** xtfdebugmonitor.lib

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

## 另请参阅

[XtfDebugMonitor](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfdebugmonitor/xtfdebugmonitor-xbox-microsoft-n.md)\
[IXtfDebugMonitorClient](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-t.md)\
[start](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/methods/start-ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m.md)\
[stop](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/methods/stop-ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m.md)


## Related topics

- [XtfDebugMonitor（API 内容）](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfdebugmonitor/xtfdebugmonitor-xbox-microsoft-n.md)
- [IXtfDebugMonitorClient 接口（接口内容）](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-t.md)
- [XtfDebugStringCallback](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfapi/functions/xtfdebugstringcallback-xtfapi-xbox-windows-m.md)
- [XtfDebugStringErrorCallback](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfapi/functions/xtfdebugstringerrorcallback-xtfapi-xbox-windows-m.md)
- [XtfCaptureOutputEnd](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfapi/functions/xtfcaptureoutputend-xtfapi-xbox-windows-m.md)
