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

# XtfCreateRemoteRunClient Method

> XtfCreateRemoteRunClient Method

# XtfCreateRemoteRunClient Method

使用指定的地址初始化 IXtfRemoteRunClient 接口的新实例。

<a id="syntaxSection" />

## 语法

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

<a id="ID4EG" />

<a id="parametersSection" />

### 参数

*pszAddress*\
类型：LPCWSTR

指向要用于新 [IXtfRemoteRunClient](/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunClient/interfaces/ixtfremoterunclient) 的开发主机的工具 IP 地址的指针。

*riid*\
类型：REFIID

接收新创建的 [IXtfRemoteRunClient](/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunClient/interfaces/ixtfremoterunclient) 实例标识符的指针。

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

接收对新创建的 [IXtfRemoteRunClient](/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunClient/interfaces/ixtfremoterunclient) 的引用的指针。

<a id="ID4EN" />

<a id="retvalSection" />

### 返回值

类型：HRESULT

操作的结果。

<a id="remarksSection" />

## 备注

[Remote Run Client](/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunClient/interfaces/ixtfremoterunclient) 是在你的主机上调用可执行文件的类。\
此类可用于执行各种可执行文件，从测试工具到常见的命令行指令（如 *kill process*）。
创建运行客户端后，你可以使用其 [Run](/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunClient/methods/ixtfremoterunclient_run) 函数运行可执行文件。
要运行需要输入或输出的可执行文件，你需要使用 [IXtfRemoteRunCallback 的接口](/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunCallback/interfaces/ixtfremoteruncallback)作为 [Run](/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunClient/methods/ixtfremoterunclient_run) 函数的参数。

<a id="requirements" />

## 要求

**头文件：** xtfremoterun.h

**库：** xtfremoterun.lib

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

## 另请参阅

[IXtfRemoteRunClient](/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunClient/interfaces/ixtfremoterunclient)\
[IXtfRemoteRunClient::Run](/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunClient/methods/ixtfremoterunclient_run)\
[IXtfRemoteRunCallback Interface](/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunCallback/interfaces/ixtfremoteruncallback)


## Related topics

- [IXtfRemoteRunClient Interface](/zh-CN/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunClient/interfaces/ixtfremoterunclient.md)
- [IXtfRemoteRunClient::Run Method](/zh-CN/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunClient/methods/ixtfremoterunclient_run.md)
- [IXtfRemoteRunCallback::Input Method](/zh-CN/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunCallback/methods/ixtfremoteruncallback_input.md)
- [IXtfRemoteRunCallback::Output Method](/zh-CN/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunCallback/methods/ixtfremoteruncallback_output.md)
- [IXtfFileIOClient::CreateDirectory Method](/zh-CN/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/createdirectory-ixtffileioclient-xtffileio-xbox-microsoft-m.md)
