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
|
// Licensed under the Apache License, Version 2.0
// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
// All files in the project carrying such notice may not be copied, modified, or distributed
// except according to those terms.
//! Procedure declarations, constant definitions, and macros for the NLS component.
use ctypes::c_int;
use shared::basetsd::LONG_PTR;
use shared::guiddef::GUID;
use shared::minwindef::{
BOOL, BYTE, DWORD, INT, LPARAM, LPDWORD, LPINT, LPVOID, LPWORD, MAX_PATH, PDWORD, PULONG,
UINT,
};
use um::minwinbase::SYSTEMTIME;
use um::winnt::{
CHAR, LANGID, LCID, LONG, LPCSTR, LPCWCH, LPCWSTR, LPSTR, LPWSTR, PCNZCH, PCNZWCH, PCWSTR,
PCZZWSTR, PULONGLONG, PWSTR, PZZWSTR, ULONGLONG, WCHAR,
};
pub const MAX_LEADBYTES: usize = 12;
pub const MAX_DEFAULTCHAR: usize = 2;
pub const MB_PRECOMPOSED: DWORD = 0x00000001;
pub const MB_COMPOSITE: DWORD = 0x00000002;
pub const MB_USEGLYPHCHARS: DWORD = 0x00000004;
pub const MB_ERR_INVALID_CHARS: DWORD = 0x00000008;
pub const WC_COMPOSITECHECK: DWORD = 0x00000200;
pub const WC_DISCARDNS: DWORD = 0x00000010;
pub const WC_SEPCHARS: DWORD = 0x00000020;
pub const WC_DEFAULTCHAR: DWORD = 0x00000040;
pub const WC_ERR_INVALID_CHARS: DWORD = 0x00000080;
pub const WC_NO_BEST_FIT_CHARS: DWORD = 0x00000400;
pub const CP_ACP: DWORD = 0;
pub const CP_OEMCP: DWORD = 1;
pub const CP_MACCP: DWORD = 2;
pub const CP_THREAD_ACP: DWORD = 3;
pub const CP_SYMBOL: DWORD = 42;
pub const CP_UTF7: DWORD = 65000;
pub const CP_UTF8: DWORD = 65001;
pub type LGRPID = DWORD;
pub type LCTYPE = DWORD;
pub type CALTYPE = DWORD;
pub type CALID = DWORD;
STRUCT!{struct CPINFO {
MaxCharSize: UINT,
DefaultChar: [BYTE; MAX_DEFAULTCHAR],
LeadByte: [BYTE; MAX_LEADBYTES],
}}
pub type LPCPINFO = *mut CPINFO;
STRUCT!{struct CPINFOEXA {
MaxCharSize: UINT,
DefaultChar: [BYTE; MAX_DEFAULTCHAR],
LeadByte: [BYTE; MAX_LEADBYTES],
UnicodeDefaultChar: WCHAR,
CodePage: UINT,
CodePageName: [CHAR; MAX_PATH],
}}
pub type LPCPINFOEXA = *mut CPINFOEXA;
STRUCT!{struct CPINFOEXW {
MaxCharSize: UINT,
DefaultChar: [BYTE; MAX_DEFAULTCHAR],
LeadByte: [BYTE; MAX_LEADBYTES],
UnicodeDefaultChar: WCHAR,
CodePage: UINT,
CodePageName: [WCHAR; MAX_PATH],
}}
pub type LPCPINFOEXW = *mut CPINFOEXW;
STRUCT!{struct NUMBERFMTA {
NumDigits: UINT,
LeadingZero: UINT,
Grouping: UINT,
lpDecimalSep: LPSTR,
lpThousandSep: LPSTR,
NegativeOrder: UINT,
}}
pub type LPNUMBERFMTA = *mut NUMBERFMTA;
STRUCT!{struct NUMBERFMTW {
NumDigits: UINT,
LeadingZero: UINT,
Grouping: UINT,
lpDecimalSep: LPWSTR,
lpThousandSep: LPWSTR,
NegativeOrder: UINT,
}}
pub type LPNUMBERFMTW = *mut NUMBERFMTW;
STRUCT!{struct CURRENCYFMTA {
NumDigits: UINT,
LeadingZero: UINT,
Grouping: UINT,
lpDecimalSep: LPSTR,
lpThousandSep: LPSTR,
NegativeOrder: UINT,
PositiveOrder: UINT,
lpCurrencySymbol: LPSTR,
}}
pub type LPCURRENCYFMTA = *mut CURRENCYFMTA;
STRUCT!{struct CURRENCYFMTW {
NumDigits: UINT,
LeadingZero: UINT,
Grouping: UINT,
lpDecimalSep: LPWSTR,
lpThousandSep: LPWSTR,
NegativeOrder: UINT,
PositiveOrder: UINT,
lpCurrencySymbol: LPWSTR,
}}
pub type LPCURRENCYFMTW = *mut CURRENCYFMTW;
pub type NLS_FUNCTION = DWORD;
STRUCT!{struct NLSVERSIONINFO {
dwNLSVersionInfoSize: DWORD,
dwNLSVersion: DWORD,
dwDefinedVersion: DWORD,
dwEffectiveId: DWORD,
guidCustomVersion: GUID,
}}
pub type LPNLSVERSIONINFO = *mut NLSVERSIONINFO;
STRUCT!{struct NLSVERSIONINFOEX {
dwNLSVersionInfoSize: DWORD,
dwNLSVersion: DWORD,
dwDefinedVersion: DWORD,
dwEffectiveId: DWORD,
guidCustomVersion: GUID,
}}
pub type LPNLSVERSIONINFOEX = *mut NLSVERSIONINFOEX;
pub type GEOID = LONG;
pub type GEOTYPE = DWORD;
pub type GEOCLASS = DWORD;
ENUM!{enum NORM_FORM {
NormalizationOther = 0,
NormalizationC = 0x1,
NormalizationD = 0x2,
NormalizationKC = 0x5,
NormalizationKD = 0x6,
}}
FN!{stdcall LANGUAGEGROUP_ENUMPROCA(
LGRPID,
LPSTR,
LPSTR,
DWORD,
LONG_PTR,
) -> BOOL}
FN!{stdcall LANGGROUPLOCALE_ENUMPROCA(
LGRPID,
LCID,
LPSTR,
LONG_PTR,
) -> BOOL}
FN!{stdcall UILANGUAGE_ENUMPROCA(
LPSTR,
LONG_PTR,
) -> BOOL}
FN!{stdcall CODEPAGE_ENUMPROCA(
LPSTR,
) -> BOOL}
FN!{stdcall DATEFMT_ENUMPROCA(
LPSTR,
) -> BOOL}
FN!{stdcall DATEFMT_ENUMPROCEXA(
LPSTR,
CALID,
) -> BOOL}
FN!{stdcall TIMEFMT_ENUMPROCA(
LPSTR,
) -> BOOL}
FN!{stdcall CALINFO_ENUMPROCA(
LPSTR,
) -> BOOL}
FN!{stdcall CALINFO_ENUMPROCEXA(
LPSTR,
CALID,
) -> BOOL}
FN!{stdcall LOCALE_ENUMPROCA(
LPSTR,
) -> BOOL}
FN!{stdcall LOCALE_ENUMPROCW(
LPWSTR,
) -> BOOL}
FN!{stdcall LANGUAGEGROUP_ENUMPROCW(
LGRPID,
LPWSTR,
LPWSTR,
DWORD,
LONG_PTR,
) -> BOOL}
FN!{stdcall LANGGROUPLOCALE_ENUMPROCW(
LGRPID,
LCID,
LPWSTR,
LONG_PTR,
) -> BOOL}
FN!{stdcall UILANGUAGE_ENUMPROCW(
LPWSTR,
LONG_PTR,
) -> BOOL}
FN!{stdcall CODEPAGE_ENUMPROCW(
LPWSTR,
) -> BOOL}
FN!{stdcall DATEFMT_ENUMPROCW(
LPWSTR,
) -> BOOL}
FN!{stdcall DATEFMT_ENUMPROCEXW(
LPWSTR,
CALID,
) -> BOOL}
FN!{stdcall TIMEFMT_ENUMPROCW(
LPWSTR,
) -> BOOL}
FN!{stdcall CALINFO_ENUMPROCW(
LPWSTR,
) -> BOOL}
FN!{stdcall CALINFO_ENUMPROCEXW(
LPWSTR,
CALID,
) -> BOOL}
FN!{stdcall GEO_ENUMPROC(
GEOID,
) -> BOOL}
STRUCT!{struct FILEMUIINFO {
dwSize: DWORD,
dwVersion: DWORD,
dwFileType: DWORD,
pChecksum: [BYTE; 16],
pServiceChecksum: [BYTE; 16],
dwLanguageNameOffset: DWORD,
dwTypeIDMainSize: DWORD,
dwTypeIDMainOffset: DWORD,
dwTypeNameMainOffset: DWORD,
dwTypeIDMUISize: DWORD,
dwTypeIDMUIOffset: DWORD,
dwTypeNameMUIOffset: DWORD,
abBuffer: [BYTE; 8],
}}
pub type PFILEMUIINFO = *mut FILEMUIINFO;
FN!{stdcall CALINFO_ENUMPROCEXEX(
LPWSTR,
CALID,
LPWSTR,
LPARAM,
) -> BOOL}
FN!{stdcall DATEFMT_ENUMPROCEXEX(
LPWSTR,
CALID,
LPARAM,
) -> BOOL}
FN!{stdcall TIMEFMT_ENUMPROCEX(
LPWSTR,
LPARAM,
) -> BOOL}
FN!{stdcall LOCALE_ENUMPROCEX(
LPWSTR,
DWORD,
LPARAM,
) -> BOOL}
extern "system" {
pub fn CompareStringA(
Locale: LCID,
dwCmpFlags: DWORD,
lpString1: PCNZCH,
cchCount1: c_int,
lpString2: PCNZCH,
cchCount2: c_int,
) -> c_int;
pub fn CompareStringEx(
lpLocaleName: LPCWSTR,
dwCmpFlags: DWORD,
lpString1: LPCWCH,
cchCount1: c_int,
lpString2: LPCWCH,
cchCount2: c_int,
lpVersionInformation: LPNLSVERSIONINFO,
lpReserved: LPVOID,
lParam: LPARAM,
) -> c_int;
pub fn CompareStringW(
Locale: LCID,
dwCmpFlags: DWORD,
lpString1: PCNZWCH,
cchCount1: c_int,
lpString2: PCNZWCH,
cchCount2: c_int,
) -> c_int;
pub fn ConvertDefaultLocale(Locale: LCID) -> LCID;
pub fn EnumCalendarInfoA(
lpCalInfoEnumProc: CALINFO_ENUMPROCA,
Locale: LCID,
Calendar: CALID,
CalType: CALTYPE,
) -> BOOL;
pub fn EnumCalendarInfoExA(
lpCalInfoEnumProcEx: CALINFO_ENUMPROCEXA,
Locale: LCID,
Calendar: CALID,
CalType: CALTYPE,
) -> BOOL;
pub fn EnumCalendarInfoExEx(
pCalInfoEnumProcExEx: CALINFO_ENUMPROCEXEX,
lpLocaleName: LPCWSTR,
Calendar: CALID,
lpReserved: LPCWSTR,
CalType: CALTYPE,
lParam: LPARAM,
) -> BOOL;
pub fn EnumCalendarInfoExW(
lpCalInfoEnumProcEx: CALINFO_ENUMPROCEXW,
Locale: LCID,
Calendar: CALID,
CalType: CALTYPE,
) -> BOOL;
pub fn EnumCalendarInfoW(
lpCalInfoEnumProc: CALINFO_ENUMPROCW,
Locale: LCID,
Calendar: CALID,
CalType: CALTYPE,
) -> BOOL;
pub fn EnumDateFormatsA(
lpDateFmtEnumProc: DATEFMT_ENUMPROCA,
Locale: LCID,
dwFlags: DWORD,
) -> BOOL;
pub fn EnumDateFormatsExA(
lpDateFmtEnumProcEx: DATEFMT_ENUMPROCEXA,
Locale: LCID,
dwFlags: DWORD,
) -> BOOL;
pub fn EnumDateFormatsExEx(
lpDateFmtEnumProcExEx: DATEFMT_ENUMPROCEXEX,
lpLocaleName: LPCWSTR,
dwFlags: DWORD,
lParam: LPARAM,
) -> BOOL;
pub fn EnumDateFormatsExW(
lpDateFmtEnumProcEx: DATEFMT_ENUMPROCEXW,
Locale: LCID,
dwFlags: DWORD,
) -> BOOL;
pub fn EnumDateFormatsW(
lpDateFmtEnumProc: DATEFMT_ENUMPROCW,
Locale: LCID,
dwFlags: DWORD,
) -> BOOL;
pub fn EnumLanguageGroupLocalesA(
lpLangGroupLocaleEnumProc: LANGGROUPLOCALE_ENUMPROCA,
LanguageGroup: LGRPID,
dwFlags: DWORD,
lParam: LONG_PTR,
) -> BOOL;
pub fn EnumLanguageGroupLocalesW(
lpLangGroupLocaleEnumProc: LANGGROUPLOCALE_ENUMPROCW,
LanguageGroup: LGRPID,
dwFlags: DWORD,
lParam: LONG_PTR,
) -> BOOL;
pub fn EnumSystemCodePagesA(
lpCodePageEnumProc: CODEPAGE_ENUMPROCA,
dwFlags: DWORD,
) -> BOOL;
pub fn EnumSystemCodePagesW(
lpCodePageEnumProc: CODEPAGE_ENUMPROCW,
dwFlags: DWORD,
) -> BOOL;
pub fn EnumSystemGeoID(
GeoClass: GEOCLASS,
ParentGeoId: GEOID,
lpGeoEnumProc: GEO_ENUMPROC,
) -> BOOL;
pub fn EnumSystemLanguageGroupsA(
lpLanguageGroupEnumProc: LANGUAGEGROUP_ENUMPROCA,
dwFlags: DWORD,
lParam: LONG_PTR,
) -> BOOL;
pub fn EnumSystemLanguageGroupsW(
lpLanguageGroupEnumProc: LANGUAGEGROUP_ENUMPROCW,
dwFlags: DWORD,
lParam: LONG_PTR,
) -> BOOL;
pub fn EnumSystemLocalesA(
lpLocaleEnumProc: LOCALE_ENUMPROCA,
dwFlags: DWORD,
) -> BOOL;
pub fn EnumSystemLocalesEx(
lpLocaleEnumProcEx: LOCALE_ENUMPROCEX,
dwFlags: DWORD,
lParam: LPARAM,
lpReserved: LPVOID,
) -> BOOL;
pub fn EnumSystemLocalesW(
lpLocaleEnumProc: LOCALE_ENUMPROCW,
dwFlags: DWORD,
) -> BOOL;
pub fn EnumTimeFormatsA(
lpTimeFmtEnumProc: TIMEFMT_ENUMPROCA,
Locale: LCID,
dwFlags: DWORD,
) -> BOOL;
pub fn EnumTimeFormatsEx(
lpTimeFmtEnumProcEx: TIMEFMT_ENUMPROCEX,
lpLocaleName: LPCWSTR,
dwFlags: DWORD,
lParam: LPARAM,
) -> BOOL;
pub fn EnumTimeFormatsW(
lpTimeFmtEnumProc: TIMEFMT_ENUMPROCW,
Locale: LCID,
dwFlags: DWORD,
) -> BOOL;
pub fn EnumUILanguagesA(
lpUILanguageEnumProc: UILANGUAGE_ENUMPROCA,
dwFlags: DWORD,
lParam: LONG_PTR,
) -> BOOL;
pub fn EnumUILanguagesW(
lpUILanguageEnumProc: UILANGUAGE_ENUMPROCW,
dwFlags: DWORD,
lParam: LONG_PTR,
) -> BOOL;
pub fn FindNLSString(
Locale: LCID,
dwFindNLSStringFlags: DWORD,
lpStringSource: LPCWSTR,
cchSource: c_int,
lpStringValue: LPCWSTR,
cchValue: c_int,
pcchFound: LPINT,
) -> c_int;
pub fn FindNLSStringEx(
lpLocaleName: LPCWSTR,
dwFindNLSStringFlags: DWORD,
lpStringSource: LPCWSTR,
cchSource: c_int,
lpStringValue: LPCWSTR,
cchValue: c_int,
pcchFound: LPINT,
lpVersionInformation: LPNLSVERSIONINFO,
lpReserved: LPVOID,
sortHandle: LPARAM,
) -> c_int;
pub fn FoldStringA(
dwMapFlags: DWORD,
lpSrcStr: LPCSTR,
cchSrc: c_int,
lpDestStr: LPSTR,
cchDest: c_int,
) -> c_int;
pub fn GetACP() -> UINT;
pub fn GetCPInfo(
CodePage: UINT,
lpCPInfo: LPCPINFO,
) -> BOOL;
pub fn GetCPInfoExA(
CodePage: UINT,
dwFlags: DWORD,
lpCPInfoEx: LPCPINFOEXA,
) -> BOOL;
pub fn GetCPInfoExW(
CodePage: UINT,
dwFlags: DWORD,
lpCPInfoEx: LPCPINFOEXW,
) -> BOOL;
pub fn GetCalendarInfoA(
Locale: LCID,
Calendar: CALID,
CalType: CALTYPE,
lpCalData: LPSTR,
cchData: c_int,
lpValue: LPDWORD,
) -> c_int;
pub fn GetCalendarInfoEx(
lpLocaleName: LPCWSTR,
Calendar: CALID,
lpReserved: LPCWSTR,
CalType: CALTYPE,
lpCalData: LPWSTR,
cchData: c_int,
lpValue: LPDWORD,
) -> c_int;
pub fn GetCalendarInfoW(
Locale: LCID,
Calendar: CALID,
CalType: CALTYPE,
lpCalData: LPWSTR,
cchData: c_int,
lpValue: LPDWORD,
) -> c_int;
pub fn GetCurrencyFormatA(
Locale: LCID,
dwFlags: DWORD,
lpValue: LPCSTR,
lpFormat: *const CURRENCYFMTA,
lpCurrencyStr: LPSTR,
cchCurrency: c_int,
) -> c_int;
pub fn GetCurrencyFormatEx(
lpLocaleName: LPCWSTR,
dwFlags: DWORD,
lpValue: LPCWSTR,
lpFormat: *const CURRENCYFMTW,
lpCurrencyStr: LPWSTR,
cchCurrency: c_int,
) -> c_int;
pub fn GetCurrencyFormatW(
Locale: LCID,
dwFlags: DWORD,
lpValue: LPCWSTR,
lpFormat: *const CURRENCYFMTW,
lpCurrencyStr: LPWSTR,
cchCurrency: c_int,
) -> c_int;
pub fn GetDurationFormat(
Locale: LCID,
dwFlags: DWORD,
lpDuration: *const SYSTEMTIME,
ullDuration: ULONGLONG,
lpFormat: LPCWSTR,
lpDurationStr: LPWSTR,
cchDuration: c_int,
) -> c_int;
pub fn GetDurationFormatEx(
lpLocaleName: LPCWSTR,
dwFlags: DWORD,
lpDuration: *const SYSTEMTIME,
ullDuration: ULONGLONG,
lpFormat: LPCWSTR,
lpDurationStr: LPWSTR,
cchDuration: c_int,
) -> c_int;
pub fn GetFileMUIInfo(
dwFlags: DWORD,
pcwszFilePath: PCWSTR,
pFileMUIInfo: PFILEMUIINFO,
pcbFileMUIInfo: *mut DWORD,
) -> BOOL;
pub fn GetFileMUIPath(
dwFlags: DWORD,
pcwszFilePath: PCWSTR,
pwszLanguage: PWSTR,
pcchLanguage: PULONG,
pwszFileMUIPath: PWSTR,
pcchFileMUIPath: PULONG,
pululEnumerator: PULONGLONG,
) -> BOOL;
pub fn GetGeoInfoA(
Location: GEOID,
GeoType: GEOTYPE,
lpGeoData: LPSTR,
cchData: c_int,
LangId: LANGID,
) -> c_int;
pub fn GetGeoInfoW(
Location: GEOID,
GeoType: GEOTYPE,
lpGeoData: LPWSTR,
cchData: c_int,
LangId: LANGID,
) -> c_int;
pub fn GetLocaleInfoA(
Locale: LCID,
LCType: LCTYPE,
lpLCData: LPSTR,
cchData: c_int,
) -> c_int;
pub fn GetLocaleInfoEx(
lpLocaleName: LPCWSTR,
LCType: LCTYPE,
lpLCData: LPWSTR,
cchData: c_int,
) -> c_int;
pub fn GetLocaleInfoW(
Locale: LCID,
LCType: LCTYPE,
lpLCData: LPWSTR,
cchData: c_int,
) -> c_int;
pub fn GetNLSVersion(
Function: NLS_FUNCTION,
Locale: LCID,
lpVersionInformation: LPNLSVERSIONINFO,
) -> BOOL;
pub fn GetNLSVersionEx(
function: NLS_FUNCTION,
lpLocaleName: LPCWSTR,
lpVersionInformation: LPNLSVERSIONINFOEX,
) -> BOOL;
pub fn GetNumberFormatA(
Locale: LCID,
dwFlags: DWORD,
lpValue: LPCSTR,
lpFormat: *const NUMBERFMTA,
lpNumberStr: LPSTR,
cchNumber: c_int,
) -> c_int;
pub fn GetNumberFormatEx(
lpLocaleName: LPCWSTR,
dwFlags: DWORD,
lpValue: LPCWSTR,
lpFormat: *const NUMBERFMTW,
lpNumberStr: LPWSTR,
cchNumber: c_int,
) -> c_int;
pub fn GetNumberFormatW(
Locale: LCID,
dwFlags: DWORD,
lpValue: LPCWSTR,
lpFormat: *const NUMBERFMTW,
lpNumberStr: LPWSTR,
cchNumber: c_int,
) -> c_int;
pub fn GetOEMCP() -> UINT;
pub fn GetProcessPreferredUILanguages(
dwFlags: DWORD,
pulNumLanguages: PULONG,
pwszLanguagesBuffer: PZZWSTR,
pcchLanguagesBuffer: PULONG,
) -> BOOL;
pub fn GetStringScripts(
dwFlags: DWORD,
lpString: LPCWSTR,
cchString: c_int,
lpScripts: LPWSTR,
cchScripts: c_int,
) -> c_int;
pub fn GetStringTypeA(
Locale: LCID,
dwInfoType: DWORD,
lpSrcStr: LPCSTR,
cchSrc: c_int,
lpCharType: LPWORD,
) -> BOOL;
pub fn GetStringTypeExA(
Locale: LCID,
dwInfoType: DWORD,
lpSrcStr: LPCSTR,
cchSrc: c_int,
lpCharType: LPWORD,
) -> BOOL;
pub fn GetStringTypeW(
dwInfoType: DWORD,
lpSrcStr: LPCWCH,
cchSrc: c_int,
lpCharType: LPWORD,
) -> BOOL;
pub fn GetSystemDefaultLCID() -> LCID;
pub fn GetSystemDefaultLangID() -> LANGID;
pub fn GetSystemDefaultLocaleName(
lpLocaleName: LPWSTR,
cchLocaleName: c_int,
) -> c_int;
pub fn GetSystemDefaultUILanguage() -> LANGID;
pub fn GetSystemPreferredUILanguages(
dwFlags: DWORD,
pulNumLanguages: PULONG,
pwszLanguagesBuffer: PZZWSTR,
pcchLanguagesBuffer: PULONG,
) -> BOOL;
pub fn GetThreadLocale() -> LCID;
pub fn GetThreadPreferredUILanguages(
dwFlags: DWORD,
pulNumLanguages: PULONG,
pwszLanguagesBuffer: PZZWSTR,
pcchLanguagesBuffer: PULONG,
) -> BOOL;
pub fn GetThreadUILanguage() -> LANGID;
pub fn GetUILanguageInfo(
dwFlags: DWORD,
pwmszLanguage: PCZZWSTR,
pwszFallbackLanguages: PZZWSTR,
pcchFallbackLanguages: PDWORD,
pAttributes: PDWORD,
) -> BOOL;
pub fn GetUserDefaultLCID() -> LCID;
pub fn GetUserDefaultLangID() -> LANGID;
pub fn GetUserDefaultLocaleName(
lpLocaleName: LPWSTR,
cchLocaleName: c_int,
) -> c_int;
pub fn GetUserDefaultUILanguage() -> LANGID;
pub fn GetUserGeoID(GeoClass: GEOCLASS) -> GEOID;
pub fn GetUserPreferredUILanguages(
dwFlags: DWORD,
pulNumLanguages: PULONG,
pwszLanguagesBuffer: PZZWSTR,
pcchLanguagesBuffer: PULONG,
) -> BOOL;
pub fn IsDBCSLeadByte(
TestChar: BYTE,
) -> BOOL;
pub fn IsDBCSLeadByteEx(
CodePage: UINT,
TestChar: BYTE,
) -> BOOL;
pub fn IsNLSDefinedString(
Function: NLS_FUNCTION,
dwFlags: DWORD,
lpVersionInformation: LPNLSVERSIONINFO,
lpString: LPCWSTR,
cchStr: INT,
) -> BOOL;
pub fn IsNormalizedString(
NormForm: NORM_FORM,
lpString: LPCWSTR,
cwLength: c_int,
) -> BOOL;
pub fn IsValidCodePage(
CodePage: UINT,
) -> BOOL;
pub fn IsValidLanguageGroup(
LanguageGroup: LGRPID,
dwFlags: DWORD,
) -> BOOL;
pub fn IsValidLocale(
Locale: LCID,
dwFlags: DWORD,
) -> BOOL;
pub fn IsValidLocaleName(
lpLocaleName: LPCWSTR,
) -> BOOL;
pub fn IsValidNLSVersion(
function: NLS_FUNCTION,
lpLocaleName: LPCWSTR,
lpVersionInformation: LPNLSVERSIONINFOEX,
) -> BOOL;
pub fn LCIDToLocaleName(
Locale: LCID,
lpName: LPWSTR,
cchName: c_int,
dwFlags: DWORD,
) -> c_int;
pub fn LCMapStringA(
Locale: LCID,
dwMapFlags: DWORD,
lpSrcStr: LPCSTR,
cchSrc: c_int,
lpDestStr: LPSTR,
cchDest: c_int,
) -> c_int;
pub fn LCMapStringEx(
lpLocaleName: LPCWSTR,
dwMapFlags: DWORD,
lpSrcStr: LPCWSTR,
cchSrc: c_int,
lpDestStr: LPWSTR,
cchDest: c_int,
lpVersionInformation: LPNLSVERSIONINFO,
lpReserved: LPVOID,
sortHandle: LPARAM,
) -> c_int;
pub fn LCMapStringW(
Locale: LCID,
dwMapFlags: DWORD,
lpSrcStr: LPCWSTR,
cchSrc: c_int,
lpDestStr: LPWSTR,
cchDest: c_int,
) -> c_int;
pub fn LocaleNameToLCID(
lpName: LPCWSTR,
dwFlags: DWORD,
) -> LCID;
pub fn NormalizeString(
NormForm: NORM_FORM,
lpSrcString: LPCWSTR,
cwSrcLength: c_int,
lpDstString: LPWSTR,
cwDstLength: c_int,
) -> c_int;
pub fn NotifyUILanguageChange(
dwFlags: DWORD,
pcwstrNewLanguage: PCWSTR,
pcwstrPreviousLanguage: PCWSTR,
dwReserved: DWORD,
pdwStatusRtrn: PDWORD,
) -> BOOL;
pub fn ResolveLocaleName(
lpNameToResolve: LPCWSTR,
lpLocaleName: LPWSTR,
cchLocaleName: c_int,
) -> c_int;
pub fn SetCalendarInfoA(
Locale: LCID,
Calendar: CALID,
CalType: CALTYPE,
lpCalData: LPCSTR,
) -> BOOL;
pub fn SetCalendarInfoW(
Locale: LCID,
Calendar: CALID,
CalType: CALTYPE,
lpCalData: LPCWSTR,
) -> BOOL;
pub fn SetLocaleInfoA(
Locale: LCID,
LCType: LCTYPE,
lpLCData: LPCSTR,
) -> BOOL;
pub fn SetLocaleInfoW(
Locale: LCID,
LCType: LCTYPE,
lpLCData: LPCWSTR,
) -> BOOL;
pub fn SetProcessPreferredUILanguages(
dwFlags: DWORD,
pwszLanguagesBuffer: PCZZWSTR,
pulNumLanguages: PULONG,
) -> BOOL;
pub fn SetThreadLocale(Locale: LCID) -> BOOL;
pub fn SetThreadPreferredUILanguages(
dwFlags: DWORD,
pwszLanguagesBuffer: PCZZWSTR,
pulNumLanguages: PULONG,
) -> BOOL;
pub fn SetThreadUILanguage(LangId: LANGID) -> LANGID;
pub fn SetUserGeoID(GeoId: GEOID) -> BOOL;
pub fn VerifyScripts(
dwFlags: DWORD,
lpLocaleScripts: LPCWSTR,
cchLocaleScripts: c_int,
lpTestScripts: LPCWSTR,
cchTestScripts: c_int,
) -> BOOL;
}
|