-
Notifications
You must be signed in to change notification settings - Fork 322
/
WinNls.h
executable file
·3005 lines (2594 loc) · 115 KB
/
WinNls.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*++
Copyright (c) Microsoft Corporation All rights reserved.
Module Name:
winnls.h
Abstract:
Procedure declarations, constant definitions, and macros for the
NLS component.
--*/
#ifndef _WINNLS_
#define _WINNLS_
#include <winapifamily.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef NOAPISET
#include <datetimeapi.h> // Datetime APISET dependencies
#include <libloaderapi.h> // LibLoader Apiset dependencies
#endif
#if _MSC_VER >= 1200
#pragma warning(push)
#pragma warning(disable:4820) // padding added after data member
#endif
//
// Deprecated attribute support for NLS
//
#pragma push_macro("DEPRECATED")
#undef DEPRECATED
// Disable NLS deprecation for the moment
#if !defined(DISABLE_NLS_DEPRECATION)
#define DISABLE_NLS_DEPRECATION
#endif
// Deprecated NLS types/functions
#if !defined(DISABLE_NLS_DEPRECATION)
#if defined(__cplusplus)
#if __cplusplus >= 201402
#define DEPRECATED(x) [[deprecated(x)]]
#elif defined(_MSC_VER)
#if _MSC_VER > 1900
#define DEPRECATED(x) [[deprecated(x)]]
#else
#define DEPRECATED(x) __declspec(deprecated(x))
#endif // _MSC_VER > 1900
#else // Not Standard C++ or MSVC, ignore the construct.
#define DEPRECATED(x)
#endif // C++ deprecation
#else // C - disable deprecation
#define DEPRECATED(x)
#endif
#else // Deprecation is disabled
#define DEPRECATED(x)
#endif /* DISABLE_NLS_DEPRECATION */
#ifndef NONLS
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
#ifdef _MAC
#include <macwin32.h>
#endif
#if !defined(_NORMALIZE_)
#define WINNORMALIZEAPI DECLSPEC_IMPORT
#else
#define WINNORMALIZEAPI
#endif
////////////////////////////////////////////////////////////////////////////
//
// Constants
//
// Define all constants for the NLS component here.
//
////////////////////////////////////////////////////////////////////////////
//
// String Length Maximums.
//
#define MAX_LEADBYTES 12 // 5 ranges, 2 bytes ea., 0 term.
#define 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.
//
#define HIGH_SURROGATE_START 0xd800
#define HIGH_SURROGATE_END 0xdbff
#define LOW_SURROGATE_START 0xdc00
#define LOW_SURROGATE_END 0xdfff
//
// MBCS and Unicode Translation Flags.
// Please use Unicode, either UTF-16 (WCHAR) or UTF-8 (CP_UTF8)
//
// MB_PRECOMPOSED and MB_COMPOSITE are deprecated, not recommended, and
// provide out-of-date behavior.
// Windows typically uses Unicode Normalization Form C type sequences,
// If explicit normalization forms are required, please use NormalizeString.
#define MB_PRECOMPOSED 0x00000001 // DEPRECATED: use single precomposed characters when possible.
#define MB_COMPOSITE 0x00000002 // DEPRECATED: use multiple discrete characters when possible.
#define MB_USEGLYPHCHARS 0x00000004 // DEPRECATED: use glyph chars, not ctrl chars
#define MB_ERR_INVALID_CHARS 0x00000008 // error for invalid chars
// WC_COMPOSITECHECK, WC_DISCARDNS and WC_SEPCHARS are deprecated, not recommended,
// and provide out-of-date behavior.
// Windows typically uses Unicode Normalization Form C type sequences,
// If explicit normalization forms are required, please use NormalizeString.
#define WC_COMPOSITECHECK 0x00000200 // convert composite to precomposed
#define WC_DISCARDNS 0x00000010 // discard non-spacing chars // Used with WC_COMPOSITECHECK
#define WC_SEPCHARS 0x00000020 // generate separate chars // Used with WC_COMPOSITECHECK
#define WC_DEFAULTCHAR 0x00000040 // replace w/ default char // Used with WC_COMPOSITECHECK
#if (WINVER >= 0x0600)
#define WC_ERR_INVALID_CHARS 0x00000080 // error for invalid chars
#endif
#if(WINVER >= 0x0500)
#define WC_NO_BEST_FIT_CHARS 0x00000400 // do not use best fit chars
#endif /* WINVER >= 0x0500 */
//
// Character Type Flags.
//
#define CT_CTYPE1 0x00000001 // ctype 1 information
#define CT_CTYPE2 0x00000002 // ctype 2 information
#define CT_CTYPE3 0x00000004 // ctype 3 information
//
// CType 1 Flag Bits.
//
#define C1_UPPER 0x0001 // upper case
#define C1_LOWER 0x0002 // lower case
#define C1_DIGIT 0x0004 // decimal digits
#define C1_SPACE 0x0008 // spacing characters
#define C1_PUNCT 0x0010 // punctuation characters
#define C1_CNTRL 0x0020 // control characters
#define C1_BLANK 0x0040 // blank characters
#define C1_XDIGIT 0x0080 // other digits
#define C1_ALPHA 0x0100 // any linguistic character
#define C1_DEFINED 0x0200 // defined character
//
// CType 2 Flag Bits.
//
#define C2_LEFTTORIGHT 0x0001 // left to right
#define C2_RIGHTTOLEFT 0x0002 // right to left
#define C2_EUROPENUMBER 0x0003 // European number, digit
#define C2_EUROPESEPARATOR 0x0004 // European numeric separator
#define C2_EUROPETERMINATOR 0x0005 // European numeric terminator
#define C2_ARABICNUMBER 0x0006 // Arabic number
#define C2_COMMONSEPARATOR 0x0007 // common numeric separator
#define C2_BLOCKSEPARATOR 0x0008 // block separator
#define C2_SEGMENTSEPARATOR 0x0009 // segment separator
#define C2_WHITESPACE 0x000A // white space
#define C2_OTHERNEUTRAL 0x000B // other neutrals
#define C2_NOTAPPLICABLE 0x0000 // no implicit directionality
//
// CType 3 Flag Bits.
//
#define C3_NONSPACING 0x0001 // nonspacing character
#define C3_DIACRITIC 0x0002 // diacritic mark
#define C3_VOWELMARK 0x0004 // vowel mark
#define C3_SYMBOL 0x0008 // symbols
#define C3_KATAKANA 0x0010 // katakana character
#define C3_HIRAGANA 0x0020 // hiragana character
#define C3_HALFWIDTH 0x0040 // half width character
#define C3_FULLWIDTH 0x0080 // full width character
#define C3_IDEOGRAPH 0x0100 // ideographic character
#define C3_KASHIDA 0x0200 // Arabic kashida character
#define C3_LEXICAL 0x0400 // lexical character
#define C3_HIGHSURROGATE 0x0800 // high surrogate code unit
#define C3_LOWSURROGATE 0x1000 // low surrogate code unit
#define C3_ALPHA 0x8000 // any linguistic char (C1_ALPHA)
#define C3_NOTAPPLICABLE 0x0000 // ctype 3 is not applicable
//
// String Flags.
//
#define NORM_IGNORECASE 0x00000001 // ignore case
#define NORM_IGNORENONSPACE 0x00000002 // ignore nonspacing chars
#define NORM_IGNORESYMBOLS 0x00000004 // ignore symbols
#define LINGUISTIC_IGNORECASE 0x00000010 // linguistically appropriate 'ignore case'
#define LINGUISTIC_IGNOREDIACRITIC 0x00000020 // linguistically appropriate 'ignore nonspace'
#define NORM_IGNOREKANATYPE 0x00010000 // ignore kanatype
#define NORM_IGNOREWIDTH 0x00020000 // ignore width
#define NORM_LINGUISTIC_CASING 0x08000000 // use linguistic rules for casing
//
// Locale Independent Mapping Flags.
//
#define MAP_FOLDCZONE 0x00000010 // fold compatibility zone chars
#define MAP_PRECOMPOSED 0x00000020 // convert to precomposed chars
#define MAP_COMPOSITE 0x00000040 // convert to composite chars
#define MAP_FOLDDIGITS 0x00000080 // all digits to ASCII 0-9
#if(WINVER >= 0x0500)
#define MAP_EXPAND_LIGATURES 0x00002000 // expand all ligatures
#endif /* WINVER >= 0x0500 */
//
// Locale Dependent Mapping Flags.
//
#define LCMAP_LOWERCASE 0x00000100 // lower case letters
#define LCMAP_UPPERCASE 0x00000200 // UPPER CASE LETTERS
#if (WINVER >= _WIN32_WINNT_WIN7)
#define LCMAP_TITLECASE 0x00000300 // Title Case Letters
#endif // (WINVER >= _WIN32_WINNT_WIN7)
#define LCMAP_SORTKEY 0x00000400 // WC sort key (normalize)
#define LCMAP_BYTEREV 0x00000800 // byte reversal
#define LCMAP_HIRAGANA 0x00100000 // map katakana to hiragana
#define LCMAP_KATAKANA 0x00200000 // map hiragana to katakana
#define LCMAP_HALFWIDTH 0x00400000 // map double byte to single byte
#define LCMAP_FULLWIDTH 0x00800000 // map single byte to double byte
#define LCMAP_LINGUISTIC_CASING 0x01000000 // use linguistic rules for casing
#define LCMAP_SIMPLIFIED_CHINESE 0x02000000 // map traditional chinese to simplified chinese
#define LCMAP_TRADITIONAL_CHINESE 0x04000000 // map simplified chinese to traditional chinese
#if (WINVER >= _WIN32_WINNT_WIN8)
#define LCMAP_SORTHANDLE 0x20000000
#define LCMAP_HASH 0x00040000
#endif // (WINVER >= _WIN32_WINNT_WIN7)
//
// Search Flags
//
#define FIND_STARTSWITH 0x00100000 // see if value is at the beginning of source
#define FIND_ENDSWITH 0x00200000 // see if value is at the end of source
#define FIND_FROMSTART 0x00400000 // look for value in source, starting at the beginning
#define FIND_FROMEND 0x00800000 // look for value in source, starting at the end
//
// ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED **
//
// Language Group Enumeration Flags.
//
// The "Language Group" concept is an obsolete concept.
// The groups returned are not well defined, arbitrary, inconsistent, inaccurate,
// no longer maintained, and no longer supported.
//
// ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED **
//
#define LGRPID_INSTALLED 0x00000001 // installed language group ids
#define LGRPID_SUPPORTED 0x00000002 // supported language group ids
//
// Locale Enumeration Flags.
//
#define LCID_INSTALLED 0x00000001 // installed locale ids
#define LCID_SUPPORTED 0x00000002 // supported locale ids
#define LCID_ALTERNATE_SORTS 0x00000004 // alternate sort locale ids
#if (WINVER >= _WIN32_WINNT_VISTA)
//
// Named based enumeration flags.
//
#define LOCALE_ALL 0 // enumerate all named based locales
#define LOCALE_WINDOWS 0x00000001 // shipped locales and/or replacements for them
#define LOCALE_SUPPLEMENTAL 0x00000002 // supplemental locales only
#define LOCALE_ALTERNATE_SORTS 0x00000004 // alternate sort locales
#define LOCALE_REPLACEMENT 0x00000008 // locales that replace shipped locales (callback flag only)
#endif // (WINVER >= _WIN32_WINNT_VISTA)
#if (WINVER >= _WIN32_WINNT_WIN7)
#define LOCALE_NEUTRALDATA 0x00000010 // Locales that are "neutral" (language only, region data is default)
#define LOCALE_SPECIFICDATA 0x00000020 // Locales that contain language and region data
#endif // (WINVER >= _WIN32_WINNT_WIN7)
//
// Code Page Enumeration Flags.
//
#define CP_INSTALLED 0x00000001 // installed code page ids
#define CP_SUPPORTED 0x00000002 // 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
//
#define SORT_STRINGSORT 0x00001000 // use string sort method
// Sort digits as numbers (ie: 2 comes before 10)
#if (WINVER >= _WIN32_WINNT_WIN7)
#define SORT_DIGITSASNUMBERS 0x00000008 // use digits as numbers sort method
#endif // (WINVER >= _WIN32_WINNT_WIN7)
//
// Compare String Return Values.
//
#define CSTR_LESS_THAN 1 // string 1 less than string 2
#define CSTR_EQUAL 2 // string 1 equal to string 2
#define CSTR_GREATER_THAN 3 // string 1 greater than string 2
//
// Code Page Default Values.
// Please Use Unicode, either UTF-16 (as in WCHAR) or UTF-8 (code page CP_ACP)
//
#define CP_ACP 0 // default to ANSI code page
#define CP_OEMCP 1 // default to OEM code page
#define CP_MACCP 2 // default to MAC code page
#define CP_THREAD_ACP 3 // current thread's ANSI code page
#define CP_SYMBOL 42 // SYMBOL translations
#define CP_UTF7 65000 // UTF-7 translation
#define CP_UTF8 65001 // UTF-8 translation
//
// ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED **
//
// Country/Region Codes.
//
// DEPRECATED: The GEOID concept is deprecated, please use
// Country/Region Names instead, eg: "US" instead of a GEOID like 244.
// See the documentation for GetGeoInfoEx.
//
// WARNING: These values are arbitrarily assigned values, please use
// standard country/region names instead, such as "US".
//
// ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED **
//
#define CTRY_DEFAULT 0
#define CTRY_ALBANIA 355 // Albania
#define CTRY_ALGERIA 213 // Algeria
#define CTRY_ARGENTINA 54 // Argentina
#define CTRY_ARMENIA 374 // Armenia
#define CTRY_AUSTRALIA 61 // Australia
#define CTRY_AUSTRIA 43 // Austria
#define CTRY_AZERBAIJAN 994 // Azerbaijan
#define CTRY_BAHRAIN 973 // Bahrain
#define CTRY_BELARUS 375 // Belarus
#define CTRY_BELGIUM 32 // Belgium
#define CTRY_BELIZE 501 // Belize
#define CTRY_BOLIVIA 591 // Bolivia
#define CTRY_BRAZIL 55 // Brazil
#define CTRY_BRUNEI_DARUSSALAM 673 // Brunei Darussalam
#define CTRY_BULGARIA 359 // Bulgaria
#define CTRY_CANADA 2 // Canada
#define CTRY_CARIBBEAN 1 // Caribbean
#define CTRY_CHILE 56 // Chile
#define CTRY_COLOMBIA 57 // Colombia
#define CTRY_COSTA_RICA 506 // Costa Rica
#define CTRY_CROATIA 385 // Croatia
#define CTRY_CZECH 420 // Czech Republic
#define CTRY_DENMARK 45 // Denmark
#define CTRY_DOMINICAN_REPUBLIC 1 // Dominican Republic
#define CTRY_ECUADOR 593 // Ecuador
#define CTRY_EGYPT 20 // Egypt
#define CTRY_EL_SALVADOR 503 // El Salvador
#define CTRY_ESTONIA 372 // Estonia
#define CTRY_FAEROE_ISLANDS 298 // Faeroe Islands
#define CTRY_FINLAND 358 // Finland
#define CTRY_FRANCE 33 // France
#define CTRY_GEORGIA 995 // Georgia
#define CTRY_GERMANY 49 // Germany
#define CTRY_GREECE 30 // Greece
#define CTRY_GUATEMALA 502 // Guatemala
#define CTRY_HONDURAS 504 // Honduras
#define CTRY_HONG_KONG 852 // Hong Kong S.A.R., P.R.C.
#define CTRY_HUNGARY 36 // Hungary
#define CTRY_ICELAND 354 // Iceland
#define CTRY_INDIA 91 // India
#define CTRY_INDONESIA 62 // Indonesia
#define CTRY_IRAN 981 // Iran
#define CTRY_IRAQ 964 // Iraq
#define CTRY_IRELAND 353 // Ireland
#define CTRY_ISRAEL 972 // Israel
#define CTRY_ITALY 39 // Italy
#define CTRY_JAMAICA 1 // Jamaica
#define CTRY_JAPAN 81 // Japan
#define CTRY_JORDAN 962 // Jordan
#define CTRY_KAZAKSTAN 7 // Kazakstan
#define CTRY_KENYA 254 // Kenya
#define CTRY_KUWAIT 965 // Kuwait
#define CTRY_KYRGYZSTAN 996 // Kyrgyzstan
#define CTRY_LATVIA 371 // Latvia
#define CTRY_LEBANON 961 // Lebanon
#define CTRY_LIBYA 218 // Libya
#define CTRY_LIECHTENSTEIN 41 // Liechtenstein
#define CTRY_LITHUANIA 370 // Lithuania
#define CTRY_LUXEMBOURG 352 // Luxembourg
#define CTRY_MACAU 853 // Macao SAR, PRC
#define CTRY_MACEDONIA 389 // Former Yugoslav Republic of Macedonia
#define CTRY_MALAYSIA 60 // Malaysia
#define CTRY_MALDIVES 960 // Maldives
#define CTRY_MEXICO 52 // Mexico
#define CTRY_MONACO 33 // Principality of Monaco
#define CTRY_MONGOLIA 976 // Mongolia
#define CTRY_MOROCCO 212 // Morocco
#define CTRY_NETHERLANDS 31 // Netherlands
#define CTRY_NEW_ZEALAND 64 // New Zealand
#define CTRY_NICARAGUA 505 // Nicaragua
#define CTRY_NORWAY 47 // Norway
#define CTRY_OMAN 968 // Oman
#define CTRY_PAKISTAN 92 // Islamic Republic of Pakistan
#define CTRY_PANAMA 507 // Panama
#define CTRY_PARAGUAY 595 // Paraguay
#define CTRY_PERU 51 // Peru
#define CTRY_PHILIPPINES 63 // Republic of the Philippines
#define CTRY_POLAND 48 // Poland
#define CTRY_PORTUGAL 351 // Portugal
#define CTRY_PRCHINA 86 // People's Republic of China
#define CTRY_PUERTO_RICO 1 // Puerto Rico
#define CTRY_QATAR 974 // Qatar
#define CTRY_ROMANIA 40 // Romania
#define CTRY_RUSSIA 7 // Russia
#define CTRY_SAUDI_ARABIA 966 // Saudi Arabia
#define CTRY_SERBIA 381 // Serbia
#define CTRY_SINGAPORE 65 // Singapore
#define CTRY_SLOVAK 421 // Slovak Republic
#define CTRY_SLOVENIA 386 // Slovenia
#define CTRY_SOUTH_AFRICA 27 // South Africa
#define CTRY_SOUTH_KOREA 82 // Korea
#define CTRY_SPAIN 34 // Spain
#define CTRY_SWEDEN 46 // Sweden
#define CTRY_SWITZERLAND 41 // Switzerland
#define CTRY_SYRIA 963 // Syria
#define CTRY_TAIWAN 886 // Taiwan
#define CTRY_TATARSTAN 7 // Tatarstan
#define CTRY_THAILAND 66 // Thailand
#define CTRY_TRINIDAD_Y_TOBAGO 1 // Trinidad y Tobago
#define CTRY_TUNISIA 216 // Tunisia
#define CTRY_TURKEY 90 // Turkey
#define CTRY_UAE 971 // U.A.E.
#define CTRY_UKRAINE 380 // Ukraine
#define CTRY_UNITED_KINGDOM 44 // United Kingdom
#define CTRY_UNITED_STATES 1 // United States
#define CTRY_URUGUAY 598 // Uruguay
#define CTRY_UZBEKISTAN 7 // Uzbekistan
#define CTRY_VENEZUELA 58 // Venezuela
#define CTRY_VIET_NAM 84 // Viet Nam
#define CTRY_YEMEN 967 // Yemen
#define 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_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.
//
// DEPRECATED: LOCALE_USE_CP_ACP is used in many of the A (Ansi) apis that need
// to do string translation. Callers are encouraged to use the W
// (WCHAR/Unicode) apis instead.
//
#define LOCALE_NOUSEROVERRIDE 0x80000000 // Not Recommended - do not use user overrides
#define LOCALE_USE_CP_ACP 0x40000000 // DEPRECATED, call Unicode APIs instead: use the system ACP
#if(WINVER >= 0x0400)
#define LOCALE_RETURN_NUMBER 0x20000000 // return number instead of string
#endif /* WINVER >= 0x0400 */
#if (WINVER >= _WIN32_WINNT_WIN7)
#define LOCALE_RETURN_GENITIVE_NAMES 0x10000000 //Flag to return the Genitive forms of month names
#define LOCALE_ALLOW_NEUTRAL_NAMES 0x08000000 //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:
//
#define LOCALE_SLOCALIZEDDISPLAYNAME 0x00000002 // localized name of locale, eg "German (Germany)" in UI language
#if (WINVER >= _WIN32_WINNT_WIN7)
#define LOCALE_SENGLISHDISPLAYNAME 0x00000072 // Display name (language + country/region usually) in English, eg "German (Germany)"
#define LOCALE_SNATIVEDISPLAYNAME 0x00000073 // Display name in native locale language, eg "Deutsch (Deutschland)
#endif //(WINVER >= _WIN32_WINNT_WIN7)
#if (WINVER >= _WIN32_WINNT_VISTA)
#define LOCALE_SLOCALIZEDLANGUAGENAME 0x0000006f // Language Display Name for a language, eg "German" in UI language
#endif //(WINVER >= _WIN32_WINNT_VISTA)
#define LOCALE_SENGLISHLANGUAGENAME 0x00001001 // English name of language, eg "German"
#define LOCALE_SNATIVELANGUAGENAME 0x00000004 // native name of language, eg "Deutsch"
#define LOCALE_SLOCALIZEDCOUNTRYNAME 0x00000006 // localized name of country/region, eg "Germany" in UI language
#define LOCALE_SENGLISHCOUNTRYNAME 0x00001002 // English name of country/region, eg "Germany"
#define LOCALE_SNATIVECOUNTRYNAME 0x00000008 // native name of country/region, eg "Deutschland"
// Additional LCTypes
#define LOCALE_IDIALINGCODE 0x00000005 // country/region dialing code, example: en-US and en-CA return 1.
#define LOCALE_SLIST 0x0000000C // list item separator, eg "," for "1,2,3,4"
#define LOCALE_IMEASURE 0x0000000D // 0 = metric, 1 = US measurement system
#define LOCALE_SDECIMAL 0x0000000E // decimal separator, eg "." for 1,234.00
#define LOCALE_STHOUSAND 0x0000000F // thousand separator, eg "," for 1,234.00
#define LOCALE_SGROUPING 0x00000010 // digit grouping, eg "3;0" for 1,000,000
#define LOCALE_IDIGITS 0x00000011 // number of fractional digits eg 2 for 1.00
#define LOCALE_ILZERO 0x00000012 // leading zeros for decimal, 0 for .97, 1 for 0.97
#define LOCALE_INEGNUMBER 0x00001010 // negative number mode, 0-4, see documentation
#define LOCALE_SNATIVEDIGITS 0x00000013 // native digits for 0-9, eg "0123456789"
#define LOCALE_SCURRENCY 0x00000014 // local monetary symbol, eg "$"
#define LOCALE_SINTLSYMBOL 0x00000015 // intl monetary symbol, eg "USD"
#define LOCALE_SMONDECIMALSEP 0x00000016 // monetary decimal separator, eg "." for $1,234.00
#define LOCALE_SMONTHOUSANDSEP 0x00000017 // monetary thousand separator, eg "," for $1,234.00
#define LOCALE_SMONGROUPING 0x00000018 // monetary grouping, eg "3;0" for $1,000,000.00
#define LOCALE_ICURRDIGITS 0x00000019 // # local monetary digits, eg 2 for $1.00
#define LOCALE_ICURRENCY 0x0000001B // positive currency mode, 0-3, see documentation
#define LOCALE_INEGCURR 0x0000001C // negative currency mode, 0-15, see documentation
#define LOCALE_SSHORTDATE 0x0000001F // short date format string, eg "MM/dd/yyyy"
#define LOCALE_SLONGDATE 0x00000020 // long date format string, eg "dddd, MMMM dd, yyyy"
#define LOCALE_STIMEFORMAT 0x00001003 // time format string, eg "HH:mm:ss"
#define LOCALE_SAM 0x00000028 // AM designator, eg "AM"
#define LOCALE_SPM 0x00000029 // PM designator, eg "PM"
#define LOCALE_ICALENDARTYPE 0x00001009 // type of calendar specifier, eg CAL_GREGORIAN
#define LOCALE_IOPTIONALCALENDAR 0x0000100B // additional calendar types specifier, eg CAL_GREGORIAN_US
#define LOCALE_IFIRSTDAYOFWEEK 0x0000100C // first day of week specifier, 0-6, 0=Monday, 6=Sunday
#define LOCALE_IFIRSTWEEKOFYEAR 0x0000100D // first week of year specifier, 0-2, see documentation
#define LOCALE_SDAYNAME1 0x0000002A // long name for Monday
#define LOCALE_SDAYNAME2 0x0000002B // long name for Tuesday
#define LOCALE_SDAYNAME3 0x0000002C // long name for Wednesday
#define LOCALE_SDAYNAME4 0x0000002D // long name for Thursday
#define LOCALE_SDAYNAME5 0x0000002E // long name for Friday
#define LOCALE_SDAYNAME6 0x0000002F // long name for Saturday
#define LOCALE_SDAYNAME7 0x00000030 // long name for Sunday
#define LOCALE_SABBREVDAYNAME1 0x00000031 // abbreviated name for Monday
#define LOCALE_SABBREVDAYNAME2 0x00000032 // abbreviated name for Tuesday
#define LOCALE_SABBREVDAYNAME3 0x00000033 // abbreviated name for Wednesday
#define LOCALE_SABBREVDAYNAME4 0x00000034 // abbreviated name for Thursday
#define LOCALE_SABBREVDAYNAME5 0x00000035 // abbreviated name for Friday
#define LOCALE_SABBREVDAYNAME6 0x00000036 // abbreviated name for Saturday
#define LOCALE_SABBREVDAYNAME7 0x00000037 // abbreviated name for Sunday
#define LOCALE_SMONTHNAME1 0x00000038 // long name for January
#define LOCALE_SMONTHNAME2 0x00000039 // long name for February
#define LOCALE_SMONTHNAME3 0x0000003A // long name for March
#define LOCALE_SMONTHNAME4 0x0000003B // long name for April
#define LOCALE_SMONTHNAME5 0x0000003C // long name for May
#define LOCALE_SMONTHNAME6 0x0000003D // long name for June
#define LOCALE_SMONTHNAME7 0x0000003E // long name for July
#define LOCALE_SMONTHNAME8 0x0000003F // long name for August
#define LOCALE_SMONTHNAME9 0x00000040 // long name for September
#define LOCALE_SMONTHNAME10 0x00000041 // long name for October
#define LOCALE_SMONTHNAME11 0x00000042 // long name for November
#define LOCALE_SMONTHNAME12 0x00000043 // long name for December
#define LOCALE_SMONTHNAME13 0x0000100E // long name for 13th month (if exists)
#define LOCALE_SABBREVMONTHNAME1 0x00000044 // abbreviated name for January
#define LOCALE_SABBREVMONTHNAME2 0x00000045 // abbreviated name for February
#define LOCALE_SABBREVMONTHNAME3 0x00000046 // abbreviated name for March
#define LOCALE_SABBREVMONTHNAME4 0x00000047 // abbreviated name for April
#define LOCALE_SABBREVMONTHNAME5 0x00000048 // abbreviated name for May
#define LOCALE_SABBREVMONTHNAME6 0x00000049 // abbreviated name for June
#define LOCALE_SABBREVMONTHNAME7 0x0000004A // abbreviated name for July
#define LOCALE_SABBREVMONTHNAME8 0x0000004B // abbreviated name for August
#define LOCALE_SABBREVMONTHNAME9 0x0000004C // abbreviated name for September
#define LOCALE_SABBREVMONTHNAME10 0x0000004D // abbreviated name for October
#define LOCALE_SABBREVMONTHNAME11 0x0000004E // abbreviated name for November
#define LOCALE_SABBREVMONTHNAME12 0x0000004F // abbreviated name for December
#define LOCALE_SABBREVMONTHNAME13 0x0000100F // abbreviated name for 13th month (if exists)
#define LOCALE_SPOSITIVESIGN 0x00000050 // positive sign, eg ""
#define LOCALE_SNEGATIVESIGN 0x00000051 // negative sign, eg "-"
#define LOCALE_IPOSSIGNPOSN 0x00000052 // positive sign position (derived from INEGCURR)
#define LOCALE_INEGSIGNPOSN 0x00000053 // negative sign position (derived from INEGCURR)
#define LOCALE_IPOSSYMPRECEDES 0x00000054 // mon sym precedes pos amt (derived from ICURRENCY)
#define LOCALE_IPOSSEPBYSPACE 0x00000055 // mon sym sep by space from pos amt (derived from ICURRENCY)
#define LOCALE_INEGSYMPRECEDES 0x00000056 // mon sym precedes neg amt (derived from INEGCURR)
#define LOCALE_INEGSEPBYSPACE 0x00000057 // mon sym sep by space from neg amt (derived from INEGCURR)
#if(WINVER >= 0x0400)
#define LOCALE_FONTSIGNATURE 0x00000058 // font signature
#define LOCALE_SISO639LANGNAME 0x00000059 // ISO abbreviated language name, eg "en"
#define LOCALE_SISO3166CTRYNAME 0x0000005A // ISO abbreviated country/region name, eg "US"
#endif /* WINVER >= 0x0400 */
#if(WINVER >= 0x0500)
#define LOCALE_IPAPERSIZE 0x0000100A // 1 = letter, 5 = legal, 8 = a3, 9 = a4
#define LOCALE_SENGCURRNAME 0x00001007 // english name of currency, eg "Euro"
#define LOCALE_SNATIVECURRNAME 0x00001008 // native name of currency, eg "euro"
#define LOCALE_SYEARMONTH 0x00001006 // year month format string, eg "MM/yyyy"
#define LOCALE_SSORTNAME 0x00001013 // sort name, usually "", eg "Dictionary" in UI Language
#define LOCALE_IDIGITSUBSTITUTION 0x00001014 // 0 = context, 1 = none, 2 = national
#endif /* WINVER >= 0x0500 */
#if (WINVER >= 0x0600)
#define LOCALE_SNAME 0x0000005c // locale name (ie: en-us)
#define LOCALE_SDURATION 0x0000005d // time duration format, eg "hh:mm:ss"
#define LOCALE_SSHORTESTDAYNAME1 0x00000060 // Shortest day name for Monday
#define LOCALE_SSHORTESTDAYNAME2 0x00000061 // Shortest day name for Tuesday
#define LOCALE_SSHORTESTDAYNAME3 0x00000062 // Shortest day name for Wednesday
#define LOCALE_SSHORTESTDAYNAME4 0x00000063 // Shortest day name for Thursday
#define LOCALE_SSHORTESTDAYNAME5 0x00000064 // Shortest day name for Friday
#define LOCALE_SSHORTESTDAYNAME6 0x00000065 // Shortest day name for Saturday
#define LOCALE_SSHORTESTDAYNAME7 0x00000066 // Shortest day name for Sunday
#define LOCALE_SISO639LANGNAME2 0x00000067 // 3 character ISO abbreviated language name, eg "eng"
#define LOCALE_SISO3166CTRYNAME2 0x00000068 // 3 character ISO country/region name, eg "USA"
#define LOCALE_SNAN 0x00000069 // Not a Number, eg "NaN"
#define LOCALE_SPOSINFINITY 0x0000006a // + Infinity, eg "infinity"
#define LOCALE_SNEGINFINITY 0x0000006b // - Infinity, eg "-infinity"
#define LOCALE_SSCRIPTS 0x0000006c // Typical scripts in the locale: ; delimited script codes, eg "Latn;"
#define LOCALE_SPARENT 0x0000006d // Fallback name for resources, eg "en" for "en-US"
#define LOCALE_SCONSOLEFALLBACKNAME 0x0000006e // Fallback name for within the console for Unicode Only locales, eg "en" for bn-IN
#endif //(WINVER >= 0x0600)
#if (WINVER >= _WIN32_WINNT_WIN7)
#define LOCALE_IREADINGLAYOUT 0x00000070 // 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
#define LOCALE_INEUTRAL 0x00000071 // Returns 0 for specific cultures, 1 for neutral cultures.
#define LOCALE_INEGATIVEPERCENT 0x00000074 // Returns 0-11 for the negative percent format
#define LOCALE_IPOSITIVEPERCENT 0x00000075 // Returns 0-3 for the positive percent formatIPOSITIVEPERCENT
#define LOCALE_SPERCENT 0x00000076 // Returns the percent symbol
#define LOCALE_SPERMILLE 0x00000077 // Returns the permille (U+2030) symbol
#define LOCALE_SMONTHDAY 0x00000078 // Returns the preferred month/day format
#define LOCALE_SSHORTTIME 0x00000079 // Returns the preferred short time format (ie: no seconds, just h:mm)
#define LOCALE_SOPENTYPELANGUAGETAG 0x0000007a // Open type language tag, eg: "latn" or "dflt"
#define LOCALE_SSORTLOCALE 0x0000007b // Name of locale to use for sorting/collation/casing behavior.
#endif //(WINVER >= _WIN32_WINNT_WIN7)
#if (WINVER >= _WIN32_WINNT_WIN8)
#define LOCALE_SRELATIVELONGDATE 0x0000007c // Long date without year, day of week, month, date, eg: for lock screen
#endif
#if (WINVER >= _WIN32_WINNT_WIN10)
#define LOCALE_SSHORTESTAM 0x0000007e // Shortest AM designator, eg "A"
#define LOCALE_SSHORTESTPM 0x0000007f // Shortest PM designator, eg "P"
#endif
//
// DEPRECATED LCTYPEs
//
// DEPRECATED LCTYPEs for Code Pages
// Applications are strongly encouraged to Use Unicode, such as UTF-16 (WCHAR type)
// or the CP_UTF8 Code Page. Legacy encodings are unable to represent the full
// set of scripts/language and characters (& emoji!) available on modern computers.
// Use of legacy code pages (encodings) is a leading cause of data loss and corruption.
#define LOCALE_IDEFAULTCODEPAGE 0x0000000B // default oem code page for locale (user may configure as UTF-8, use of Unicode is recommended instead)
#define LOCALE_IDEFAULTANSICODEPAGE 0x00001004 // default ansi code page for locale (user may configure as UTF-8, use of Unicode is recommended instead)
#define LOCALE_IDEFAULTMACCODEPAGE 0x00001011 // default mac code page for locale (user may configure as UTF-8, use of Unicode is recommended instead)
#if(WINVER >= 0x0500)
#define LOCALE_IDEFAULTEBCDICCODEPAGE 0x00001012 // default ebcdic code page for a locale (use of Unicode is recommended instead)
#endif /* WINVER >= 0x0500 */
// LCTYPEs using out-of-date concepts
#define LOCALE_ILANGUAGE 0x00000001 // DEPRECATED language id (LCID), LOCALE_SNAME preferred
#define LOCALE_SABBREVLANGNAME 0x00000003 // DEPRECATED arbitrary abbreviated language name, LOCALE_SISO639LANGNAME instead.
#define LOCALE_SABBREVCTRYNAME 0x00000007 // DEPRECATED arbitrary abbreviated country/region name, LOCALE_SISO3166CTRYNAME instead.
#define LOCALE_IGEOID 0x0000005B // DEPRECATED geographical location id, use LOCALE_SISO3166CTRYNAME instead.
#define LOCALE_IDEFAULTLANGUAGE 0x00000009 // DEPRECATED default language id, deprecated
#define LOCALE_IDEFAULTCOUNTRY 0x0000000A // DEPRECATED default country/region code, deprecated
#define LOCALE_IINTLCURRDIGITS 0x0000001A // DEPRECATED, use LOCALE_ICURRDIGITS # intl monetary digits, eg 2 for $1.00
// Derived legacy date & time values for compatibility only.
// Please use the appropriate date or time pattern instead.
// These can be misleading, for example a locale configured as 12h24m52s could have a time separator of "h".
#define LOCALE_SDATE 0x0000001D // DEPRECATED date separator (derived from LOCALE_SSHORTDATE, use that instead)
#define LOCALE_STIME 0x0000001E // DEPRECATED time separator (derived from LOCALE_STIMEFORMAT, use that instead)
#define LOCALE_IDATE 0x00000021 // DEPRECATED short date format ordering (derived from LOCALE_SSHORTDATE, use that instead)
#define LOCALE_ILDATE 0x00000022 // DEPRECATED long date format ordering (derived from LOCALE_SLONGDATE, use that instead)
#define LOCALE_ITIME 0x00000023 // DEPRECATED time format specifier (derived from LOCALE_STIMEFORMAT, use that instead)
#define LOCALE_ITIMEMARKPOSN 0x00001005 // DEPRECATED time marker position (derived from LOCALE_STIMEFORMAT, use that instead)
#define LOCALE_ICENTURY 0x00000024 // DEPRECATED century format specifier (short date, LOCALE_SSHORTDATE is preferred)
#define LOCALE_ITLZERO 0x00000025 // DEPRECATED leading zeros in time field (derived from LOCALE_STIMEFORMAT, use that instead)
#define LOCALE_IDAYLZERO 0x00000026 // DEPRECATED leading zeros in day field (short date, LOCALE_SSHORTDATE is preferred)
#define LOCALE_IMONLZERO 0x00000027 // DEPRECATED leading zeros in month field (short date, LOCALE_SSHORTDATE is preferred)
#if(WINVER >= 0x0600)
#define LOCALE_SKEYBOARDSTOINSTALL 0x0000005e // Used internally, see GetKeyboardLayoutName() function
#endif /* WINVER >= 0x0600 */
// LCTYPEs which have been renamed to enable more understandable source code.
#define LOCALE_SLANGUAGE LOCALE_SLOCALIZEDDISPLAYNAME // DEPRECATED as new name is more readable.
#if (WINVER >= _WIN32_WINNT_VISTA)
#define LOCALE_SLANGDISPLAYNAME LOCALE_SLOCALIZEDLANGUAGENAME // DEPRECATED as new name is more readable.
#endif //(WINVER >= _WIN32_WINNT_VISTA)
#define LOCALE_SENGLANGUAGE LOCALE_SENGLISHLANGUAGENAME // DEPRECATED as new name is more readable.
#define LOCALE_SNATIVELANGNAME LOCALE_SNATIVELANGUAGENAME // DEPRECATED as new name is more readable.
#define LOCALE_SCOUNTRY LOCALE_SLOCALIZEDCOUNTRYNAME // DEPRECATED as new name is more readable.
#define LOCALE_SENGCOUNTRY LOCALE_SENGLISHCOUNTRYNAME // DEPRECATED as new name is more readable.
#define LOCALE_SNATIVECTRYNAME LOCALE_SNATIVECOUNTRYNAME // DEPRECATED as new name is more readable.
// DEPRECATED: Use LOCALE_SISO3166CTRYNAME to query for a region identifier, LOCALE_ICOUNTRY is not a region identifier.
#define LOCALE_ICOUNTRY LOCALE_IDIALINGCODE // Deprecated synonym for LOCALE_IDIALINGCODE
#define LOCALE_S1159 LOCALE_SAM // DEPRECATED: Please use LOCALE_SAM, which is more readable.
#define LOCALE_S2359 LOCALE_SPM // DEPRECATED: Please use LOCALE_SPM, which is more readable.
//
// Time Flags for GetTimeFormat.
//
#define TIME_NOMINUTESORSECONDS 0x00000001 // do not use minutes or seconds
#define TIME_NOSECONDS 0x00000002 // do not use seconds
#define TIME_NOTIMEMARKER 0x00000004 // do not use time marker
#define TIME_FORCE24HOURFORMAT 0x00000008 // always use 24 hour format
//
// Date Flags for GetDateFormat.
//
#define DATE_SHORTDATE 0x00000001 // use short date picture
#define DATE_LONGDATE 0x00000002 // use long date picture
#define DATE_USE_ALT_CALENDAR 0x00000004 // use alternate calendar (if any)
#if(WINVER >= 0x0500)
#define DATE_YEARMONTH 0x00000008 // use year month picture
#define DATE_LTRREADING 0x00000010 // add marks for left to right reading order layout
#define DATE_RTLREADING 0x00000020 // add marks for right to left reading order layout
#endif /* WINVER >= 0x0500 */
#if (WINVER >= _WIN32_WINNT_WIN7)
#define DATE_AUTOLAYOUT 0x00000040 // add appropriate marks for left-to-right or right-to-left reading order layout
#endif //(WINVER >= _WIN32_WINNT_WIN7)
#if (WINVER >= _WIN32_WINNT_WINTHRESHOLD)
#define DATE_MONTHDAY 0x00000080 // include month day pictures
#endif //(WINVER >= _WIN32_WINNT_WINTHRESHOLD)
//
// 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_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.
//
// DEPRECATED: CAL_USE_CP_ACP is used in many of the A (Ansi) apis that need
// to do string translation. Callers are encouraged to use the W
// (WCHAR/Unicode) apis instead.
//
#if(WINVER >= 0x0500)
#define CAL_NOUSEROVERRIDE LOCALE_NOUSEROVERRIDE // Not Recommended - do not use user overrides
#define CAL_USE_CP_ACP LOCALE_USE_CP_ACP // DEPRECATED, call Unicode APIs instead: use the system ACP
#define CAL_RETURN_NUMBER LOCALE_RETURN_NUMBER // return number instead of string
#endif /* WINVER >= 0x0500 */
#if (WINVER >= _WIN32_WINNT_WIN7)
#define 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.
//
#define CAL_ICALINTVALUE 0x00000001 // calendar type
#define CAL_SCALNAME 0x00000002 // native name of calendar
#define CAL_IYEAROFFSETRANGE 0x00000003 // starting years of eras
#define CAL_SERASTRING 0x00000004 // era name for IYearOffsetRanges, eg A.D.
#define CAL_SSHORTDATE 0x00000005 // short date format string
#define CAL_SLONGDATE 0x00000006 // long date format string
#define CAL_SDAYNAME1 0x00000007 // native name for Monday
#define CAL_SDAYNAME2 0x00000008 // native name for Tuesday
#define CAL_SDAYNAME3 0x00000009 // native name for Wednesday
#define CAL_SDAYNAME4 0x0000000a // native name for Thursday
#define CAL_SDAYNAME5 0x0000000b // native name for Friday
#define CAL_SDAYNAME6 0x0000000c // native name for Saturday
#define CAL_SDAYNAME7 0x0000000d // native name for Sunday
#define CAL_SABBREVDAYNAME1 0x0000000e // abbreviated name for Mon
#define CAL_SABBREVDAYNAME2 0x0000000f // abbreviated name for Tue
#define CAL_SABBREVDAYNAME3 0x00000010 // abbreviated name for Wed
#define CAL_SABBREVDAYNAME4 0x00000011 // abbreviated name for Thu
#define CAL_SABBREVDAYNAME5 0x00000012 // abbreviated name for Fri
#define CAL_SABBREVDAYNAME6 0x00000013 // abbreviated name for Sat
#define CAL_SABBREVDAYNAME7 0x00000014 // abbreviated name for Sun
// Note that in the hebrew calendar the leap month name is always returned as the 7th month
#define CAL_SMONTHNAME1 0x00000015 // native name for January
#define CAL_SMONTHNAME2 0x00000016 // native name for February
#define CAL_SMONTHNAME3 0x00000017 // native name for March
#define CAL_SMONTHNAME4 0x00000018 // native name for April
#define CAL_SMONTHNAME5 0x00000019 // native name for May
#define CAL_SMONTHNAME6 0x0000001a // native name for June
#define CAL_SMONTHNAME7 0x0000001b // native name for July
#define CAL_SMONTHNAME8 0x0000001c // native name for August
#define CAL_SMONTHNAME9 0x0000001d // native name for September
#define CAL_SMONTHNAME10 0x0000001e // native name for October
#define CAL_SMONTHNAME11 0x0000001f // native name for November
#define CAL_SMONTHNAME12 0x00000020 // native name for December
#define CAL_SMONTHNAME13 0x00000021 // native name for 13th month (if any)
#define CAL_SABBREVMONTHNAME1 0x00000022 // abbreviated name for Jan
#define CAL_SABBREVMONTHNAME2 0x00000023 // abbreviated name for Feb
#define CAL_SABBREVMONTHNAME3 0x00000024 // abbreviated name for Mar
#define CAL_SABBREVMONTHNAME4 0x00000025 // abbreviated name for Apr
#define CAL_SABBREVMONTHNAME5 0x00000026 // abbreviated name for May
#define CAL_SABBREVMONTHNAME6 0x00000027 // abbreviated name for Jun
#define CAL_SABBREVMONTHNAME7 0x00000028 // abbreviated name for July
#define CAL_SABBREVMONTHNAME8 0x00000029 // abbreviated name for Aug
#define CAL_SABBREVMONTHNAME9 0x0000002a // abbreviated name for Sep
#define CAL_SABBREVMONTHNAME10 0x0000002b // abbreviated name for Oct
#define CAL_SABBREVMONTHNAME11 0x0000002c // abbreviated name for Nov
#define CAL_SABBREVMONTHNAME12 0x0000002d // abbreviated name for Dec
#define CAL_SABBREVMONTHNAME13 0x0000002e // abbreviated name for 13th month (if any)
#if(WINVER >= 0x0500)
#define CAL_SYEARMONTH 0x0000002f // year month format string
#define CAL_ITWODIGITYEARMAX 0x00000030 // two digit year max
#endif /* WINVER >= 0x0500 */
#if (WINVER >= 0x0600)
#define CAL_SSHORTESTDAYNAME1 0x00000031 // Shortest day name for Mo
#define CAL_SSHORTESTDAYNAME2 0x00000032 // Shortest day name for Tu
#define CAL_SSHORTESTDAYNAME3 0x00000033 // Shortest day name for We
#define CAL_SSHORTESTDAYNAME4 0x00000034 // Shortest day name for Th
#define CAL_SSHORTESTDAYNAME5 0x00000035 // Shortest day name for Fr
#define CAL_SSHORTESTDAYNAME6 0x00000036 // Shortest day name for Sa
#define CAL_SSHORTESTDAYNAME7 0x00000037 // Shortest day name for Su
#endif //(WINVER >= 0x0600)
#if (WINVER >= _WIN32_WINNT_WIN7)
#define CAL_SMONTHDAY 0x00000038 // Month/day format
#define CAL_SABBREVERASTRING 0x00000039 // Abbreviated era string (eg: AD)
#endif // winver >= windows 7
#if (WINVER >= _WIN32_WINNT_WIN8)
#define CAL_SRELATIVELONGDATE 0x0000003a // Long date without year, day of week, month, date, eg: for lock screen
#endif
#if (NTDDI_VERSION >= NTDDI_WIN10_RS2)
#define CAL_SENGLISHERANAME 0x0000003b // Japanese calendar only: return the English era names for .Net compatibility
#define CAL_SENGLISHABBREVERANAME 0x0000003c // Japanese calendar only: return the English Abbreviated era names for .Net compatibility
#endif
//
// Calendar Enumeration Value.
//
#define ENUM_ALL_CALENDARS 0xffffffff // enumerate all calendars
//
// Calendar ID Values.
//
#define CAL_GREGORIAN 1 // Gregorian (localized) calendar
#define CAL_GREGORIAN_US 2 // Gregorian (U.S.) calendar
#define CAL_JAPAN 3 // Japanese Emperor Era calendar
#define CAL_TAIWAN 4 // Taiwan calendar
#define CAL_KOREA 5 // Korean Tangun Era calendar
#define CAL_HIJRI 6 // Hijri (Arabic Lunar) calendar
#define CAL_THAI 7 // Thai calendar
#define CAL_HEBREW 8 // Hebrew (Lunar) calendar
#define CAL_GREGORIAN_ME_FRENCH 9 // Gregorian Middle East French calendar
#define CAL_GREGORIAN_ARABIC 10 // Gregorian Arabic calendar
#define CAL_GREGORIAN_XLIT_ENGLISH 11 // Gregorian Transliterated English calendar
#define CAL_GREGORIAN_XLIT_FRENCH 12 // Gregorian Transliterated French calendar
#define CAL_PERSIAN 22 // Persian (Solar Hijri) calendar
#define CAL_UMALQURA 23 // UmAlQura Hijri (Arabic Lunar) calendar
//
// ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED **
//
// Language Group ID Values
//
// The "Language Group" concept is an obsolete concept.
// The groups returned are not well defined, arbitrary, inconsistent, inaccurate,
// no longer maintained, and no longer supported.
//
// ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED **
//
#define LGRPID_WESTERN_EUROPE 0x0001 // Western Europe & U.S.
#define LGRPID_CENTRAL_EUROPE 0x0002 // Central Europe
#define LGRPID_BALTIC 0x0003 // Baltic
#define LGRPID_GREEK 0x0004 // Greek
#define LGRPID_CYRILLIC 0x0005 // Cyrillic
#define LGRPID_TURKIC 0x0006 // Turkic
#define LGRPID_TURKISH 0x0006 // Turkish
#define LGRPID_JAPANESE 0x0007 // Japanese
#define LGRPID_KOREAN 0x0008 // Korean
#define LGRPID_TRADITIONAL_CHINESE 0x0009 // Traditional Chinese
#define LGRPID_SIMPLIFIED_CHINESE 0x000a // Simplified Chinese
#define LGRPID_THAI 0x000b // Thai
#define LGRPID_HEBREW 0x000c // Hebrew
#define LGRPID_ARABIC 0x000d // Arabic
#define LGRPID_VIETNAMESE 0x000e // Vietnamese
#define LGRPID_INDIC 0x000f // Indic
#define LGRPID_GEORGIAN 0x0010 // Georgian
#define LGRPID_ARMENIAN 0x0011 // Armenian
#if (WINVER >= 0x0600)
//
// MUI function flag values
//
#define MUI_LANGUAGE_ID 0x4 // Use traditional language ID convention
#define MUI_LANGUAGE_NAME 0x8 // Use ISO language (culture) name convention
#define MUI_MERGE_SYSTEM_FALLBACK 0x10 // GetThreadPreferredUILanguages merges in parent and base languages
#define MUI_MERGE_USER_FALLBACK 0x20 // GetThreadPreferredUILanguages merges in user preferred languages
#define MUI_UI_FALLBACK MUI_MERGE_SYSTEM_FALLBACK | MUI_MERGE_USER_FALLBACK
#define MUI_THREAD_LANGUAGES 0x40 // GetThreadPreferredUILanguages merges in user preferred languages
#define MUI_CONSOLE_FILTER 0x100 // SetThreadPreferredUILanguages takes on console specific behavior
#define MUI_COMPLEX_SCRIPT_FILTER 0x200 // SetThreadPreferredUILanguages takes on complex script specific behavior
#define MUI_RESET_FILTERS 0x001 // Reset MUI_CONSOLE_FILTER and MUI_COMPLEX_SCRIPT_FILTER