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

# XtfCreateRemoteRunClient

> XtfCreateRemoteRunClient Method

# XtfCreateRemoteRunClient Method

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

## 语法

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

### 参数

*pszAddress*\
类型：LPCWSTR

指向要用于新 [IXtfRemoteRunClient](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunClient/interfaces/ixtfremoterunclient.md) 的开发主机的工具 IP 地址的指针。

*riid*\
类型：REFIID

接收新创建的 [IXtfRemoteRunClient](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunClient/interfaces/ixtfremoterunclient.md) 实例标识符的指针。

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

接收对新创建的 [IXtfRemoteRunClient](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunClient/interfaces/ixtfremoterunclient.md) 的引用的指针。

### 返回值

类型：HRESULT

操作的结果。

## 备注

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

## 要求

**头文件：** xtfremoterun.h

**库：** xtfremoterun.lib

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

## 另请参阅

[IXtfRemoteRunClient](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunClient/interfaces/ixtfremoterunclient.md)\
[IXtfRemoteRunClient::Run](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunClient/methods/ixtfremoterunclient_run.md)\
[IXtfRemoteRunCallback Interface](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunCallback/interfaces/ixtfremoteruncallback.md)


## Related topics

- [XtfRemoteRun 成员（API 内容）](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfremoterun/xtfremoterun_members.md)
- [IXtfRemoteRunClient 接口（接口内容）](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunClient/interfaces/ixtfremoterunclient.md)
- [Run](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunClient/methods/ixtfremoterunclient_run.md)
- [IXtfRemoteRunCallback 接口（接口内容）](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunCallback/interfaces/ixtfremoteruncallback.md)
- [Input](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunCallback/methods/ixtfremoteruncallback_input.md)
