' ########################################################################################
' Microsoft Windows
' File: WinNls.inc
' Contents: Procedure declarations, constant definitions, and macros for the NLS component.
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_WinNls_PBI)
#DEFINE PBX_WinNls_PBI
%EQUATE `WINNLS_INC = 1
#INCLUDE ONCE "Core/Windows.inc"
#IF NOT %DEF(%NONLS)
'////////////////////////////////////////////////////////////////////////////
'//
'// Constants
'//
'// Define all constants for the NLS component here.
'//
'////////////////////////////////////////////////////////////////////////////
'//
'// String Length Maximums.
'//
%EQUATE `MAX_LEADBYTES = 12 ' 5 ranges, 2 bytes ea., 0 term.
%EQUATE `MAX_DEFAULTCHAR = 2 ' single or double byte
'//
'// Surrogate pairs
'//
'// Conversion examples:
'//
'// A) The first character in the Surrogate range (D800, DC00) as UTF-32:
'//
'// 1. D800: binary 1101100000000000 (lower ten bits: 0000000000)
'// 2. DC00: binary 1101110000000000 (lower ten bits: 0000000000)
'// 3. Concatenate 0000000000+0000000000 = 0x0000
'// 4. Add 0x10000
'//
'// Result: U+10000. This is correct, since the first character in the Supplementary character
'// range immediately follows the last code point in the 16-bit UTF-16 range (U+FFFF)
'//
'// B) A UTF-32 code point such as U+2040A (this a CJK character in CJK Extension B), and wish
'// to convert it in UTF-16:
'//
'// 1. Subtract 0x10000 - Result: 0x1040A
'// 2. Split into two ten-bit pieces: 0001000001 0000001010
'// 3. Add 1101100000000000 (0xD800) to the high 10 bits piece (0001000001) - Result: 1101100001000001 (0xD841)
'// 4. Add 1101110000000000 (0xDC00) to the low 10 bits piece (0000001010) - Result: 1101110000001010 (0xDC0A)
'//
'// RESULT: The surrogate pair: U+D841, U+DC0A
'//
'// Special Unicode code point values, for use with UTF-16 surrogate pairs.
'//
%EQUATE `HIGH_SURROGATE_START = &Hd800
%EQUATE `HIGH_SURROGATE_END = &Hdbff
%EQUATE `LOW_SURROGATE_START = &Hdc00
%EQUATE `LOW_SURROGATE_END = &Hdfff
'//
'// MBCS and Unicode Translation Flags.
'//
%EQUATE `MB_PRECOMPOSED = &H00000001 ' // use precomposed chars
%EQUATE `MB_COMPOSITE = &H00000002 ' // use composite chars
%EQUATE `MB_USEGLYPHCHARS = &H00000004 ' // use glyph chars, not ctrl chars
%EQUATE `MB_ERR_INVALID_CHARS = &H00000008 ' // error for invalid chars
%EQUATE `WC_COMPOSITECHECK = &H00000200 ' // convert composite to precomposed
%EQUATE `WC_DISCARDNS = &H00000010 ' // discard non-spacing chars
%EQUATE `WC_SEPCHARS = &H00000020 ' // generate separate chars
%EQUATE `WC_DEFAULTCHAR = &H00000040 ' // replace w/ default char
'#if (WINVER >= 0x0600)
%EQUATE `WC_ERR_INVALID_CHARS = &H00000080 ' // error for invalid chars
'#endif
'#if(WINVER >= 0x0500)
%EQUATE `WC_NO_BEST_FIT_CHARS = &H00000400 ' // do not use best fit chars
'#endif /* WINVER >= 0x0500 */
'//
'// Character Type Flags.
'//
%EQUATE `CT_CTYPE1 = &H00000001 ' // ctype 1 information
%EQUATE `CT_CTYPE2 = &H00000002 ' // ctype 2 information
%EQUATE `CT_CTYPE3 = &H00000004 ' // ctype 3 information
'//
'// CType 1 Flag Bits.
'//
%EQUATE `C1_UPPER = &H0001 ' // upper case
%EQUATE `C1_LOWER = &H0002 ' // lower case
%EQUATE `C1_DIGIT = &H0004 ' // decimal digits
%EQUATE `C1_SPACE = &H0008 ' // spacing characters
%EQUATE `C1_PUNCT = &H0010 ' // punctuation characters
%EQUATE `C1_CNTRL = &H0020 ' // control characters
%EQUATE `C1_BLANK = &H0040 ' // blank characters
%EQUATE `C1_XDIGIT = &H0080 ' // other digits
%EQUATE `C1_ALPHA = &H0100 ' // any linguistic character
%EQUATE `C1_DEFINED = &H0200 ' // defined character
'//
'// CType 2 Flag Bits.
'//
%EQUATE `C2_LEFTTORIGHT = &H0001 ' // left to right
%EQUATE `C2_RIGHTTOLEFT = &H0002 ' // right to left
%EQUATE `C2_EUROPENUMBER = &H0003 ' // European number, digit
%EQUATE `C2_EUROPESEPARATOR = &H0004 ' // European numeric separator
%EQUATE `C2_EUROPETERMINATOR = &H0005 ' // European numeric terminator
%EQUATE `C2_ARABICNUMBER = &H0006 ' // Arabic number
%EQUATE `C2_COMMONSEPARATOR = &H0007 ' // common numeric separator
%EQUATE `C2_BLOCKSEPARATOR = &H0008 ' // block separator
%EQUATE `C2_SEGMENTSEPARATOR = &H0009 ' // segment separator
%EQUATE `C2_WHITESPACE = &H000A ' // white space
%EQUATE `C2_OTHERNEUTRAL = &H000B ' // other neutrals
%EQUATE `C2_NOTAPPLICABLE = &H0000 ' // no implicit directionality
'//
'// CType 3 Flag Bits.
'//
%EQUATE `C3_NONSPACING = &H0001 ' // nonspacing character
%EQUATE `C3_DIACRITIC = &H0002 ' // diacritic mark
%EQUATE `C3_VOWELMARK = &H0004 ' // vowel mark
%EQUATE `C3_SYMBOL = &H0008 ' // symbols
%EQUATE `C3_KATAKANA = &H0010 ' // katakana character
%EQUATE `C3_HIRAGANA = &H0020 ' // hiragana character
%EQUATE `C3_HALFWIDTH = &H0040 ' // half width character
%EQUATE `C3_FULLWIDTH = &H0080 ' // full width character
%EQUATE `C3_IDEOGRAPH = &H0100 ' // ideographic character
%EQUATE `C3_KASHIDA = &H0200 ' // Arabic kashida character
%EQUATE `C3_LEXICAL = &H0400 ' // lexical character
%EQUATE `C3_HIGHSURROGATE = &H0800 ' // high surrogate code unit
%EQUATE `C3_LOWSURROGATE = &H1000 ' // low surrogate code unit
%EQUATE `C3_ALPHA = &H8000 ' // any linguistic char (C1_ALPHA)
%EQUATE `C3_NOTAPPLICABLE = &H0000 ' // ctype 3 is not applicable
'//
'// String Flags.
'//
%EQUATE `NORM_IGNORECASE = &H00000001 ' // ignore case
%EQUATE `NORM_IGNORENONSPACE = &H00000002 ' // ignore nonspacing chars
%EQUATE `NORM_IGNORESYMBOLS = &H00000004 ' // ignore symbols
%EQUATE `LINGUISTIC_IGNORECASE = &H00000010 ' // // linguistically appropriate ' //ignore case' //
%EQUATE `LINGUISTIC_IGNOREDIACRITIC = &H00000020 ' // // linguistically appropriate ' //ignore nonspace' //
%EQUATE `NORM_IGNOREKANATYPE = &H00010000 ' // ignore kanatype
%EQUATE `NORM_IGNOREWIDTH = &H00020000 ' // ignore width
%EQUATE `NORM_LINGUISTIC_CASING = &H08000000 ' // // use linguistic rules for casing
'//
'// Locale Independent Mapping Flags.
'//
%EQUATE `MAP_FOLDCZONE = &H00000010 ' // fold compatibility zone chars
%EQUATE `MAP_PRECOMPOSED = &H00000020 ' // convert to precomposed chars
%EQUATE `MAP_COMPOSITE = &H00000040 ' // convert to composite chars
%EQUATE `MAP_FOLDDIGITS = &H00000080 ' // all digits to ASCII 0-9
'#if(WINVER >= 0x0500)
%EQUATE `MAP_EXPAND_LIGATURES = &H00002000 ' // expand all ligatures
'#endif /* WINVER >= 0x0500 */
'//
'// Locale Dependent Mapping Flags.
'//
%EQUATE `LCMAP_LOWERCASE = &H00000100 ' // lower case letters
%EQUATE `LCMAP_UPPERCASE = &H00000200 ' // upper case letters
'#if (WINVER >= _WIN32_WINNT_WIN7)
%EQUATE `LCMAP_TITLECASE = &H00000300 ' // Title Case Letters
'#endif // (WINVER >= _WIN32_WINNT_WIN7)
%EQUATE `LCMAP_SORTKEY = &H00000400 ' // WC sort key (normalize)
%EQUATE `LCMAP_BYTEREV = &H00000800 ' // byte reversal
%EQUATE `LCMAP_HIRAGANA = &H00100000 ' // map katakana to hiragana
%EQUATE `LCMAP_KATAKANA = &H00200000 ' // map hiragana to katakana
%EQUATE `LCMAP_HALFWIDTH = &H00400000 ' // map double byte to single byte
%EQUATE `LCMAP_FULLWIDTH = &H00800000 ' // map single byte to double byte
%EQUATE `LCMAP_LINGUISTIC_CASING = &H01000000 ' // use linguistic rules for casing
%EQUATE `LCMAP_SIMPLIFIED_CHINESE = &H02000000 ' // map traditional chinese to simplified chinese
%EQUATE `LCMAP_TRADITIONAL_CHINESE = &H04000000 ' // map simplified chinese to traditional chinese
'//
'// Search Flags
'//
%EQUATE `FIND_STARTSWITH = &H00100000 ' // // see if value is at the beginning of source
%EQUATE `FIND_ENDSWITH = &H00200000 ' // // see if value is at the end of source
%EQUATE `FIND_FROMSTART = &H00400000 ' // // look for value in source, starting at the beginning
%EQUATE `FIND_FROMEND = &H00800000 ' // // look for value in source, starting at the end
'//
'// Language Group Enumeration Flags.
'//
%EQUATE `LGRPID_INSTALLED = &H00000001 ' // installed language group ids
%EQUATE `LGRPID_SUPPORTED = &H00000002 ' // supported language group ids
'//
'// Locale Enumeration Flags.
'//
%EQUATE `LCID_INSTALLED = &H00000001 ' // installed locale ids
%EQUATE `LCID_SUPPORTED = &H00000002 ' // supported locale ids
%EQUATE `LCID_ALTERNATE_SORTS = &H00000004 ' // alternate sort locale ids
'#if (WINVER >= _WIN32_WINNT_VISTA)
'//
'// Named based enumeration flags.
'//
%EQUATE `LOCALE_ALL = 0 ' // // enumerate all named based locales
%EQUATE `LOCALE_WINDOWS = &H00000001 ' // // shipped locales and/or replacements for them
%EQUATE `LOCALE_SUPPLEMENTAL = &H00000002 ' // // supplemental locales only
%EQUATE `LOCALE_ALTERNATE_SORTS = &H00000004 ' // // alternate sort locales
%EQUATE `LOCALE_REPLACEMENT = &H00000008 ' // // replacement locales only (supplemental - custom)
'#endif // (WINVER >= _WIN32_WINNT_VISTA)
'#if (WINVER >= _WIN32_WINNT_WIN7)
%EQUATE `LOCALE_NEUTRALDATA = &H00000010 ' // Locales that are "neutral" (language only, region data is default)
%EQUATE `LOCALE_SPECIFICDATA = &H00000020 ' // Locales that contain language and region data
'#endif // (WINVER >= _WIN32_WINNT_WIN7)
'//
'// Code Page Enumeration Flags.
'//
%EQUATE `CP_INSTALLED = &H00000001 ' // installed code page ids
%EQUATE `CP_SUPPORTED = &H00000002 ' // supported code page ids
'//
'// Sorting Flags.
'//
'// WORD Sort: culturally correct sort
'// hyphen and apostrophe are special cased
'// example: "coop" and "co-op" will sort together in a list
'//
'// co_op <------- underscore (symbol)
'// coat
'// comb
'// coop
'// co-op <------- hyphen (punctuation)
'// cork
'// went
'// were
'// we're <------- apostrophe (punctuation)
'//
'//
'// STRING Sort: hyphen and apostrophe will sort with all other symbols
'//
'// co-op <------- hyphen (punctuation)
'// co_op <------- underscore (symbol)
'// coat
'// comb
'// coop
'// cork
'// we're <------- apostrophe (punctuation)
'// went
'// were
'//
%EQUATE `SORT_STRINGSORT = &H00001000 ' // use string sort method
'// Sort digits as numbers (ie: 2 comes before 10)
'#if (WINVER >= _WIN32_WINNT_WIN7)
%EQUATE `SORT_DIGITSASNUMBERS = &H00000008 ' // use digits as numbers sort method
'#endif // (WINVER >= _WIN32_WINNT_WIN7)
'//
'// Compare String Return Values.
'//
%EQUATE `CSTR_LESS_THAN = 1 ' // string 1 less than string 2
%EQUATE `CSTR_EQUAL = 2 ' // string 1 equal to string 2
%EQUATE `CSTR_GREATER_THAN = 3 ' // string 1 greater than string 2
'//
'// Code Page Default Values.
'//
%EQUATE `CP_ACP = 0 ' // default to ANSI code page
%EQUATE `CP_OEMCP = 1 ' // default to OEM code page
%EQUATE `CP_MACCP = 2 ' // default to MAC code page
%EQUATE `CP_THREAD_ACP = 3 ' // current thread' //s ANSI code page
%EQUATE `CP_SYMBOL = 42 ' // SYMBOL translations
%EQUATE `CP_UTF7 = 65000 ' // UTF-7 translation
%EQUATE `CP_UTF8 = 65001 ' // UTF-8 translation
'//
'// Country/Region Codes.
'//
%EQUATE `CTRY_DEFAULT = 0
%EQUATE `CTRY_ALBANIA = 355 ' // Albania
%EQUATE `CTRY_ALGERIA = 213 ' // Algeria
%EQUATE `CTRY_ARGENTINA = 54 ' // Argentina
%EQUATE `CTRY_ARMENIA = 374 ' // Armenia
%EQUATE `CTRY_AUSTRALIA = 61 ' // Australia
%EQUATE `CTRY_AUSTRIA = 43 ' // Austria
%EQUATE `CTRY_AZERBAIJAN = 994 ' // Azerbaijan
%EQUATE `CTRY_BAHRAIN = 973 ' // Bahrain
%EQUATE `CTRY_BELARUS = 375 ' // Belarus
%EQUATE `CTRY_BELGIUM = 32 ' // Belgium
%EQUATE `CTRY_BELIZE = 501 ' // Belize
%EQUATE `CTRY_BOLIVIA = 591 ' // Bolivia
%EQUATE `CTRY_BRAZIL = 55 ' // Brazil
%EQUATE `CTRY_BRUNEI_DARUSSALAM = 673 ' // Brunei Darussalam
%EQUATE `CTRY_BULGARIA = 359 ' // Bulgaria
%EQUATE `CTRY_CANADA = 2 ' // Canada
%EQUATE `CTRY_CARIBBEAN = 1 ' // Caribbean
%EQUATE `CTRY_CHILE = 56 ' // Chile
%EQUATE `CTRY_COLOMBIA = 57 ' // Colombia
%EQUATE `CTRY_COSTA_RICA = 506 ' // Costa Rica
%EQUATE `CTRY_CROATIA = 385 ' // Croatia
%EQUATE `CTRY_CZECH = 420 ' // Czech Republic
%EQUATE `CTRY_DENMARK = 45 ' // Denmark
%EQUATE `CTRY_DOMINICAN_REPUBLIC = 1 ' // Dominican Republic
%EQUATE `CTRY_ECUADOR = 593 ' // Ecuador
%EQUATE `CTRY_EGYPT = 20 ' // Egypt
%EQUATE `CTRY_EL_SALVADOR = 503 ' // El Salvador
%EQUATE `CTRY_ESTONIA = 372 ' // Estonia
%EQUATE `CTRY_FAEROE_ISLANDS = 298 ' // Faeroe Islands
%EQUATE `CTRY_FINLAND = 358 ' // Finland
%EQUATE `CTRY_FRANCE = 33 ' // France
%EQUATE `CTRY_GEORGIA = 995 ' // Georgia
%EQUATE `CTRY_GERMANY = 49 ' // Germany
%EQUATE `CTRY_GREECE = 30 ' // Greece
%EQUATE `CTRY_GUATEMALA = 502 ' // Guatemala
%EQUATE `CTRY_HONDURAS = 504 ' // Honduras
%EQUATE `CTRY_HONG_KONG = 852 ' // Hong Kong S.A.R., P.R.C.
%EQUATE `CTRY_HUNGARY = 36 ' // Hungary
%EQUATE `CTRY_ICELAND = 354 ' // Iceland
%EQUATE `CTRY_INDIA = 91 ' // India
%EQUATE `CTRY_INDONESIA = 62 ' // Indonesia
%EQUATE `CTRY_IRAN = 981 ' // Iran
%EQUATE `CTRY_IRAQ = 964 ' // Iraq
%EQUATE `CTRY_IRELAND = 353 ' // Ireland
%EQUATE `CTRY_ISRAEL = 972 ' // Israel
%EQUATE `CTRY_ITALY = 39 ' // Italy
%EQUATE `CTRY_JAMAICA = 1 ' // Jamaica
%EQUATE `CTRY_JAPAN = 81 ' // Japan
%EQUATE `CTRY_JORDAN = 962 ' // Jordan
%EQUATE `CTRY_KAZAKSTAN = 7 ' // Kazakstan
%EQUATE `CTRY_KENYA = 254 ' // Kenya
%EQUATE `CTRY_KUWAIT = 965 ' // Kuwait
%EQUATE `CTRY_KYRGYZSTAN = 996 ' // Kyrgyzstan
%EQUATE `CTRY_LATVIA = 371 ' // Latvia
%EQUATE `CTRY_LEBANON = 961 ' // Lebanon
%EQUATE `CTRY_LIBYA = 218 ' // Libya
%EQUATE `CTRY_LIECHTENSTEIN = 41 ' // Liechtenstein
%EQUATE `CTRY_LITHUANIA = 370 ' // Lithuania
%EQUATE `CTRY_LUXEMBOURG = 352 ' // Luxembourg
%EQUATE `CTRY_MACAU = 853 ' // Macau S.A.R., PRC
%EQUATE `CTRY_MACEDONIA = 389 ' // Former Yugoslav Republic of Macedonia
%EQUATE `CTRY_MALAYSIA = 60 ' // Malaysia
%EQUATE `CTRY_MALDIVES = 960 ' // Maldives
%EQUATE `CTRY_MEXICO = 52 ' // Mexico
%EQUATE `CTRY_MONACO = 33 ' // Principality of Monaco
%EQUATE `CTRY_MONGOLIA = 976 ' // Mongolia
%EQUATE `CTRY_MOROCCO = 212 ' // Morocco
%EQUATE `CTRY_NETHERLANDS = 31 ' // Netherlands
%EQUATE `CTRY_NEW_ZEALAND = 64 ' // New Zealand
%EQUATE `CTRY_NICARAGUA = 505 ' // Nicaragua
%EQUATE `CTRY_NORWAY = 47 ' // Norway
%EQUATE `CTRY_OMAN = 968 ' // Oman
%EQUATE `CTRY_PAKISTAN = 92 ' // Islamic Republic of Pakistan
%EQUATE `CTRY_PANAMA = 507 ' // Panama
%EQUATE `CTRY_PARAGUAY = 595 ' // Paraguay
%EQUATE `CTRY_PERU = 51 ' // Peru
%EQUATE `CTRY_PHILIPPINES = 63 ' // Republic of the Philippines
%EQUATE `CTRY_POLAND = 48 ' // Poland
%EQUATE `CTRY_PORTUGAL = 351 ' // Portugal
%EQUATE `CTRY_PRCHINA = 86 ' // People' //s Republic of China
%EQUATE `CTRY_PUERTO_RICO = 1 ' // Puerto Rico
%EQUATE `CTRY_QATAR = 974 ' // Qatar
%EQUATE `CTRY_ROMANIA = 40 ' // Romania
%EQUATE `CTRY_RUSSIA = 7 ' // Russia
%EQUATE `CTRY_SAUDI_ARABIA = 966 ' // Saudi Arabia
%EQUATE `CTRY_SERBIA = 381 ' // Serbia
%EQUATE `CTRY_SINGAPORE = 65 ' // Singapore
%EQUATE `CTRY_SLOVAK = 421 ' // Slovak Republic
%EQUATE `CTRY_SLOVENIA = 386 ' // Slovenia
%EQUATE `CTRY_SOUTH_AFRICA = 27 ' // South Africa
%EQUATE `CTRY_SOUTH_KOREA = 82 ' // Korea
%EQUATE `CTRY_SPAIN = 34 ' // Spain
%EQUATE `CTRY_SWEDEN = 46 ' // Sweden
%EQUATE `CTRY_SWITZERLAND = 41 ' // Switzerland
%EQUATE `CTRY_SYRIA = 963 ' // Syria
%EQUATE `CTRY_TAIWAN = 886 ' // Taiwan
%EQUATE `CTRY_TATARSTAN = 7 ' // Tatarstan
%EQUATE `CTRY_THAILAND = 66 ' // Thailand
%EQUATE `CTRY_TRINIDAD_Y_TOBAGO = 1 ' // Trinidad y Tobago
%EQUATE `CTRY_TUNISIA = 216 ' // Tunisia
%EQUATE `CTRY_TURKEY = 90 ' // Turkey
%EQUATE `CTRY_UAE = 971 ' // U.A.E.
%EQUATE `CTRY_UKRAINE = 380 ' // Ukraine
%EQUATE `CTRY_UNITED_KINGDOM = 44 ' // United Kingdom
%EQUATE `CTRY_UNITED_STATES = 1 ' // United States
%EQUATE `CTRY_URUGUAY = 598 ' // Uruguay
%EQUATE `CTRY_UZBEKISTAN = 7 ' // Uzbekistan
%EQUATE `CTRY_VENEZUELA = 58 ' // Venezuela
%EQUATE `CTRY_VIET_NAM = 84 ' // Viet Nam
%EQUATE `CTRY_YEMEN = 967 ' // Yemen
%EQUATE `CTRY_ZIMBABWE = 263 ' // Zimbabwe
'//
'// Locale Types.
'//
'// These types are used for the GetLocaleInfo NLS API routine.
'// Some of these types are also used for the SetLocaleInfo NLS API routine.
'//
'//
'// The following LCTypes may be used in combination with any other LCTypes.
'//
'// LOCALE_NOUSEROVERRIDE is also used in GetTimeFormat and
'// GetDateFormat.
'//
'// LOCALE_USE_CP_ACP is used in many of the A (Ansi) apis that need
'// to do string translation.
'//
'// LOCALE_RETURN_NUMBER will return the result from GetLocaleInfo as a
'// number instead of a string. This flag is only valid for the LCTypes
'// beginning with LOCALE_I.
'//
%EQUATE `LOCALE_NOUSEROVERRIDE = &H80000000 ' // do not use user overrides
%EQUATE `LOCALE_USE_CP_ACP = &H40000000 ' // use the system ACP
'#if(WINVER >= 0x0400)
%EQUATE `LOCALE_RETURN_NUMBER = &H20000000 ' // return number instead of string
'#endif /* WINVER >= 0x0400 */
'#if (WINVER >= _WIN32_WINNT_WIN7)
%EQUATE `LOCALE_RETURN_GENITIVE_NAMES = &H10000000 ' // Flag to return the Genitive forms of month names
%EQUATE `LOCALE_ALLOW_NEUTRAL_NAMES = &H08000000 ' // Flag to allow returning neutral names/lcids for name conversion
'#endif //(WINVER >= _WIN32_WINNT_WIN7)
'//
'// The following LCTypes are mutually exclusive in that they may NOT
'// be used in combination with each other.
'//
'//
'// These are the various forms of the name of the locale:
'//
%EQUATE `LOCALE_SLOCALIZEDDISPLAYNAME = &H00000002 ' // localized name of locale, eg "German (Germany)" in UI language
'#if (WINVER >= _WIN32_WINNT_WIN7)
%EQUATE `LOCALE_SENGLISHDISPLAYNAME = &H00000072 ' // Display name (language + country usually) in English, eg "German (Germany)"
%EQUATE `LOCALE_SNATIVEDISPLAYNAME = &H00000073 ' // Display name in native locale language, eg "Deutsch (Deutschland)
'#endif //(WINVER >= _WIN32_WINNT_WIN7)
'#if (WINVER >= _WIN32_WINNT_VISTA)
%EQUATE `LOCALE_SLOCALIZEDLANGUAGENAME = &H0000006f ' // Language Display Name for a language, eg "German" in UI language
'#endif //(WINVER >= _WIN32_WINNT_VISTA)
%EQUATE `LOCALE_SENGLISHLANGUAGENAME = &H00001001 ' // English name of language, eg "German"
%EQUATE `LOCALE_SNATIVELANGUAGENAME = &H00000004 ' // native name of language, eg "Deutsch"
%EQUATE `LOCALE_SLOCALIZEDCOUNTRYNAME = &H00000006 ' // localized name of country, eg "Germany" in UI language
%EQUATE `LOCALE_SENGLISHCOUNTRYNAME = &H00001002 ' // English name of country, eg "Germany"
%EQUATE `LOCALE_SNATIVECOUNTRYNAME = &H00000008 ' // native name of country, eg "Deutschland"
'//
'// Legacy labels for the locale name values
'//
%EQUATE `LOCALE_SLANGUAGE = &H00000002 ' // localized name of locale, eg "German (Germany)" in UI language
'#if (WINVER >= _WIN32_WINNT_VISTA)
%EQUATE `LOCALE_SLANGDISPLAYNAME = &H0000006f ' // Language Display Name for a language, eg "German" in UI language
'#endif //(WINVER >= _WIN32_WINNT_VISTA)
%EQUATE `LOCALE_SENGLANGUAGE = &H00001001 ' // English name of language, eg "German"
%EQUATE `LOCALE_SNATIVELANGNAME = &H00000004 ' // native name of language, eg "Deutsch"
%EQUATE `LOCALE_SCOUNTRY = &H00000006 ' // localized name of country, eg "Germany" in UI language
%EQUATE `LOCALE_SENGCOUNTRY = &H00001002 ' // English name of country, eg "Germany"
%EQUATE `LOCALE_SNATIVECTRYNAME = &H00000008 ' // native name of country, eg "Deutschland"
'//
'// The following LCTypes are mutually exclusive in that they may NOT
'// be used in combination with each other.
'//
%EQUATE `LOCALE_ILANGUAGE = &H00000001 ' // language id, LOCALE_SNAME preferred
%EQUATE `LOCALE_SABBREVLANGNAME = &H00000003 ' // abbreviated language name, LOCALE_SISO639LANGNAME preferred
%EQUATE `LOCALE_ICOUNTRY = &H00000005 ' // country code, eg 1, LOCALE_SISO3166CTRYNAME may be more useful.
%EQUATE `LOCALE_SABBREVCTRYNAME = &H00000007 ' // arbitrary abbreviated country name, LOCALE_SISO3166CTRYNAME preferred
%EQUATE `LOCALE_IGEOID = &H0000005B ' // geographical location id, eg "244"
%EQUATE `LOCALE_IDEFAULTLANGUAGE = &H00000009 ' // default language id, deprecated
%EQUATE `LOCALE_IDEFAULTCOUNTRY = &H0000000A ' // default country code, deprecated
%EQUATE `LOCALE_IDEFAULTCODEPAGE = &H0000000B ' // default oem code page (use of Unicode is recommended instead)
%EQUATE `LOCALE_IDEFAULTANSICODEPAGE = &H00001004 ' // default ansi code page (use of Unicode is recommended instead)
%EQUATE `LOCALE_IDEFAULTMACCODEPAGE = &H00001011 ' // default mac code page (use of Unicode is recommended instead)
%EQUATE `LOCALE_SLIST = &H0000000C ' // list item separator, eg "," for "1,2,3,4"
%EQUATE `LOCALE_IMEASURE = &H0000000D ' // 0 = metric, 1 = US measurement system
%EQUATE `LOCALE_SDECIMAL = &H0000000E ' // decimal separator, eg "." for 1,234.00
%EQUATE `LOCALE_STHOUSAND = &H0000000F ' // thousand separator, eg "," for 1,234.00
%EQUATE `LOCALE_SGROUPING = &H00000010 ' // digit grouping, eg "3;0" for 1,000,000
%EQUATE `LOCALE_IDIGITS = &H00000011 ' // number of fractional digits eg 2 for 1.00
%EQUATE `LOCALE_ILZERO = &H00000012 ' // leading zeros for decimal, 0 for .97, 1 for 0.97
%EQUATE `LOCALE_INEGNUMBER = &H00001010 ' // negative number mode, 0-4, see documentation
%EQUATE `LOCALE_SNATIVEDIGITS = &H00000013 ' // native ascii 0-9, eg "0123456789"
%EQUATE `LOCALE_SCURRENCY = &H00000014 ' // local monetary symbol, eg "$"
%EQUATE `LOCALE_SINTLSYMBOL = &H00000015 ' // intl monetary symbol, eg "USD"
%EQUATE `LOCALE_SMONDECIMALSEP = &H00000016 ' // monetary decimal separator, eg "." for $1,234.00
%EQUATE `LOCALE_SMONTHOUSANDSEP = &H00000017 ' // monetary thousand separator, eg "," for $1,234.00
%EQUATE `LOCALE_SMONGROUPING = &H00000018 ' // monetary grouping, eg "3;0" for $1,000,000.00
%EQUATE `LOCALE_ICURRDIGITS = &H00000019 ' // # local monetary digits, eg 2 for $1.00
%EQUATE `LOCALE_IINTLCURRDIGITS = &H0000001A ' // # intl monetary digits, eg 2 for $1.00
%EQUATE `LOCALE_ICURRENCY = &H0000001B ' // positive currency mode, 0-3, see documenation
%EQUATE `LOCALE_INEGCURR = &H0000001C ' // negative currency mode, 0-15, see documentation
%EQUATE `LOCALE_SDATE = &H0000001D ' // date separator (derived from LOCALE_SSHORTDATE, use that instead)
%EQUATE `LOCALE_STIME = &H0000001E ' // time separator (derived from LOCALE_STIMEFORMAT, use that instead)
%EQUATE `LOCALE_SSHORTDATE = &H0000001F ' // short date format string, eg "MM/dd/yyyy"
%EQUATE `LOCALE_SLONGDATE = &H00000020 ' // long date format string, eg "dddd, MMMM dd, yyyy"
%EQUATE `LOCALE_STIMEFORMAT = &H00001003 ' // time format string, eg "HH:mm:ss"
%EQUATE `LOCALE_IDATE = &H00000021 ' // short date format ordering (derived from LOCALE_SSHORTDATE, use that instead)
%EQUATE `LOCALE_ILDATE = &H00000022 ' // long date format ordering (derived from LOCALE_SLONGDATE, use that instead)
%EQUATE `LOCALE_ITIME = &H00000023 ' // time format specifier (derived from LOCALE_STIMEFORMAT, use that instead)
%EQUATE `LOCALE_ITIMEMARKPOSN = &H00001005 ' // time marker position (derived from LOCALE_STIMEFORMAT, use that instead)
%EQUATE `LOCALE_ICENTURY = &H00000024 ' // century format specifier (short date, LOCALE_SSHORTDATE is preferred)
%EQUATE `LOCALE_ITLZERO = &H00000025 ' // leading zeros in time field (derived from LOCALE_STIMEFORMAT, use that instead)
%EQUATE `LOCALE_IDAYLZERO = &H00000026 ' // leading zeros in day field (short date, LOCALE_SSHORTDATE is preferred)
%EQUATE `LOCALE_IMONLZERO = &H00000027 ' // leading zeros in month field (short date, LOCALE_SSHORTDATE is preferred)
%EQUATE `LOCALE_S1159 = &H00000028 ' // AM designator, eg "AM"
%EQUATE `LOCALE_S2359 = &H00000029 ' // PM designator, eg "PM"
%EQUATE `LOCALE_ICALENDARTYPE = &H00001009 ' // type of calendar specifier, eg CAL_GREGORIAN
%EQUATE `LOCALE_IOPTIONALCALENDAR = &H0000100B ' // additional calendar types specifier, eg CAL_GREGORIAN_US
%EQUATE `LOCALE_IFIRSTDAYOFWEEK = &H0000100C ' // first day of week specifier, 0-6, 0=Monday, 6=Sunday
%EQUATE `LOCALE_IFIRSTWEEKOFYEAR = &H0000100D ' // first week of year specifier, 0-2, see documentation
%EQUATE `LOCALE_SDAYNAME1 = &H0000002A ' // long name for Monday
%EQUATE `LOCALE_SDAYNAME2 = &H0000002B ' // long name for Tuesday
%EQUATE `LOCALE_SDAYNAME3 = &H0000002C ' // long name for Wednesday
%EQUATE `LOCALE_SDAYNAME4 = &H0000002D ' // long name for Thursday
%EQUATE `LOCALE_SDAYNAME5 = &H0000002E ' // long name for Friday
%EQUATE `LOCALE_SDAYNAME6 = &H0000002F ' // long name for Saturday
%EQUATE `LOCALE_SDAYNAME7 = &H00000030 ' // long name for Sunday
%EQUATE `LOCALE_SABBREVDAYNAME1 = &H00000031 ' // abbreviated name for Monday
%EQUATE `LOCALE_SABBREVDAYNAME2 = &H00000032 ' // abbreviated name for Tuesday
%EQUATE `LOCALE_SABBREVDAYNAME3 = &H00000033 ' // abbreviated name for Wednesday
%EQUATE `LOCALE_SABBREVDAYNAME4 = &H00000034 ' // abbreviated name for Thursday
%EQUATE `LOCALE_SABBREVDAYNAME5 = &H00000035 ' // abbreviated name for Friday
%EQUATE `LOCALE_SABBREVDAYNAME6 = &H00000036 ' // abbreviated name for Saturday
%EQUATE `LOCALE_SABBREVDAYNAME7 = &H00000037 ' // abbreviated name for Sunday
%EQUATE `LOCALE_SMONTHNAME1 = &H00000038 ' // long name for January
%EQUATE `LOCALE_SMONTHNAME2 = &H00000039 ' // long name for February
%EQUATE `LOCALE_SMONTHNAME3 = &H0000003A ' // long name for March
%EQUATE `LOCALE_SMONTHNAME4 = &H0000003B ' // long name for April
%EQUATE `LOCALE_SMONTHNAME5 = &H0000003C ' // long name for May
%EQUATE `LOCALE_SMONTHNAME6 = &H0000003D ' // long name for June
%EQUATE `LOCALE_SMONTHNAME7 = &H0000003E ' // long name for July
%EQUATE `LOCALE_SMONTHNAME8 = &H0000003F ' // long name for August
%EQUATE `LOCALE_SMONTHNAME9 = &H00000040 ' // long name for September
%EQUATE `LOCALE_SMONTHNAME10 = &H00000041 ' // long name for October
%EQUATE `LOCALE_SMONTHNAME11 = &H00000042 ' // long name for November
%EQUATE `LOCALE_SMONTHNAME12 = &H00000043 ' // long name for December
%EQUATE `LOCALE_SMONTHNAME13 = &H0000100E ' // long name for 13th month (if exists)
%EQUATE `LOCALE_SABBREVMONTHNAME1 = &H00000044 ' // abbreviated name for January
%EQUATE `LOCALE_SABBREVMONTHNAME2 = &H00000045 ' // abbreviated name for February
%EQUATE `LOCALE_SABBREVMONTHNAME3 = &H00000046 ' // abbreviated name for March
%EQUATE `LOCALE_SABBREVMONTHNAME4 = &H00000047 ' // abbreviated name for April
%EQUATE `LOCALE_SABBREVMONTHNAME5 = &H00000048 ' // abbreviated name for May
%EQUATE `LOCALE_SABBREVMONTHNAME6 = &H00000049 ' // abbreviated name for June
%EQUATE `LOCALE_SABBREVMONTHNAME7 = &H0000004A ' // abbreviated name for July
%EQUATE `LOCALE_SABBREVMONTHNAME8 = &H0000004B ' // abbreviated name for August
%EQUATE `LOCALE_SABBREVMONTHNAME9 = &H0000004C ' // abbreviated name for September
%EQUATE `LOCALE_SABBREVMONTHNAME10 = &H0000004D ' // abbreviated name for October
%EQUATE `LOCALE_SABBREVMONTHNAME11 = &H0000004E ' // abbreviated name for November
%EQUATE `LOCALE_SABBREVMONTHNAME12 = &H0000004F ' // abbreviated name for December
%EQUATE `LOCALE_SABBREVMONTHNAME13 = &H0000100F ' // abbreviated name for 13th month (if exists)
%EQUATE `LOCALE_SPOSITIVESIGN = &H00000050 ' // positive sign, eg ""
%EQUATE `LOCALE_SNEGATIVESIGN = &H00000051 ' // negative sign, eg "-"
%EQUATE `LOCALE_IPOSSIGNPOSN = &H00000052 ' // positive sign position (derived from INEGCURR)
%EQUATE `LOCALE_INEGSIGNPOSN = &H00000053 ' // negative sign position (derived from INEGCURR)
%EQUATE `LOCALE_IPOSSYMPRECEDES = &H00000054 ' // mon sym precedes pos amt (derived from ICURRENCY)
%EQUATE `LOCALE_IPOSSEPBYSPACE = &H00000055 ' // mon sym sep by space from pos amt (derived from ICURRENCY)
%EQUATE `LOCALE_INEGSYMPRECEDES = &H00000056 ' // mon sym precedes neg amt (derived from INEGCURR)
%EQUATE `LOCALE_INEGSEPBYSPACE = &H00000057 ' // mon sym sep by space from neg amt (derived from INEGCURR)
'#if(WINVER >= 0x0400)
%EQUATE `LOCALE_FONTSIGNATURE = &H00000058 ' font signature
%EQUATE `LOCALE_SISO639LANGNAME = &H00000059 ' ISO abbreviated language name, eg "en"
%EQUATE `LOCALE_SISO3166CTRYNAME = &H0000005A ' ISO abbreviated country name, eg "US"
'#endif /* WINVER >= 0x0400 */
'#if(WINVER >= 0x0500)
%EQUATE `LOCALE_IDEFAULTEBCDICCODEPAGE = &H00001012 ' default ebcdic code page (use of Unicode is recommended instead)
%EQUATE `LOCALE_IPAPERSIZE = &H0000100A ' 1 = letter, 5 = legal, 8 = a3, 9 = a4
%EQUATE `LOCALE_SENGCURRNAME = &H00001007 ' english name of currency, eg "Euro"
%EQUATE `LOCALE_SNATIVECURRNAME = &H00001008 ' native name of currency, eg "euro"
%EQUATE `LOCALE_SYEARMONTH = &H00001006 ' year month format string, eg "MM/yyyy"
%EQUATE `LOCALE_SSORTNAME = &H00001013 ' sort name, usually "", eg "Dictionary" in UI Language
%EQUATE `LOCALE_IDIGITSUBSTITUTION = &H00001014 ' 0 = context, 1 = none, 2 = national
'#endif /* WINVER >= 0x0500 */
'#if (WINVER >= 0x0600)
%EQUATE `LOCALE_SNAME = &H0000005c ' // locale name (ie: en-us)
%EQUATE `LOCALE_SDURATION = &H0000005d ' // time duration format
%EQUATE `LOCALE_SKEYBOARDSTOINSTALL = &H0000005e ' // Used internally, see GetKeyboardLayoutName() function
%EQUATE `LOCALE_SSHORTESTDAYNAME1 = &H00000060 ' // Shortest day name for Monday
%EQUATE `LOCALE_SSHORTESTDAYNAME2 = &H00000061 ' // Shortest day name for Tuesday
%EQUATE `LOCALE_SSHORTESTDAYNAME3 = &H00000062 ' // Shortest day name for Wednesday
%EQUATE `LOCALE_SSHORTESTDAYNAME4 = &H00000063 ' // Shortest day name for Thursday
%EQUATE `LOCALE_SSHORTESTDAYNAME5 = &H00000064 ' // Shortest day name for Friday
%EQUATE `LOCALE_SSHORTESTDAYNAME6 = &H00000065 ' // Shortest day name for Saturday
%EQUATE `LOCALE_SSHORTESTDAYNAME7 = &H00000066 ' // Shortest day name for Sunday
%EQUATE `LOCALE_SISO639LANGNAME2 = &H00000067 ' // 3 character ISO abbreviated language name, eg "eng"
%EQUATE `LOCALE_SISO3166CTRYNAME2 = &H00000068 ' // 3 character ISO country name, eg "USA"
%EQUATE `LOCALE_SNAN = &H00000069 ' // Not a Number, eg "NaN"
%EQUATE `LOCALE_SPOSINFINITY = &H0000006a ' // + Infinity, eg "infinity"
%EQUATE `LOCALE_SNEGINFINITY = &H0000006b ' // - Infinity, eg "-infinity"
%EQUATE `LOCALE_SSCRIPTS = &H0000006c ' // Typical scripts in the locale: ; delimited script codes, eg "Latn;"
%EQUATE `LOCALE_SPARENT = &H0000006d ' // Fallback name for resources, eg "en" for "en-US"
%EQUATE `LOCALE_SCONSOLEFALLBACKNAME = &H0000006e ' // Fallback name for within the console for Unicode Only locales, eg "en" for bn-IN
'#endif //(WINVER >= 0x0600)
'#if (WINVER >= _WIN32_WINNT_WIN7)
%EQUATE `LOCALE_IREADINGLAYOUT = &H00000070 ' // Returns one of the following 4 reading layout values:
 ' // 0 - Left to right (eg en-US)
 ' // 1 - Right to left (eg arabic locales)
 ' // 2 - Vertical top to bottom with columns to the left and also left to right (ja-JP locales)
 ' // 3 - Vertical top to bottom with columns proceeding to the right
%EQUATE `LOCALE_INEUTRAL = &H00000071 ' // Returns 0 for specific cultures, 1 for neutral cultures.
%EQUATE `LOCALE_INEGATIVEPERCENT = &H00000074 ' // Returns 0-11 for the negative percent format
%EQUATE `LOCALE_IPOSITIVEPERCENT = &H00000075 ' // Returns 0-3 for the positive percent formatIPOSITIVEPERCENT
%EQUATE `LOCALE_SPERCENT = &H00000076 ' // Returns the percent symbol
%EQUATE `LOCALE_SPERMILLE = &H00000077 ' // Returns the permille (U+2030) symbol
%EQUATE `LOCALE_SMONTHDAY = &H00000078 ' // Returns the preferred month/day format
%EQUATE `LOCALE_SSHORTTIME = &H00000079 ' // Returns the preferred short time format (ie: no seconds, just h:mm)
%EQUATE `LOCALE_SOPENTYPELANGUAGETAG = &H0000007a ' // Open type language tag, eg: "latn" or "dflt"
%EQUATE `LOCALE_SSORTLOCALE = &H0000007b ' // Name of locale to use for sorting/collation/casing behavior.
'#endif //(WINVER >= _WIN32_WINNT_WIN7)
'//
'// Time Flags for GetTimeFormat.
'//
%EQUATE `TIME_NOMINUTESORSECONDS = &H00000001 ' // do not use minutes or seconds
%EQUATE `TIME_NOSECONDS = &H00000002 ' // do not use seconds
%EQUATE `TIME_NOTIMEMARKER = &H00000004 ' // do not use time marker
%EQUATE `TIME_FORCE24HOURFORMAT = &H00000008 ' // always use 24 hour format
'//
'// Date Flags for GetDateFormat.
'//
%EQUATE `DATE_SHORTDATE = &H00000001 ' // use short date picture
%EQUATE `DATE_LONGDATE = &H00000002 ' // use long date picture
%EQUATE `DATE_USE_ALT_CALENDAR = &H00000004 ' // use alternate calendar (if any)
'#if(WINVER >= 0x0500)
%EQUATE `DATE_YEARMONTH = &H00000008 ' // use year month picture
%EQUATE `DATE_LTRREADING = &H00000010 ' // add marks for left to right reading order layout
%EQUATE `DATE_RTLREADING = &H00000020 ' // add marks for right to left reading order layout
'#endif /* WINVER >= 0x0500 */
'#if (WINVER >= _WIN32_WINNT_WIN7)
%EQUATE `DATE_AUTOLAYOUT = &H00000040 ' // add appropriate marks for left-to-right or right-to-left reading order layout
'#endif //(WINVER >= _WIN32_WINNT_WIN7)
'//
'// Calendar Types.
'//
'// These types are used for the EnumCalendarInfo and GetCalendarInfo
'// NLS API routines.
'// Some of these types are also used for the SetCalendarInfo NLS API
'// routine.
'//
'//
'// The following CalTypes may be used in combination with any other CalTypes.
'//
'// CAL_NOUSEROVERRIDE
'//
'// CAL_USE_CP_ACP is used in the A (Ansi) apis that need to do string
'// translation.
'//
'// CAL_RETURN_NUMBER will return the result from GetCalendarInfo as a
'// number instead of a string. This flag is only valid for the CalTypes
'// beginning with CAL_I.
'//
'#if(WINVER >= 0x0500)
%EQUATE `CAL_NOUSEROVERRIDE = %LOCALE_NOUSEROVERRIDE ' // do not use user overrides
%EQUATE `CAL_USE_CP_ACP = %LOCALE_USE_CP_ACP ' // use the system ACP
%EQUATE `CAL_RETURN_NUMBER = %LOCALE_RETURN_NUMBER ' // return number instead of string
'#endif /* WINVER >= 0x0500 */
'#if (WINVER >= _WIN32_WINNT_WIN7)
%EQUATE `CAL_RETURN_GENITIVE_NAMES = %LOCALE_RETURN_GENITIVE_NAMES ' // return genitive forms of month names
'#endif // winver >= windows 7
'//
'// The following CalTypes are mutually exclusive in that they may NOT
'// be used in combination with each other.
'//
%EQUATE `CAL_ICALINTVALUE = &H00000001 ' // calendar type
%EQUATE `CAL_SCALNAME = &H00000002 ' // native name of calendar
%EQUATE `CAL_IYEAROFFSETRANGE = &H00000003 ' // starting years of eras
%EQUATE `CAL_SERASTRING = &H00000004 ' // era name for IYearOffsetRanges, eg A.D.
%EQUATE `CAL_SSHORTDATE = &H00000005 ' // short date format string
%EQUATE `CAL_SLONGDATE = &H00000006 ' // long date format string
%EQUATE `CAL_SDAYNAME1 = &H00000007 ' // native name for Monday
%EQUATE `CAL_SDAYNAME2 = &H00000008 ' // native name for Tuesday
%EQUATE `CAL_SDAYNAME3 = &H00000009 ' // native name for Wednesday
%EQUATE `CAL_SDAYNAME4 = &H0000000a ' // native name for Thursday
%EQUATE `CAL_SDAYNAME5 = &H0000000b ' // native name for Friday
%EQUATE `CAL_SDAYNAME6 = &H0000000c ' // native name for Saturday
%EQUATE `CAL_SDAYNAME7 = &H0000000d ' // native name for Sunday
%EQUATE `CAL_SABBREVDAYNAME1 = &H0000000e ' // abbreviated name for Mon
%EQUATE `CAL_SABBREVDAYNAME2 = &H0000000f ' // abbreviated name for Tue
%EQUATE `CAL_SABBREVDAYNAME3 = &H00000010 ' // abbreviated name for Wed
%EQUATE `CAL_SABBREVDAYNAME4 = &H00000011 ' // abbreviated name for Thu
%EQUATE `CAL_SABBREVDAYNAME5 = &H00000012 ' // abbreviated name for Fri
%EQUATE `CAL_SABBREVDAYNAME6 = &H00000013 ' // abbreviated name for Sat
%EQUATE `CAL_SABBREVDAYNAME7 = &H00000014 ' // abbreviated name for Sun
%EQUATE `CAL_SMONTHNAME1 = &H00000015 ' // native name for January
%EQUATE `CAL_SMONTHNAME2 = &H00000016 ' // native name for February
%EQUATE `CAL_SMONTHNAME3 = &H00000017 ' // native name for March
%EQUATE `CAL_SMONTHNAME4 = &H00000018 ' // native name for April
%EQUATE `CAL_SMONTHNAME5 = &H00000019 ' // native name for May
%EQUATE `CAL_SMONTHNAME6 = &H0000001a ' // native name for June
%EQUATE `CAL_SMONTHNAME7 = &H0000001b ' // native name for July
%EQUATE `CAL_SMONTHNAME8 = &H0000001c ' // native name for August
%EQUATE `CAL_SMONTHNAME9 = &H0000001d ' // native name for September
%EQUATE `CAL_SMONTHNAME10 = &H0000001e ' // native name for October
%EQUATE `CAL_SMONTHNAME11 = &H0000001f ' // native name for November
%EQUATE `CAL_SMONTHNAME12 = &H00000020 ' // native name for December
%EQUATE `CAL_SMONTHNAME13 = &H00000021 ' // native name for 13th month (if any)
%EQUATE `CAL_SABBREVMONTHNAME1 = &H00000022 ' // abbreviated name for Jan
%EQUATE `CAL_SABBREVMONTHNAME2 = &H00000023 ' // abbreviated name for Feb
%EQUATE `CAL_SABBREVMONTHNAME3 = &H00000024 ' // abbreviated name for Mar
%EQUATE `CAL_SABBREVMONTHNAME4 = &H00000025 ' // abbreviated name for Apr
%EQUATE `CAL_SABBREVMONTHNAME5 = &H00000026 ' // abbreviated name for May
%EQUATE `CAL_SABBREVMONTHNAME6 = &H00000027 ' // abbreviated name for Jun
%EQUATE `CAL_SABBREVMONTHNAME7 = &H00000028 ' // abbreviated name for Jul
%EQUATE `CAL_SABBREVMONTHNAME8 = &H00000029 ' // abbreviated name for Aug
%EQUATE `CAL_SABBREVMONTHNAME9 = &H0000002a ' // abbreviated name for Sep
%EQUATE `CAL_SABBREVMONTHNAME10 = &H0000002b ' // abbreviated name for Oct
%EQUATE `CAL_SABBREVMONTHNAME11 = &H0000002c ' // abbreviated name for Nov
%EQUATE `CAL_SABBREVMONTHNAME12 = &H0000002d ' // abbreviated name for Dec
%EQUATE `CAL_SABBREVMONTHNAME13 = &H0000002e ' // abbreviated name for 13th month (if any)
'#if(WINVER >= 0x0500)
%EQUATE `CAL_SYEARMONTH = &H0000002f ' // year month format string
%EQUATE `CAL_ITWODIGITYEARMAX = &H00000030 ' // two digit year max
'#endif /* WINVER >= 0x0500 */
'#if (WINVER >= 0x0600)
%EQUATE `CAL_SSHORTESTDAYNAME1 = &H00000031 ' // Shortest day name for Mo
%EQUATE `CAL_SSHORTESTDAYNAME2 = &H00000032 ' // Shortest day name for Tu
%EQUATE `CAL_SSHORTESTDAYNAME3 = &H00000033 ' // Shortest day name for We
%EQUATE `CAL_SSHORTESTDAYNAME4 = &H00000034 ' // Shortest day name for Th
%EQUATE `CAL_SSHORTESTDAYNAME5 = &H00000035 ' // Shortest day name for Fr
%EQUATE `CAL_SSHORTESTDAYNAME6 = &H00000036 ' // Shortest day name for Sa
%EQUATE `CAL_SSHORTESTDAYNAME7 = &H00000037 ' // Shortest day name for Su
'#endif //(WINVER >= 0x0600)
'#if (WINVER >= _WIN32_WINNT_WIN7)
%EQUATE `CAL_SMONTHDAY = &H00000038 ' // Month/day format
%EQUATE `CAL_SABBREVERASTRING = &H00000039 ' // Abbreviated era string (eg: AD)
'#endif // winver >= windows 7
'//
'// Calendar Enumeration Value.
'//
%EQUATE `ENUM_ALL_CALENDARS = &Hffffffff ' // enumerate all calendars
'//
'// Calendar ID Values.
'//
%EQUATE `CAL_GREGORIAN = 1 ' Gregorian (localized) calendar
%EQUATE `CAL_GREGORIAN_US = 2 ' // Gregorian (U.S.) calendar
%EQUATE `CAL_JAPAN = 3 ' // Japanese Emperor Era calendar
%EQUATE `CAL_TAIWAN = 4 ' // Taiwan calendar
%EQUATE `CAL_KOREA = 5 ' // Korean Tangun Era calendar
%EQUATE `CAL_HIJRI = 6 ' // Hijri (Arabic Lunar) calendar
%EQUATE `CAL_THAI = 7 ' // Thai calendar
%EQUATE `CAL_HEBREW = 8 ' // Hebrew (Lunar) calendar
%EQUATE `CAL_GREGORIAN_ME_FRENCH = 9 ' // Gregorian Middle East French calendar
%EQUATE `CAL_GREGORIAN_ARABIC = 10 ' // Gregorian Arabic calendar
%EQUATE `CAL_GREGORIAN_XLIT_ENGLISH = 11 ' // Gregorian Transliterated English calendar
%EQUATE `CAL_GREGORIAN_XLIT_FRENCH = 12 ' // Gregorian Transliterated French calendar
%EQUATE `CAL_UMALQURA = 23 ' // UmAlQura Hijri (Arabic Lunar) calendar
'//
'// Language Group ID Values.
'//
%EQUATE `LGRPID_WESTERN_EUROPE = &H0001 ' //Western Europe & U.S.
%EQUATE `LGRPID_CENTRAL_EUROPE = &H0002 ' //Central Europe
%EQUATE `LGRPID_BALTIC = &H0003 ' //Baltic
%EQUATE `LGRPID_GREEK = &H0004 ' //Greek
%EQUATE `LGRPID_CYRILLIC = &H0005 ' //Cyrillic
%EQUATE `LGRPID_TURKISH = &H0006 ' //Turkish
%EQUATE `LGRPID_JAPANESE = &H0007 ' //Japanese
%EQUATE `LGRPID_KOREAN = &H0008 ' //Korean
%EQUATE `LGRPID_TRADITIONAL_CHINESE = &H0009 ' //Traditional Chinese
%EQUATE `LGRPID_SIMPLIFIED_CHINESE = &H000a ' //Simplified Chinese
%EQUATE `LGRPID_THAI = &H000b ' //Thai
%EQUATE `LGRPID_HEBREW = &H000c ' //Hebrew
%EQUATE `LGRPID_ARABIC = &H000d ' //Arabic
%EQUATE `LGRPID_VIETNAMESE = &H000e ' //Vietnamese
%EQUATE `LGRPID_INDIC = &H000f ' //Indic
%EQUATE `LGRPID_GEORGIAN = &H0010 ' //Georgian
%EQUATE `LGRPID_ARMENIAN = &H0011 ' //Armenian
'#if (WINVER >= 0x0600)
'//
'// MUI function flag values
'//
%EQUATE `MUI_LANGUAGE_ID = &H4 ' // Use traditional language ID convention
%EQUATE `MUI_LANGUAGE_NAME = &H8 ' // Use ISO language (culture) name convention
%EQUATE `MUI_MERGE_SYSTEM_FALLBACK = &H10 ' // GetThreadPreferredUILanguages merges in parent and base languages
%EQUATE `MUI_MERGE_USER_FALLBACK = &H20 ' // GetThreadPreferredUILanguages merges in user preferred languages
%EQUATE `MUI_UI_FALLBACK = %MUI_MERGE_SYSTEM_FALLBACK OR %MUI_MERGE_USER_FALLBACK
%EQUATE `MUI_THREAD_LANGUAGES = &H40 ' // GetThreadPreferredUILanguages merges in user preferred languages
%EQUATE `MUI_CONSOLE_FILTER = &H100 ' // SetThreadPreferredUILanguages takes on console specific behavior
%EQUATE `MUI_COMPLEX_SCRIPT_FILTER = &H200 ' // SetThreadPreferredUILanguages takes on complex script specific behavior
%EQUATE `MUI_RESET_FILTERS = &H001 ' // Reset MUI_CONSOLE_FILTER and MUI_COMPLEX_SCRIPT_FILTER
%EQUATE `MUI_USER_PREFERRED_UI_LANGUAGES = &H10 ' // GetFileMUIPath returns the MUI files for the languages in the fallback list
%EQUATE `MUI_USE_INSTALLED_LANGUAGES = &H20 ' // GetFileMUIPath returns all the MUI files installed in the machine
%EQUATE `MUI_USE_SEARCH_ALL_LANGUAGES = &H40 ' // GetFileMUIPath returns all the MUI files irrespective of whether language is installed
%EQUATE `MUI_LANG_NEUTRAL_PE_FILE = &H100 ' // GetFileMUIPath returns target file with .mui extension
%EQUATE `MUI_NON_LANG_NEUTRAL_FILE = &H200 ' // GetFileMUIPath returns target file with same name as source
%EQUATE `MUI_MACHINE_LANGUAGE_SETTINGS = &H400
%EQUATE `MUI_FILETYPE_NOT_LANGUAGE_NEUTRAL = &H001 ' // GetFileMUIInfo found a non-split resource file
%EQUATE `MUI_FILETYPE_LANGUAGE_NEUTRAL_MAIN = &H002 ' // GetFileMUIInfo found a LN main module resource file
%EQUATE `MUI_FILETYPE_LANGUAGE_NEUTRAL_MUI = &H004 ' // GetFileMUIInfo found a LN MUI module resource file
%EQUATE `MUI_QUERY_TYPE = &H001 ' // GetFileMUIInfo will look for the type of the resource file
%EQUATE `MUI_QUERY_CHECKSUM = &H002 ' // GetFileMUIInfo will look for the checksum of the resource file
%EQUATE `MUI_QUERY_LANGUAGE_NAME = &H004 ' // GetFileMUIInfo will look for the culture of the resource file
%EQUATE `MUI_QUERY_RESOURCE_TYPES = &H008 ' // GetFileMUIInfo will look for the resource types of the resource file
%EQUATE `MUI_FILEINFO_VERSION = &H001 ' // Version of FILEMUIINFO structure used with GetFileMUIInfo
%EQUATE `MUI_FULL_LANGUAGE = &H01
%EQUATE `MUI_PARTIAL_LANGUAGE = &H02
%EQUATE `MUI_LIP_LANGUAGE = &H04
%EQUATE `MUI_LANGUAGE_INSTALLED = &H20
%EQUATE `MUI_LANGUAGE_LICENSED = &H40
'//
'// MUI_CALLBACK_FLAG defines are duplicated in rtlmui.h
'//
'%MUI_CALLBACK_ALL_FLAGS = %MUI_CALLBACK_FLAG_UPGRADED_INSTALLATION ' // OR all other flags when defined.
'//
'// MUI_CALLBACK_ flags are duplicated in rtlmui.h
'//
'#endif
'////////////////////////////////////////////////////////////////////////////
'//
'// Typedefs
'//
'// Define all types for the NLS component here.
'//
'////////////////////////////////////////////////////////////////////////////
'//
'// Language Group ID.
'//
'typedef DWORD LGRPID;
'//
'// Locale type constant.
'//
'typedef DWORD LCTYPE;
'//
'// Calendar type constant.
'//
'typedef DWORD CALTYPE;
'//
'// Calendar ID.
'//
'typedef DWORD CALID;
'//
'// CP Info.
'//
' // Size = 20 bytes
TYPE CPINFO DWORD
 MaxCharSize AS DWORD ' max length (bytes) of a char
 DefaultChar(%MAX_DEFAULTCHAR - 1) AS BYTE ' default character
 LeadByte(%MAX_LEADBYTES - 1) AS BYTE ' lead byte ranges
END TYPE
' // Size = 284 bytes
TYPE CPINFOEXA BYTE
 MaxCharSize AS DWORD ' max length (in bytes) of a char
 DefaultChar(%MAX_DEFAULTCHAR - 1) AS BYTE ' default character (MB)
 LeadByte(%MAX_LEADBYTES - 1) AS BYTE ' lead byte ranges
 UnicodeDefaultChar AS WORD ' default character (Unicode)
 CodePage AS DWORD ' code page id
 CodePageName AS ASCIIZ * %MAX_PATH ' code page name (ANSI?)
END TYPE
' // Size = 544 bytes
TYPE CPINFOEXW BYTE
 MaxCharSize AS DWORD ' max length (in bytes) of a char
 DefaultChar(%MAX_DEFAULTCHAR - 1) AS BYTE ' default character (MB)
 LeadByte(%MAX_LEADBYTES - 1) AS BYTE ' lead byte ranges
 UnicodeDefaultChar AS WORD ' default character (Unicode)
 CodePage AS DWORD ' code page id
 CodePageName AS WSTRINGZ * %MAX_PATH ' code page name (Unicode)
END TYPE
#IF %DEF(%UNICODE)
 MACRO CPINFOEX = CPINFOEXW
#ELSE
 MACRO CPINFOEX = CPINFOEXA
#ENDIF
'//
'// Number format.
'//
' // Size = 24 bytes
TYPE NUMBERFMTA DWORD
 NumDigits AS DWORD ' UINT // number of decimal digits
 LeadingZero AS DWORD ' UINT // if leading zero in decimal fields
 Grouping AS DWORD ' UINT // group size left of decimal
 lpDecimalSep AS ASCIIZ PTR ' LPSTR // ptr to decimal separator string
 lpThousandSep AS ASCIIZ PTR ' LPSTR // ptr to thousand separator string
 NegativeOrder AS DWORD ' UINT // negative number ordering
END TYPE
' // Size = 24 bytes
TYPE NUMBERFMTW DWORD
 NumDigits AS DWORD ' UINT // number of decimal digits
 LeadingZero AS DWORD ' UINT // if leading zero in decimal fields
 Grouping AS DWORD ' UINT // group size left of decimal
 lpDecimalSep AS WSTRINGZ PTR ' LPWSTR // ptr to decimal separator string
 lpThousandSep AS WSTRINGZ PTR ' LPWSTR // ptr to thousand separator string
 NegativeOrder AS DWORD ' UINT // negative number ordering
END TYPE
#IF %DEF(%UNICODE)
 MACRO NUMBERFMT = NUMBERFMTW
#ELSE
 MACRO NUMBERFMT = NUMBERFMTA
#ENDIF
'//
'// Currency format.
'//
' // Size = 32 bytes
TYPE CURRENCYFMTA DWORD
 NumDigits AS DWORD ' UINT // number of decimal digits
 LeadingZero AS DWORD ' UINT // if leading zero in decimal fields
 Grouping AS DWORD ' UINT // group size left of decimal
 lpDecimalSep AS ASCIIZ PTR ' LPSTR // ptr to decimal separator string
 lpThousandSep AS ASCIIZ PTR ' LPSTR // ptr to thousand separator string
 NegativeOrder AS DWORD ' UINT // negative currency ordering
 PositiveOrder AS DWORD ' UINT // positive currency ordering
 lpCurrencySymbol AS ASCIIZ PTR ' LPSTR // ptr to currency symbol string
END TYPE
' // Size = 32 bytes
TYPE CURRENCYFMTW DWORD
 NumDigits AS DWORD ' UINT // number of decimal digits
 LeadingZero AS DWORD ' UINT // if leading zero in decimal fields
 Grouping AS DWORD ' UINT // group size left of decimal
 lpDecimalSep AS WSTRINGZ PTR ' LPWSTR // ptr to decimal separator string
 lpThousandSep AS WSTRINGZ PTR ' LPWSTR // ptr to thousand separator string
 NegativeOrder AS DWORD ' UINT // negative currency ordering
 PositiveOrder AS DWORD ' UINT // positive currency ordering
 lpCurrencySymbol AS WSTRINGZ PTR ' LPWSTR // ptr to currency symbol string
END TYPE
#IF %DEF(%UNICODE)
 MACRO CURRENCYFMT = CURRENCYFMTW
#ELSE
 MACRO CURRENCYFMT = CURRENCYFMTA
#ENDIF
'//
'// NLS function capabilities
'//
' SYSNLS_FUNCTION enum
%EQUATE `COMPARE_STRING = &H0001
'typedef DWORD NLS_FUNCTION;
'//
'// NLS version structure.
'//
' // Size = 12 bytes
TYPE NLSVERSIONINFO DWORD
 dwNLSVersionInfoSize AS DWORD
 dwNLSVersion AS DWORD
 dwDefinedVersion AS DWORD
