ISensorDataReport::GetSensorValues method (sensorsapi.h)

Retrieves a collection of data field values.

Syntax

HRESULT GetSensorValues(
  [in]  IPortableDeviceKeyCollection *pKeys,
  [out] IPortableDeviceValues        **ppValues
);

Parameters

[in] pKeys

Pointer to the IPortableDeviceKeyCollection interface that contains the data fields for which to retrieve values. Set to NULL to retrieve values for all supported data fields.

[out] ppValues

Address of an IPortableDeviceValues interface pointer that receives the pointer to the retrieved values.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK
The method succeeded.
HRESULT_FROM_WIN32(ERROR_NOT_FOUND)
A data field was not found. Inspect ppValues to determine which values were set to ERROR_NOT_FOUND.
E_POINTER
NULL was passed in for ppValues.

Remarks

The IPortableDeviceKeyCollection and IPortableDeviceValues interfaces are defined by the Windows Portable Devices API.

When this method returns HRESULT_FROM_WIN32(ERROR_NOT_FOUND), one or more of the results contained by the IPortableDeviceValues interface will be set to an HRESULT error value.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server None supported
Target Platform Windows
Header sensorsapi.h
Library Sensorsapi.lib
DLL Sensorsapi.dll

See also

ISensorDataReport