Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ILocation::SetDesiredAccuracy method

[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. ]

Specifies the accuracy to be used.

Syntax


HRESULT SetDesiredAccuracy(
  [in] REFIID                    reportType,
  [in] LOCATION_DESIRED_ACCURACY desiredAccuracy
);

Parameters

reportType [in]

REFIID that specifies the report type for which to set the accuracy to be used.

desiredAccuracy [in]

LOCATION_DESIRED_ACCURACY value that specifies the accuracy to be used.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return codeDescription
S_OK

The method succeeded.

HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED)

reportType was other than IID_ILatLongReport or IID_ICivicAddressReport.

E_INVALIDARG

The value of desiredAccuracy is not supported in the LOCATION_DESIRED_ACCURACY enumerated type.

 

Examples

The following example demonstrates how to call SetDesiredAccuracy.



LOCATION_DESIRED_ACCURACY acc = LOCATION_DESIRED_ACCURACY_HIGH;
HRESULT hr = spLocation->SetDesiredAccuracy(IID_ILatLongReport, acc);

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

None supported

Header

LocationApi.h

DLL

LocationAPI.dll

See also

ILocation

 

 

Community Additions

ADD
Show:
© 2015 Microsoft