Export (0) Print
Expand All

ISensor::GetProperties method

Retrieves multiple sensor properties.

Syntax


HRESULT GetProperties(
  [in]   IPortableDeviceKeyCollection *pKeys,
  [out]  IPortableDeviceValues **ppProperties
);

Parameters

pKeys [in]

Pointer to an IPortableDeviceKeyCollection interface containing the PROPERTYKEY collection for the property values being requested. Set to NULL to retrieve all supported properties.

ppProperties [out]

Address of an IPortableDeviceValues pointer that receives the pointer to the requested property values.

Return value

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

Return codeDescription
S_OK

The method succeeded.

S_FALSE

The sensor driver does not support at least one of the specified properties. Each unsupported property PROPVARIANT returned through the IPortableDeviceValues interface will have its error value set to HRESULT_FROM_WIN32 (ERROR_NOT_FOUND).

E_POINTER

NULL was passed in for ppProperties.

 

Remarks

This method enables you to retrieve the values of multiple properties, such as the sensor make, model, and serial number, by making a single call. To retrieve a single property, call ISensor::GetProperty.

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

Examples

For an example of how to retrieve properties from a sensor, see Setting and Retrieving Sensor Properties.

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

None supported

Header

Sensorsapi.h

Library

Sensorsapi.lib

DLL

Sensorsapi.dll

See also

ISensor
Sensor Properties
SetProperties

 

 

Community Additions

ADD
Show:
© 2014 Microsoft