Home | History | Annotate | Download | only in include
      1 /**
      2  * This file is part of the mingw-w64 runtime package.
      3  * No warranty is given; refer to the file DISCLAIMER within this package.
      4  */
      5 
      6 #ifndef _WINNLS_
      7 #define _WINNLS_
      8 
      9 #include <winapifamily.h>
     10 
     11 #ifdef __cplusplus
     12 extern "C" {
     13 #endif
     14 
     15 #ifndef NOAPISET
     16 #include <datetimeapi.h>
     17 #include <libloaderapi.h>
     18 #endif
     19 
     20 #ifndef NONLS
     21 
     22 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP)
     23 
     24 #ifndef _NORMALIZE_
     25 #define WINNORMALIZEAPI DECLSPEC_IMPORT
     26 #else
     27 #define WINNORMALIZEAPI
     28 #endif
     29 
     30 #define MAX_LEADBYTES 12
     31 #define MAX_DEFAULTCHAR 2
     32 
     33 #define HIGH_SURROGATE_START 0xd800
     34 #define HIGH_SURROGATE_END 0xdbff
     35 #define LOW_SURROGATE_START 0xdc00
     36 #define LOW_SURROGATE_END 0xdfff
     37 
     38 #define MB_PRECOMPOSED 0x00000001
     39 #define MB_COMPOSITE 0x00000002
     40 #define MB_USEGLYPHCHARS 0x00000004
     41 #define MB_ERR_INVALID_CHARS 0x00000008
     42 #define WC_DISCARDNS 0x00000010
     43 #define WC_SEPCHARS 0x00000020
     44 #define WC_DEFAULTCHAR 0x00000040
     45 #if WINVER >= 0x0600
     46 #define WC_ERR_INVALID_CHARS 0x00000080
     47 #endif
     48 #define WC_COMPOSITECHECK 0x00000200
     49 #define WC_NO_BEST_FIT_CHARS 0x00000400
     50 
     51 #define CT_CTYPE1 0x00000001
     52 #define CT_CTYPE2 0x00000002
     53 #define CT_CTYPE3 0x00000004
     54 
     55 #define C1_UPPER 0x0001
     56 #define C1_LOWER 0x0002
     57 #define C1_DIGIT 0x0004
     58 #define C1_SPACE 0x0008
     59 #define C1_PUNCT 0x0010
     60 #define C1_CNTRL 0x0020
     61 #define C1_BLANK 0x0040
     62 #define C1_XDIGIT 0x0080
     63 #define C1_ALPHA 0x0100
     64 #define C1_DEFINED 0x0200
     65 
     66 #define C2_LEFTTORIGHT 0x0001
     67 #define C2_RIGHTTOLEFT 0x0002
     68 #define C2_EUROPENUMBER 0x0003
     69 #define C2_EUROPESEPARATOR 0x0004
     70 #define C2_EUROPETERMINATOR 0x0005
     71 #define C2_ARABICNUMBER 0x0006
     72 #define C2_COMMONSEPARATOR 0x0007
     73 #define C2_BLOCKSEPARATOR 0x0008
     74 #define C2_SEGMENTSEPARATOR 0x0009
     75 #define C2_WHITESPACE 0x000a
     76 #define C2_OTHERNEUTRAL 0x000b
     77 
     78 #define C2_NOTAPPLICABLE 0x0000
     79 
     80 #define C3_NONSPACING 0x0001
     81 #define C3_DIACRITIC 0x0002
     82 #define C3_VOWELMARK 0x0004
     83 #define C3_SYMBOL 0x0008
     84 #define C3_KATAKANA 0x0010
     85 #define C3_HIRAGANA 0x0020
     86 #define C3_HALFWIDTH 0x0040
     87 #define C3_FULLWIDTH 0x0080
     88 #define C3_IDEOGRAPH 0x0100
     89 #define C3_KASHIDA 0x0200
     90 #define C3_LEXICAL 0x0400
     91 #define C3_HIGHSURROGATE 0x0800
     92 #define C3_LOWSURROGATE 0x1000
     93 #define C3_ALPHA 0x8000
     94 
     95 #define C3_NOTAPPLICABLE 0x0000
     96 
     97 #define NORM_IGNORECASE 0x00000001
     98 #define NORM_IGNORENONSPACE 0x00000002
     99 #define NORM_IGNORESYMBOLS 0x00000004
    100 
    101 #define LINGUISTIC_IGNORECASE 0x00000010
    102 #define LINGUISTIC_IGNOREDIACRITIC 0x00000020
    103 
    104 #define NORM_IGNOREKANATYPE 0x00010000
    105 #define NORM_IGNOREWIDTH 0x00020000
    106 #define NORM_LINGUISTIC_CASING 0x08000000
    107 
    108 #define MAP_FOLDCZONE 0x00000010
    109 #define MAP_PRECOMPOSED 0x00000020
    110 #define MAP_COMPOSITE 0x00000040
    111 #define MAP_FOLDDIGITS 0x00000080
    112 
    113 #define MAP_EXPAND_LIGATURES 0x00002000
    114 
    115 #define LCMAP_LOWERCASE 0x00000100
    116 #define LCMAP_UPPERCASE 0x00000200
    117 #if WINVER >= 0x0601
    118 #define LCMAP_TITLECASE 0x00000300
    119 #endif
    120 
    121 #define LCMAP_SORTKEY 0x00000400
    122 #define LCMAP_BYTEREV 0x00000800
    123 
    124 #define LCMAP_HIRAGANA 0x00100000
    125 #define LCMAP_KATAKANA 0x00200000
    126 #define LCMAP_HALFWIDTH 0x00400000
    127 #define LCMAP_FULLWIDTH 0x00800000
    128 
    129 #define LCMAP_LINGUISTIC_CASING 0x01000000
    130 
    131 #define LCMAP_SIMPLIFIED_CHINESE 0x02000000
    132 #define LCMAP_TRADITIONAL_CHINESE 0x04000000
    133 
    134 #if WINVER >= 0x0602
    135 #define LCMAP_SORTHANDLE 0x20000000
    136 #define LCMAP_HASH 0x00040000
    137 #endif
    138 
    139 #define FIND_STARTSWITH 0x00100000
    140 #define FIND_ENDSWITH 0x00200000
    141 #define FIND_FROMSTART 0x00400000
    142 #define FIND_FROMEND 0x00800000
    143 
    144 #define LGRPID_INSTALLED 0x00000001
    145 #define LGRPID_SUPPORTED 0x00000002
    146 
    147 #define LCID_INSTALLED 0x00000001
    148 #define LCID_SUPPORTED 0x00000002
    149 #define LCID_ALTERNATE_SORTS 0x00000004
    150 
    151 #if WINVER >= 0x0600
    152 
    153 #define LOCALE_ALL 0
    154 #define LOCALE_WINDOWS 0x00000001
    155 #define LOCALE_SUPPLEMENTAL 0x00000002
    156 #define LOCALE_ALTERNATE_SORTS 0x00000004
    157 #define LOCALE_REPLACEMENT 0x00000008
    158 #endif
    159 #if WINVER >= 0x0601
    160 #define LOCALE_NEUTRALDATA 0x00000010
    161 #define LOCALE_SPECIFICDATA 0x00000020
    162 #endif
    163 
    164 #define CP_INSTALLED 0x00000001
    165 #define CP_SUPPORTED 0x00000002
    166 
    167 #define SORT_STRINGSORT 0x00001000
    168 
    169 #if WINVER >= 0x0601
    170 #define SORT_DIGITSASNUMBERS 0x00000008
    171 #endif
    172 
    173 #define CSTR_LESS_THAN 1
    174 #define CSTR_EQUAL 2
    175 #define CSTR_GREATER_THAN 3
    176 
    177 #define CP_ACP 0
    178 #define CP_OEMCP 1
    179 #define CP_MACCP 2
    180 #define CP_THREAD_ACP 3
    181 #define CP_SYMBOL 42
    182 
    183 #define CP_UTF7 65000
    184 #define CP_UTF8 65001
    185 
    186 #define CTRY_DEFAULT 0
    187 
    188 #define CTRY_ALBANIA 355
    189 #define CTRY_ALGERIA 213
    190 #define CTRY_ARGENTINA 54
    191 #define CTRY_ARMENIA 374
    192 #define CTRY_AUSTRALIA 61
    193 #define CTRY_AUSTRIA 43
    194 #define CTRY_AZERBAIJAN 994
    195 #define CTRY_BAHRAIN 973
    196 #define CTRY_BELARUS 375
    197 #define CTRY_BELGIUM 32
    198 #define CTRY_BELIZE 501
    199 #define CTRY_BOLIVIA 591
    200 #define CTRY_BRAZIL 55
    201 #define CTRY_BRUNEI_DARUSSALAM 673
    202 #define CTRY_BULGARIA 359
    203 #define CTRY_CANADA 2
    204 #define CTRY_CARIBBEAN 1
    205 #define CTRY_CHILE 56
    206 #define CTRY_COLOMBIA 57
    207 #define CTRY_COSTA_RICA 506
    208 #define CTRY_CROATIA 385
    209 #define CTRY_CZECH 420
    210 #define CTRY_DENMARK 45
    211 #define CTRY_DOMINICAN_REPUBLIC 1
    212 #define CTRY_ECUADOR 593
    213 #define CTRY_EGYPT 20
    214 #define CTRY_EL_SALVADOR 503
    215 #define CTRY_ESTONIA 372
    216 #define CTRY_FAEROE_ISLANDS 298
    217 #define CTRY_FINLAND 358
    218 #define CTRY_FRANCE 33
    219 #define CTRY_GEORGIA 995
    220 #define CTRY_GERMANY 49
    221 #define CTRY_GREECE 30
    222 #define CTRY_GUATEMALA 502
    223 #define CTRY_HONDURAS 504
    224 #define CTRY_HONG_KONG 852
    225 #define CTRY_HUNGARY 36
    226 #define CTRY_ICELAND 354
    227 #define CTRY_INDIA 91
    228 #define CTRY_INDONESIA 62
    229 #define CTRY_IRAN 981
    230 #define CTRY_IRAQ 964
    231 #define CTRY_IRELAND 353
    232 #define CTRY_ISRAEL 972
    233 #define CTRY_ITALY 39
    234 #define CTRY_JAMAICA 1
    235 #define CTRY_JAPAN 81
    236 #define CTRY_JORDAN 962
    237 #define CTRY_KAZAKSTAN 7
    238 #define CTRY_KENYA 254
    239 #define CTRY_KUWAIT 965
    240 #define CTRY_KYRGYZSTAN 996
    241 #define CTRY_LATVIA 371
    242 #define CTRY_LEBANON 961
    243 #define CTRY_LIBYA 218
    244 #define CTRY_LIECHTENSTEIN 41
    245 #define CTRY_LITHUANIA 370
    246 #define CTRY_LUXEMBOURG 352
    247 #define CTRY_MACAU 853
    248 #define CTRY_MACEDONIA 389
    249 #define CTRY_MALAYSIA 60
    250 #define CTRY_MALDIVES 960
    251 #define CTRY_MEXICO 52
    252 #define CTRY_MONACO 33
    253 #define CTRY_MONGOLIA 976
    254 #define CTRY_MOROCCO 212
    255 #define CTRY_NETHERLANDS 31
    256 #define CTRY_NEW_ZEALAND 64
    257 #define CTRY_NICARAGUA 505
    258 #define CTRY_NORWAY 47
    259 #define CTRY_OMAN 968
    260 #define CTRY_PAKISTAN 92
    261 #define CTRY_PANAMA 507
    262 #define CTRY_PARAGUAY 595
    263 #define CTRY_PERU 51
    264 #define CTRY_PHILIPPINES 63
    265 #define CTRY_POLAND 48
    266 #define CTRY_PORTUGAL 351
    267 #define CTRY_PRCHINA 86
    268 #define CTRY_PUERTO_RICO 1
    269 #define CTRY_QATAR 974
    270 #define CTRY_ROMANIA 40
    271 #define CTRY_RUSSIA 7
    272 #define CTRY_SAUDI_ARABIA 966
    273 #define CTRY_SERBIA 381
    274 #define CTRY_SINGAPORE 65
    275 #define CTRY_SLOVAK 421
    276 #define CTRY_SLOVENIA 386
    277 #define CTRY_SOUTH_AFRICA 27
    278 #define CTRY_SOUTH_KOREA 82
    279 #define CTRY_SPAIN 34
    280 #define CTRY_SWEDEN 46
    281 #define CTRY_SWITZERLAND 41
    282 #define CTRY_SYRIA 963
    283 #define CTRY_TAIWAN 886
    284 #define CTRY_TATARSTAN 7
    285 #define CTRY_THAILAND 66
    286 #define CTRY_TRINIDAD_Y_TOBAGO 1
    287 #define CTRY_TUNISIA 216
    288 #define CTRY_TURKEY 90
    289 #define CTRY_UAE 971
    290 #define CTRY_UKRAINE 380
    291 #define CTRY_UNITED_KINGDOM 44
    292 #define CTRY_UNITED_STATES 1
    293 #define CTRY_URUGUAY 598
    294 #define CTRY_UZBEKISTAN 7
    295 #define CTRY_VENEZUELA 58
    296 #define CTRY_VIET_NAM 84
    297 #define CTRY_YEMEN 967
    298 #define CTRY_ZIMBABWE 263
    299 
    300 #define LOCALE_SLOCALIZEDDISPLAYNAME 0x00000002
    301 #if WINVER >= 0x0601
    302 #define LOCALE_ALLOW_NEUTRAL_NAMES 0x08000000
    303 #define LOCALE_RETURN_GENITIVE_NAMES 0x10000000
    304 #endif
    305 #define LOCALE_RETURN_NUMBER 0x20000000
    306 #define LOCALE_USE_CP_ACP 0x40000000
    307 #define LOCALE_NOUSEROVERRIDE 0x80000000
    308 
    309 #if WINVER >= 0x0601
    310 #define LOCALE_SENGLISHDISPLAYNAME 0x00000072
    311 #define LOCALE_SNATIVEDISPLAYNAME 0x00000073
    312 #endif
    313 
    314 #if WINVER >= 0x0600
    315 #define LOCALE_SLOCALIZEDLANGUAGENAME 0x0000006f
    316 #endif
    317 
    318 #define LOCALE_SENGLISHLANGUAGENAME 0x00001001
    319 #define LOCALE_SNATIVELANGUAGENAME 0x00000004
    320 
    321 #define LOCALE_SLOCALIZEDCOUNTRYNAME 0x00000006
    322 #define LOCALE_SENGLISHCOUNTRYNAME 0x00001002
    323 #define LOCALE_SNATIVECOUNTRYNAME 0x00000008
    324 
    325 #define LOCALE_SLANGUAGE 0x00000002
    326 #if WINVER >= 0x0600
    327 #define LOCALE_SLANGDISPLAYNAME 0x0000006f
    328 #endif
    329 #define LOCALE_SENGLANGUAGE 0x00001001
    330 #define LOCALE_SNATIVELANGNAME 0x00000004
    331 #define LOCALE_SCOUNTRY 0x00000006
    332 #define LOCALE_SENGCOUNTRY 0x00001002
    333 #define LOCALE_SNATIVECTRYNAME 0x00000008
    334 
    335 #define LOCALE_ILANGUAGE 0x00000001
    336 
    337 #define LOCALE_SABBREVLANGNAME 0x00000003
    338 
    339 #define LOCALE_ICOUNTRY 0x00000005
    340 #define LOCALE_SABBREVCTRYNAME 0x00000007
    341 #define LOCALE_IGEOID 0x0000005b
    342 
    343 #define LOCALE_IDEFAULTLANGUAGE 0x00000009
    344 #define LOCALE_IDEFAULTCOUNTRY 0x0000000a
    345 #define LOCALE_IDEFAULTCODEPAGE 0x0000000b
    346 #define LOCALE_IDEFAULTANSICODEPAGE 0x00001004
    347 #define LOCALE_IDEFAULTMACCODEPAGE 0x00001011
    348 
    349 #define LOCALE_SLIST 0x0000000c
    350 #define LOCALE_IMEASURE 0x0000000d
    351 
    352 #define LOCALE_SDECIMAL 0x0000000e
    353 #define LOCALE_STHOUSAND 0x0000000f
    354 #define LOCALE_SGROUPING 0x00000010
    355 #define LOCALE_IDIGITS 0x00000011
    356 #define LOCALE_ILZERO 0x00000012
    357 #define LOCALE_INEGNUMBER 0x00001010
    358 #define LOCALE_SNATIVEDIGITS 0x00000013
    359 
    360 #define LOCALE_SCURRENCY 0x00000014
    361 #define LOCALE_SINTLSYMBOL 0x00000015
    362 #define LOCALE_SMONDECIMALSEP 0x00000016
    363 #define LOCALE_SMONTHOUSANDSEP 0x00000017
    364 #define LOCALE_SMONGROUPING 0x00000018
    365 #define LOCALE_ICURRDIGITS 0x00000019
    366 #define LOCALE_IINTLCURRDIGITS 0x0000001a
    367 #define LOCALE_ICURRENCY 0x0000001b
    368 #define LOCALE_INEGCURR 0x0000001c
    369 
    370 #define LOCALE_SDATE 0x0000001d
    371 #define LOCALE_STIME 0x0000001e
    372 #define LOCALE_SSHORTDATE 0x0000001f
    373 #define LOCALE_SLONGDATE 0x00000020
    374 #define LOCALE_STIMEFORMAT 0x00001003
    375 #define LOCALE_IDATE 0x00000021
    376 #define LOCALE_ILDATE 0x00000022
    377 #define LOCALE_ITIME 0x00000023
    378 #define LOCALE_ITIMEMARKPOSN 0x00001005
    379 #define LOCALE_ICENTURY 0x00000024
    380 #define LOCALE_ITLZERO 0x00000025
    381 #define LOCALE_IDAYLZERO 0x00000026
    382 #define LOCALE_IMONLZERO 0x00000027
    383 #define LOCALE_S1159 0x00000028
    384 #define LOCALE_S2359 0x00000029
    385 
    386 #define LOCALE_ICALENDARTYPE 0x00001009
    387 #define LOCALE_IOPTIONALCALENDAR 0x0000100b
    388 #define LOCALE_IFIRSTDAYOFWEEK 0x0000100c
    389 #define LOCALE_IFIRSTWEEKOFYEAR 0x0000100d
    390 
    391 #define LOCALE_SDAYNAME1 0x0000002a
    392 #define LOCALE_SDAYNAME2 0x0000002b
    393 #define LOCALE_SDAYNAME3 0x0000002c
    394 #define LOCALE_SDAYNAME4 0x0000002d
    395 #define LOCALE_SDAYNAME5 0x0000002e
    396 #define LOCALE_SDAYNAME6 0x0000002f
    397 #define LOCALE_SDAYNAME7 0x00000030
    398 #define LOCALE_SABBREVDAYNAME1 0x00000031
    399 #define LOCALE_SABBREVDAYNAME2 0x00000032
    400 #define LOCALE_SABBREVDAYNAME3 0x00000033
    401 #define LOCALE_SABBREVDAYNAME4 0x00000034
    402 #define LOCALE_SABBREVDAYNAME5 0x00000035
    403 #define LOCALE_SABBREVDAYNAME6 0x00000036
    404 #define LOCALE_SABBREVDAYNAME7 0x00000037
    405 #define LOCALE_SMONTHNAME1 0x00000038
    406 #define LOCALE_SMONTHNAME2 0x00000039
    407 #define LOCALE_SMONTHNAME3 0x0000003a
    408 #define LOCALE_SMONTHNAME4 0x0000003b
    409 #define LOCALE_SMONTHNAME5 0x0000003c
    410 #define LOCALE_SMONTHNAME6 0x0000003d
    411 #define LOCALE_SMONTHNAME7 0x0000003e
    412 #define LOCALE_SMONTHNAME8 0x0000003f
    413 #define LOCALE_SMONTHNAME9 0x00000040
    414 #define LOCALE_SMONTHNAME10 0x00000041
    415 #define LOCALE_SMONTHNAME11 0x00000042
    416 #define LOCALE_SMONTHNAME12 0x00000043
    417 #define LOCALE_SMONTHNAME13 0x0000100e
    418 #define LOCALE_SABBREVMONTHNAME1 0x00000044
    419 #define LOCALE_SABBREVMONTHNAME2 0x00000045
    420 #define LOCALE_SABBREVMONTHNAME3 0x00000046
    421 #define LOCALE_SABBREVMONTHNAME4 0x00000047
    422 #define LOCALE_SABBREVMONTHNAME5 0x00000048
    423 #define LOCALE_SABBREVMONTHNAME6 0x00000049
    424 #define LOCALE_SABBREVMONTHNAME7 0x0000004a
    425 #define LOCALE_SABBREVMONTHNAME8 0x0000004b
    426 #define LOCALE_SABBREVMONTHNAME9 0x0000004c
    427 #define LOCALE_SABBREVMONTHNAME10 0x0000004d
    428 #define LOCALE_SABBREVMONTHNAME11 0x0000004e
    429 #define LOCALE_SABBREVMONTHNAME12 0x0000004f
    430 #define LOCALE_SABBREVMONTHNAME13 0x0000100f
    431 
    432 #define LOCALE_SPOSITIVESIGN 0x00000050
    433 #define LOCALE_SNEGATIVESIGN 0x00000051
    434 #define LOCALE_IPOSSIGNPOSN 0x00000052
    435 #define LOCALE_INEGSIGNPOSN 0x00000053
    436 #define LOCALE_IPOSSYMPRECEDES 0x00000054
    437 #define LOCALE_IPOSSEPBYSPACE 0x00000055
    438 #define LOCALE_INEGSYMPRECEDES 0x00000056
    439 #define LOCALE_INEGSEPBYSPACE 0x00000057
    440 
    441 #define LOCALE_FONTSIGNATURE 0x00000058
    442 #define LOCALE_SISO639LANGNAME 0x00000059
    443 #define LOCALE_SISO3166CTRYNAME 0x0000005a
    444 
    445 #define LOCALE_IDEFAULTEBCDICCODEPAGE 0x00001012
    446 #define LOCALE_IPAPERSIZE 0x0000100a
    447 #define LOCALE_SENGCURRNAME 0x00001007
    448 #define LOCALE_SNATIVECURRNAME 0x00001008
    449 #define LOCALE_SYEARMONTH 0x00001006
    450 #define LOCALE_SSORTNAME 0x00001013
    451 #define LOCALE_IDIGITSUBSTITUTION 0x00001014
    452 
    453 #if WINVER >= 0x0600
    454 #define LOCALE_SNAME 0x0000005c
    455 #define LOCALE_SDURATION 0x0000005d
    456 #define LOCALE_SKEYBOARDSTOINSTALL 0x0000005e
    457 #define LOCALE_SSHORTESTDAYNAME1 0x00000060
    458 #define LOCALE_SSHORTESTDAYNAME2 0x00000061
    459 #define LOCALE_SSHORTESTDAYNAME3 0x00000062
    460 #define LOCALE_SSHORTESTDAYNAME4 0x00000063
    461 #define LOCALE_SSHORTESTDAYNAME5 0x00000064
    462 #define LOCALE_SSHORTESTDAYNAME6 0x00000065
    463 #define LOCALE_SSHORTESTDAYNAME7 0x00000066
    464 #define LOCALE_SISO639LANGNAME2 0x00000067
    465 #define LOCALE_SISO3166CTRYNAME2 0x00000068
    466 #define LOCALE_SNAN 0x00000069
    467 #define LOCALE_SPOSINFINITY 0x0000006a
    468 #define LOCALE_SNEGINFINITY 0x0000006b
    469 #define LOCALE_SSCRIPTS 0x0000006c
    470 #define LOCALE_SPARENT 0x0000006d
    471 #define LOCALE_SCONSOLEFALLBACKNAME 0x0000006e
    472 #endif
    473 
    474 #if WINVER >= 0x0601
    475 #define LOCALE_IREADINGLAYOUT 0x00000070
    476 
    477 #define LOCALE_INEUTRAL 0x00000071
    478 #define LOCALE_INEGATIVEPERCENT 0x00000074
    479 #define LOCALE_IPOSITIVEPERCENT 0x00000075
    480 #define LOCALE_SPERCENT 0x00000076
    481 #define LOCALE_SPERMILLE 0x00000077
    482 #define LOCALE_SMONTHDAY 0x00000078
    483 #define LOCALE_SSHORTTIME 0x00000079
    484 #define LOCALE_SOPENTYPELANGUAGETAG 0x0000007a
    485 #define LOCALE_SSORTLOCALE 0x0000007b
    486 #endif
    487 
    488 #define TIME_NOMINUTESORSECONDS 0x00000001
    489 #define TIME_NOSECONDS 0x00000002
    490 #define TIME_NOTIMEMARKER 0x00000004
    491 #define TIME_FORCE24HOURFORMAT 0x00000008
    492 
    493 #define DATE_SHORTDATE 0x00000001
    494 #define DATE_LONGDATE 0x00000002
    495 #define DATE_USE_ALT_CALENDAR 0x00000004
    496 
    497 #define DATE_YEARMONTH 0x00000008
    498 #define DATE_LTRREADING 0x00000010
    499 #define DATE_RTLREADING 0x00000020
    500 #if WINVER >= 0x0601
    501 #define DATE_AUTOLAYOUT 0x00000040
    502 #endif
    503 
    504 #define CAL_NOUSEROVERRIDE LOCALE_NOUSEROVERRIDE
    505 #define CAL_USE_CP_ACP LOCALE_USE_CP_ACP
    506 #define CAL_RETURN_NUMBER LOCALE_RETURN_NUMBER
    507 #if WINVER >= 0x0601
    508 #define CAL_RETURN_GENITIVE_NAMES LOCALE_RETURN_GENITIVE_NAMES
    509 #endif
    510 
    511 #define CAL_ICALINTVALUE 0x00000001
    512 #define CAL_SCALNAME 0x00000002
    513 #define CAL_IYEAROFFSETRANGE 0x00000003
    514 #define CAL_SERASTRING 0x00000004
    515 #define CAL_SSHORTDATE 0x00000005
    516 #define CAL_SLONGDATE 0x00000006
    517 #define CAL_SDAYNAME1 0x00000007
    518 #define CAL_SDAYNAME2 0x00000008
    519 #define CAL_SDAYNAME3 0x00000009
    520 #define CAL_SDAYNAME4 0x0000000a
    521 #define CAL_SDAYNAME5 0x0000000b
    522 #define CAL_SDAYNAME6 0x0000000c
    523 #define CAL_SDAYNAME7 0x0000000d
    524 #define CAL_SABBREVDAYNAME1 0x0000000e
    525 #define CAL_SABBREVDAYNAME2 0x0000000f
    526 #define CAL_SABBREVDAYNAME3 0x00000010
    527 #define CAL_SABBREVDAYNAME4 0x00000011
    528 #define CAL_SABBREVDAYNAME5 0x00000012
    529 #define CAL_SABBREVDAYNAME6 0x00000013
    530 #define CAL_SABBREVDAYNAME7 0x00000014
    531 
    532 #define CAL_SMONTHNAME1 0x00000015
    533 #define CAL_SMONTHNAME2 0x00000016
    534 #define CAL_SMONTHNAME3 0x00000017
    535 #define CAL_SMONTHNAME4 0x00000018
    536 #define CAL_SMONTHNAME5 0x00000019
    537 #define CAL_SMONTHNAME6 0x0000001a
    538 #define CAL_SMONTHNAME7 0x0000001b
    539 #define CAL_SMONTHNAME8 0x0000001c
    540 #define CAL_SMONTHNAME9 0x0000001d
    541 #define CAL_SMONTHNAME10 0x0000001e
    542 #define CAL_SMONTHNAME11 0x0000001f
    543 #define CAL_SMONTHNAME12 0x00000020
    544 #define CAL_SMONTHNAME13 0x00000021
    545 #define CAL_SABBREVMONTHNAME1 0x00000022
    546 #define CAL_SABBREVMONTHNAME2 0x00000023
    547 #define CAL_SABBREVMONTHNAME3 0x00000024
    548 #define CAL_SABBREVMONTHNAME4 0x00000025
    549 #define CAL_SABBREVMONTHNAME5 0x00000026
    550 #define CAL_SABBREVMONTHNAME6 0x00000027
    551 #define CAL_SABBREVMONTHNAME7 0x00000028
    552 #define CAL_SABBREVMONTHNAME8 0x00000029
    553 #define CAL_SABBREVMONTHNAME9 0x0000002a
    554 #define CAL_SABBREVMONTHNAME10 0x0000002b
    555 #define CAL_SABBREVMONTHNAME11 0x0000002c
    556 #define CAL_SABBREVMONTHNAME12 0x0000002d
    557 #define CAL_SABBREVMONTHNAME13 0x0000002e
    558 #define CAL_SYEARMONTH 0x0000002f
    559 #define CAL_ITWODIGITYEARMAX 0x00000030
    560 #if WINVER >= 0x0600
    561 #define CAL_SSHORTESTDAYNAME1 0x00000031
    562 #define CAL_SSHORTESTDAYNAME2 0x00000032
    563 #define CAL_SSHORTESTDAYNAME3 0x00000033
    564 #define CAL_SSHORTESTDAYNAME4 0x00000034
    565 #define CAL_SSHORTESTDAYNAME5 0x00000035
    566 #define CAL_SSHORTESTDAYNAME6 0x00000036
    567 #define CAL_SSHORTESTDAYNAME7 0x00000037
    568 #endif
    569 #if WINVER >= 0x0601
    570 #define CAL_SMONTHDAY 0x00000038
    571 #define CAL_SABBREVERASTRING 0x00000039
    572 #endif
    573 
    574 #define ENUM_ALL_CALENDARS 0xffffffff
    575 
    576 #define CAL_GREGORIAN 1
    577 #define CAL_GREGORIAN_US 2
    578 #define CAL_JAPAN 3
    579 #define CAL_TAIWAN 4
    580 #define CAL_KOREA 5
    581 #define CAL_HIJRI 6
    582 #define CAL_THAI 7
    583 #define CAL_HEBREW 8
    584 #define CAL_GREGORIAN_ME_FRENCH 9
    585 #define CAL_GREGORIAN_ARABIC 10
    586 #define CAL_GREGORIAN_XLIT_ENGLISH 11
    587 #define CAL_GREGORIAN_XLIT_FRENCH 12
    588 #define CAL_UMALQURA 23
    589 
    590 #define LGRPID_WESTERN_EUROPE 0x0001
    591 #define LGRPID_CENTRAL_EUROPE 0x0002
    592 #define LGRPID_BALTIC 0x0003
    593 #define LGRPID_GREEK 0x0004
    594 #define LGRPID_CYRILLIC 0x0005
    595 #define LGRPID_TURKIC 0x0006
    596 #define LGRPID_TURKISH 0x0006
    597 #define LGRPID_JAPANESE 0x0007
    598 #define LGRPID_KOREAN 0x0008
    599 #define LGRPID_TRADITIONAL_CHINESE 0x0009
    600 #define LGRPID_SIMPLIFIED_CHINESE 0x000a
    601 #define LGRPID_THAI 0x000b
    602 #define LGRPID_HEBREW 0x000c
    603 #define LGRPID_ARABIC 0x000d
    604 #define LGRPID_VIETNAMESE 0x000e
    605 #define LGRPID_INDIC 0x000f
    606 #define LGRPID_GEORGIAN 0x0010
    607 #define LGRPID_ARMENIAN 0x0011
    608 
    609 #if WINVER >= 0x0600
    610 
    611 #define MUI_LANGUAGE_ID 0x4
    612 #define MUI_LANGUAGE_NAME 0x8
    613 #define MUI_MERGE_SYSTEM_FALLBACK 0x10
    614 #define MUI_MERGE_USER_FALLBACK 0x20
    615 #define MUI_UI_FALLBACK MUI_MERGE_SYSTEM_FALLBACK | MUI_MERGE_USER_FALLBACK
    616 #define MUI_THREAD_LANGUAGES 0x40
    617 #define MUI_CONSOLE_FILTER 0x100
    618 #define MUI_COMPLEX_SCRIPT_FILTER 0x200
    619 #define MUI_RESET_FILTERS 0x001
    620 #define MUI_USER_PREFERRED_UI_LANGUAGES 0x10
    621 #define MUI_USE_INSTALLED_LANGUAGES 0x20
    622 #define MUI_USE_SEARCH_ALL_LANGUAGES 0x40
    623 #define MUI_LANG_NEUTRAL_PE_FILE 0x100
    624 #define MUI_NON_LANG_NEUTRAL_FILE 0x200
    625 #define MUI_MACHINE_LANGUAGE_SETTINGS 0x400
    626 #define MUI_FILETYPE_NOT_LANGUAGE_NEUTRAL 0x001
    627 #define MUI_FILETYPE_LANGUAGE_NEUTRAL_MAIN 0x002
    628 #define MUI_FILETYPE_LANGUAGE_NEUTRAL_MUI 0x004
    629 #define MUI_QUERY_TYPE 0x001
    630 #define MUI_QUERY_CHECKSUM 0x002
    631 #define MUI_QUERY_LANGUAGE_NAME 0x004
    632 #define MUI_QUERY_RESOURCE_TYPES 0x008
    633 #define MUI_FILEINFO_VERSION 0x001
    634 
    635 #define MUI_FULL_LANGUAGE 0x01
    636 #define MUI_PARTIAL_LANGUAGE 0x02
    637 #define MUI_LIP_LANGUAGE 0x04
    638 #define MUI_LANGUAGE_INSTALLED 0x20
    639 #define MUI_LANGUAGE_LICENSED 0x40
    640 
    641 #define MUI_CALLBACK_ALL_FLAGS MUI_CALLBACK_FLAG_UPGRADED_INSTALLATION
    642 #endif
    643 
    644   typedef DWORD LGRPID;
    645   typedef DWORD LCTYPE;
    646   typedef DWORD CALTYPE;
    647   typedef DWORD CALID;
    648 
    649   typedef struct _cpinfo {
    650     UINT MaxCharSize;
    651     BYTE DefaultChar[MAX_DEFAULTCHAR];
    652     BYTE LeadByte[MAX_LEADBYTES];
    653   } CPINFO,*LPCPINFO;
    654   typedef struct _cpinfoexA {
    655     UINT MaxCharSize;
    656     BYTE DefaultChar[MAX_DEFAULTCHAR];
    657     BYTE LeadByte[MAX_LEADBYTES];
    658     WCHAR UnicodeDefaultChar;
    659     UINT CodePage;
    660     CHAR CodePageName[MAX_PATH];
    661   } CPINFOEXA,*LPCPINFOEXA;
    662 
    663   typedef struct _cpinfoexW {
    664     UINT MaxCharSize;
    665     BYTE DefaultChar[MAX_DEFAULTCHAR];
    666     BYTE LeadByte[MAX_LEADBYTES];
    667     WCHAR UnicodeDefaultChar;
    668     UINT CodePage;
    669     WCHAR CodePageName[MAX_PATH];
    670   } CPINFOEXW,*LPCPINFOEXW;
    671 
    672   __MINGW_TYPEDEF_AW(CPINFOEX)
    673   __MINGW_TYPEDEF_AW(LPCPINFOEX)
    674 
    675   typedef struct _numberfmtA {
    676     UINT NumDigits;
    677     UINT LeadingZero;
    678     UINT Grouping;
    679     LPSTR lpDecimalSep;
    680     LPSTR lpThousandSep;
    681     UINT NegativeOrder;
    682   } NUMBERFMTA,*LPNUMBERFMTA;
    683   typedef struct _numberfmtW {
    684     UINT NumDigits;
    685     UINT LeadingZero;
    686     UINT Grouping;
    687     LPWSTR lpDecimalSep;
    688     LPWSTR lpThousandSep;
    689     UINT NegativeOrder;
    690   } NUMBERFMTW,*LPNUMBERFMTW;
    691 
    692   __MINGW_TYPEDEF_AW(NUMBERFMT)
    693   __MINGW_TYPEDEF_AW(LPNUMBERFMT)
    694 
    695   typedef struct _currencyfmtA {
    696     UINT NumDigits;
    697     UINT LeadingZero;
    698     UINT Grouping;
    699     LPSTR lpDecimalSep;
    700     LPSTR lpThousandSep;
    701     UINT NegativeOrder;
    702     UINT PositiveOrder;
    703     LPSTR lpCurrencySymbol;
    704   } CURRENCYFMTA,*LPCURRENCYFMTA;
    705 
    706   typedef struct _currencyfmtW {
    707     UINT NumDigits;
    708     UINT LeadingZero;
    709     UINT Grouping;
    710     LPWSTR lpDecimalSep;
    711     LPWSTR lpThousandSep;
    712     UINT NegativeOrder;
    713     UINT PositiveOrder;
    714     LPWSTR lpCurrencySymbol;
    715   } CURRENCYFMTW,*LPCURRENCYFMTW;
    716 
    717   __MINGW_TYPEDEF_AW(CURRENCYFMT)
    718   __MINGW_TYPEDEF_AW(LPCURRENCYFMT)
    719 
    720   enum SYSNLS_FUNCTION {
    721     COMPARE_STRING = 0x1
    722   };
    723 
    724   typedef DWORD NLS_FUNCTION;
    725 
    726 #if WINVER >= 0x0602
    727   typedef struct _nlsversioninfo {
    728     DWORD dwNLSVersionInfoSize;
    729     DWORD dwNLSVersion;
    730     DWORD dwDefinedVersion;
    731     DWORD dwEffectiveId;
    732     GUID guidCustomVersion;
    733   } NLSVERSIONINFO,*LPNLSVERSIONINFO;
    734 #else
    735   typedef struct _nlsversioninfo {
    736     DWORD dwNLSVersionInfoSize;
    737     DWORD dwNLSVersion;
    738     DWORD dwDefinedVersion;
    739   } NLSVERSIONINFO,*LPNLSVERSIONINFO;
    740 #endif
    741 
    742   typedef struct _nlsversioninfoex {
    743     DWORD dwNLSVersionInfoSize;
    744     DWORD dwNLSVersion;
    745     DWORD dwDefinedVersion;
    746     DWORD dwEffectiveId;
    747     GUID guidCustomVersion;
    748   } NLSVERSIONINFOEX,*LPNLSVERSIONINFOEX;
    749 
    750   typedef LONG GEOID;
    751   typedef DWORD GEOTYPE;
    752   typedef DWORD GEOCLASS;
    753 
    754 #define GEOID_NOT_AVAILABLE -1
    755 
    756   enum SYSGEOTYPE {
    757     GEO_NATION = 0x0001,
    758     GEO_LATITUDE = 0x0002,
    759     GEO_LONGITUDE = 0x0003,
    760     GEO_ISO2 = 0x0004,
    761     GEO_ISO3 = 0x0005,
    762     GEO_RFC1766 = 0x0006,
    763     GEO_LCID = 0x0007,
    764     GEO_FRIENDLYNAME= 0x0008,
    765     GEO_OFFICIALNAME= 0x0009,
    766     GEO_TIMEZONES = 0x000a,
    767     GEO_OFFICIALLANGUAGES = 0x000b,
    768     GEO_ISO_UN_NUMBER = 0x000c,
    769     GEO_PARENT = 0x000d
    770   };
    771 
    772   enum SYSGEOCLASS {
    773     GEOCLASS_NATION = 16,
    774     GEOCLASS_REGION = 14,
    775     GEOCLASS_ALL = 0
    776   };
    777 
    778 #if WINVER >= 0x0600
    779   typedef enum _NORM_FORM {
    780     NormalizationOther = 0,
    781     NormalizationC = 0x1,
    782     NormalizationD = 0x2,
    783     NormalizationKC = 0x5,
    784     NormalizationKD = 0x6
    785   } NORM_FORM;
    786 
    787 #define IDN_ALLOW_UNASSIGNED 0x01
    788 #define IDN_USE_STD3_ASCII_RULES 0x02
    789 #define IDN_EMAIL_ADDRESS 0x04
    790 #define IDN_RAW_PUNYCODE 0x08
    791 
    792 #define VS_ALLOW_LATIN 0x0001
    793 
    794 #define GSS_ALLOW_INHERITED_COMMON 0x0001
    795 #endif
    796 
    797 #ifdef STRICT
    798   typedef WINBOOL (CALLBACK *LANGUAGEGROUP_ENUMPROCA) (LGRPID, LPSTR, LPSTR, DWORD, LONG_PTR);
    799   typedef WINBOOL (CALLBACK *LANGGROUPLOCALE_ENUMPROCA) (LGRPID, LCID, LPSTR, LONG_PTR);
    800   typedef WINBOOL (CALLBACK *UILANGUAGE_ENUMPROCA) (LPSTR, LONG_PTR);
    801   typedef WINBOOL (CALLBACK *CODEPAGE_ENUMPROCA) (LPSTR);
    802   typedef WINBOOL (CALLBACK *DATEFMT_ENUMPROCA) (LPSTR);
    803   typedef WINBOOL (CALLBACK *DATEFMT_ENUMPROCEXA) (LPSTR, CALID);
    804   typedef WINBOOL (CALLBACK *TIMEFMT_ENUMPROCA) (LPSTR);
    805   typedef WINBOOL (CALLBACK *CALINFO_ENUMPROCA) (LPSTR);
    806   typedef WINBOOL (CALLBACK *CALINFO_ENUMPROCEXA) (LPSTR, CALID);
    807   typedef WINBOOL (CALLBACK *LOCALE_ENUMPROCA) (LPSTR);
    808   typedef WINBOOL (CALLBACK *LOCALE_ENUMPROCW) (LPWSTR);
    809   typedef WINBOOL (CALLBACK *LANGUAGEGROUP_ENUMPROCW) (LGRPID, LPWSTR, LPWSTR, DWORD, LONG_PTR);
    810   typedef WINBOOL (CALLBACK *LANGGROUPLOCALE_ENUMPROCW) (LGRPID, LCID, LPWSTR, LONG_PTR);
    811   typedef WINBOOL (CALLBACK *UILANGUAGE_ENUMPROCW) (LPWSTR, LONG_PTR);
    812   typedef WINBOOL (CALLBACK *CODEPAGE_ENUMPROCW) (LPWSTR);
    813   typedef WINBOOL (CALLBACK *DATEFMT_ENUMPROCW) (LPWSTR);
    814   typedef WINBOOL (CALLBACK *DATEFMT_ENUMPROCEXW) (LPWSTR, CALID);
    815   typedef WINBOOL (CALLBACK *TIMEFMT_ENUMPROCW) (LPWSTR);
    816   typedef WINBOOL (CALLBACK *CALINFO_ENUMPROCW) (LPWSTR);
    817   typedef WINBOOL (CALLBACK *CALINFO_ENUMPROCEXW) (LPWSTR, CALID);
    818   typedef WINBOOL (CALLBACK *GEO_ENUMPROC) (GEOID);
    819 #else
    820   typedef FARPROC LANGUAGEGROUP_ENUMPROCA;
    821   typedef FARPROC LANGGROUPLOCALE_ENUMPROCA;
    822   typedef FARPROC UILANGUAGE_ENUMPROCA;
    823   typedef FARPROC CODEPAGE_ENUMPROCA;
    824   typedef FARPROC DATEFMT_ENUMPROCA;
    825   typedef FARPROC DATEFMT_ENUMPROCEXA;
    826   typedef FARPROC TIMEFMT_ENUMPROCA;
    827   typedef FARPROC CALINFO_ENUMPROCA;
    828   typedef FARPROC CALINFO_ENUMPROCEXA;
    829   typedef FARPROC GEO_ENUMPROC;
    830   typedef FARPROC LOCALE_ENUMPROCA;
    831   typedef FARPROC LOCALE_ENUMPROCW;
    832   typedef FARPROC LANGUAGEGROUP_ENUMPROCW;
    833   typedef FARPROC LANGGROUPLOCALE_ENUMPROCW;
    834   typedef FARPROC UILANGUAGE_ENUMPROCW;
    835   typedef FARPROC CODEPAGE_ENUMPROCW;
    836   typedef FARPROC DATEFMT_ENUMPROCW;
    837   typedef FARPROC DATEFMT_ENUMPROCEXW;
    838   typedef FARPROC TIMEFMT_ENUMPROCW;
    839   typedef FARPROC CALINFO_ENUMPROCW;
    840   typedef FARPROC CALINFO_ENUMPROCEXW;
    841 #endif
    842 
    843 #ifdef UNICODE
    844 
    845 #define LANGUAGEGROUP_ENUMPROC LANGUAGEGROUP_ENUMPROCW
    846 #define LANGGROUPLOCALE_ENUMPROC LANGGROUPLOCALE_ENUMPROCW
    847 #define UILANGUAGE_ENUMPROC UILANGUAGE_ENUMPROCW
    848 #define CODEPAGE_ENUMPROC CODEPAGE_ENUMPROCW
    849 #define DATEFMT_ENUMPROC DATEFMT_ENUMPROCW
    850 #define DATEFMT_ENUMPROCEX DATEFMT_ENUMPROCEXW
    851 #define TIMEFMT_ENUMPROC TIMEFMT_ENUMPROCW
    852 #define CALINFO_ENUMPROC CALINFO_ENUMPROCW
    853 #define CALINFO_ENUMPROCEX CALINFO_ENUMPROCEXW
    854 #define LOCALE_ENUMPROC LOCALE_ENUMPROCW
    855 #else
    856 
    857 #define LANGUAGEGROUP_ENUMPROC LANGUAGEGROUP_ENUMPROCA
    858 #define LANGGROUPLOCALE_ENUMPROC LANGGROUPLOCALE_ENUMPROCA
    859 #define UILANGUAGE_ENUMPROC UILANGUAGE_ENUMPROCA
    860 #define CODEPAGE_ENUMPROC CODEPAGE_ENUMPROCA
    861 #define DATEFMT_ENUMPROC DATEFMT_ENUMPROCA
    862 #define DATEFMT_ENUMPROCEX DATEFMT_ENUMPROCEXA
    863 #define TIMEFMT_ENUMPROC TIMEFMT_ENUMPROCA
    864 #define CALINFO_ENUMPROC CALINFO_ENUMPROCA
    865 #define CALINFO_ENUMPROCEX CALINFO_ENUMPROCEXA
    866 #define LOCALE_ENUMPROC LOCALE_ENUMPROCA
    867 #endif
    868 
    869   typedef struct _FILEMUIINFO {
    870     DWORD dwSize;
    871     DWORD dwVersion;
    872     DWORD dwFileType;
    873     BYTE pChecksum[16];
    874     BYTE pServiceChecksum[16];
    875     DWORD dwLanguageNameOffset;
    876     DWORD dwTypeIDMainSize;
    877     DWORD dwTypeIDMainOffset;
    878     DWORD dwTypeNameMainOffset;
    879     DWORD dwTypeIDMUISize;
    880     DWORD dwTypeIDMUIOffset;
    881     DWORD dwTypeNameMUIOffset;
    882     BYTE abBuffer[8];
    883   } FILEMUIINFO,*PFILEMUIINFO;
    884 
    885 #ifndef NOAPISET
    886 #include <stringapiset.h>
    887 #endif
    888 
    889 #define IS_HIGH_SURROGATE(wch) (((wch) >= HIGH_SURROGATE_START) && ((wch) <= HIGH_SURROGATE_END))
    890 #define IS_LOW_SURROGATE(wch) (((wch) >= LOW_SURROGATE_START) && ((wch) <= LOW_SURROGATE_END))
    891 #define IS_SURROGATE_PAIR(hs, ls) (IS_HIGH_SURROGATE (hs) && IS_LOW_SURROGATE (ls))
    892 
    893 #define FILEMUIINFO_GET_CULTURE(pInfo) ((LPWSTR) ((pInfo->dwLanguageNameOffset>0)? (ULONG_PTR)pInfo+pInfo->dwLanguageNameOffset:NULL))
    894 #define FILEMUIINFO_GET_MAIN_TYPEIDS(pInfo) ((DWORD *) ((pInfo->dwTypeIDMainOffset>0)? (ULONG_PTR)pInfo+pInfo->dwTypeIDMainOffset:NULL))
    895 #define FILEMUIINFO_GET_MAIN_TYPEID(pInfo, iType) (((iType<pInfo->dwTypeIDMainSize)&& (pInfo->dwTypeIDMainOffset>0))? *((DWORD *) ((ULONG_PTR)pInfo+pInfo->dwTypeIDMainOffset)+iType):0)
    896 #define FILEMUIINFO_GET_MAIN_TYPENAMES(pInfo) ((LPWSTR) ((pInfo->dwTypeNameMainOffset>0)? (ULONG_PTR)pInfo+pInfo->dwTypeNameMainOffset:NULL))
    897 #define FILEMUIINFO_GET_MUI_TYPEIDS(pInfo) ((DWORD *) ((pInfo->dwTypeIDMUIOffset>0)? (ULONG_PTR)pInfo+pInfo->dwTypeIDMUIOffset:NULL))
    898 #define FILEMUIINFO_GET_MUI_TYPEID(pInfo, iType) (((iType<pInfo->dwTypeIDMUISize)&& (pInfo->dwTypeIDMUIOffset>0))? *((DWORD *) ((ULONG_PTR)pInfo+pInfo->dwTypeIDMUIOffset)+iType):0)
    899 #define FILEMUIINFO_GET_MUI_TYPENAMES(pInfo) ((LPWSTR) ((pInfo->dwTypeNameMUIOffset>0)? (ULONG_PTR)pInfo+pInfo->dwTypeNameMUIOffset:NULL))
    900 
    901   WINBASEAPI WINBOOL WINAPI IsValidCodePage (UINT CodePage);
    902 #endif
    903 
    904 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || defined(WINSTORECOMPAT)
    905   WINBASEAPI UINT WINAPI GetACP (void);
    906 #endif
    907 
    908 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
    909   WINBASEAPI UINT WINAPI GetOEMCP (void);
    910   WINBASEAPI int WINAPI CompareStringA (LCID Locale, DWORD dwCmpFlags, PCNZCH lpString1, int cchCount1, PCNZCH lpString2, int cchCount2);
    911   WINBASEAPI int WINAPI LCMapStringW (LCID Locale, DWORD dwMapFlags, LPCWSTR lpSrcStr, int cchSrc, LPWSTR lpDestStr, int cchDest);
    912   WINBASEAPI int WINAPI LCMapStringA (LCID Locale, DWORD dwMapFlags, LPCSTR lpSrcStr, int cchSrc, LPSTR lpDestStr, int cchDest);
    913   WINBASEAPI int WINAPI GetLocaleInfoW (LCID Locale, LCTYPE LCType, LPWSTR lpLCData, int cchData);
    914   WINBASEAPI int WINAPI GetLocaleInfoA (LCID Locale, LCTYPE LCType, LPSTR lpLCData, int cchData);
    915   WINBASEAPI WINBOOL WINAPI IsDBCSLeadByte (BYTE TestChar);
    916   WINBASEAPI WINBOOL WINAPI IsDBCSLeadByteEx (UINT CodePage, BYTE TestChar);
    917   WINBASEAPI int WINAPI GetNumberFormatA (LCID Locale, DWORD dwFlags, LPCSTR lpValue, CONST NUMBERFMTA *lpFormat, LPSTR lpNumberStr, int cchNumber);
    918   WINBASEAPI int WINAPI GetNumberFormatW (LCID Locale, DWORD dwFlags, LPCWSTR lpValue, CONST NUMBERFMTW *lpFormat, LPWSTR lpNumberStr, int cchNumber);
    919   WINBASEAPI int WINAPI GetCurrencyFormatA (LCID Locale, DWORD dwFlags, LPCSTR lpValue, CONST CURRENCYFMTA *lpFormat, LPSTR lpCurrencyStr, int cchCurrency);
    920   WINBASEAPI int WINAPI GetCurrencyFormatW (LCID Locale, DWORD dwFlags, LPCWSTR lpValue, CONST CURRENCYFMTW *lpFormat, LPWSTR lpCurrencyStr, int cchCurrency);
    921   WINBASEAPI WINBOOL WINAPI EnumCalendarInfoA (CALINFO_ENUMPROCA lpCalInfoEnumProc, LCID Locale, CALID Calendar, CALTYPE CalType);
    922   WINBASEAPI WINBOOL WINAPI EnumCalendarInfoW (CALINFO_ENUMPROCW lpCalInfoEnumProc, LCID Locale, CALID Calendar, CALTYPE CalType);
    923   WINBASEAPI WINBOOL WINAPI EnumCalendarInfoExA (CALINFO_ENUMPROCEXA lpCalInfoEnumProcEx, LCID Locale, CALID Calendar, CALTYPE CalType);
    924   WINBASEAPI WINBOOL WINAPI EnumCalendarInfoExW (CALINFO_ENUMPROCEXW lpCalInfoEnumProcEx, LCID Locale, CALID Calendar, CALTYPE CalType);
    925   WINBASEAPI WINBOOL WINAPI EnumTimeFormatsA (TIMEFMT_ENUMPROCA lpTimeFmtEnumProc, LCID Locale, DWORD dwFlags);
    926   WINBASEAPI WINBOOL WINAPI EnumTimeFormatsW (TIMEFMT_ENUMPROCW lpTimeFmtEnumProc, LCID Locale, DWORD dwFlags);
    927   WINBASEAPI WINBOOL WINAPI EnumDateFormatsA (DATEFMT_ENUMPROCA lpDateFmtEnumProc, LCID Locale, DWORD dwFlags);
    928   WINBASEAPI WINBOOL WINAPI EnumDateFormatsW (DATEFMT_ENUMPROCW lpDateFmtEnumProc, LCID Locale, DWORD dwFlags);
    929   WINBASEAPI WINBOOL WINAPI EnumDateFormatsExA (DATEFMT_ENUMPROCEXA lpDateFmtEnumProcEx, LCID Locale, DWORD dwFlags);
    930   WINBASEAPI WINBOOL WINAPI EnumDateFormatsExW (DATEFMT_ENUMPROCEXW lpDateFmtEnumProcEx, LCID Locale, DWORD dwFlags);
    931   WINBASEAPI WINBOOL WINAPI IsValidLanguageGroup (LGRPID LanguageGroup, DWORD dwFlags);
    932   WINBASEAPI WINBOOL WINAPI GetNLSVersion (NLS_FUNCTION Function, LCID Locale, LPNLSVERSIONINFO lpVersionInformation);
    933   WINBASEAPI WINBOOL WINAPI IsNLSDefinedString (NLS_FUNCTION Function, DWORD dwFlags, LPNLSVERSIONINFO lpVersionInformation, LPCWSTR lpString, INT cchStr);
    934   WINBASEAPI WINBOOL WINAPI IsValidLocale (LCID Locale, DWORD dwFlags);
    935   WINBASEAPI WINBOOL WINAPI SetLocaleInfoA (LCID Locale, LCTYPE LCType, LPCSTR lpLCData);
    936   WINBASEAPI WINBOOL WINAPI SetLocaleInfoW (LCID Locale, LCTYPE LCType, LPCWSTR lpLCData);
    937   WINBASEAPI int WINAPI GetCalendarInfoA (LCID Locale, CALID Calendar, CALTYPE CalType, LPSTR lpCalData, int cchData, LPDWORD lpValue);
    938   WINBASEAPI int WINAPI GetCalendarInfoW (LCID Locale, CALID Calendar, CALTYPE CalType, LPWSTR lpCalData, int cchData, LPDWORD lpValue);
    939   WINBASEAPI WINBOOL WINAPI SetCalendarInfoA (LCID Locale, CALID Calendar, CALTYPE CalType, LPCSTR lpCalData);
    940   WINBASEAPI WINBOOL WINAPI SetCalendarInfoW (LCID Locale, CALID Calendar, CALTYPE CalType, LPCWSTR lpCalData);
    941 #if WINVER >= 0x0600
    942   WINBASEAPI int WINAPI GetDurationFormat (LCID Locale, DWORD dwFlags, CONST SYSTEMTIME *lpDuration, ULONGLONG ullDuration, LPCWSTR lpFormat, LPWSTR lpDurationStr, int cchDuration);
    943   WINBASEAPI int WINAPI FindNLSString (LCID Locale, DWORD dwFindNLSStringFlags, LPCWSTR lpStringSource, int cchSource, LPCWSTR lpStringValue, int cchValue, LPINT pcchFound);
    944 #endif
    945 #if WINVER >= 0x0601
    946   WINBASEAPI WINBOOL WINAPI LoadStringByReference (DWORD Flags, PCWSTR Language, PCWSTR SourceString, PWSTR Buffer, ULONG cchBuffer, PCWSTR Directory, PULONG pcchBufferOut);
    947 #endif
    948 
    949 #define SetLocaleInfo __MINGW_NAME_AW(SetLocaleInfo)
    950 #define GetCalendarInfo __MINGW_NAME_AW(GetCalendarInfo)
    951 #define SetCalendarInfo __MINGW_NAME_AW(SetCalendarInfo)
    952 
    953 #if WINVER >= 0x0601
    954 #define MUI_FORMAT_REG_COMPAT 0x0001
    955 #define MUI_FORMAT_INF_COMPAT 0x0002
    956 #define MUI_VERIFY_FILE_EXISTS 0x0004
    957 #define MUI_SKIP_STRING_CACHE 0x0008
    958 #define MUI_IMMUTABLE_LOOKUP 0x0010
    959 #endif
    960 
    961 #ifndef UNICODE
    962 #define CompareString CompareStringA
    963 #define LCMapString LCMapStringA
    964 #define GetLocaleInfo GetLocaleInfoA
    965 #else
    966 #define LCMapString LCMapStringW
    967 #define GetLocaleInfo GetLocaleInfoW
    968 #endif
    969 
    970 #define GetNumberFormat __MINGW_NAME_AW(GetNumberFormat)
    971 #define GetCurrencyFormat __MINGW_NAME_AW(GetCurrencyFormat)
    972 #define EnumCalendarInfo __MINGW_NAME_AW(EnumCalendarInfo)
    973 #define EnumCalendarInfoEx __MINGW_NAME_AW(EnumCalendarInfoEx)
    974 #define EnumTimeFormats __MINGW_NAME_AW(EnumTimeFormats)
    975 #define EnumDateFormats __MINGW_NAME_AW(EnumDateFormats)
    976 #define EnumDateFormatsEx __MINGW_NAME_AW(EnumDateFormatsEx)
    977 
    978 #endif
    979 
    980 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP)
    981   WINBASEAPI int WINAPI GetGeoInfoA (GEOID Location, GEOTYPE GeoType, LPSTR lpGeoData, int cchData, LANGID LangId);
    982   WINBASEAPI int WINAPI GetGeoInfoW (GEOID Location, GEOTYPE GeoType, LPWSTR lpGeoData, int cchData, LANGID LangId);
    983   WINBASEAPI WINBOOL WINAPI EnumSystemGeoID (GEOCLASS GeoClass, GEOID ParentGeoId, GEO_ENUMPROC lpGeoEnumProc);
    984   WINBASEAPI GEOID WINAPI GetUserGeoID (GEOCLASS GeoClass);
    985   WINBASEAPI WINBOOL WINAPI GetCPInfo (UINT CodePage, LPCPINFO lpCPInfo);
    986   WINBASEAPI WINBOOL WINAPI GetCPInfoExA (UINT CodePage, DWORD dwFlags, LPCPINFOEXA lpCPInfoEx);
    987   WINBASEAPI WINBOOL WINAPI GetCPInfoExW (UINT CodePage, DWORD dwFlags, LPCPINFOEXW lpCPInfoEx);
    988 
    989 #if WINVER >= 0x0600
    990   WINBASEAPI int WINAPI LCIDToLocaleName (LCID Locale, LPWSTR lpName, int cchName, DWORD dwFlags);
    991   WINBASEAPI LCID WINAPI LocaleNameToLCID (LPCWSTR lpName, DWORD dwFlags);
    992 #endif
    993 
    994 #define GetGeoInfo __MINGW_NAME_AW(GetGeoInfo)
    995 #define GetCPInfoEx __MINGW_NAME_AW(GetCPInfoEx)
    996 
    997 #endif
    998 
    999 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
   1000   WINBASEAPI WINBOOL WINAPI SetUserGeoID (GEOID GeoId);
   1001   WINBASEAPI LCID WINAPI ConvertDefaultLocale (LCID Locale);
   1002   WINBASEAPI LCID WINAPI GetThreadLocale (void);
   1003   WINBASEAPI WINBOOL WINAPI SetThreadLocale (LCID Locale);
   1004   WINBASEAPI LANGID WINAPI GetSystemDefaultUILanguage (void);
   1005   WINBASEAPI LANGID WINAPI GetUserDefaultUILanguage (void);
   1006   WINBASEAPI LANGID WINAPI GetSystemDefaultLangID (void);
   1007   WINBASEAPI LANGID WINAPI GetUserDefaultLangID (void);
   1008   WINBASEAPI LCID WINAPI GetSystemDefaultLCID (void);
   1009   WINBASEAPI LCID WINAPI GetUserDefaultLCID (void);
   1010   WINBASEAPI LANGID WINAPI SetThreadUILanguage (LANGID LangId);
   1011   WINBASEAPI WINBOOL WINAPI GetStringTypeExA (LCID Locale, DWORD dwInfoType, LPCSTR lpSrcStr, int cchSrc, LPWORD lpCharType);
   1012   WINBASEAPI WINBOOL WINAPI GetStringTypeA (LCID Locale, DWORD dwInfoType, LPCSTR lpSrcStr, int cchSrc, LPWORD lpCharType);
   1013   WINBASEAPI int WINAPI FoldStringA (DWORD dwMapFlags, LPCSTR lpSrcStr, int cchSrc, LPSTR lpDestStr, int cchDest);
   1014   WINBASEAPI WINBOOL WINAPI EnumSystemLocalesA (LOCALE_ENUMPROCA lpLocaleEnumProc, DWORD dwFlags);
   1015   WINBASEAPI WINBOOL WINAPI EnumSystemLocalesW (LOCALE_ENUMPROCW lpLocaleEnumProc, DWORD dwFlags);
   1016   WINBASEAPI WINBOOL WINAPI EnumSystemLanguageGroupsA (LANGUAGEGROUP_ENUMPROCA lpLanguageGroupEnumProc, DWORD dwFlags, LONG_PTR lParam);
   1017   WINBASEAPI WINBOOL WINAPI EnumSystemLanguageGroupsW (LANGUAGEGROUP_ENUMPROCW lpLanguageGroupEnumProc, DWORD dwFlags, LONG_PTR lParam);
   1018   WINBASEAPI WINBOOL WINAPI EnumLanguageGroupLocalesA (LANGGROUPLOCALE_ENUMPROCA lpLangGroupLocaleEnumProc, LGRPID LanguageGroup, DWORD dwFlags, LONG_PTR lParam);
   1019   WINBASEAPI WINBOOL WINAPI EnumLanguageGroupLocalesW (LANGGROUPLOCALE_ENUMPROCW lpLangGroupLocaleEnumProc, LGRPID LanguageGroup, DWORD dwFlags, LONG_PTR lParam);
   1020   WINBASEAPI WINBOOL WINAPI EnumUILanguagesA (UILANGUAGE_ENUMPROCA lpUILanguageEnumProc, DWORD dwFlags, LONG_PTR lParam);
   1021   WINBASEAPI WINBOOL WINAPI EnumUILanguagesW (UILANGUAGE_ENUMPROCW lpUILanguageEnumProc, DWORD dwFlags, LONG_PTR lParam);
   1022 #if WINVER >= 0x0600
   1023   WINBASEAPI LANGID WINAPI GetThreadUILanguage (void);
   1024   WINBASEAPI WINBOOL WINAPI GetProcessPreferredUILanguages (DWORD dwFlags, PULONG pulNumLanguages, PZZWSTR pwszLanguagesBuffer, PULONG pcchLanguagesBuffer);
   1025   WINBASEAPI WINBOOL WINAPI SetProcessPreferredUILanguages (DWORD dwFlags, PCZZWSTR pwszLanguagesBuffer, PULONG pulNumLanguages);
   1026   WINBASEAPI WINBOOL WINAPI GetUserPreferredUILanguages (DWORD dwFlags, PULONG pulNumLanguages, PZZWSTR pwszLanguagesBuffer, PULONG pcchLanguagesBuffer);
   1027   WINBASEAPI WINBOOL WINAPI GetSystemPreferredUILanguages (DWORD dwFlags, PULONG pulNumLanguages, PZZWSTR pwszLanguagesBuffer, PULONG pcchLanguagesBuffer);
   1028   WINBASEAPI WINBOOL WINAPI GetThreadPreferredUILanguages (DWORD dwFlags, PULONG pulNumLanguages, PZZWSTR pwszLanguagesBuffer, PULONG pcchLanguagesBuffer);
   1029   WINBASEAPI WINBOOL WINAPI SetThreadPreferredUILanguages (DWORD dwFlags, PCZZWSTR pwszLanguagesBuffer, PULONG pulNumLanguages);
   1030   WINBASEAPI WINBOOL WINAPI GetFileMUIInfo (DWORD dwFlags, PCWSTR pcwszFilePath, PFILEMUIINFO pFileMUIInfo, DWORD *pcbFileMUIInfo);
   1031   WINBASEAPI WINBOOL WINAPI GetFileMUIPath (DWORD dwFlags, PCWSTR pcwszFilePath, PWSTR pwszLanguage, PULONG pcchLanguage, PWSTR pwszFileMUIPath, PULONG pcchFileMUIPath, PULONGLONG pululEnumerator);
   1032   WINBASEAPI WINBOOL WINAPI GetUILanguageInfo (DWORD dwFlags, PCZZWSTR pwmszLanguage, PZZWSTR pwszFallbackLanguages, PDWORD pcchFallbackLanguages, PDWORD pAttributes);
   1033   WINBASEAPI WINBOOL WINAPI NotifyUILanguageChange (DWORD dwFlags, PCWSTR pcwstrNewLanguage, PCWSTR pcwstrPreviousLanguage, DWORD dwReserved, PDWORD pdwStatusRtrn);
   1034 #endif
   1035 
   1036 #ifndef UNICODE
   1037 #define FoldString FoldStringA
   1038 #define GetStringTypeEx GetStringTypeExA
   1039 #endif
   1040 
   1041 #define EnumSystemLocales __MINGW_NAME_AW(EnumSystemLocales)
   1042 #define EnumSystemLanguageGroups __MINGW_NAME_AW(EnumSystemLanguageGroups)
   1043 #define EnumLanguageGroupLocales __MINGW_NAME_AW(EnumLanguageGroupLocales)
   1044 #define EnumUILanguages __MINGW_NAME_AW(EnumUILanguages)
   1045 
   1046 #endif
   1047 
   1048 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP)
   1049   WINBASEAPI WINBOOL WINAPI EnumSystemCodePagesA (CODEPAGE_ENUMPROCA lpCodePageEnumProc, DWORD dwFlags);
   1050   WINBASEAPI WINBOOL WINAPI EnumSystemCodePagesW (CODEPAGE_ENUMPROCW lpCodePageEnumProc, DWORD dwFlags);
   1051 
   1052 #define EnumSystemCodePages __MINGW_NAME_AW(EnumSystemCodePages)
   1053 
   1054 #if WINVER >= 0x0600
   1055 
   1056 #define LOCALE_NAME_USER_DEFAULT NULL
   1057 #define LOCALE_NAME_INVARIANT L""
   1058 #define LOCALE_NAME_SYSTEM_DEFAULT L"!x-sys-default-locale"
   1059 
   1060   typedef WINBOOL (CALLBACK *CALINFO_ENUMPROCEXEX) (LPWSTR, CALID, LPWSTR, LPARAM);
   1061   typedef WINBOOL (CALLBACK *DATEFMT_ENUMPROCEXEX) (LPWSTR, CALID, LPARAM);
   1062   typedef WINBOOL (CALLBACK *TIMEFMT_ENUMPROCEX) (LPWSTR, LPARAM);
   1063   typedef WINBOOL (CALLBACK *LOCALE_ENUMPROCEX) (LPWSTR, DWORD, LPARAM);
   1064 
   1065   WINNORMALIZEAPI int WINAPI NormalizeString (NORM_FORM NormForm, LPCWSTR lpSrcString, int cwSrcLength, LPWSTR lpDstString, int cwDstLength);
   1066   WINNORMALIZEAPI WINBOOL WINAPI IsNormalizedString (NORM_FORM NormForm, LPCWSTR lpString, int cwLength);
   1067   WINNORMALIZEAPI int WINAPI IdnToAscii (DWORD dwFlags, LPCWSTR lpUnicodeCharStr, int cchUnicodeChar, LPWSTR lpASCIICharStr, int cchASCIIChar);
   1068   WINNORMALIZEAPI int WINAPI IdnToNameprepUnicode (DWORD dwFlags, LPCWSTR lpUnicodeCharStr, int cchUnicodeChar, LPWSTR lpNameprepCharStr, int cchNameprepChar);
   1069   WINNORMALIZEAPI int WINAPI IdnToUnicode (DWORD dwFlags, LPCWSTR lpASCIICharStr, int cchASCIIChar, LPWSTR lpUnicodeCharStr, int cchUnicodeChar);
   1070 
   1071   WINBASEAPI WINBOOL WINAPI VerifyScripts (DWORD dwFlags, LPCWSTR lpLocaleScripts, int cchLocaleScripts, LPCWSTR lpTestScripts, int cchTestScripts);
   1072   WINBASEAPI int WINAPI GetStringScripts (DWORD dwFlags, LPCWSTR lpString, int cchString, LPWSTR lpScripts, int cchScripts);
   1073   WINBASEAPI int WINAPI GetLocaleInfoEx (LPCWSTR lpLocaleName, LCTYPE LCType, LPWSTR lpLCData, int cchData);
   1074   WINBASEAPI int WINAPI GetCalendarInfoEx (LPCWSTR lpLocaleName, CALID Calendar, LPCWSTR lpReserved, CALTYPE CalType, LPWSTR lpCalData, int cchData, LPDWORD lpValue);
   1075   WINBASEAPI int WINAPI GetDurationFormatEx (LPCWSTR lpLocaleName, DWORD dwFlags, CONST SYSTEMTIME *lpDuration, ULONGLONG ullDuration, LPCWSTR lpFormat, LPWSTR lpDurationStr, int cchDuration);
   1076   WINBASEAPI int WINAPI GetNumberFormatEx (LPCWSTR lpLocaleName, DWORD dwFlags, LPCWSTR lpValue, CONST NUMBERFMTW *lpFormat, LPWSTR lpNumberStr, int cchNumber);
   1077   WINBASEAPI int WINAPI GetCurrencyFormatEx (LPCWSTR lpLocaleName, DWORD dwFlags, LPCWSTR lpValue, CONST CURRENCYFMTW *lpFormat, LPWSTR lpCurrencyStr, int cchCurrency);
   1078   WINBASEAPI int WINAPI GetUserDefaultLocaleName (LPWSTR lpLocaleName, int cchLocaleName);
   1079   WINBASEAPI int WINAPI GetSystemDefaultLocaleName (LPWSTR lpLocaleName, int cchLocaleName);
   1080   WINBASEAPI WINBOOL WINAPI GetNLSVersionEx (NLS_FUNCTION function, LPCWSTR lpLocaleName, LPNLSVERSIONINFOEX lpVersionInformation);
   1081   WINBASEAPI int WINAPI FindNLSStringEx (LPCWSTR lpLocaleName, DWORD dwFindNLSStringFlags, LPCWSTR lpStringSource, int cchSource, LPCWSTR lpStringValue, int cchValue, LPINT pcchFound, LPNLSVERSIONINFO lpVersionInformation, LPVOID lpReserved, LPARAM sortHandle);
   1082   WINBASEAPI int WINAPI LCMapStringEx (LPCWSTR lpLocaleName, DWORD dwMapFlags, LPCWSTR lpSrcStr, int cchSrc, LPWSTR lpDestStr, int cchDest, LPNLSVERSIONINFO lpVersionInformation, LPVOID lpReserved, LPARAM sortHandle);
   1083   WINBASEAPI WINBOOL WINAPI IsValidLocaleName (LPCWSTR lpLocaleName);
   1084   WINBASEAPI WINBOOL WINAPI EnumCalendarInfoExEx (CALINFO_ENUMPROCEXEX pCalInfoEnumProcExEx, LPCWSTR lpLocaleName, CALID Calendar, LPCWSTR lpReserved, CALTYPE CalType, LPARAM lParam);
   1085   WINBASEAPI WINBOOL WINAPI EnumDateFormatsExEx (DATEFMT_ENUMPROCEXEX lpDateFmtEnumProcExEx, LPCWSTR lpLocaleName, DWORD dwFlags, LPARAM lParam);
   1086   WINBASEAPI WINBOOL WINAPI EnumTimeFormatsEx (TIMEFMT_ENUMPROCEX lpTimeFmtEnumProcEx, LPCWSTR lpLocaleName, DWORD dwFlags, LPARAM lParam);
   1087   WINBASEAPI WINBOOL WINAPI EnumSystemLocalesEx (LOCALE_ENUMPROCEX lpLocaleEnumProcEx, DWORD dwFlags, LPARAM lParam, LPVOID lpReserved);
   1088 #endif
   1089 #if WINVER >= 0x0601
   1090   WINBASEAPI int WINAPI ResolveLocaleName (LPCWSTR lpNameToResolve, LPWSTR lpLocaleName, int cchLocaleName);
   1091 #endif
   1092 #if WINVER >= 0x0602
   1093   WINBASEAPI DWORD WINAPI IsValidNLSVersion (NLS_FUNCTION function, LPCWSTR lpLocaleName, LPNLSVERSIONINFOEX lpVersionInformation);
   1094 #endif
   1095 #endif
   1096 
   1097 #endif
   1098 
   1099 #ifdef __cplusplus
   1100 }
   1101 #endif
   1102 
   1103 #endif
   1104