END TYPE
' // Size = 32 bytes
'// This is to be deprecated, please use the NLSVERSIONINFO
'// structure above in the future. The difference is that
'// the effective ID is more robust.
TYPE NLSVERSIONINFOEX DWORD
 dwNLSVersionInfoSize AS DWORD ' DWORD // sizeof(NLSVERSIONINFOEX) == 32 bytes
 dwNLSVersion AS DWORD
 dwDefinedVersion AS DWORD
 dwEffectiveId AS DWORD ' DWORD // Use NLSVERSIONINFO instead
 guidCustomVersion AS GUID ' GUID
END TYPE
'//
'// GEO defines
'//
'typedef LONG GEOID;
'typedef DWORD GEOTYPE;
'typedef DWORD GEOCLASS;
%EQUATE `GEOID_NOT_AVAILABLE = -1
'//
'// GEO information types for clients to query
'//
' SYSGEOTYPE enum
%EQUATE `GEO_NATION = &H0001
%EQUATE `GEO_LATITUDE = &H0002
%EQUATE `GEO_LONGITUDE = &H0003
%EQUATE `GEO_ISO2 = &H0004
%EQUATE `GEO_ISO3 = &H0005
%EQUATE `GEO_RFC1766 = &H0006
%EQUATE `GEO_LCID = &H0007
%EQUATE `GEO_FRIENDLYNAME = &H0008
%EQUATE `GEO_OFFICIALNAME = &H0009
%EQUATE `GEO_TIMEZONES = &H000A
%EQUATE `GEO_OFFICIALLANGUAGES = &H000B
'//
'// More GEOCLASS defines will be listed here
'//
' SYSGEOCLASS enum
%EQUATE `GEOCLASS_NATION = 16
%EQUATE `GEOCLASS_REGION = 14
'//
'// More GEOCLASS defines will be listed here
'//
' enum SYSGEOCLASS {
%EQUATE `GEOCLASS_NATION = 16
%EQUATE `GEOCLASS_REGION = 14
'#if (WINVER >= 0x0600)
'//
'// Normalization forms
'//
' enum NORM_FORM
%EQUATE `NormalizationOther = 0 ' // Not supported
%EQUATE `NormalizationC = &H1 ' // Each base plus combining characters to the canonical precomposed equivalent.
%EQUATE `NormalizationD = &H2 ' // Each precomposed character to its canonical decomposed equivalent.
%EQUATE `NormalizationKC = &H5 ' // Each base plus combining characters to the canonical precomposed
 ' // equivalents and all compatibility characters to their equivalents.
