ILocationReport::GetSensorID method (locationapi.h)
[The Win32 Location API is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. Instead, use the Windows.Devices.Geolocation API. ]
Retrieves the ID of the sensor that generated the location report.
Syntax
HRESULT GetSensorID(
[out] SENSOR_ID *pSensorID
);
Parameters
[out] pSensorID
Address of a SENSOR_ID that receives the ID of the sensor that generated the location report.
Return value
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
A sensor ID is a GUID.
Examples
The following example demonstrates how to call GetSensorID.
// Print the Sensor ID GUID
GUID sensorID = {0};
if (SUCCEEDED(spLatLongReport->GetSensorID(&sensorID)))
{
wprintf(L"SensorID: %s\n", GUIDToString(sensorID, szGUID, ARRAYSIZE(szGUID)));
}
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7 [desktop apps only],Windows 7 |
Minimum supported server | None supported |
Target Platform | Windows |
Header | locationapi.h |
DLL | LocationAPI.dll |