EnumSystemGeoID function (winnls.h)

[EnumSystemGeoID is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. Instead, use EnumSystemGeoNames.


Enumerates the geographical location identifiers (type GEOID) that are available on the operating system.


BOOL EnumSystemGeoID(
  [in] GEOCLASS     GeoClass,
  [in] GEOID        ParentGeoId,
  [in] GEO_ENUMPROC lpGeoEnumProc


[in] GeoClass

Geographical location class for which to enumerate the identifiers. At present, only GEOCLASS_NATION is supported. This type causes the function to enumerate all geographical identifiers for nations on the operating system.

[in] ParentGeoId

Reserved. This parameter must be 0.

[in] lpGeoEnumProc

Pointer to the application-defined callback function EnumGeoInfoProc. The EnumSystemGeoID function makes repeated calls to this callback function until it returns FALSE.

Return value

Returns a nonzero value if successful, or 0 otherwise. To get extended error information, the application can call GetLastError, which can return one of the following error codes:

  • ERROR_INVALID_FLAGS. The values supplied for flags were not valid.
  • ERROR_INVALID_PARAMETER. Any of the parameter values was invalid.


Requirement Value
Minimum supported client Windows XP [desktop apps | UWP apps]
Minimum supported server Windows Server 2003 [desktop apps | UWP apps]
Target Platform Windows
Header winnls.h (include Windows.h)
Library Kernel32.lib
DLL Kernel32.dll

See also



National Language Support

National Language Support Functions