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

# ListUsersEx

> IXtfUserClient::ListUsersEx

# IXtfUserClient::ListUsersEx

返回当前与此主机关联的所有用户的列表。

## 语法

```cpp theme={null}
HRESULT ListUsersEx(  
         XTF_USER_DATA_V2 **ppUserData,  
         UINT32 *pCount  
)  
```

### 参数

\*\**ppUserData*   \
类型：[XTF\_USER\_DATA\_V2](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfuser/structures/xtf_user_data_v2.md)

成功返回时，指向一个 [XTF\_USER\_DATA\_V2](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfuser/structures/xtf_user_data_v2.md) 对象数组，描述当前与该主机关联的用户。

\**pCount*   \
类型：UINT32

成功返回时，*ppUserData* 数组中的元素数量。

### 返回值

类型：HRESULT

HRESULT 成功或错误代码。

## 要求

**头文件：** xtfuser.h

**库：** xtfuser.lib

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

## 另请参阅

[IXtfUserClient 接口](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfuser/classes/IXtfUserClient/ixtfuserclient-xtfuser-xbox-windows-t.md)


## Related topics

- [IXtfUserClient 接口（接口内容）](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfuser/classes/IXtfUserClient/ixtfuserclient-xtfuser-xbox-windows-t.md)
- [XInputSetStateEx](https://docs.xbox.com/zh-CN/reference/input/xinputongameinput/functions/xinputsetstateex.md)
- [XINPUT_VIBRATION_EX](https://docs.xbox.com/zh-CN/reference/input/xinputongameinput/structs/xinput_vibration_ex.md)
- [GAMEPAD_REPORT_EX](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfinput/structures/gamepad_report_ex.md)
- [DeployEx](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfapplication/classes/IXtfApplicationClient/methods/ixtfapplicationclient-deployex.md)
