Function Reference


Retrieves information about a specified geographical location

#include <WinAPILocale.au3>
_WinAPI_GetGeoInfo ( $iGEOID, $iType [, $iLanguage = 0] )


$iGEOID The identifier for the geographical location (GEOID) for which to get information.
$iType The type of information to retrieve. It can be one of the following values.

Windows Vista or later

Windows 8 or later
$iLanguage [optional] The language identifier, used with the geographical location.

Return Value

Success: 1.
Failure: 0, call _WinAPI_GetLastError() to get extended error information.

See Also

Search GetGeoInfo in MSDN Library.


#include <APILocaleConstants.au3>
#include <WinAPILocale.au3>

Local $iID = _WinAPI_GetUserGeoID()

ConsoleWrite('ID:        0x' & Hex($iID) & @CRLF)
ConsoleWrite('Latitude:  ' & _WinAPI_GetGeoInfo($iID, $GEO_LATITUDE) & @CRLF)
ConsoleWrite('Longitude: ' & _WinAPI_GetGeoInfo($iID, $GEO_LONGITUDE) & @CRLF)
ConsoleWrite('Name:      ' & _WinAPI_GetGeoInfo($iID, $GEO_FRIENDLYNAME) & @CRLF)
ConsoleWrite('ISO code:  ' & _WinAPI_GetGeoInfo($iID, $GEO_ISO3) & @CRLF)