General Requirements for Application Development

This topic describes what you must do to start to create programs that use the Sensor API.

To create a Sensor API application, you must install Windows 7 and the Windows 7 Software Development Kit (SDK) on your computer. The following table describes the specific files that you will need.

File nameDescription
Sensorsapi.hThe main header file for the Sensor API. This header file contains the interface definitions.
Sensors.hThe header file that contains definitions of platform-defined constants.
Initguid.hThe header file that contains definitions for controlling GUID initialization.
FunctionDiscoveryKeys.hThe header file that defines device ID property keys that are required when you connect to logical sensors.
Sensorsapi.libA static library that contains GUID definitions for the Sensor API.
PortableDeviceGuids.libA static library that contains GUID definitions for Windows Portable Devices objects.

 

Your program may require additional files.

Supported Operating Systems

Sensor API applications will run on all editions of Windows 7, except for Windows 7 Starter edition.

Windows Portable Devices Interfaces

The Sensor API uses certain Windows Portable Devices (WPD) objects to encapsulate property keys and values. The following table describes the interfaces for these objects.

InterfaceDescription
IPortableDeviceValues

This interface provides a convenient way to create a property bag of name/value pairs. Names are represented by PROPERTYKEYs and values are represented by PROPVARIANTs.

The API uses this interface for setting and retrieving both single values and sets of values. This interface can be retrieved from a method or, if a new object is required, by calling CoCreateInstance with CLSID_PortableDeviceValues.

IPortableDeviceKeyCollection

This interface contains a collection of PROPERTYKEYs. These keys represent property names that can be stored by IPortableDeviceValues. The API uses this collection object for setting and retrieving both single property names and sets of property names.

This interface can be retrieved from a method or, if a new object is required, by calling CoCreateInstance with CLSID_PortableDeviceKeyCollection.

 

 

 

Community Additions

ADD
Show:
© 2014 Microsoft