%EQUATE `NormalizationKD = &H6 ' // Each precomposed character to its canonical decomposed equivalent
 ' // and all compatibility characters to their equivalents.
'//
'// IDN (International Domain Name) Flags
'//
%EQUATE `IDN_ALLOW_UNASSIGNED = &H01 ' // Allow unassigned "query" behavior per RFC 3454
%EQUATE `IDN_USE_STD3_ASCII_RULES = &H02 ' // Enforce STD3 ASCII restrictions for legal characters
%EQUATE `VS_ALLOW_LATIN = &H0001 ' // Allow Latin in test script even if not present in locale script
%EQUATE `GSS_ALLOW_INHERITED_COMMON = &H0001 ' // Output script ids for inherited and common character types if present
'#endif //(WINVER >= 0x0600)
'//
'// Enumeration function constants.
'//
'#ifdef STRICT
'typedef BOOL (CALLBACK* LANGUAGEGROUP_ENUMPROCA)(LGRPID, LPSTR, LPSTR, DWORD, LONG_PTR);
'typedef BOOL (CALLBACK* LANGGROUPLOCALE_ENUMPROCA)(LGRPID, LCID, LPSTR, LONG_PTR);
'typedef BOOL (CALLBACK* UILANGUAGE_ENUMPROCA)(LPSTR, LONG_PTR);
'typedef BOOL (CALLBACK* LOCALE_ENUMPROCA)(LPSTR);
'typedef BOOL (CALLBACK* CODEPAGE_ENUMPROCA)(LPSTR);
'typedef BOOL (CALLBACK* DATEFMT_ENUMPROCA)(LPSTR);
'typedef BOOL (CALLBACK* DATEFMT_ENUMPROCEXA)(LPSTR, CALID);
'typedef BOOL (CALLBACK* TIMEFMT_ENUMPROCA)(LPSTR);
'typedef BOOL (CALLBACK* CALINFO_ENUMPROCA)(LPSTR);
'typedef BOOL (CALLBACK* CALINFO_ENUMPROCEXA)(LPSTR, CALID);
'typedef BOOL (CALLBACK* LANGUAGEGROUP_ENUMPROCW)(LGRPID, LPWSTR, LPWSTR, DWORD, LONG_PTR);
'typedef BOOL (CALLBACK* LANGGROUPLOCALE_ENUMPROCW)(LGRPID, LCID, LPWSTR, LONG_PTR);
'typedef BOOL (CALLBACK* UILANGUAGE_ENUMPROCW)(LPWSTR, LONG_PTR);
'typedef BOOL (CALLBACK* LOCALE_ENUMPROCW)(LPWSTR);
'typedef BOOL (CALLBACK* CODEPAGE_ENUMPROCW)(LPWSTR);
'typedef BOOL (CALLBACK* DATEFMT_ENUMPROCW)(LPWSTR);
'typedef BOOL (CALLBACK* DATEFMT_ENUMPROCEXW)(LPWSTR, CALID);
'typedef BOOL (CALLBACK* TIMEFMT_ENUMPROCW)(LPWSTR);
'typedef BOOL (CALLBACK* CALINFO_ENUMPROCW)(LPWSTR);
'typedef BOOL (CALLBACK* CALINFO_ENUMPROCEXW)(LPWSTR, CALID);
'typedef BOOL (CALLBACK* GEO_ENUMPROC)(GEOID);
'#else // !STRICT
'typedef FARPROC LANGUAGEGROUP_ENUMPROCA;
'typedef FARPROC LANGGROUPLOCALE_ENUMPROCA;
'typedef FARPROC UILANGUAGE_ENUMPROCA;
'typedef FARPROC LOCALE_ENUMPROCA;
'typedef FARPROC CODEPAGE_ENUMPROCA;
'typedef FARPROC DATEFMT_ENUMPROCA;
'typedef FARPROC DATEFMT_ENUMPROCEXA;
'typedef FARPROC TIMEFMT_ENUMPROCA;
'typedef FARPROC CALINFO_ENUMPROCA;
'typedef FARPROC CALINFO_ENUMPROCEXA;
'typedef FARPROC GEO_ENUMPROC;
'typedef FARPROC LANGUAGEGROUP_ENUMPROCW;
'typedef FARPROC LANGGROUPLOCALE_ENUMPROCW;
'typedef FARPROC UILANGUAGE_ENUMPROCW;
'typedef FARPROC LOCALE_ENUMPROCW;
'typedef FARPROC CODEPAGE_ENUMPROCW;
'typedef FARPROC DATEFMT_ENUMPROCW;
'typedef FARPROC DATEFMT_ENUMPROCEXW;
'typedef FARPROC TIMEFMT_ENUMPROCW;
'typedef FARPROC CALINFO_ENUMPROCW;
'typedef FARPROC CALINFO_ENUMPROCEXW;
'#endif // !STRICT
'//
'// Information about a MUI file, used as input/output in GetFileMUIInfo
'// All offsets are relative to start of the structure. Offsets with value 0 mean empty field.
'//
' // Size = 80 bytes
TYPE FILEMUIINFO DWORD
 dwSize AS DWORD ' DWORD // Size of the structure including buffer size [in]
 dwVersion AS DWORD ' DWORD // Version of the structure [in]
 dwFileType AS DWORD ' DWORD // Type of the file [out]
 pChecksum(15) AS BYTE ' BYTE // Checksum of the file [out]
 pServiceChecksum(15) AS BYTE ' BYTE // Checksum of the file [out]
 dwLanguageNameOffset AS DWORD ' DWORD // Language name of the file [out]
 dwTypeIDMainSize AS DWORD ' DWORD // Number of TypeIDs in main module [out]
 dwTypeIDMainOffset AS DWORD ' DWORD // Array of TypeIDs (DWORD) in main module [out]
 dwTypeNameMainOffset AS DWORD ' DWORD // Multistring array of TypeNames in main module [out]
 dwTypeIDMUISize AS DWORD ' DWORD // Number of TypeIDs in MUI module [out]
 dwTypeIDMUIOffset AS DWORD ' DWORD // Array of TypeIDs (DWORD) in MUI module [out]
 dwTypeNameMUIOffset AS DWORD ' DWORD // Multistring array of TypeNames in MUI module [out]
 abBuffer(7) AS BYTE ' BYTE // Buffer for extra data [in] (Size 4 is for padding)
END TYPE
'////////////////////////////////////////////////////////////////////////////
'//
'// Macros
'//
'// Define all macros for the NLS component here.
'//
'////////////////////////////////////////////////////////////////////////////
'//
'// Macros to determine whether a character is a high or low surrogate,
'// and whether two code points make up a surrogate pair (a high surrogate
'// and a low surrogate).
'//
'#define IS_HIGH_SURROGATE(wch) (((wch) >= HIGH_SURROGATE_START) && ((wch) <= HIGH_SURROGATE_END))
'#define IS_LOW_SURROGATE(wch) (((wch) >= LOW_SURROGATE_START) && ((wch) <= LOW_SURROGATE_END))
'#define IS_SURROGATE_PAIR(hs, ls) (IS_HIGH_SURROGATE(hs) && IS_LOW_SURROGATE(ls))
MACRO IS_HIGH_SURROGATE(wch) = ((wch >= %HIGH_SURROGATE_START) AND (wch <= %HIGH_SURROGATE_END))
MACRO IS_LOW_SURROGATE(wch) = ((wch >= %LOW_SURROGATE_START) AND (wch <= %LOW_SURROGATE_END))
MACRO IS_SURROGATE_PAIR(hs, ls) = (IS_HIGH_SURROGATE(hs) AND IS_LOW_SURROGATE(ls))
'// ----------------------------------------------------------------------
'// The following macros retrieve information from a MUIFILEINFO structure
'//
'// Gets the culture name (LPWSTR), NULL if not initialized
'#define FILEMUIINFO_GET_CULTURE(pInfo) \
' ((LPWSTR)((pInfo->dwLanguageNameOffset>0)?(ULONG_PTR)pInfo+pInfo->dwLanguageNameOffset:NULL))
'//
'// Gets the main module types array (DWORD[]), NULL if not initialized
'#define FILEMUIINFO_GET_MAIN_TYPEIDS(pInfo) \
' ((DWORD*)((pInfo->dwTypeIDMainOffset>0)?(ULONG_PTR)pInfo+pInfo->dwTypeIDMainOffset:NULL))
'//
'// Gets the main module type array element iType (DWORD), the array is not initialized or index is out of bounds
'#define FILEMUIINFO_GET_MAIN_TYPEID(pInfo,iType) \
' (((iType<pInfo->dwTypeIDMainSize)&&(pInfo->dwTypeIDMainOffset>0))?*((DWORD*)((ULONG_PTR)pInfo+pInfo->dwTypeIDMainOffset)+iType):0)
'//
'// Gets the main module names multistring array (LPWSTR), NULL if not initialized
'#define FILEMUIINFO_GET_MAIN_TYPENAMES(pInfo) \
' ((LPWSTR)((pInfo->dwTypeNameMainOffset>0)?(ULONG_PTR)pInfo+pInfo->dwTypeNameMainOffset:NULL))
'//
'// Gets the mui module types array (DWORD[]), NULL if not initialized
'#define FILEMUIINFO_GET_MUI_TYPEIDS(pInfo) \
' ((DWORD*)((pInfo->dwTypeIDMUIOffset>0)?(ULONG_PTR)pInfo+pInfo->dwTypeIDMUIOffset:NULL))
'//
'// Gets the mui module type array element iType (DWORD), the array is not initialized or index is out of bounds
'#define FILEMUIINFO_GET_MUI_TYPEID(pInfo,iType) \
' (((iType<pInfo->dwTypeIDMUISize)&&(pInfo->dwTypeIDMUIOffset>0))?*((DWORD*)((ULONG_PTR)pInfo+pInfo->dwTypeIDMUIOffset)+iType):0)
'//
'// Gets the mui module names multistring array (LPWSTR), NULL if not initialized
'#define FILEMUIINFO_GET_MUI_TYPENAMES(pInfo) \
' ((LPWSTR)((pInfo->dwTypeNameMUIOffset>0)?(ULONG_PTR)pInfo+pInfo->dwTypeNameMUIOffset:NULL))
'// ------------------------------------------------------------------------
'////////////////////////////////////////////////////////////////////////////
'//
'// Function Prototypes
'//
'// Only prototypes for the NLS APIs should go here.
'//
'////////////////////////////////////////////////////////////////////////////
'//
'// Code Page Dependent APIs.
'//
DECLARE FUNCTION IsValidCodePage LIB "kernel32.dll" ALIAS "IsValidCodePage" ( BYVAL CodePage AS QUAD ) AS LONG
DECLARE FUNCTION GetACP LIB "kernel32.dll" ALIAS "GetACP" ( ) AS QUAD ' UINT
DECLARE FUNCTION GetOEMCP LIB "kernel32.dll" ALIAS "GetOEMCP" ( ) AS QUAD ' UINT
DECLARE FUNCTION GetCPInfo LIB "kernel32.dll" ALIAS "GetCPInfo" ( BYVAL CodePage AS QUAD , BYREF lpCPInfo AS CPINFO ) AS LONG
DECLARE FUNCTION GetCPInfoExA LIB "kernel32.dll" ALIAS "GetCPInfoExA" ( BYVAL CodePage AS QUAD
 , BYVAL dwFlags AS DWORD
 , BYREF lpCPInfoEx AS CPINFOEXA
 ) AS LONG
DECLARE FUNCTION GetCPInfoExW LIB "kernel32.dll" ALIAS "GetCPInfoExW" ( BYVAL CodePage AS DWORD
 , BYVAL dwFlags AS DWORD
 , BYREF lpCPInfoEx AS CPINFOEXW
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO GetCPInfoEx = GetCPInfoExW
#ELSE
 MACRO GetCPInfoEx = GetCPInfoExA
#ENDIF
DECLARE FUNCTION IsDBCSLeadByte LIB "kernel32.dll" ALIAS "IsDBCSLeadByte" ( BYVAL TestChar AS BYTE ) AS LONG
DECLARE FUNCTION IsDBCSLeadByteEx LIB "kernel32.dll" ALIAS "IsDBCSLeadByteEx" ( BYVAL CodePage AS QUAD
 , BYVAL TestChar AS BYTE
 ) AS LONG
DECLARE FUNCTION MultiByteToWideChar LIB "kernel32.dll" ALIAS "MultiByteToWideChar" ( BYVAL CodePage AS DWORD
 , BYVAL dwFlags AS DWORD
 , BYREF lpMultiByteStr AS ASCIIZ
 , BYVAL cbMultiByte AS LONG
 , BYREF lpWideCharStr AS WSTRINGZ
 , BYVAL cchWideChar AS LONG
 ) AS LONG ' int
DECLARE FUNCTION WideCharToMultiByte LIB "kernel32.dll" ALIAS "WideCharToMultiByte" ( BYVAL CodePage AS QUAD , BYVAL dwFlags AS QUAD , BYREF lpWideCharStr AS WSTRINGZ , BYVAL cchWideChar AS LONG , BYREF lpMultiByteStr AS ASCIIZ , BYVAL cbMultiByte AS LONG , OPTIONAL BYREF lpDefaultChar AS ASCIIZ , OPTIONAL BYREF lpUsedDefaultChar AS LONG ) AS LONG ' int
'//
'// Locale Dependent APIs.
'//
'// For Windows Vista and above CompareStringEx is preferred
DECLARE FUNCTION CompareStringA LIB "kernel32.dll" ALIAS "CompareStringA" ( BYVAL Locale AS QUAD , BYVAL dwCmpFlags AS QUAD , BYREF lpString1 AS ASCIIZ , BYVAL cchCount1 AS LONG , BYREF lpString2 AS ASCIIZ , BYVAL cchCount2 AS LONG ) AS LONG ' int
DECLARE FUNCTION CompareStringW LIB "kernel32.dll" ALIAS "CompareStringW" ( BYVAL Locale AS QUAD , BYVAL dwCmpFlags AS QUAD , BYREF lpString1 AS WSTRINGZ , BYVAL cchCount1 AS LONG , BYREF lpString2 AS WSTRINGZ , BYVAL cchCount2 AS LONG ) AS LONG ' int
#IF %DEF(%UNICODE)
 MACRO CompareString = CompareStringW
#ELSE
 MACRO CompareString = CompareStringA
#ENDIF
'#if (WINVER >= 0x0600)
'// For Windows Vista and above FindNLSStringEx is preferred
DECLARE FUNCTION FindNLSString LIB "kernel32.dll" ALIAS "FindNLSString" ( BYVAL Locale AS QUAD , BYVAL dwFindNLSStringFlags AS QUAD , BYREF lpStringSource AS WSTRINGZ , BYVAL cchSource AS LONG , BYREF lpStringValue AS WSTRINGZ , BYVAL cchValue AS LONG , OPTIONAL BYREF pcchFound AS LONG ) AS LONG ' int
'#endif //(WINVER >= 0x0600)
'#if (WINVER >= _WIN32_WINNT_WIN7)
DECLARE FUNCTION FindStringOrdinal LIB "kernel32.dll" ALIAS "FindStringOrdinal" ( BYVAL dwFindStringOrdinalFlags AS QUAD , BYREF lpStringSource AS WSTRINGZ , BYVAL cchSource AS LONG , BYREF lpStringValue AS WSTRINGZ , BYVAL cchValue AS LONG , BYVAL bIgnoreCase AS LONG ) AS LONG ' int
'#endif //(WINVER >= _WIN32_WINNT_WIN7)
'// For Windows Vista and above LCMapStringEx is preferred
DECLARE FUNCTION LCMapStringA LIB "kernel32.dll" ALIAS "LCMapStringA" ( BYVAL Locale AS QUAD , BYVAL dwMapFlags AS QUAD , BYREF lpSrcStr AS ASCIIZ , BYVAL cchSrc AS LONG , BYREF lpDestStr AS ASCIIZ , BYVAL cchDest AS LONG ) AS LONG ' int
'// For Windows Vista and above LCMapStringEx is preferred
DECLARE FUNCTION LCMapStringW LIB "kernel32.dll" ALIAS "LCMapStringW" ( BYVAL Locale AS QUAD , BYVAL dwMapFlags AS QUAD , BYREF lpSrcStr AS WSTRINGZ , BYVAL cchSrc AS LONG , BYREF lpDestStr AS WSTRINGZ , BYVAL cchDest AS LONG ) AS LONG ' int
#IF %DEF(%UNICODE)
 MACRO LCMapString = LCMapStringW
#ELSE
 MACRO LCMapString = LCMapStringA
#ENDIF
' // For Windows Vista and above GetLocaleInfoEx is preferred
' // Note: The lpLCData has been declared as ANY because this parameter can be used for
' // numbers if LOCALE_RETURN_NUMBER is used in LCType.
DECLARE FUNCTION GetLocaleInfoA LIB "kernel32.dll" ALIAS "GetLocaleInfoA" ( BYVAL Locale AS QUAD , BYVAL LCType AS QUAD , BYREF lpLCData AS ASCIIZ , BYVAL cchData AS LONG ) AS LONG ' int
' // For Windows Vista and above GetLocaleInfoEx is preferred
' // Note: The lpLCData has been declared as ANY because this parameter can be used for
' // numbers if LOCALE_RETURN_NUMBER is used in LCType.
DECLARE FUNCTION GetLocaleInfoW LIB "kernel32.dll" ALIAS "GetLocaleInfoW" ( BYVAL Locale AS QUAD , BYVAL LCType AS QUAD , BYREF lpLCData AS WSTRINGZ , BYVAL cchData AS LONG ) AS LONG ' int
#IF %DEF(%UNICODE)
 MACRO GetLocaleInfo = GetLocaleInfoW
#ELSE
 MACRO GetLocaleInfo = GetLocaleInfoA
#ENDIF
DECLARE FUNCTION SetLocaleInfoA LIB "kernel32.dll" ALIAS "SetLocaleInfoA" ( BYVAL Locale AS QUAD , BYVAL LCType AS QUAD , BYREF lpLCData AS ASCIIZ ) AS LONG
DECLARE FUNCTION SetLocaleInfoW LIB "kernel32.dll" ALIAS "SetLocaleInfoW" ( BYVAL Locale AS QUAD
 , BYVAL LCType AS DWORD
 , BYREF lpLCData AS WSTRINGZ
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO SetLocaleInfo = SetLocaleInfoW
#ELSE
 MACRO SetLocaleInfo = SetLocaleInfoA
#ENDIF
'#if (WINVER >= 0x040A)
'// For Windows Vista and above GetCalendarInfoEx is preferred
DECLARE FUNCTION GetCalendarInfoA LIB "kernel32.dll" ALIAS "GetCalendarInfoA" ( BYVAL Locale AS QUAD , BYVAL Calendar AS QUAD , BYVAL CalType AS QUAD , BYREF lpCalData AS ASCIIZ , BYVAL cchData AS LONG , OPTIONAL BYREF lpValue AS QUAD ) AS LONG ' int
'// For Windows Vista and above GetCalendarInfoEx is preferred
DECLARE FUNCTION GetCalendarInfoW LIB "kernel32.dll" ALIAS "GetCalendarInfoW" ( BYVAL Locale AS QUAD , BYVAL Calendar AS QUAD , BYVAL CalType AS QUAD , BYREF lpCalData AS WSTRINGZ , BYVAL cchData AS LONG , OPTIONAL BYREF lpValue AS QUAD ) AS LONG ' int
#IF %DEF(%UNICODE)
 MACRO GetCalendarInfo = GetCalendarInfoW
#ELSE
 MACRO GetCalendarInfo = GetCalendarInfoA
#ENDIF
DECLARE FUNCTION SetCalendarInfoA LIB "kernel32.dll" ALIAS "SetCalendarInfoA" ( BYVAL Locale AS QUAD , BYVAL Calendar AS QUAD , BYVAL CalType AS QUAD , BYREF lpCalData AS ASCIIZ ) AS LONG
DECLARE FUNCTION SetCalendarInfoW LIB "kernel32.dll" ALIAS "SetCalendarInfoW" ( BYVAL Locale AS QUAD
 , BYVAL Calendar AS DWORD
 , BYVAL CalType AS DWORD
 , BYREF lpCalData AS WSTRINGZ
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO SetCalendarInfo = SetCalendarInfoW
#ELSE
 MACRO SetCalendarInfo = SetCalendarInfoA
#ENDIF
'#if (WINVER >= 0x0600)
DECLARE FUNCTION LCIDToLocaleName LIB "kernel32.dll" ALIAS "LCIDToLocaleName" ( BYVAL Locale AS QUAD , BYREF lpName AS WSTRINGZ , BYVAL cchName AS LONG , BYVAL dwFlags AS QUAD ) AS LONG ' int
DECLARE FUNCTION LocaleNameToLCID LIB "kernel32.dll" ALIAS "LCIDToLocaleName" ( BYREF lpName AS WSTRINGZ , BYVAL dwFlags AS QUAD ) AS QUAD ' LCID
'#endif // (WINVER >= 0x0600)
'// For Windows Vista and above GetTimeFormatEx is preferred
DECLARE FUNCTION GetTimeFormatA LIB "kernel32.dll" ALIAS "GetTimeFormatA" ( BYVAL Locale AS QUAD , BYVAL dwFlags AS QUAD , BYREF lpTime AS SYSTEMTIME , BYREF lpFormat AS ASCIIZ , BYREF lpTimeStr AS ASCIIZ , BYVAL cchTime AS LONG ) AS LONG ' int
'// For Windows Vista and above GetTimeFormatEx is preferred
DECLARE FUNCTION GetTimeFormatW LIB "kernel32.dll" ALIAS "GetTimeFormatW" ( BYVAL Locale AS QUAD , BYVAL dwFlags AS QUAD , BYREF lpTime AS SYSTEMTIME , BYREF lpFormat AS WSTRINGZ , BYREF lpTimeStr AS WSTRINGZ , BYVAL cchTime AS LONG ) AS LONG ' int
#IF %DEF(%UNICODE)
 MACRO GetTimeFormat = GetTimeFormatW
#ELSE
 MACRO GetTimeFormat = GetTimeFormatA
#ENDIF
'#if (WINVER >= 0x0600)
'// For Windows Vista and above GetDurationFormatEx is preferred
DECLARE FUNCTION GetDurationFormat LIB "kernel32.dll" ALIAS "GetDurationFormat" ( BYVAL Locale AS QUAD , BYVAL dwFlags AS QUAD , BYREF lpDuration AS SYSTEMTIME , BYVAL ullDuration AS QUAD , BYREF lpFormat AS WSTRINGZ , BYREF lpDurationStr AS WSTRINGZ , BYVAL cchDuration AS LONG ) AS LONG ' int
'#endif //(WINVER >= 0x0600)
'// For Windows Vista and above GetDateFormatEx is preferred
DECLARE FUNCTION GetDateFormatA LIB "kernel32.dll" ALIAS "GetDateFormatA" ( BYVAL Locale AS QUAD , BYVAL dwFlags AS QUAD , BYREF lpDate AS SYSTEMTIME , BYREF lpFormat AS ASCIIZ , BYREF lpDateStr AS ASCIIZ , BYVAL cchDate AS LONG ) AS LONG ' int
'// For Windows Vista and above GetDateFormatEx is preferred
DECLARE FUNCTION GetDateFormatW LIB "kernel32.dll" ALIAS "GetDateFormatW" ( BYVAL Locale AS QUAD , BYVAL dwFlags AS QUAD , BYREF lpDate AS SYSTEMTIME , BYREF lpFormat AS WSTRINGZ , BYREF lpDateStr AS WSTRINGZ , BYVAL cchDate AS LONG ) AS LONG ' int
#IF %DEF(%UNICODE)
 MACRO GetDateFormat = GetDateFormatW
#ELSE
 MACRO GetDateFormat = GetDateFormatA
#ENDIF
'// For Windows Vista and above GetNumberFormatEx is preferred
DECLARE FUNCTION GetNumberFormatA LIB "kernel32.dll" ALIAS "GetNumberFormatA" ( BYVAL Locale AS QUAD , BYVAL dwFlags AS QUAD , BYREF lpValue AS ASCIIZ , BYREF lpFormat AS NUMBERFMTA , BYREF lpNumberStr AS ASCIIZ , BYVAL cchNumber AS LONG ) AS LONG ' int
'// For Windows Vista and above GetNumberFormatEx is preferred
DECLARE FUNCTION GetNumberFormatW LIB "kernel32.dll" ALIAS "GetNumberFormatW" ( BYVAL Locale AS QUAD , BYVAL dwFlags AS QUAD , BYREF lpValue AS WSTRINGZ , BYREF lpFormat AS NUMBERFMTW , BYREF lpNumberStr AS WSTRINGZ , BYVAL cchNumber AS LONG ) AS LONG ' int
#IF %DEF(%UNICODE)
 MACRO GetNumberFormat = GetNumberFormatW
#ELSE
 MACRO GetNumberFormat = GetNumberFormatA
#ENDIF
'// For Windows Vista and above GetCurrencyFormatEx is preferred
DECLARE FUNCTION GetCurrencyFormatA LIB "kernel32.dll" ALIAS "GetCurrencyFormatA" ( BYVAL Locale AS QUAD , BYVAL dwFlags AS QUAD , BYREF lpValue AS ASCIIZ , BYREF lpFormat AS CURRENCYFMTA , BYREF lpCurrencyStr AS ASCIIZ , BYVAL cchCurrency AS LONG ) AS LONG ' int
'// For Windows Vista and above GetCurrencyFormatEx is preferred
DECLARE FUNCTION GetCurrencyFormatW LIB "kernel32.dll" ALIAS "GetCurrencyFormatW" ( BYVAL Locale AS QUAD , BYVAL dwFlags AS QUAD , BYREF lpValue AS WSTRINGZ , BYREF lpFormat AS CURRENCYFMTW , BYREF lpCurrencyStr AS WSTRINGZ , BYVAL cchCurrency AS LONG ) AS LONG ' int
#IF %DEF(%UNICODE)
 MACRO GetCurrencyFormat = GetCurrencyFormatW
#ELSE
 MACRO GetCurrencyFormat = GetCurrencyFormatA
#ENDIF
'// For Windows Vista and above EnumCalendarInfoExEx is preferred
DECLARE FUNCTION EnumCalendarInfoA LIB "kernel32.dll" ALIAS "EnumCalendarInfoA" ( BYVAL lpCalInfoEnumProc AS QUAD , BYVAL Locale AS QUAD , BYVAL Calendar AS QUAD , BYVAL CalType AS QUAD ) AS LONG
'// For Windows Vista and above EnumCalendarInfoExEx is preferred
DECLARE FUNCTION EnumCalendarInfoW LIB "kernel32.dll" ALIAS "EnumCalendarInfoW" ( BYVAL lpCalInfoEnumProc AS QUAD , BYVAL Locale AS QUAD , BYVAL Calendar AS QUAD , BYVAL CalType AS QUAD ) AS LONG
#IF %DEF(%UNICODE)
 MACRO EnumCalendarInfo = EnumCalendarInfoW
#ELSE
 MACRO EnumCalendarInfo = EnumCalendarInfoA
#ENDIF
'#if(WINVER >= 0x0500)
'// For Windows Vista and above EnumCalendarInfoExEx is preferred
DECLARE FUNCTION EnumCalendarInfoExA LIB "kernel32.dll" ALIAS "EnumCalendarInfoExA" ( BYVAL lpCalInfoEnumProcEx AS QUAD , BYVAL Locale AS QUAD , BYVAL Calendar AS QUAD , BYVAL CalType AS QUAD ) AS LONG
'// For Windows Vista and above EnumCalendarInfoExEx is preferred
DECLARE FUNCTION EnumCalendarInfoExW LIB "kernel32.dll" ALIAS "EnumCalendarInfoExW" ( BYVAL lpCalInfoEnumProcEx AS QUAD , BYVAL Locale AS QUAD , BYVAL Calendar AS QUAD , BYVAL CalType AS QUAD ) AS LONG
#IF %DEF(%UNICODE)
 MACRO EnumCalendarInfoEx = EnumCalendarInfoExW
#ELSE
 MACRO EnumCalendarInfoEx = EnumCalendarInfoExA
#ENDIF
'#endif /* WINVER >= 0x0500 */
'// For Windows Vista and above EnumTimeFormatsEx is preferred
DECLARE FUNCTION EnumTimeFormatsA LIB "kernel32.dll" ALIAS "EnumTimeFormatsA" ( BYVAL lpTimeFmtEnumProc AS QUAD , BYVAL Locale AS QUAD , BYVAL dwFlags AS QUAD ) AS LONG
'// For Windows Vista and above EnumTimeFormatsEx is preferred
DECLARE FUNCTION EnumTimeFormatsW LIB "kernel32.dll" ALIAS "EnumTimeFormatsW" ( BYVAL lpTimeFmtEnumProc AS QUAD , BYVAL Locale AS QUAD , BYVAL dwFlags AS QUAD ) AS LONG
#IF %DEF(%UNICODE)
 MACRO EnumTimeFormats = EnumTimeFormatsW
#ELSE
 MACRO EnumTimeFormats = EnumTimeFormatsA
#ENDIF
'// For Windows Vista and above EnumDateFormatsExEx is preferred
DECLARE FUNCTION EnumDateFormatsA LIB "kernel32.dll" ALIAS "EnumDateFormatsA" ( BYVAL lpDateFmtEnumProc AS QUAD , BYVAL Locale AS QUAD , BYVAL dwFlags AS QUAD ) AS LONG
'// For Windows Vista and above EnumDateFormatsExEx is preferred
DECLARE FUNCTION EnumDateFormatsW LIB "kernel32.dll" ALIAS "EnumDateFormatsW" ( BYVAL lpDateFmtEnumProc AS QUAD , BYVAL Locale AS QUAD , BYVAL dwFlags AS QUAD ) AS LONG
#IF %DEF(%UNICODE)
 MACRO EnumDateFormats = EnumDateFormatsW
#ELSE
 MACRO EnumDateFormats = EnumDateFormatsA
#ENDIF
'#if(WINVER >= 0x0500)
'// For Windows Vista and above EnumDateFormatsExEx is preferred
DECLARE FUNCTION EnumDateFormatsExA LIB "kernel32.dll" ALIAS "EnumDateFormatsExA" ( BYVAL lpDateFmtEnumProcEx AS QUAD , BYVAL Locale AS QUAD , BYVAL dwFlags AS QUAD ) AS LONG
'// For Windows Vista and above EnumDateFormatsExEx is preferred
DECLARE FUNCTION EnumDateFormatsExW LIB "kernel32.dll" ALIAS "EnumDateFormatsExW" ( BYVAL lpDateFmtEnumProcEx AS QUAD , BYVAL Locale AS QUAD , BYVAL dwFlags AS QUAD ) AS LONG
#IF %DEF(%UNICODE)
 MACRO EnumDateFormatsEx = EnumDateFormatsExW
#ELSE
 MACRO EnumDateFormatsEx = EnumDateFormatsExA
#ENDIF
'#endif /* WINVER >= 0x0500 */
'#if(WINVER >= 0x0500)
DECLARE FUNCTION IsValidLanguageGroup LIB "kernel32.dll" ALIAS "IsValidLanguageGroup" ( BYVAL LanguageGroup AS QUAD , BYVAL dwFlags AS QUAD ) AS LONG
'#endif /* WINVER >= 0x0500 */
'// For Windows Vista and above GetNLSVersionEx is preferred
DECLARE FUNCTION GetNLSVersion LIB "kernel32.dll" ALIAS "GetNLSVersion" ( BYVAL Function AS QUAD , BYVAL Locale AS QUAD , BYREF lpVersionInformation AS NLSVERSIONINFO ) AS LONG
DECLARE FUNCTION IsNLSDefinedString LIB "kernel32.dll" ALIAS "IsNLSDefinedString" ( BYVAL Function AS QUAD
 , BYVAL dwFlags AS DWORD
 , BYREF lpVersionInformation AS NLSVERSIONINFO
 , BYREF lpString AS WSTRINGZ
 , BYVAL cchStr AS LONG
 ) AS LONG
'// For Windows Vista and above IsValidLocaleName is preferred
DECLARE FUNCTION IsValidLocale LIB "kernel32.dll" ALIAS "IsValidLocale" ( BYVAL Locale AS QUAD , BYVAL dwFlags AS QUAD ) AS LONG
DECLARE FUNCTION GetGeoInfoA LIB "kernel32.dll" ALIAS "GetGeoInfoA" ( BYVAL Location AS LONG
 , BYVAL GeoType AS DWORD
 , BYREF lpGeoData AS ASCIIZ
 , BYVAL cchData AS LONG
 , BYVAL LangId AS WORD
 ) AS LONG ' int
DECLARE FUNCTION GetGeoInfoW LIB "kernel32.dll" ALIAS "GetGeoInfoW" ( BYVAL Location AS LONG , BYVAL GeoType AS QUAD , BYREF lpGeoData AS WSTRINGZ , BYVAL cchData AS LONG , BYVAL LangId AS WORD ) AS LONG ' int
#IF %DEF(%UNICODE)
 MACRO GetGeoInfo = GetGeoInfoW
#ELSE
 MACRO GetGeoInfo = GetGeoInfoA
#ENDIF
DECLARE FUNCTION EnumSystemGeoID LIB "kernel32.dll" ALIAS "EnumSystemGeoID" ( BYVAL GeoClass AS QUAD , BYVAL ParentGeoId AS LONG , BYVAL lpGeoEnumProc AS QUAD ) AS LONG
DECLARE FUNCTION GetUserGeoID LIB "kernel32.dll" ALIAS "GetUserGeoID" ( BYVAL GeoClass AS QUAD
 ) AS LONG ' GEOID
DECLARE FUNCTION SetUserGeoID LIB "kernel32.dll" ALIAS "SetUserGeoID" ( BYVAL GeoId AS LONG ) AS LONG
DECLARE FUNCTION ConvertDefaultLocale LIB "kernel32.dll" ALIAS "ConvertDefaultLocale" ( BYVAL Locale AS QUAD
 ) AS DWORD ' LCID
DECLARE FUNCTION GetThreadLocale LIB "kernel32.dll" ALIAS "GetThreadLocale" ( ) AS QUAD ' LCID
DECLARE FUNCTION SetThreadLocale LIB "kernel32.dll" ALIAS "SetThreadLocale" ( BYVAL Locale AS QUAD ) AS LONG
'#if(WINVER >= 0x0500)
DECLARE FUNCTION GetSystemDefaultUILanguage LIB "kernel32.dll" ALIAS "GetSystemDefaultUILanguage" ( ) AS WORD ' LANGID
DECLARE FUNCTION GetUserDefaultUILanguage LIB "kernel32.dll" ALIAS "GetUserDefaultUILanguage" ( ) AS WORD ' LANGID
'#endif /* WINVER >= 0x0500 */
DECLARE FUNCTION GetSystemDefaultLangID LIB "kernel32.dll" ALIAS "GetSystemDefaultLangID" ( ) AS WORD ' LANGID
DECLARE FUNCTION GetUserDefaultLangID LIB "kernel32.dll" ALIAS "GetUserDefaultLangID" ( ) AS WORD ' LANGID
DECLARE FUNCTION GetSystemDefaultLCID LIB "kernel32.dll" ALIAS "GetSystemDefaultLCID" ( ) AS QUAD ' LCID
DECLARE FUNCTION GetUserDefaultLCID LIB "kernel32.dll" ALIAS "GetUserDefaultLCID" ( ) AS QUAD
DECLARE FUNCTION SetThreadUILanguage LIB "kernel32.dll" ALIAS "SetThreadUILanguage" ( BYVAL WORD
 ) AS WORD ' LANGID
'#if (WINVER >= 0x0600)
DECLARE FUNCTION GetThreadUILanguage LIB "kernel32.dll" ALIAS "GetThreadUILanguage" ( ) AS WORD ' LANGID
DECLARE FUNCTION GetProcessPreferredUILanguages LIB "kernel32.dll" ALIAS "GetProcessPreferredUILanguages" ( BYVAL dwFlags AS QUAD , BYREF pulNumLanguages AS QUAD , BYREF pwszLanguagesBuffer AS ANY , BYREF pcchLanguagesBuffer AS QUAD ) AS LONG
DECLARE FUNCTION SetProcessPreferredUILanguages LIB "kernel32.dll" ALIAS "SetProcessPreferredUILanguages" ( BYVAL dwFlags AS QUAD
 , OPTIONAL BYREF pwszLanguagesBuffer AS ANY
 , OPTIONAL BYREF pulNumLanguages AS DWORD
 ) AS LONG
DECLARE FUNCTION GetUserPreferredUILanguages LIB "kernel32.dll" ALIAS "GetUserPreferredUILanguages" ( BYVAL dwFlags AS DWORD
 , BYREF pulNumLanguages AS DWORD
 , BYREF pcchLanguagesBuffer AS ANY
 , BYVAL pcchLanguagesBuffer AS DWORD
 ) AS LONG
DECLARE FUNCTION GetSystemPreferredUILanguages LIB "kernel32.dll" ALIAS "GetSystemPreferredUILanguages" ( BYVAL dwFlags AS DWORD
 , BYREF pulNumLanguages AS DWORD
 , BYREF pcchLanguagesBuffer AS ANY
 , BYVAL pcchLanguagesBuffer AS DWORD
 ) AS LONG
DECLARE FUNCTION GetThreadPreferredUILanguages LIB "kernel32.dll" ALIAS "GetThreadPreferredUILanguages" ( BYVAL dwFlags AS DWORD
 , BYREF pulNumLanguages AS DWORD
 , BYREF pwszLanguagesBuffer AS ANY
 , BYVAL pcchLanguagesBuffer AS DWORD
 ) AS LONG
DECLARE FUNCTION SetThreadPreferredUILanguages LIB "kernel32.dll" ALIAS "SetThreadPreferredUILanguages" ( BYVAL dwFlags AS DWORD
 , OPTIONAL BYREF pwszLanguagesBuffer AS ANY
 , OPTIONAL BYVAL pulNumLanguages AS DWORD
 ) AS LONG
DECLARE FUNCTION GetFileMUIInfo LIB "kernel32.dll" ALIAS "GetFileMUIInfo" ( BYVAL dwFlags AS DWORD
 , BYREF pcwszFilePath AS WSTRINGZ
 , BYREF pFileMUIInfo AS FILEMUIINFO
 , BYREF pcbFileMUIInfo AS DWORD
 ) AS LONG
DECLARE FUNCTION GetFileMUIPath LIB "kernel32.dll" ALIAS "GetFileMUIPath" ( BYVAL dwFlags AS DWORD
 , BYREF pcwszFilePath AS WSTRINGZ
 , BYREF pwszLanguage AS WSTRINGZ
 , BYREF pcchLanguage AS DWORD
 , BYREF pwszFileMUIPath AS WSTRINGZ
 , BYREF pcchFileMUIPath AS DWORD
 , BYREF pululEnumerator AS QUAD
 ) AS LONG
DECLARE FUNCTION GetUILanguageInfo LIB "kernel32.dll" ALIAS "GetUILanguageInfo" ( BYVAL dwFlags AS DWORD
 , BYREF pwmszLanguage AS ANY
 , BYREF pwszFallbackLanguages AS ANY
 , BYREF pcchFallbackLanguages AS DWORD
 , BYREF pAttributes AS DWORD
 ) AS LONG
DECLARE FUNCTION NotifyUILanguageChange LIB "kernel32.dll" ALIAS "NotifyUILanguageChange" ( BYVAL dwFlags AS DWORD
 , BYREF pcwstrNewLanguage AS WSTRINGZ
 , BYREF pcwstrPreviousLanguage AS WSTRINGZ
 , BYVAL dwReserved AS DWORD
 , OPTIONAL BYREF pdwStatusRtrn AS DWORD
 ) AS LONG
'#endif
'//
'// Locale Independent APIs.
'//
DECLARE FUNCTION GetStringTypeExA LIB "kernel32.dll" ALIAS "GetStringTypeExA" ( BYVAL Locale AS QUAD , BYVAL dwInfoType AS QUAD , BYREF lpSrcStr AS ASCIIZ , BYVAL cchSrc AS LONG , BYREF lpCharType AS WORD ) AS LONG
DECLARE FUNCTION GetStringTypeExW LIB "kernel32.dll" ALIAS "GetStringTypeExW" ( BYVAL Locale AS QUAD
 , BYVAL dwInfoType AS DWORD
 , BYREF lpSrcStr AS WSTRINGZ
 , BYVAL cchSrc AS LONG
 , BYREF lpCharType AS WORD
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO GetStringTypeEx = GetStringTypeExW
#ELSE
 MACRO GetStringTypeEx = GetStringTypeExA
#ENDIF
'//
'// NOTE: The parameters for GetStringTypeA and GetStringTypeW are
'// NOT the same. The W version was shipped in NT 3.1. The
'// A version was then shipped in 16-bit OLE with the wrong
'// parameters (ported from Win95). To be compatible, we
'// must break the relationship between the A and W versions
'// of GetStringType. There will be NO function call for the
'// generic GetStringType.
'//
'// GetStringTypeEx (above) should be used instead.
'//
DECLARE FUNCTION GetStringTypeA LIB "kernel32.dll" ALIAS "GetStringTypeA" ( BYVAL Locale AS QUAD , BYVAL dwInfoType AS QUAD , BYREF lpSrcStr AS ASCIIZ , BYVAL cchSrc AS LONG , BYREF lpCharType AS WORD ) AS LONG
DECLARE FUNCTION GetStringTypeW LIB "kernel32.dll" ALIAS "GetStringTypeW" ( BYVAL dwInfoType AS QUAD
 , BYREF lpSrcStr AS WSTRINGZ
 , BYVAL cchSrc AS LONG
 , BYREF lpCharType AS WORD
 ) AS LONG
DECLARE FUNCTION FoldStringA LIB "kernel32.dll" ALIAS "FoldStringA" ( BYVAL dwMapFlags AS DWORD
 , BYREF lpSrcStr AS ASCIIZ
 , BYVAL cchSrc AS LONG
 , BYREF lpDestStr AS ASCIIZ
 , BYVAL cchDest AS LONG
 ) AS LONG ' int
DECLARE FUNCTION FoldStringW LIB "kernel32.dll" ALIAS "FoldStringW" ( BYVAL dwMapFlags AS QUAD , BYREF lpSrcStr AS WSTRINGZ , BYVAL cchSrc AS LONG , BYREF lpDestStr AS WSTRINGZ , BYVAL cchDest AS LONG ) AS LONG ' int
#IF %DEF(%UNICODE)
 MACRO FoldString = FoldStringW
#ELSE
 MACRO FoldString = FoldStringA
#ENDIF
'#if(WINVER >= 0x0500)
DECLARE FUNCTION EnumSystemLanguageGroupsA LIB "kernel32.dll" ALIAS "EnumSystemLanguageGroupsA" ( BYVAL lpLanguageGroupEnumProc AS QUAD , BYVAL dwFlags AS QUAD , BYVAL lParam AS LONG ) AS LONG
DECLARE FUNCTION EnumSystemLanguageGroupsW LIB "kernel32.dll" ALIAS "EnumSystemLanguageGroupsW" ( BYVAL lpLanguageGroupEnumProc AS QUAD
 , BYVAL dwFlags AS DWORD
 , BYVAL lParam AS LONG
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO EnumSystemLanguageGroups = EnumSystemLanguageGroupsW
#ELSE
 MACRO EnumSystemLanguageGroups = EnumSystemLanguageGroupsA
#ENDIF
DECLARE FUNCTION EnumLanguageGroupLocalesA LIB "kernel32.dll" ALIAS "EnumLanguageGroupLocalesA" ( BYVAL lpLangGroupLocaleEnumProc AS QUAD , BYVAL LanguageGroup AS QUAD , BYVAL dwFlags AS QUAD , BYVAL lParam AS LONG ) AS LONG
DECLARE FUNCTION EnumLanguageGroupLocalesW LIB "kernel32.dll" ALIAS "EnumLanguageGroupLocalesW" ( BYVAL lpLangGroupLocaleEnumProc AS QUAD
 , BYVAL LanguageGroup AS DWORD
 , BYVAL dwFlags AS DWORD
 , BYVAL lParam AS LONG
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO EnumLanguageGroupLocales = EnumLanguageGroupLocalesW
#ELSE
 MACRO EnumLanguageGroupLocales = EnumLanguageGroupLocalesA
#ENDIF
DECLARE FUNCTION EnumUILanguagesA LIB "kernel32.dll" ALIAS "EnumUILanguagesA" ( BYVAL lpUILanguageEnumProc AS QUAD , BYVAL dwFlags AS QUAD , BYVAL lParam AS LONG ) AS LONG
DECLARE FUNCTION EnumUILanguagesW LIB "kernel32.dll" ALIAS "EnumUILanguagesW" ( BYVAL lpUILanguageEnumProc AS QUAD
 , BYVAL dwFlags AS DWORD
 , BYVAL lParam AS LONG
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO EnumUILanguages = EnumUILanguagesW
#ELSE
 MACRO EnumUILanguages = EnumUILanguagesA
#ENDIF
'#endif /* WINVER >= 0x0500 */
DECLARE FUNCTION EnumSystemLocalesA LIB "kernel32.dll" ALIAS "EnumSystemLocalesA" ( BYVAL lpLocaleEnumProc AS QUAD , BYVAL dwFlags AS QUAD ) AS LONG
DECLARE FUNCTION EnumSystemLocalesW LIB "kernel32.dll" ALIAS "EnumSystemLocalesW" ( BYVAL lpLocaleEnumProc AS QUAD
 , BYVAL dwFlags AS DWORD
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO EnumSystemLocales = EnumSystemLocalesW
#ELSE
 MACRO EnumSystemLocales = EnumSystemLocalesA
#ENDIF
DECLARE FUNCTION EnumSystemCodePagesA LIB "kernel32.dll" ALIAS "EnumSystemCodePagesA" ( BYVAL lpCodePageEnumProc AS QUAD , BYVAL dwFlags AS QUAD ) AS LONG
DECLARE FUNCTION EnumSystemCodePagesW LIB "kernel32.dll" ALIAS "EnumSystemCodePagesW" ( BYVAL lpCodePageEnumProc AS QUAD
 , BYVAL dwFlags AS DWORD
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO EnumSystemCodePages = EnumSystemCodePagesW
#ELSE
 MACRO EnumSystemCodePages = EnumSystemCodePagesA
#ENDIF
'#if (WINVER >= 0x0600)
'//
'// Windows API Normalization Functions
'//
DECLARE FUNCTION NormalizeString LIB "normaliz.dll" ALIAS "NormalizeString" ( BYVAL NormForm AS QUAD , BYREF lpSrcString AS WSTRINGZ , BYVAL cwSrcLength AS LONG , BYREF lpDstString AS WSTRINGZ , BYVAL cwDstLength AS LONG ) AS LONG ' int
DECLARE FUNCTION IsNormalizedString LIB "normaliz.dll" ALIAS "IsNormalizedString" ( BYVAL NormForm AS QUAD , BYREF lpString AS WSTRINGZ , BYVAL cwLength AS LONG ) AS LONG ' int
'//
'// IDN (International Domain Name) Functions
'//
DECLARE FUNCTION IdnToAscii LIB "normaliz.dll" ALIAS "IdnToAscii" ( BYVAL dwFlags AS QUAD , BYREF lpUnicodeCharStr AS WSTRINGZ , BYVAL cchUnicodeChar AS LONG , BYREF lpASCIICharStr AS WSTRINGZ , BYVAL cchASCIIChar AS LONG ) AS LONG ' int
DECLARE FUNCTION IdnToNameprepUnicode LIB "normaliz.dll" ALIAS "IdnToNameprepUnicode" ( BYVAL dwFlags AS QUAD , BYREF lpUnicodeCharStr AS WSTRINGZ , BYVAL cchUnicodeChar AS LONG , BYREF lpNameprepCharStr AS WSTRINGZ , BYVAL cchNameprepChar AS LONG ) AS LONG ' int
DECLARE FUNCTION IdnToUnicode LIB "normaliz.dll" ALIAS "IdnToUnicode" ( BYVAL dwFlags AS QUAD , BYREF lpASCIICharStr AS WSTRINGZ , BYVAL cchASCIIChar AS LONG , BYREF lpUnicodeCharStr AS WSTRINGZ , BYVAL cchUnicodeChar AS LONG ) AS LONG ' int
#IF %DEF(%USEPBDECL)
DECLARE FUNCTION VerifyScripts LIB "Kernel32.dll" ALIAS "VerifyScripts" (BYVAL dwFlags AS QUAD, ' optional behavior flags
 BYVAL lpLocaleScripts AS DWORD, ' Locale list of scripts string
 BYVAL cchLocaleScripts AS LONG, ' size of locale script list string
 BYVAL lpTestScripts AS DWORD, ' test scripts string
 BYVAL cchTestScripts AS LONG) ' size of test list string
 AS LONG
#ELSE
DECLARE FUNCTION VerifyScripts LIB "kernel32.dll" ALIAS "VerifyScripts" ( BYVAL dwFlags AS QUAD , BYREF lpLocaleScripts AS WSTRINGZ , BYVAL cchLocaleScripts AS LONG , BYREF lpTestScripts AS WSTRINGZ , BYVAL cchTestScripts AS LONG ) AS LONG
#ENDIF
#IF %DEF(%USEPBDECL)
DECLARE FUNCTION GetStringScripts LIB "Kernel32.dll" ALIAS "GetStringScripts" (BYVAL dwFlags AS QUAD, ' optional behavior flags
 BYVAL lpString AS DWORD PTR, ' Unicode character input string
 BYVAL cchString AS LONG, ' size of input string
 lpScripts AS WSTRINGZ, ' Script list output string
 BYVAL cchScripts AS LONG) ' size of output string
 AS LONG
#ELSE
DECLARE FUNCTION GetStringScripts LIB "kernel32.dll" ALIAS "GetStringScripts" ( BYVAL dwFlags AS QUAD , BYREF lpString AS WSTRINGZ , BYVAL cchString AS LONG , BYREF lpScripts AS WSTRINGZ , BYVAL cchScripts AS LONG ) AS LONG ' int
#ENDIF
'#endif //(WINVER >= 0x0600)
'#if (WINVER >= 0x0600)
'//
'// String based NLS APIs
'//
%EQUATE `LOCALE_NAME_USER_DEFAULT = %NULL
$$LOCALE_NAME_INVARIANT = ""$$
$$LOCALE_NAME_SYSTEM_DEFAULT = "!x-sys-default-locale"$$
' // Note: The lpLCData has been declared as ANY because this parameter can be used for
' // numbers if LOCALE_RETURN_NUMBER is used in LCType.
DECLARE FUNCTION GetLocaleInfoEx LIB "kernel32.dll" ALIAS "GetLocaleInfoEx" ( BYREF lpLocaleName AS WSTRINGZ , BYVAL LCType AS QUAD , BYREF lpLCData AS WSTRINGZ , BYVAL cchData AS LONG ) AS LONG ' int
DECLARE FUNCTION GetCalendarInfoEx LIB "kernel32.dll" ALIAS "GetCalendarInfoEx" ( BYREF lpLocaleName AS WSTRINGZ , BYVAL Calendar AS QUAD , BYREF lpReserved AS WSTRINGZ , BYVAL CalType AS QUAD , BYREF lpCalData AS WSTRINGZ , BYVAL cchData AS LONG , OPTIONAL BYREF lpValue AS QUAD ) AS LONG ' int
DECLARE FUNCTION GetTimeFormatEx LIB "kernel32.dll" ALIAS "GetTimeFormatEx" ( BYREF lpLocaleName AS WSTRINGZ , BYVAL dwFlags AS QUAD , BYREF lpTime AS SYSTEMTIME , BYREF lpFormat AS WSTRINGZ , BYREF lpTimeStr AS WSTRINGZ , BYVAL cchTime AS LONG ) AS LONG ' int
DECLARE FUNCTION GetDateFormatEx LIB "kernel32.dll" ALIAS "GetDateFormatEx" ( BYREF lpLocaleName AS WSTRINGZ , BYVAL dwFlags AS QUAD , BYREF lpDate AS SYSTEMTIME , BYREF lpFormat AS WSTRINGZ , BYREF lpDateStr AS WSTRINGZ , BYVAL cchDate AS LONG , OPTIONAL BYREF lpCalendar AS WSTRINGZ ) AS LONG ' int
DECLARE FUNCTION GetDurationFormatEx LIB "kernel32.dll" ALIAS "GetDurationFormatEx" ( BYREF lpLocaleName AS WSTRINGZ , BYVAL dwFlags AS QUAD , BYREF lpDuration AS SYSTEMTIME , BYVAL ullDuration AS QUAD , BYREF lpFormat AS WSTRINGZ , BYREF lpDurationStr AS WSTRINGZ , BYVAL cchDuration AS LONG ) AS LONG ' int
DECLARE FUNCTION GetNumberFormatEx LIB "kernel32.dll" ALIAS "GetNumberFormatEx" ( BYREF lpLocaleName AS WSTRINGZ , BYVAL dwFlags AS QUAD , BYREF lpValue AS WSTRINGZ , BYREF lpFormat AS NUMBERFMTW , BYREF lpNumberStr AS WSTRINGZ , BYVAL cchNumber AS LONG ) AS LONG ' int
DECLARE FUNCTION GetCurrencyFormatEx LIB "kernel32.dll" ALIAS "GetCurrencyFormatEx" ( BYREF lpLocaleName AS WSTRINGZ , BYVAL dwFlags AS QUAD , BYREF lpValue AS WSTRINGZ , BYREF lpFormat AS CURRENCYFMTW , BYREF lpCurrencyStr AS WSTRINGZ , BYVAL cchCurrency AS LONG ) AS LONG ' int
DECLARE FUNCTION GetUserDefaultLocaleName LIB "kernel32.dll" ALIAS "GetUserDefaultLocaleName" ( BYREF lpLocaleName AS WSTRINGZ , BYVAL cchLocaleName AS LONG ) AS LONG ' int
DECLARE FUNCTION GetSystemDefaultLocaleName LIB "kernel32.dll" ALIAS "GetSystemDefaultLocaleName" ( BYREF lpLocaleName AS WSTRINGZ , BYVAL cchLocaleName AS LONG ) AS LONG ' int
DECLARE FUNCTION GetNLSVersionEx LIB "kernel32.dll" ALIAS "GetNLSVersionEx" ( BYVAL function AS QUAD , BYREF lpLocaleName AS WSTRINGZ , BYREF lpVersionInformation AS NLSVERSIONINFOEX ) AS LONG
#IF %DEF(%USEPBDECL)
DECLARE FUNCTION CompareStringEx LIB "Kernel32.dll" ALIAS "CompareStringEx" (lpLocaleName AS WSTRINGZ, BYVAL dwCmpFlags AS QUAD, lpString1 AS WSTRINGZ, BYVAL cchCount1 AS LONG, lpString2 AS WSTRINGZ, BYVAL cchCount2 AS LONG, lpVersionInformation AS NLSVERSIONINFO, lpReserved AS QUAD, BYVAL lParam AS LONG) AS LONG
#ELSE
DECLARE FUNCTION CompareStringEx LIB "kernel32.dll" ALIAS "CompareStringEx" ( BYREF lpLocaleName AS WSTRINGZ , BYVAL dwCmpFlags AS QUAD , BYREF lpString1 AS WSTRINGZ , BYVAL cchCount1 AS LONG , BYREF lpString2 AS WSTRINGZ , BYVAL cchCount2 AS LONG , OPTIONAL BYREF lpVersionInformation AS NLSVERSIONINFO , OPTIONAL BYVAL lpReserved AS QUAD , OPTIONAL BYVAL lParam AS LONG ) AS LONG ' int
#ENDIF
#IF %DEF(%USEPBDECL)
DECLARE FUNCTION FindNLSStringEx LIB "Kernel32.dll" ALIAS "FindNLSStringEx" (lpLocaleName AS WSTRINGZ, BYVAL dwFindNLSStringFlags AS QUAD, lpStringSource AS WSTRINGZ, BYVAL cchSource AS LONG, lpStringValue AS WSTRINGZ, BYVAL cchValue AS LONG, pcchFound AS LONG, lpVersionInformation AS NLSVERSIONINFO, lpReserved AS QUAD, BYVAL lParam AS LONG) AS LONG
#ELSE
DECLARE FUNCTION FindNLSStringEx LIB "kernel32.dll" ALIAS "FindNLSStringEx" ( BYREF lpLocaleName AS WSTRINGZ , BYVAL dwFindNLSStringFlags AS QUAD , BYREF lpStringSource AS WSTRINGZ , BYVAL cchSource AS LONG , BYREF lpStringValue AS WSTRINGZ , BYVAL cchValue AS LONG , BYREF pcchFound AS LONG , OPTIONAL BYREF lpVersionInformation AS NLSVERSIONINFO , OPTIONAL BYVAL lpReserved AS QUAD , OPTIONAL BYVAL lParam AS LONG ) AS LONG ' int
#ENDIF
#IF %DEF(%USEPBDECL)
DECLARE FUNCTION LCMapStringEx LIB "Kernel32.dll" ALIAS "LCMapStringEx" (lpLocaleName AS WSTRINGZ, BYVAL dwMapFlags AS QUAD, lpSrcStr AS WSTRINGZ, BYVAL cchSrc AS LONG, lpDestStr AS WSTRINGZ, BYVAL cchDest AS LONG, lpVersionInformation AS NLSVERSIONINFO, lpReserved AS QUAD, BYVAL lParam AS LONG) AS LONG
#ELSE
DECLARE FUNCTION LCMapStringEx LIB "kernel32.dll" ALIAS "LCMapStringEx" ( BYREF lpLocaleName AS WSTRINGZ , BYVAL dwMapFlags AS QUAD , BYREF lpSrcStr AS WSTRINGZ , BYVAL cchSrc AS LONG , BYREF lpDestStr AS WSTRINGZ , BYVAL cchDest AS LONG , OPTIONAL BYREF lpVersionInformation AS NLSVERSIONINFO , OPTIONAL BYVAL lpReserved AS QUAD , OPTIONAL BYVAL lParam AS LONG ) AS LONG ' int
#ENDIF
DECLARE FUNCTION CompareStringOrdinal LIB "kernel32.dll" ALIAS "CompareStringOrdinal" ( BYREF lpString1 AS WSTRINGZ , BYVAL cchCount1 AS LONG , BYREF lpString2 AS WSTRINGZ , BYVAL cchCount2 AS LONG , BYVAL bIgnoreCase AS LONG ) AS LONG ' int
DECLARE FUNCTION IsValidLocaleName LIB "kernel32.dll" ALIAS "IsValidLocaleName" ( BYREF lpLocaleName AS WSTRINGZ ) AS LONG
'typedef BOOL (CALLBACK* CALINFO_ENUMPROCEXEX)(LPWSTR, CALID, LPWSTR, LPARAM);
DECLARE FUNCTION EnumCalendarInfoExEx LIB "kernel32.dll" ALIAS "EnumCalendarInfoExEx" ( BYVAL pCalInfoEnumProcExEx AS QUAD , BYREF lpLocaleName AS WSTRINGZ , BYVAL Calendar AS QUAD , BYREF lpReserved AS WSTRINGZ , BYVAL CalType AS QUAD , BYVAL lParam AS LONG ) AS LONG
'typedef BOOL (CALLBACK* DATEFMT_ENUMPROCEXEX)(LPWSTR, CALID, LPARAM);
DECLARE FUNCTION EnumDateFormatsExEx LIB "kernel32.dll" ALIAS "EnumDateFormatsExEx" ( BYVAL lpDateFmtEnumProcExEx AS QUAD , BYREF lpLocaleName AS WSTRINGZ , BYVAL dwFlags AS QUAD , BYVAL lParam AS LONG ) AS LONG
'typedef BOOL (CALLBACK* TIMEFMT_ENUMPROCEX)(LPWSTR, LPARAM);
DECLARE FUNCTION EnumTimeFormatsEx LIB "kernel32.dll" ALIAS "EnumTimeFormatsEx" ( BYVAL lpTimeFmtEnumProcEx AS QUAD , BYREF lpLocaleName AS WSTRINGZ , BYVAL dwFlags AS QUAD , BYVAL lParam AS LONG ) AS LONG
'typedef BOOL (CALLBACK* LOCALE_ENUMPROCEX)(LPWSTR, DWORD, LPARAM);
#IF %DEF(%USEPBDECL)
DECLARE FUNCTION EnumSystemLocalesEx LIB "Kernel32.dll" ALIAS "EnumSystemLocalesEx" (BYVAL lpLocaleEnumProcEx AS QUAD, BYVAL dwFlags AS QUAD, BYVAL lParam AS LONG, lpReserved AS QUAD) AS LONG
#ELSE
DECLARE FUNCTION EnumSystemLocalesEx LIB "kernel32.dll" ALIAS "EnumSystemLocalesEx" ( BYVAL lpLocaleEnumProcEx AS QUAD , BYVAL dwFlags AS QUAD , BYVAL lParam AS LONG , OPTIONAL BYVAL lpReserved AS QUAD ) AS LONG
#ENDIF
'#endif //(WINVER >= 0x0600)
'#if (WINVER >= _WIN32_WINNT_WIN7)
DECLARE FUNCTION ResolveLocaleName LIB "kernel32.dll" ALIAS "ResolveLocaleName" ( BYREF lpNameToResolve AS WSTRINGZ , BYREF lpLocaleName AS WSTRINGZ , BYVAL cchLocaleName AS LONG ) AS LONG ' int
'#endif // (WINVER >= _WIN32_WINNT_WIN7)
#ENDIF ' // NONLS
#ENDIF
