ISensor::SetProperties method (sensorsapi.h)

Specifies sensor properties.

Syntax

HRESULT SetProperties(
  [in]  IPortableDeviceValues *pProperties,
  [out] IPortableDeviceValues **ppResults
);

Parameters

[in] pProperties

Pointer to an IPortableDeviceValues interface containing the list of properties and values to set.

[out] ppResults

Address of an IPortableDeviceValues interface that receives the list of properties that were successfully set. Each property has an associated HRESULT value, which indicates whether setting the property succeeded.

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.
S_FALSE
The request to set one or more of the specified properties failed. Inspect ppResults to determine which properties, if any, succeeded.
E_POINTER
NULL was passed in for ppResults.

Remarks

This method enables you to specify the values of one or more properties, such as the sensor make, model, and serial number, by making a single call.

Not all properties can be set.

IPortableDeviceValues is defined by the Windows Portable Devices API.

Examples

For an example of how to set properties, see Setting and Retrieving Sensor Properties.

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

GetProperties

ISensor