检索数据字段值的集合。
Syntax
HRESULT GetSensorValues(
[in] IPortableDeviceKeyCollection *pKeys,
[out] IPortableDeviceValues **ppValues
);
参数
[in] pKeys
指向 IPortableDeviceKeyCollection 接口的指针,该接口包含要为其检索值的数据字段。 设置为 NULL 以检索所有支持的数据字段的值。
[out] ppValues
接收指向检索值的指针的 IPortableDeviceValues 接口指针的地址。
返回值
该方法返回 HRESULT。 可能的值包括但不限于下表中的值。
| 返回代码 | Description |
|---|---|
|
方法成功。 |
|
找不到数据字段。 检查 ppValues 以确定哪些值设置为 ERROR_NOT_FOUND。 |
|
为 ppValues 传入 NULL。 |
注解
IPortableDeviceKeyCollection 和 IPortableDeviceValues 接口由 Windows 可移植设备 API 定义。
当此方法返回 HRESULT_FROM_WIN32(ERROR_NOT_FOUND)时, IPortableDeviceValues 接口包含的一个或多个结果将设置为 HRESULT 错误值。
要求
| Requirement | 价值 |
|---|---|
| 最低支持的客户端 | Windows 7 [仅限桌面应用] |
| 支持的最低服务器 | 无受支持的版本 |
| 目标平台 | Windows操作系统 |
| Header | sensorsapi.h |
| Library | Sensorsapi.lib |
| DLL | Sensorsapi.dll |