ILatLongReport::GetLongitude 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. ]

Retrieves the longitude, in degrees. The longitude is between -180 and 180, where East is positive.

Syntax


HRESULT GetLongitude(
  [out] DOUBLE *pLongitude
);

Parameters

pLongitude [out]

Address of a DOUBLE that receives the longitude.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Examples

The following example demonstrates how to call GetLongitude.


DOUBLE longitude = 0;
// Print the Longitude
if (SUCCEEDED(spLatLongReport->GetLongitude(&longitude)))
{
    wprintf(L"Longitude: %f\n", longitude);
}


Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

None supported

Client

Windows 7

Header

LocationApi.h

DLL

LocationAPI.dll

See also

ILatLongReport

 

 

Community Additions

ADD
Show: