Applies to: desktop apps only
Retrieves the most recent sensor data report.
Syntax
HRESULT GetData(
[out] ISensorDataReport **ppDataReport
);
Parameters
- ppDataReport [out]
-
Address of an ISensorDataReport pointer that receives the pointer to the most recent sensor data report.
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.
|
- E_INVALIDARG
|
The sensor driver provided badly formed data. For example, the data was of a type that is not supported. For information about data types of platform-defined data fields, see Sensor Categories, Types, and Data Fields.
|
- HRESULT_FROM_WIN32(ERROR_NO_DATA)
|
The sensor has no data to report. For example, a GPS sensor could be in the process of acquiring a satellite fix.
|
Remarks
You can retrieve data only from sensors for which the user has granted permission.
Examples
For an example of how to retrieve sensor data, see Retrieving Sensor Data Values.
Requirements
|
Minimum supported client
| Windows 7 |
|
Minimum supported server
| None supported |
|
Header
|
- Sensorsapi.h
|
|
Library
|
- Sensorsapi.lib
|
|
DLL
|
- Sensorsapi.dll
|
See also
-
ISensor
-
Managing User Permissions
-
RequestPermissions
-
Sensor Categories, Types, and Data Fields
Send comments about this topic to Microsoft
Build date: 3/6/2012