GetAddressLine2 Method
Collapse the table of content
Expand the table of content

ICivicAddressReport::GetAddressLine2 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 second line of a street address.

Syntax


HRESULT GetAddressLine2(
  [out] BSTR *pbstrAddress2
);

Parameters

pbstrAddress2 [out]

Address of a BSTR that receives the second line of a street address.

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 GetAddressLine2.


    hr = pCivicAddressReport->GetAddressLine2(&bstrAddress2);            
    if (SUCCEEDED(hr) && (bstrAddress2.Length() != 0))
    {   
        wprintf(L"\tAddress Line 2:\t%s\n", bstrAddress2);
    }


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

ICivicAddressReport

 

 

Community Additions

ADD
Show:
© 2016 Microsoft