ILocation::GetReportInterval 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 requested amount of time, in milliseconds, between report events.

Syntax

HRESULT GetReportInterval(
  [in]  REFIID reportType,
  [out] DWORD  *pMilliseconds
);

Parameters

[in] reportType

REFIID that specifies the report type for which to get the interval.

[out] pMilliseconds

The address of a DWORD that receives the report interval value, in milliseconds. If the report is not registered, this will be set to NULL. If this value is set to zero, no minimum interval is specified and your application receives events at the location sensor's default interval.

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.
HRESULT_FROM_WIN32(ERROR_INVALID_STATE)
The caller is not registered to receive events for the specified report type.
E_INVALIDARG
pMilliseconds is NULL.

Remarks

You must call RegisterForReport before calling this method.

Examples

The following example demonstrates how to call GetReportInterval.


DWORD reportInterval = 0;
HRESULT hr = spLocation->GetReportInterval(IID_ILatLongReport, &reportInterval);

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

See also

ILocation