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

ICivicAddressReport::GetPostalCode 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 postal code.

Syntax


HRESULT GetPostalCode(
  [out] BSTR *pbstrPostalCode
);

Parameters

pbstrPostalCode [out]

Address of a BSTR that receives the postal code.

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


    hr = pCivicAddressReport->GetPostalCode(&bstrPostalCode);
    if (SUCCEEDED(hr) && (bstrPostalCode.Length() != 0))
    {                
        wprintf(L"\tPostal Code:\t%s\n", bstrPostalCode);
    }


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:
© 2015 Microsoft