ISensorDriver::OnSetProperties method

The ISensorDriver::OnSetProperties method specifies values for the specified list of properties.

Syntax


HRESULT OnSetProperties(
  [in]  IWDFFile              *pClientFile,
  [in]  LPWSTR                pwszSensorID,
  [in]  IPortableDeviceValues *pPropertiesToSet,
  [out] IPortableDeviceValues **ppResults
);

Parameters

pClientFile [in]

Pointer to an IWDFFile interface that represents the file object for the application specifying property values.

pwszSensorID [in]

LPWSTR that contains the ID for the sensor for which the client application is specifying property values.

pPropertiesToSet [in]

Pointer to an IPortableDeviceValues interface that contains the list of properties to set and their values.

ppResults [out]

Address of an IPortableDeviceValues pointer that receives the list of properties that have been set successfully and their new values. If a property was not set, the new value contains an HRESULT error code.

Return value

If the operation succeeds, this method returns S_OK. Otherwise, this method returns one of the error codes that are defined in Winerror.h.

Remarks

Properties describe the sensor device, as opposed to data fields, which contain sensor-generated data. Platform-defined properties are defined in sensors.h.

The list of properties provided through pPropertiesToSet is typically a subset of the list you returned through ISensorDriver::OnGetSupportedProperties. However, the sensor class extension does not enforce this condition on client applications.

The sensor class extension is responsible for freeing any PROPVARIANT structures returned by this method.

IPortableDeviceValues is documented in Windows Portable Devices.

Note  This method will be called only if the user has enabled the sensor in the Location and Other Sensors control panel.
 

Requirements

Minimum supported client

Windows 7

Minimum supported server

None supported

Target platform

Version

Available in Windows 7.

Header

Sensorsclassextension.h

Library

SensorsClassExtension.lib

See also

ISensorDriver::OnGetProperties

 

 

Send comments about this topic to Microsoft

Show: