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.
|Sensorsapi.h||The main header file for the Sensor API. This header file contains the interface definitions.|
|Sensors.h||The header file that contains definitions of platform-defined constants.|
|Initguid.h||The header file that contains definitions for controlling GUID initialization.|
|FunctionDiscoveryKeys.h||The header file that defines device ID property keys that are required when you connect to logical sensors.|
|Sensorsapi.lib||A static library that contains GUID definitions for the Sensor API.|
|PortableDeviceGuids.lib||A static library that contains GUID definitions for Windows Portable Devices objects.|
Your program may require additional files.
Sensor API applications will run on all editions of Windows 7, except for Windows 7 Starter edition.
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.
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.
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.