ILocation::GetDesiredAccuracy 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 current requested accuracy setting.

Syntax

HRESULT GetDesiredAccuracy(
  [in]  REFIID                    reportType,
  [out] LOCATION_DESIRED_ACCURACY *pDesiredAccuracy
);

Parameters

[in] reportType

REFIID that specifies the report type for which to get the requested accuracy.

[out] pDesiredAccuracy

The address of a LOCATION_DESIRED_ACCURACY that receives the accuracy value. If the report is not registered, this will be set to NULL.

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.
HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED)
reportType was other than IID_ILatLongReport or IID_ICivicAddressReport.
E_INVALIDARG
pDesiredAccuracy is NULL.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server None supported
Target Platform Windows
Header locationapi.h
DLL LocationAPI.dll

See also

ILocation