18#define MAX_PRIMARY_LANGUAGE 0x3FF
19#define MAX_BASIC_LCID 0x5FFF
21#define LCID_ALT_NAME 0x00100000
61 {
"arn-CL", 0x0047A },
65 {
"az-Cyrl", 0x0742C },
66 {
"az-Cyrl-AZ", 0x0082C },
67 {
"az-Latn", 0x0782C },
68 {
"az-Latn-AZ", 0x0042C },
76 {
"bin-NG", 0x00466 },
86 {
"bs-Cyrl", 0x0641A },
87 {
"bs-Cyrl-BA", 0x0201A },
88 {
"bs-Latn", 0x0681A },
89 {
"bs-Latn-BA", 0x0141A },
92 {
"ca-ES-valencia", 0x00803 },
94 {
"chr-Cher", 0x07C5C },
95 {
"chr-Cher-US", 0x0045C },
101 {
"cy-GB", 0x00452 },
103 {
"da-DK", 0x00406 },
105 {
"de-AT", 0x00C07 },
106 {
"de-CH", 0x00807 },
107 {
"de-DE", 0x00407 },
108 {
"de-DE_phoneb", 0x10407 },
109 {
"de-LI", 0x01407 },
110 {
"de-LU", 0x01007 },
112 {
"dsb-DE", 0x0082E },
114 {
"dv-MV", 0x00465 },
115 {
"dz-BT", 0x00C51 },
117 {
"el-GR", 0x00408 },
119 {
"en-029", 0x02409 },
120 {
"en-AE", 0x04C09 },
121 {
"en-AU", 0x00C09 },
123 {
"en-BZ", 0x02809 },
124 {
"en-CA", 0x01009 },
126 {
"en-GB", 0x00809 },
127 {
"en-HK", 0x03C09 },
128 {
"en-ID", 0x03809 },
129 {
"en-IE", 0x01809 },
130 {
"en-IN", 0x04009 },
131 {
"en-JM", 0x02009 },
134 {
"en-MY", 0x04409 },
135 {
"en-NZ", 0x01409 },
136 {
"en-PH", 0x03409 },
137 {
"en-SG", 0x04809 },
139 {
"en-TT", 0x02C09 },
140 {
"en-US", 0x00409 },
142 {
"en-ZA", 0x01C09 },
143 {
"en-ZW", 0x03009 },
145 {
"es-419", 0x0580A },
146 {
"es-AR", 0x02C0A },
147 {
"es-BO", 0x0400A },
148 {
"es-CL", 0x0340A },
149 {
"es-CO", 0x0240A },
150 {
"es-CR", 0x0140A },
151 {
"es-CU", 0x05C0A },
152 {
"es-DO", 0x01C0A },
153 {
"es-EC", 0x0300A },
154 {
"es-ES", 0x00C0A },
155 {
"es-ES_tradnl", 0x0040A },
156 {
"es-GT", 0x0100A },
157 {
"es-HN", 0x0480A },
158 {
"es-MX", 0x0080A },
159 {
"es-NI", 0x04C0A },
160 {
"es-PA", 0x0180A },
161 {
"es-PE", 0x0280A },
162 {
"es-PR", 0x0500A },
163 {
"es-PY", 0x03C0A },
164 {
"es-SV", 0x0440A },
165 {
"es-US", 0x0540A },
166 {
"es-UY", 0x0380A },
167 {
"es-VE", 0x0200A },
169 {
"et-EE", 0x00425 },
171 {
"eu-ES", 0x0042D },
173 {
"fa-IR", 0x00429 },
175 {
"ff-Latn", 0x07C67 },
176 {
"ff-Latn-NG", 0x00467 },
177 {
"ff-Latn-SN", 0x00867 },
180 {
"fi-FI", 0x0040B },
182 {
"fil-PH", 0x00464 },
184 {
"fo-FO", 0x00438 },
187 {
"fr-029", 0x01C0C },
188 {
"fr-BE", 0x0080C },
189 {
"fr-CA", 0x00C0C },
190 {
"fr-CD", 0x0240C },
191 {
"fr-CH", 0x0100C },
192 {
"fr-CI", 0x0300C },
193 {
"fr-CM", 0x02C0C },
194 {
"fr-FR", 0x0040C },
195 {
"fr-HT", 0x03C0C },
196 {
"fr-LU", 0x0140C },
197 {
"fr-MA", 0x0380C },
198 {
"fr-MC", 0x0180C },
199 {
"fr-ML", 0x0340C },
200 {
"fr-RE", 0x0200C },
201 {
"fr-SN", 0x0280C },
203 {
"fy-NL", 0x00462 },
205 {
"ga-IE", 0x0083C },
207 {
"gd-GB", 0x00491 },
209 {
"gl-ES", 0x00456 },
211 {
"gn-PY", 0x00474 },
213 {
"gsw-FR", 0x00484 },
215 {
"gu-IN", 0x00447 },
217 {
"ha-Latn", 0x07C68 },
218 {
"ha-Latn-NG", 0x00468 },
220 {
"haw-US", 0x00475 },
222 {
"he-IL", 0x0040D },
224 {
"hi-IN", 0x00439 },
226 {
"hr-BA", 0x0101A },
227 {
"hr-HR", 0x0041A },
229 {
"hsb-DE", 0x0042E },
231 {
"hu-HU", 0x0040E },
232 {
"hu-HU_technl", 0x1040E },
234 {
"hy-AM", 0x0042B },
236 {
"ibb-NG", 0x00469 },
238 {
"id-ID", 0x00421 },
240 {
"ig-NG", 0x00470 },
242 {
"ii-CN", 0x00478 },
244 {
"is-IS", 0x0040F },
246 {
"it-CH", 0x00810 },
247 {
"it-IT", 0x00410 },
249 {
"iu-Cans", 0x0785D },
250 {
"iu-Cans-CA", 0x0045D },
251 {
"iu-Latn", 0x07C5D },
252 {
"iu-Latn-CA", 0x0085D },
254 {
"ja-JP", 0x00411 },
255 {
"ja-JP_radstr", 0x040411 },
258 {
"ka-GE", 0x00437 },
259 {
"ka-GE_modern", 0x10437 },
263 {
"kk-KZ", 0x0043F },
267 {
"kl-GL", 0x0046F },
269 {
"km-KH", 0x00453 },
271 {
"kn-IN", 0x0044B },
273 {
"ko-KR", 0x00412 },
275 {
"kok-IN", 0x00457 },
277 {
"kr-Latn-NG", 0x00471 },
279 {
"ks-Arab", 0x00460 },
280 {
"ks-Deva-IN", 0x00860 },
282 {
"ku-Arab", 0x07C92 },
283 {
"ku-Arab-IQ", 0x00492 },
285 {
"ky-KG", 0x00440 },
287 {
"la-001", 0x00476 },
289 {
"lb-LU", 0x0046E },
291 {
"lo-LA", 0x00454 },
293 {
"lt-LT", 0x00427 },
295 {
"lv-LV", 0x00426 },
297 {
"mi-NZ", 0x00481 },
299 {
"mk-MK", 0x0042F },
301 {
"ml-IN", 0x0044C },
303 {
"mn-Cyrl", 0x07850 },
304 {
"mn-MN", 0x00450 },
305 {
"mn-Mong", 0x07C50 },
306 {
"mn-Mong-CN", 0x00850 },
307 {
"mn-Mong-MN", 0x00C50 },
309 {
"mni-IN", 0x00458 },
311 {
"moh-CA", 0x0047C },
313 {
"mr-IN", 0x0044E },
315 {
"ms-BN", 0x0083E },
316 {
"ms-MY", 0x0043E },
318 {
"mt-MT", 0x0043A },
320 {
"my-MM", 0x00455 },
322 {
"nb-NO", 0x00414 },
324 {
"ne-IN", 0x00861 },
325 {
"ne-NP", 0x00461 },
327 {
"nl-BE", 0x00813 },
328 {
"nl-NL", 0x00413 },
330 {
"nn-NO", 0x00814 },
333 {
"nso-ZA", 0x0046C },
335 {
"oc-FR", 0x00482 },
337 {
"om-ET", 0x00472 },
339 {
"or-IN", 0x00448 },
341 {
"pa-Arab", 0x07C46 },
342 {
"pa-Arab-PK", 0x00846 },
343 {
"pa-IN", 0x00446 },
345 {
"pap-029", 0x00479 },
347 {
"pl-PL", 0x00415 },
350 {
"prs-AF", 0x0048C },
352 {
"ps-AF", 0x00463 },
354 {
"pt-BR", 0x00416 },
355 {
"pt-PT", 0x00816 },
356 {
"qps-ploc", 0x00501 },
357 {
"qps-ploca", 0x005FE },
358 {
"qps-plocm", 0x009FF },
361 {
"quc-Latn-GT", 0x00486 },
365 {
"quz-BO", 0x0046B },
366 {
"quz-EC", 0x0086B },
367 {
"quz-PE", 0x00C6b },
369 {
"rm-CH", 0x00417 },
371 {
"ro-MD", 0x00818 },
372 {
"ro-RO", 0x00418 },
374 {
"ru-MD", 0x00819 },
375 {
"ru-RU", 0x00419 },
377 {
"rw-RW", 0x00487 },
379 {
"sa-IN", 0x0044F },
381 {
"sah-RU", 0x00485 },
383 {
"sd-Arab", 0x07C59 },
384 {
"sd-Arab-PK", 0x00859 },
385 {
"sd-Deva-IN", 0x00459 },
387 {
"se-FI", 0x00C3B },
388 {
"se-NO", 0x0043B },
389 {
"se-SE", 0x0083B },
391 {
"si-LK", 0x0045B },
393 {
"sk-SK", 0x0041B },
395 {
"sl-SI", 0x00424 },
397 {
"sma-NO", 0x0183B },
398 {
"sma-SE", 0x01C3B },
400 {
"smj-NO", 0x0103B },
401 {
"smj-SE", 0x0143B },
403 {
"smn-FI", 0x0243B },
405 {
"sms-FI", 0x0203B },
407 {
"so-SO", 0x00477 },
409 {
"sq-AL", 0x0041C },
411 {
"sr-Cyrl", 0x06C1A },
412 {
"sr-Cyrl-BA", 0x01C1A },
413 {
"sr-Cyrl-CS", 0x00C1A },
414 {
"sr-Cyrl-ME", 0x0301A },
415 {
"sr-Cyrl-RS", 0x0281A },
416 {
"sr-Latn", 0x0701A },
417 {
"sr-Latn-BA", 0x0181A },
418 {
"sr-Latn-CS", 0x0081A },
419 {
"sr-Latn-ME", 0x02C1A },
420 {
"sr-Latn-RS", 0x0241A },
422 {
"st-ZA", 0x00430 },
424 {
"sv-FI", 0x0081D },
425 {
"sv-SE", 0x0041D },
427 {
"sw-KE", 0x00441 },
429 {
"syr-SY", 0x0045A },
431 {
"ta-IN", 0x00449 },
432 {
"ta-LK", 0x00849 },
435 {
"te-IN", 0x0044A },
437 {
"tg-Cyrl", 0x07C28 },
438 {
"tg-Cyrl-TJ", 0x00428 },
440 {
"th-TH", 0x0041E },
442 {
"ti-ER", 0x00873 },
443 {
"ti-ET", 0x00473 },
445 {
"tk-TM", 0x00442 },
448 {
"tn-BW", 0x00832 },
449 {
"tn-ZA", 0x00432 },
451 {
"tr-TR", 0x0041F },
453 {
"ts-ZA", 0x00431 },
455 {
"tt-RU", 0x00444 },
457 {
"tzm-Arab-MA", 0x0045F },
458 {
"tzm-Latn", 0x07C5F },
459 {
"tzm-Latn-DZ", 0x0085F },
460 {
"tzm-Tfng", 0x0785F },
461 {
"tzm-Tfng-MA", 0x0105F },
463 {
"ug-CN", 0x00480 },
465 {
"uk-UA", 0x00422 },
467 {
"ur-IN", 0x00820 },
468 {
"ur-PK", 0x00420 },
470 {
"uz-Cyrl", 0x07843 },
471 {
"uz-Cyrl-UZ", 0x00843 },
472 {
"uz-Latn", 0x07C43 },
473 {
"uz-Latn-UZ", 0x00443 },
475 {
"ve-ZA", 0x00433 },
477 {
"vi-VN", 0x0042A },
479 {
"wo-SN", 0x00488 },
481 {
"xh-ZA", 0x00434 },
483 {
"yi-001", 0x0043D },
485 {
"yo-NG", 0x0046A },
487 {
"zh-CN", 0x00804 },
488 {
"zh-CN_stroke", 0x20804 },
489 {
"zh-Hans", 0x00004 },
490 {
"zh-Hant", 0x07C04 },
491 {
"zh-HK", 0x00C04 },
492 {
"zh-HK_radstr", 0x40C04 },
493 {
"zh-MO", 0x01404 },
494 {
"zh-MO_radstr", 0x41404 },
495 {
"zh-SG", 0x01004 },
496 {
"zh-SG_stroke", 0x21004 },
497 {
"zh-TW", 0x00404 },
498 {
"zh-TW_pronun", 0x30404 },
499 {
"zh-TW_radstr", 0x40404 },
502 {
"zu-ZA", 0x00435 },
519 return SortEntryA->
Lcid - SortEntryB->
Lcid;
539 if (SortTable ==
NULL)
554 sizeof(SortTable[0]),
590 if (CurrentLcid <
Lcid)
594 else if (CurrentLcid >
Lcid)
607#define LOWERCASE_CHAR(Char) \
608 (((Char) >= 'A' && (Char) <= 'Z') ? ((Char) + ('a' - 'A')) : (Char))
620 for (
i = 0;
i < UnicodeLocaleName->Length /
sizeof(
WCHAR);
i++)
633 if (AsciiLocaleName[
i] ==
'\0')
640 return (
INT)Char1 - (
INT)Char2;
645 if (AsciiLocaleName[
i] ==
'\0')
663 PCSTR CurrentLocaleName;
672 if (CompareResult < 0)
676 else if (CompareResult > 0)
746 DPRINT1(
"RtlLcidToLocaleName: Invalid flags: 0x%lx\n",
Flags);
753 DPRINT1(
"RtlLcidToLocaleName: Invalid buffer\n");
760 DPRINT1(
"RtlLcidToLocaleName: Invalid LCID: 0x%lx\n",
Lcid);
765 if ((
Flags & RTL_LOCALE_ALLOW_NEUTRAL_NAMES) == 0)
770 DPRINT(
"RtlLcidToLocaleName: Neutral LCID: 0x%lx\n",
Lcid);
795 DPRINT(
"RtlLcidToLocaleName: LCID 0x%lx not found\n",
Lcid);
802 DPRINT(
"RtlLcidToLocaleName: Buffer too small\n");
823 DPRINT1(
"RtlpLocaleNameToLcidInternal: Invalid buffer\n");
830 DPRINT1(
"RtlpLocaleNameToLcidInternal: Lcid is NULL\n");
837 DPRINT1(
"RtlpLocaleNameToLcidInternal: Invalid flags: 0x%lx\n",
Flags);
845 DPRINT(
"RtlpLocaleNameToLcidInternal: Locale name not found\n");
853 if ((
Flags & RTL_LOCALE_ALLOW_NEUTRAL_NAMES) == 0)
858 DPRINT(
"RtlpLocaleNameToLcidInternal: Neutral LCID: 0x%lx\n", FoundLcid);
899 DPRINT1(
"RtlLcidToLocaleName failed with status 0x%lx\n",
Status);
926 DPRINT1(
"RtlpLocaleNameToLcidInternal failed with status 0x%lx\n",
Status);
static _In_ LPCWSTR LocaleName
ACPI_SIZE strlen(const char *String)
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
void __cdecl qsort(_Inout_updates_bytes_(_NumOfElements *_SizeOfElements) void *_Base, _In_ size_t _NumOfElements, _In_ size_t _SizeOfElements, _In_ int(__cdecl *_PtFuncCompare)(const void *, const void *))
#define STATUS_NOT_IMPLEMENTED
#define NT_SUCCESS(StatCode)
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static const SYSTEMTIME INT
_In_ PSID _In_ BOOLEAN AllocateDestinationString
#define _Must_inspect_result_
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define LOCALE_USER_DEFAULT
#define LOCALE_CUSTOM_DEFAULT
#define LOCALE_SYSTEM_DEFAULT
#define LOCALE_CUSTOM_UI_DEFAULT
#define NLS_VALID_LOCALE_MASK
NTSTATUS NTAPI NtQueryDefaultLocale(IN BOOLEAN UserProfile, OUT PLCID DefaultLocaleId)
#define STATUS_INVALID_PARAMETER_2
#define STATUS_INVALID_PARAMETER_1
#define STATUS_INVALID_PARAMETER_3
NTSTATUS NTAPI RtlConvertLCIDToString(_In_ LCID LcidValue, _In_ ULONG Base, _In_ ULONG Padding, _Out_writes_(Size) PWSTR pResultBuf, _In_ ULONG Size)
static USHORT RtlpLocaleIndexTable[_ARRAYSIZE(RtlpLocaleTable)]
static _Must_inspect_result_ INT CompareLocaleNames(_In_ PCSTR AsciiLocaleName, _In_ PCUNICODE_STRING UnicodeLocaleName)
BOOLEAN NTAPI RtlIsValidLocaleName(_In_ LPCWSTR LocaleName, _In_ ULONG Flags)
static const LOCALE_ENTRY RtlpLocaleTable[]
struct _LOCALE_ENTRY LOCALE_ENTRY
NTSTATUS NTAPI RtlpInitializeLocaleTable(VOID)
NTSTATUS NTAPI RtlLocaleNameToLcid(_In_ PCWSTR LocaleName, _Out_ PLCID Lcid, _In_ ULONG Flags)
#define MAX_PRIMARY_LANGUAGE
static _Must_inspect_result_ NTSTATUS RtlpLocaleNameToLcidInternal(_In_ PCUNICODE_STRING LocaleName, _Out_ PLCID Lcid, _In_ ULONG Flags)
LCID RtlpSystemDefaultLcid
static int __cdecl LcidSortEntryCompare(const void *a, const void *b)
static _Must_inspect_result_ ULONG FindIndexByLcid(_In_ LCID Lcid)
struct _SORT_ENTRY * PSORT_ENTRY
static BOOLEAN IsNeutralLocale(_In_ LCID Lcid)
struct _SORT_ENTRY SORT_ENTRY
#define LOWERCASE_CHAR(Char)
static _Must_inspect_result_ BOOLEAN CopyAsciizToUnicodeString(_Inout_ PUNICODE_STRING UnicodeString, _In_ PCSTR AsciiString)
NTSTATUS NTAPI RtlLcidToLocaleName(_In_ LCID Lcid, _Inout_ PUNICODE_STRING LocaleName, _In_ ULONG Flags, _In_ BOOLEAN AllocateDestinationString)
static _Must_inspect_result_ ULONG FindIndexByLocaleName(_In_ PCUNICODE_STRING LocaleName)
#define STATUS_BUFFER_TOO_SMALL
#define STATUS_UNSUCCESSFUL
#define STATUS_INSUFFICIENT_RESOURCES
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
_Must_inspect_result_ _In_ ULONG Flags
_In_ CONST DEVPROPKEY _In_ LCID Lcid