Funktionreferenz


_WinAPI_GetGeoInfo


Retrieves information about a specified geographical location

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

Parameter

$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.
$GEO_NATION
$GEO_LATITUDE
$GEO_LONGITUDE
$GEO_ISO2
$GEO_ISO3
$GEO_LCID
$GEO_FRIENDLYNAME
$GEO_OFFICIALNAME
$GEO_TIMEZONES
$GEO_OFFICIALLANGUAGES

Windows Vista or later
$GEO_RFC1766

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

Rückgabewert

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

Bemerkungen

None.

Siehe auch

Suche nach GetGeoInfo in der MSDN Bibliothek.

Beispiel

Beispiel 1

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

Local $iID = _WinAPI_GetUserGeoID()

ConsoleWrite('ID:        0x' & Hex($iID) & @CRLF)
ConsoleWrite('Breitengrad:  ' & _WinAPI_GetGeoInfo($iID, $GEO_LATITUDE) & @CRLF)
ConsoleWrite('Längengrad: ' & _WinAPI_GetGeoInfo($iID, $GEO_LONGITUDE) & @CRLF)
ConsoleWrite('Name:      ' & _WinAPI_GetGeoInfo($iID, $GEO_FRIENDLYNAME) & @CRLF)
ConsoleWrite('ISO Code:  ' & _WinAPI_GetGeoInfo($iID, $GEO_ISO3) & @CRLF)

Beispiel 2

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

Local $aData = _WinAPI_EnumSystemGeoID()

If Not @error Then
    Local $aData2[UBound($aData)][$GEO_PARENT]
    For $iData_idx = 0 To $aData[0]
        For $iData2_idx = 1 To $GEO_PARENT
            $aData2[$iData_idx][$iData2_idx-1] = _WinAPI_GetGeoInfo($aData[$iData_idx], $iData2_idx)
        Next
    Next
    _ArrayDisplay($aData2, '_WinAPI_GetGeoInfo')
EndIf