1 // Licensed under the Apache License, Version 2.0
2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
4 // All files in the project carrying such notice may not be copied, modified, or distributed
5 // except according to those terms.
6 //! Type definitions for the basic types.
7 use ctypes::{
8     __int64, __uint64, c_char, c_double, c_int, c_long, c_schar, c_short, c_uchar, c_ulong,
9     c_ushort, c_void, wchar_t
10 };
11 use shared::basetsd::{KAFFINITY, LONG_PTR, ULONG64, ULONG_PTR};
12 use shared::guiddef::GUID;
13 #[cfg(target_arch = "x86_64")]
14 IFDEF!{
15 pub const MAX_NATURAL_ALIGNMENT: usize = 8;
16 pub const MEMORY_ALLOCATION_ALIGNMENT: usize = 16;
17 }
18 #[cfg(not(target_arch = "x86_64"))]
19 IFDEF!{
20 pub const MAX_NATURAL_ALIGNMENT: usize = 4;
21 pub const MEMORY_ALLOCATION_ALIGNMENT: usize = 8;
22 }
23 #[cfg(any(target_arch = "x86_64", target_arch = "x86"))]
24 pub const SYSTEM_CACHE_ALIGNMENT_SIZE: usize = 64;
25 #[cfg(not(any(target_arch = "x86_64", target_arch = "x86")))]
26 pub const SYSTEM_CACHE_ALIGNMENT_SIZE: usize = 128;
27 pub type PVOID = *mut c_void;
28 pub type PVOID64 = u64; // This is a 64-bit pointer, even when in 32-bit
29 pub type VOID = c_void;
30 pub type CHAR = c_char;
31 pub type SHORT = c_short;
32 pub type LONG = c_long;
33 pub type INT = c_int;
34 pub type WCHAR = wchar_t;
35 pub type PWCHAR = *mut WCHAR;
36 pub type LPWCH = *mut WCHAR;
37 pub type PWCH = *mut WCHAR;
38 pub type LPCWCH = *const WCHAR;
39 pub type PCWCH = *const WCHAR;
40 pub type NWPSTR = *mut WCHAR;
41 pub type LPWSTR = *mut WCHAR;
42 pub type LPTSTR = LPSTR;
43 pub type PWSTR = *mut WCHAR;
44 pub type PZPWSTR = *mut PWSTR;
45 pub type PCZPWSTR = *const PWSTR;
46 pub type LPUWSTR = *mut WCHAR; // Unaligned pointer
47 pub type PUWSTR = *mut WCHAR; // Unaligned pointer
48 pub type LPCWSTR = *const WCHAR;
49 pub type PCWSTR = *const WCHAR;
50 pub type PZPCWSTR = *mut PCWSTR;
51 pub type PCZPCWSTR = *const PCWSTR;
52 pub type LPCUWSTR = *const WCHAR; // Unaligned pointer
53 pub type PCUWSTR = *const WCHAR; // Unaligned pointer
54 pub type PZZWSTR = *mut WCHAR;
55 pub type PCZZWSTR = *const WCHAR;
56 pub type PUZZWSTR = *mut WCHAR; // Unaligned pointer
57 pub type PCUZZWSTR = *const WCHAR; // Unaligned pointer
58 pub type PNZWCH = *mut WCHAR;
59 pub type PCNZWCH = *const WCHAR;
60 pub type PUNZWCH = *mut WCHAR; // Unaligned pointer
61 pub type PCUNZWCH = *const WCHAR; // Unaligned pointer
62 pub type LPCWCHAR = *const WCHAR;
63 pub type PCWCHAR = *const WCHAR;
64 pub type LPCUWCHAR = *const WCHAR; // Unaligned pointer
65 pub type PCUWCHAR = *const WCHAR; // Unaligned pointer
66 pub type UCSCHAR = c_ulong;
67 pub const UCSCHAR_INVALID_CHARACTER: UCSCHAR = 0xffffffff;
68 pub const MIN_UCSCHAR: UCSCHAR = 0;
69 pub const MAX_UCSCHAR: UCSCHAR = 0x0010FFFF;
70 pub type PUCSCHAR = *mut UCSCHAR;
71 pub type PCUCSCHAR = *const UCSCHAR;
72 pub type PUCSSTR = *mut UCSCHAR;
73 pub type PUUCSSTR = *mut UCSCHAR; // Unaligned pointer
74 pub type PCUCSSTR = *const UCSCHAR;
75 pub type PCUUCSSTR = *const UCSCHAR; // Unaligned pointer
76 pub type PUUCSCHAR = *mut UCSCHAR; // Unaligned pointer
77 pub type PCUUCSCHAR = *const UCSCHAR; // Unaligned pointer
78 pub type PCHAR = *mut CHAR;
79 pub type LPCH = *mut CHAR;
80 pub type PCH = *mut CHAR;
81 pub type LPCCH = *const CHAR;
82 pub type PCCH = *const CHAR;
83 pub type NPSTR = *mut CHAR;
84 pub type LPSTR = *mut CHAR;
85 pub type PSTR = *mut CHAR;
86 pub type PZPSTR = *mut PSTR;
87 pub type PCZPSTR = *const PSTR;
88 pub type LPCSTR = *const CHAR;
89 pub type PCSTR = *const CHAR;
90 pub type PZPCSTR = *mut PCSTR;
91 pub type PCZPCSTR = *const PCSTR;
92 pub type PZZSTR = *mut CHAR;
93 pub type PCZZSTR = *const CHAR;
94 pub type PNZCH = *mut CHAR;
95 pub type PCNZCH = *const CHAR;
96 // Skipping TCHAR things
97 pub type DOUBLE = c_double;
98 STRUCT!{struct QUAD {
99     UseThisFieldToCopy: __int64,
100 }}
101 pub type PSHORT = *mut SHORT;
102 pub type PLONG = *mut LONG;
103 pub type PQUAD = *mut QUAD;
104 pub type UCHAR = c_uchar;
105 pub type USHORT = c_ushort;
106 pub type ULONG = c_ulong;
107 pub type UQUAD = QUAD;
108 pub type PUCHAR = *mut UCHAR;
109 pub type PUSHORT = *mut USHORT;
110 pub type PULONG = *mut ULONG;
111 pub type PUQUAD = *mut UQUAD;
112 pub type PCUCHAR = *const UCHAR;
113 pub type PCUSHORT = *const USHORT;
114 pub type PCULONG = *const ULONG;
115 pub type PCUQUAD = *const UQUAD;
116 pub type SCHAR = c_schar;
117 pub type PSCHAR = *mut SCHAR;
118 pub type PCSCHAR = *const SCHAR;
119 pub const ALL_PROCESSOR_GROUPS: USHORT = 0xffff;
120 STRUCT!{struct PROCESSOR_NUMBER {
121     Group: USHORT,
122     Number: UCHAR,
123     Reserved: UCHAR,
124 }}
125 pub type PPROCESSOR_NUMBER = *mut PROCESSOR_NUMBER;
126 STRUCT!{struct GROUP_AFFINITY {
127     Mask: KAFFINITY,
128     Group: USHORT,
129     Reserved: [USHORT; 3],
130 }}
131 pub type PGROUP_AFFINITY = *mut GROUP_AFFINITY;
132 #[cfg(target_arch = "x86_64")]
133 pub const MAXIMUM_PROC_PER_GROUP: UCHAR = 64;
134 #[cfg(not(target_arch = "x86_64"))]
135 pub const MAXIMUM_PROC_PER_GROUP: UCHAR = 32;
136 pub const MAXIMUM_PROCESSORS: UCHAR = MAXIMUM_PROC_PER_GROUP;
137 pub type HANDLE = *mut c_void;
138 pub type PHANDLE = *mut HANDLE;
139 pub type FCHAR = UCHAR;
140 pub type FSHORT = USHORT;
141 pub type FLONG = ULONG;
142 pub type HRESULT = c_long;
143 pub const OBJ_HANDLE_TAGBITS: usize = 0x00000003;
144 pub type CCHAR = c_char;
145 pub type CSHORT = c_short;
146 pub type CLONG = ULONG;
147 pub type PCCHAR = *mut CCHAR;
148 pub type PCSHORT = *mut CSHORT;
149 pub type PCLONG = *mut CLONG;
150 pub type LCID = ULONG;
151 pub type PLCID = PULONG;
152 pub type LANGID = USHORT;
153 ENUM!{enum COMPARTMENT_ID {
154     UNSPECIFIED_COMPARTMENT_ID = 0,
155     DEFAULT_COMPARTMENT_ID,
156 }}
157 pub type PCOMPARTMENT_ID = *mut COMPARTMENT_ID;
158 pub type LOGICAL = ULONG;
159 pub type PLOGICAL = *mut ULONG;
160 pub type NTSTATUS = LONG;
161 pub type PNTSTATUS = *mut NTSTATUS;
162 pub type PCNTSTATUS = *const NTSTATUS;
163 #[inline]
NT_SUCCESS(Status: NTSTATUS) -> bool164 pub fn NT_SUCCESS(Status: NTSTATUS) -> bool {
165     Status >= 0
166 }
167 #[inline]
NT_INFORMATION(Status: NTSTATUS) -> bool168 pub fn NT_INFORMATION(Status: NTSTATUS) -> bool {
169     ((Status as ULONG) >> 30) == 1
170 }
171 #[inline]
NT_WARNING(Status: NTSTATUS) -> bool172 pub fn NT_WARNING(Status: NTSTATUS) -> bool {
173     ((Status as ULONG) >> 30) == 2
174 }
175 #[inline]
NT_ERROR(Status: NTSTATUS) -> bool176 pub fn NT_ERROR(Status: NTSTATUS) -> bool {
177     ((Status as ULONG) >> 30) == 3
178 }
179 pub const APPLICATION_ERROR_MASK: ULONG = 0x20000000;
180 pub const ERROR_SEVERITY_SUCCESS: ULONG = 0x00000000;
181 pub const ERROR_SEVERITY_INFORMATIONAL: ULONG = 0x40000000;
182 pub const ERROR_SEVERITY_WARNING: ULONG = 0x80000000;
183 pub const ERROR_SEVERITY_ERROR: ULONG = 0xC0000000;
184 pub type SECURITY_STATUS = c_long;
185 pub type TIME = LARGE_INTEGER;
186 pub type PTIME = *mut TIME;
187 STRUCT!{struct FLOAT128 {
188     LowPart: __int64,
189     HighPart: __int64,
190 }}
191 pub type PFLOAT128 = *mut FLOAT128;
192 pub type LONGLONG = __int64;
193 pub type ULONGLONG = __uint64;
194 pub const MAXLONGLONG: LONGLONG = 0x7fffffffffffffff;
195 pub type PLONGLONG = *mut LONGLONG;
196 pub type PULONGLONG = *mut ULONGLONG;
197 pub type USN = LONGLONG;
198 UNION!{union LARGE_INTEGER {
199     [i64; 1],
200     s s_mut: LARGE_INTEGER_s,
201     u u_mut: LARGE_INTEGER_u,
202     QuadPart QuadPart_mut: LONGLONG,
203 }}
204 STRUCT!{struct LARGE_INTEGER_s {
205     LowPart: ULONG,
206     HighPart: LONG,
207 }}
208 STRUCT!{struct LARGE_INTEGER_u {
209     LowPart: ULONG,
210     HighPart: LONG,
211 }}
212 pub type PLARGE_INTEGER = *mut LARGE_INTEGER;
213 UNION!{union ULARGE_INTEGER {
214     [u64; 1],
215     s s_mut: ULARGE_INTEGER_s,
216     u u_mut: ULARGE_INTEGER_s,
217     QuadPart QuadPart_mut: ULONGLONG,
218 }}
219 STRUCT!{struct ULARGE_INTEGER_s {
220     LowPart: ULONG,
221     HighPart: ULONG,
222 }}
223 STRUCT!{struct ULARGE_INTEGER_u {
224     LowPart: ULONG,
225     HighPart: ULONG,
226 }}
227 pub type PULARGE_INTEGER = *mut ULARGE_INTEGER;
228 pub type RTL_REFERENCE_COUNT = LONG_PTR;
229 pub type PRTL_REFERENCE_COUNT = *mut RTL_REFERENCE_COUNT;
230 STRUCT!{struct LUID {
231     LowPart: ULONG,
232     HighPart: LONG,
233 }}
234 pub type PLUID = *mut LUID;
235 pub type DWORDLONG = ULONGLONG;
236 pub type PDWORDLONG = *mut DWORDLONG;
237 pub type PHYSICAL_ADDRESS = LARGE_INTEGER;
238 pub type PPHYSICAL_ADDRESS = *mut PHYSICAL_ADDRESS;
239 ENUM!{enum EVENT_TYPE {
240     NotificationEvent,
241     SynchronizationEvent,
242 }}
243 ENUM!{enum TIMER_TYPE {
244     NotificationTimer,
245     SynchronizationTimer,
246 }}
247 ENUM!{enum WAIT_TYPE {
248     WaitAll,
249     WaitAny,
250     WaitNotification,
251     WaitDequeue,
252 }}
253 pub type PSZ = *mut CHAR;
254 pub type PCSZ = *const c_char;
255 pub type RTL_STRING_LENGTH_TYPE = USHORT;
256 STRUCT!{struct STRING {
257     Length: USHORT,
258     MaximumLength: USHORT,
259     Buffer: PCHAR,
260 }}
261 pub type PSTRING = *mut STRING;
262 pub type ANSI_STRING = STRING;
263 pub type PANSI_STRING = PSTRING;
264 pub type OEM_STRING = STRING;
265 pub type POEM_STRING = PSTRING;
266 pub type PCOEM_STRING = *const STRING;
267 STRUCT!{struct CSTRING {
268     Length: USHORT,
269     MaximumLength: USHORT,
270     Buffer: *const c_char,
271 }}
272 pub type PCSTRING = *mut CSTRING;
273 pub const ANSI_NULL: CHAR = 0;
274 pub type CANSI_STRING = STRING;
275 pub type PCANSI_STRING = PSTRING;
276 STRUCT!{struct UNICODE_STRING {
277     Length: USHORT,
278     MaximumLength: USHORT,
279     Buffer: PWCH,
280 }}
281 pub type PUNICODE_STRING = *mut UNICODE_STRING;
282 pub type PCUNICODE_STRING = *const UNICODE_STRING;
283 pub const UNICODE_NULL: WCHAR = 0;
284 pub const UNICODE_STRING_MAX_BYTES: USHORT = 65534;
285 pub const UNICODE_STRING_MAX_CHARS: usize = 32767;
286 pub type BOOLEAN = UCHAR;
287 pub type PBOOLEAN = *mut BOOLEAN;
288 STRUCT!{struct LIST_ENTRY {
289     Flink: *mut LIST_ENTRY,
290     Blink: *mut LIST_ENTRY,
291 }}
292 pub type PLIST_ENTRY = *mut LIST_ENTRY;
293 pub type PRLIST_ENTRY = *mut LIST_ENTRY; // Restricted pointer
294 STRUCT!{struct SINGLE_LIST_ENTRY {
295     Next: *mut SINGLE_LIST_ENTRY,
296 }}
297 pub type PSINGLE_LIST_ENTRY = *mut SINGLE_LIST_ENTRY;
298 STRUCT!{struct RTL_BALANCED_NODE {
299     u: RTL_BALANCED_NODE_u,
300     ParentValue: ULONG_PTR,
301 }}
302 UNION!{union RTL_BALANCED_NODE_u {
303     [usize; 2],
304     Children Children_mut: [*mut RTL_BALANCED_NODE; 2],
305     s s_mut: RTL_BALANCED_NODE_s,
306 }}
307 STRUCT!{struct RTL_BALANCED_NODE_s {
308     Left: *mut RTL_BALANCED_NODE,
309     Right: *mut RTL_BALANCED_NODE,
310 }}
311 pub const RTL_BALANCED_NODE_RESERVED_PARENT_MASK: ULONG_PTR = 3;
312 pub type PRTL_BALANCED_NODE = *mut RTL_BALANCED_NODE;
313 #[inline]
RTL_BALANCED_NODE_GET_PARENT_POINTER( Node: PRTL_BALANCED_NODE, ) -> PRTL_BALANCED_NODE314 pub unsafe fn RTL_BALANCED_NODE_GET_PARENT_POINTER(
315     Node: PRTL_BALANCED_NODE,
316 ) -> PRTL_BALANCED_NODE {
317     ((*Node).ParentValue & !RTL_BALANCED_NODE_RESERVED_PARENT_MASK) as *mut RTL_BALANCED_NODE
318 }
319 STRUCT!{struct LIST_ENTRY32 {
320     Flink: ULONG,
321     Blink: ULONG,
322 }}
323 pub type PLIST_ENTRY32 = *mut LIST_ENTRY32;
324 STRUCT!{struct LIST_ENTRY64 {
325     Flink: ULONGLONG,
326     Blink: ULONGLONG,
327 }}
328 pub type PLIST_ENTRY64 = *mut LIST_ENTRY64;
329 STRUCT!{struct SINGLE_LIST_ENTRY32 {
330     Next: ULONG,
331 }}
332 pub type PSINGLE_LIST_ENTRY32 = *mut SINGLE_LIST_ENTRY32;
333 #[inline]
ListEntry32To64(l32: PLIST_ENTRY32, l64: PLIST_ENTRY64)334 pub unsafe fn ListEntry32To64(l32: PLIST_ENTRY32, l64: PLIST_ENTRY64) {
335     (*l64).Flink = (*l32).Flink as ULONGLONG;
336     (*l64).Blink = (*l32).Blink as ULONGLONG;
337 }
338 #[inline]
ListEntry64To32(l64: PLIST_ENTRY64, l32: PLIST_ENTRY32)339 pub unsafe fn ListEntry64To32(l64: PLIST_ENTRY64, l32: PLIST_ENTRY32) {
340     (*l32).Flink = (*l64).Flink as ULONG;
341     (*l32).Blink = (*l64).Blink as ULONG;
342 }
343 STRUCT!{struct WNF_STATE_NAME {
344     Data: [ULONG; 2],
345 }}
346 pub type PWNF_STATE_NAME = *mut WNF_STATE_NAME;
347 pub type PCWNF_STATE_NAME = *const WNF_STATE_NAME;
348 STRUCT!{struct STRING32 {
349     Length: USHORT,
350     MaximumLength: USHORT,
351     Buffer: ULONG,
352 }}
353 pub type PSTRING32 = *mut STRING32;
354 pub type UNICODE_STRING32 = STRING32;
355 pub type PUNICODE_STRING32 = *mut UNICODE_STRING32;
356 pub type ANSI_STRING32 = STRING32;
357 pub type PANSI_STRING32 = *mut ANSI_STRING32;
358 STRUCT!{struct STRING64 {
359     Length: USHORT,
360     MaximumLength: USHORT,
361     Buffer: ULONGLONG,
362 }}
363 pub type PSTRING64 = *mut STRING64;
364 pub type UNICODE_STRING64 = STRING64;
365 pub type PUNICODE_STRING64 = *mut UNICODE_STRING64;
366 pub type ANSI_STRING64 = STRING64;
367 pub type PANSI_STRING64 = *mut ANSI_STRING64;
368 pub const OBJ_INHERIT: ULONG = 0x00000002;
369 pub const OBJ_PERMANENT: ULONG = 0x00000010;
370 pub const OBJ_EXCLUSIVE: ULONG = 0x00000020;
371 pub const OBJ_CASE_INSENSITIVE: ULONG = 0x00000040;
372 pub const OBJ_OPENIF: ULONG = 0x00000080;
373 pub const OBJ_OPENLINK: ULONG = 0x00000100;
374 pub const OBJ_KERNEL_HANDLE: ULONG = 0x00000200;
375 pub const OBJ_FORCE_ACCESS_CHECK: ULONG = 0x00000400;
376 pub const OBJ_IGNORE_IMPERSONATED_DEVICEMAP: ULONG = 0x00000800;
377 pub const OBJ_DONT_REPARSE: ULONG = 0x00001000;
378 pub const OBJ_VALID_ATTRIBUTES: ULONG = 0x00001FF2;
379 STRUCT!{struct OBJECT_ATTRIBUTES64 {
380     Length: ULONG,
381     RootDirectory: ULONG64,
382     ObjectName: ULONG64,
383     Attributes: ULONG,
384     SecurityDescriptor: ULONG64,
385     SecurityQualityOfService: ULONG64,
386 }}
387 pub type POBJECT_ATTRIBUTES64 = *mut OBJECT_ATTRIBUTES64;
388 pub type PCOBJECT_ATTRIBUTES64 = *const OBJECT_ATTRIBUTES64;
389 STRUCT!{struct OBJECT_ATTRIBUTES32 {
390     Length: ULONG,
391     RootDirectory: ULONG,
392     ObjectName: ULONG,
393     Attributes: ULONG,
394     SecurityDescriptor: ULONG,
395     SecurityQualityOfService: ULONG,
396 }}
397 pub type POBJECT_ATTRIBUTES32 = *mut OBJECT_ATTRIBUTES32;
398 pub type PCOBJECT_ATTRIBUTES32 = *const OBJECT_ATTRIBUTES32;
399 STRUCT!{struct OBJECT_ATTRIBUTES {
400     Length: ULONG,
401     RootDirectory: HANDLE,
402     ObjectName: PUNICODE_STRING,
403     Attributes: ULONG,
404     SecurityDescriptor: PVOID,
405     SecurityQualityOfService: PVOID,
406 }}
407 pub type POBJECT_ATTRIBUTES = *mut OBJECT_ATTRIBUTES;
408 pub type PCOBJECT_ATTRIBUTES = *const OBJECT_ATTRIBUTES;
409 #[inline]
InitializeObjectAttributes( p: POBJECT_ATTRIBUTES, n: PUNICODE_STRING, a: ULONG, r: HANDLE, s: PVOID, )410 pub unsafe fn InitializeObjectAttributes(
411     p: POBJECT_ATTRIBUTES,
412     n: PUNICODE_STRING,
413     a: ULONG,
414     r: HANDLE,
415     s: PVOID,
416 ) {
417     use core::mem::size_of;
418     (*p).Length = size_of::<OBJECT_ATTRIBUTES>() as ULONG;
419     (*p).RootDirectory = r;
420     (*p).Attributes = a;
421     (*p).ObjectName = n;
422     (*p).SecurityDescriptor = s;
423     (*p).SecurityQualityOfService = NULL;
424 }
425 pub const FALSE: BOOLEAN = 0;
426 pub const TRUE: BOOLEAN = 1;
427 pub const NULL: PVOID = 0 as PVOID;
428 pub const NULL64: PVOID64 = 0;
429 STRUCT!{struct OBJECTID {
430     Lineage: GUID,
431     Uniquifier: ULONG,
432 }}
433 pub const MINCHAR: CHAR = 0x80;
434 pub const MAXCHAR: CHAR = 0x7f;
435 pub const MINSHORT: SHORT = 0x8000;
436 pub const MAXSHORT: SHORT = 0x7fff;
437 pub const MINLONG: LONG = 0x80000000;
438 pub const MAXLONG: LONG = 0x7fffffff;
439 pub const MAXUCHAR: UCHAR = 0xff;
440 pub const MAXUSHORT: USHORT = 0xffff;
441 pub const MAXULONG: ULONG = 0xffffffff;
442 // PEXCEPTION_ROUTINE: Can't define here, because it needs EXCEPTION_RECORD and CONTEXT.
443 pub type KIRQL = UCHAR;
444 pub type PKIRQL = *mut KIRQL;
445 ENUM!{enum NT_PRODUCT_TYPE {
446     NtProductWinNt = 1,
447     NtProductLanManNt,
448     NtProductServer,
449 }}
450 pub type PNT_PRODUCT_TYPE = *mut NT_PRODUCT_TYPE;
451 ENUM!{enum SUITE_TYPE {
452     SmallBusiness,
453     Enterprise,
454     BackOffice,
455     CommunicationServer,
456     TerminalServer,
457     SmallBusinessRestricted,
458     EmbeddedNT,
459     DataCenter,
460     SingleUserTS,
461     Personal,
462     Blade,
463     EmbeddedRestricted,
464     SecurityAppliance,
465     StorageServer,
466     ComputeServer,
467     WHServer,
468     PhoneNT,
469     MaxSuiteType,
470 }}
471 pub const VER_SERVER_NT: ULONG = 0x80000000;
472 pub const VER_WORKSTATION_NT: ULONG = 0x40000000;
473 pub const VER_SUITE_SMALLBUSINESS: ULONG = 0x00000001;
474 pub const VER_SUITE_ENTERPRISE: ULONG = 0x00000002;
475 pub const VER_SUITE_BACKOFFICE: ULONG = 0x00000004;
476 pub const VER_SUITE_COMMUNICATIONS: ULONG = 0x00000008;
477 pub const VER_SUITE_TERMINAL: ULONG = 0x00000010;
478 pub const VER_SUITE_SMALLBUSINESS_RESTRICTED: ULONG = 0x00000020;
479 pub const VER_SUITE_EMBEDDEDNT: ULONG = 0x00000040;
480 pub const VER_SUITE_DATACENTER: ULONG = 0x00000080;
481 pub const VER_SUITE_SINGLEUSERTS: ULONG = 0x00000100;
482 pub const VER_SUITE_PERSONAL: ULONG = 0x00000200;
483 pub const VER_SUITE_BLADE: ULONG = 0x00000400;
484 pub const VER_SUITE_EMBEDDED_RESTRICTED: ULONG = 0x00000800;
485 pub const VER_SUITE_SECURITY_APPLIANCE: ULONG = 0x00001000;
486 pub const VER_SUITE_STORAGE_SERVER: ULONG = 0x00002000;
487 pub const VER_SUITE_COMPUTE_SERVER: ULONG = 0x00004000;
488 pub const VER_SUITE_WH_SERVER: ULONG = 0x00008000;
489 pub const PRODUCT_UNDEFINED: ULONG = 0x00000000;
490 pub const PRODUCT_ULTIMATE: ULONG = 0x00000001;
491 pub const PRODUCT_HOME_BASIC: ULONG = 0x00000002;
492 pub const PRODUCT_HOME_PREMIUM: ULONG = 0x00000003;
493 pub const PRODUCT_ENTERPRISE: ULONG = 0x00000004;
494 pub const PRODUCT_HOME_BASIC_N: ULONG = 0x00000005;
495 pub const PRODUCT_BUSINESS: ULONG = 0x00000006;
496 pub const PRODUCT_STANDARD_SERVER: ULONG = 0x00000007;
497 pub const PRODUCT_DATACENTER_SERVER: ULONG = 0x00000008;
498 pub const PRODUCT_SMALLBUSINESS_SERVER: ULONG = 0x00000009;
499 pub const PRODUCT_ENTERPRISE_SERVER: ULONG = 0x0000000A;
500 pub const PRODUCT_STARTER: ULONG = 0x0000000B;
501 pub const PRODUCT_DATACENTER_SERVER_CORE: ULONG = 0x0000000C;
502 pub const PRODUCT_STANDARD_SERVER_CORE: ULONG = 0x0000000D;
503 pub const PRODUCT_ENTERPRISE_SERVER_CORE: ULONG = 0x0000000E;
504 pub const PRODUCT_ENTERPRISE_SERVER_IA64: ULONG = 0x0000000F;
505 pub const PRODUCT_BUSINESS_N: ULONG = 0x00000010;
506 pub const PRODUCT_WEB_SERVER: ULONG = 0x00000011;
507 pub const PRODUCT_CLUSTER_SERVER: ULONG = 0x00000012;
508 pub const PRODUCT_HOME_SERVER: ULONG = 0x00000013;
509 pub const PRODUCT_STORAGE_EXPRESS_SERVER: ULONG = 0x00000014;
510 pub const PRODUCT_STORAGE_STANDARD_SERVER: ULONG = 0x00000015;
511 pub const PRODUCT_STORAGE_WORKGROUP_SERVER: ULONG = 0x00000016;
512 pub const PRODUCT_STORAGE_ENTERPRISE_SERVER: ULONG = 0x00000017;
513 pub const PRODUCT_SERVER_FOR_SMALLBUSINESS: ULONG = 0x00000018;
514 pub const PRODUCT_SMALLBUSINESS_SERVER_PREMIUM: ULONG = 0x00000019;
515 pub const PRODUCT_HOME_PREMIUM_N: ULONG = 0x0000001A;
516 pub const PRODUCT_ENTERPRISE_N: ULONG = 0x0000001B;
517 pub const PRODUCT_ULTIMATE_N: ULONG = 0x0000001C;
518 pub const PRODUCT_WEB_SERVER_CORE: ULONG = 0x0000001D;
519 pub const PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT: ULONG = 0x0000001E;
520 pub const PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY: ULONG = 0x0000001F;
521 pub const PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING: ULONG = 0x00000020;
522 pub const PRODUCT_SERVER_FOUNDATION: ULONG = 0x00000021;
523 pub const PRODUCT_HOME_PREMIUM_SERVER: ULONG = 0x00000022;
524 pub const PRODUCT_SERVER_FOR_SMALLBUSINESS_V: ULONG = 0x00000023;
525 pub const PRODUCT_STANDARD_SERVER_V: ULONG = 0x00000024;
526 pub const PRODUCT_DATACENTER_SERVER_V: ULONG = 0x00000025;
527 pub const PRODUCT_ENTERPRISE_SERVER_V: ULONG = 0x00000026;
528 pub const PRODUCT_DATACENTER_SERVER_CORE_V: ULONG = 0x00000027;
529 pub const PRODUCT_STANDARD_SERVER_CORE_V: ULONG = 0x00000028;
530 pub const PRODUCT_ENTERPRISE_SERVER_CORE_V: ULONG = 0x00000029;
531 pub const PRODUCT_HYPERV: ULONG = 0x0000002A;
532 pub const PRODUCT_STORAGE_EXPRESS_SERVER_CORE: ULONG = 0x0000002B;
533 pub const PRODUCT_STORAGE_STANDARD_SERVER_CORE: ULONG = 0x0000002C;
534 pub const PRODUCT_STORAGE_WORKGROUP_SERVER_CORE: ULONG = 0x0000002D;
535 pub const PRODUCT_STORAGE_ENTERPRISE_SERVER_CORE: ULONG = 0x0000002E;
536 pub const PRODUCT_STARTER_N: ULONG = 0x0000002F;
537 pub const PRODUCT_PROFESSIONAL: ULONG = 0x00000030;
538 pub const PRODUCT_PROFESSIONAL_N: ULONG = 0x00000031;
539 pub const PRODUCT_SB_SOLUTION_SERVER: ULONG = 0x00000032;
540 pub const PRODUCT_SERVER_FOR_SB_SOLUTIONS: ULONG = 0x00000033;
541 pub const PRODUCT_STANDARD_SERVER_SOLUTIONS: ULONG = 0x00000034;
542 pub const PRODUCT_STANDARD_SERVER_SOLUTIONS_CORE: ULONG = 0x00000035;
543 pub const PRODUCT_SB_SOLUTION_SERVER_EM: ULONG = 0x00000036;
544 pub const PRODUCT_SERVER_FOR_SB_SOLUTIONS_EM: ULONG = 0x00000037;
545 pub const PRODUCT_SOLUTION_EMBEDDEDSERVER: ULONG = 0x00000038;
546 pub const PRODUCT_SOLUTION_EMBEDDEDSERVER_CORE: ULONG = 0x00000039;
547 pub const PRODUCT_PROFESSIONAL_EMBEDDED: ULONG = 0x0000003A;
548 pub const PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT: ULONG = 0x0000003B;
549 pub const PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL: ULONG = 0x0000003C;
550 pub const PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC: ULONG = 0x0000003D;
551 pub const PRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC: ULONG = 0x0000003E;
552 pub const PRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE: ULONG = 0x0000003F;
553 pub const PRODUCT_CLUSTER_SERVER_V: ULONG = 0x00000040;
554 pub const PRODUCT_EMBEDDED: ULONG = 0x00000041;
555 pub const PRODUCT_STARTER_E: ULONG = 0x00000042;
556 pub const PRODUCT_HOME_BASIC_E: ULONG = 0x00000043;
557 pub const PRODUCT_HOME_PREMIUM_E: ULONG = 0x00000044;
558 pub const PRODUCT_PROFESSIONAL_E: ULONG = 0x00000045;
559 pub const PRODUCT_ENTERPRISE_E: ULONG = 0x00000046;
560 pub const PRODUCT_ULTIMATE_E: ULONG = 0x00000047;
561 pub const PRODUCT_ENTERPRISE_EVALUATION: ULONG = 0x00000048;
562 pub const PRODUCT_MULTIPOINT_STANDARD_SERVER: ULONG = 0x0000004C;
563 pub const PRODUCT_MULTIPOINT_PREMIUM_SERVER: ULONG = 0x0000004D;
564 pub const PRODUCT_STANDARD_EVALUATION_SERVER: ULONG = 0x0000004F;
565 pub const PRODUCT_DATACENTER_EVALUATION_SERVER: ULONG = 0x00000050;
566 pub const PRODUCT_ENTERPRISE_N_EVALUATION: ULONG = 0x00000054;
567 pub const PRODUCT_EMBEDDED_AUTOMOTIVE: ULONG = 0x00000055;
568 pub const PRODUCT_EMBEDDED_INDUSTRY_A: ULONG = 0x00000056;
569 pub const PRODUCT_THINPC: ULONG = 0x00000057;
570 pub const PRODUCT_EMBEDDED_A: ULONG = 0x00000058;
571 pub const PRODUCT_EMBEDDED_INDUSTRY: ULONG = 0x00000059;
572 pub const PRODUCT_EMBEDDED_E: ULONG = 0x0000005A;
573 pub const PRODUCT_EMBEDDED_INDUSTRY_E: ULONG = 0x0000005B;
574 pub const PRODUCT_EMBEDDED_INDUSTRY_A_E: ULONG = 0x0000005C;
575 pub const PRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER: ULONG = 0x0000005F;
576 pub const PRODUCT_STORAGE_STANDARD_EVALUATION_SERVER: ULONG = 0x00000060;
577 pub const PRODUCT_CORE_ARM: ULONG = 0x00000061;
578 pub const PRODUCT_CORE_N: ULONG = 0x00000062;
579 pub const PRODUCT_CORE_COUNTRYSPECIFIC: ULONG = 0x00000063;
580 pub const PRODUCT_CORE_SINGLELANGUAGE: ULONG = 0x00000064;
581 pub const PRODUCT_CORE: ULONG = 0x00000065;
582 pub const PRODUCT_PROFESSIONAL_WMC: ULONG = 0x00000067;
583 pub const PRODUCT_MOBILE_CORE: ULONG = 0x00000068;
584 pub const PRODUCT_EMBEDDED_INDUSTRY_EVAL: ULONG = 0x00000069;
585 pub const PRODUCT_EMBEDDED_INDUSTRY_E_EVAL: ULONG = 0x0000006A;
586 pub const PRODUCT_EMBEDDED_EVAL: ULONG = 0x0000006B;
587 pub const PRODUCT_EMBEDDED_E_EVAL: ULONG = 0x0000006C;
588 pub const PRODUCT_NANO_SERVER: ULONG = 0x0000006D;
589 pub const PRODUCT_CLOUD_STORAGE_SERVER: ULONG = 0x0000006E;
590 pub const PRODUCT_CORE_CONNECTED: ULONG = 0x0000006F;
591 pub const PRODUCT_PROFESSIONAL_STUDENT: ULONG = 0x00000070;
592 pub const PRODUCT_CORE_CONNECTED_N: ULONG = 0x00000071;
593 pub const PRODUCT_PROFESSIONAL_STUDENT_N: ULONG = 0x00000072;
594 pub const PRODUCT_CORE_CONNECTED_SINGLELANGUAGE: ULONG = 0x00000073;
595 pub const PRODUCT_CORE_CONNECTED_COUNTRYSPECIFIC: ULONG = 0x00000074;
596 pub const PRODUCT_CONNECTED_CAR: ULONG = 0x00000075;
597 pub const PRODUCT_INDUSTRY_HANDHELD: ULONG = 0x00000076;
598 pub const PRODUCT_PPI_PRO: ULONG = 0x00000077;
599 pub const PRODUCT_ARM64_SERVER: ULONG = 0x00000078;
600 pub const PRODUCT_EDUCATION: ULONG = 0x00000079;
601 pub const PRODUCT_EDUCATION_N: ULONG = 0x0000007A;
602 pub const PRODUCT_IOTUAP: ULONG = 0x0000007B;
603 pub const PRODUCT_CLOUD_HOST_INFRASTRUCTURE_SERVER: ULONG = 0x0000007C;
604 pub const PRODUCT_ENTERPRISE_S: ULONG = 0x0000007D;
605 pub const PRODUCT_ENTERPRISE_S_N: ULONG = 0x0000007E;
606 pub const PRODUCT_PROFESSIONAL_S: ULONG = 0x0000007F;
607 pub const PRODUCT_PROFESSIONAL_S_N: ULONG = 0x00000080;
608 pub const PRODUCT_ENTERPRISE_S_EVALUATION: ULONG = 0x00000081;
609 pub const PRODUCT_ENTERPRISE_S_N_EVALUATION: ULONG = 0x00000082;
610 pub const PRODUCT_HOLOGRAPHIC: ULONG = 0x00000087;
611 pub const PRODUCT_PRO_SINGLE_LANGUAGE: ULONG = 0x0000008A;
612 pub const PRODUCT_PRO_CHINA: ULONG = 0x0000008B;
613 pub const PRODUCT_ENTERPRISE_SUBSCRIPTION: ULONG = 0x0000008C;
614 pub const PRODUCT_ENTERPRISE_SUBSCRIPTION_N: ULONG = 0x0000008D;
615 pub const PRODUCT_DATACENTER_NANO_SERVER: ULONG = 0x0000008F;
616 pub const PRODUCT_STANDARD_NANO_SERVER: ULONG = 0x00000090;
617 pub const PRODUCT_DATACENTER_A_SERVER_CORE: ULONG = 0x00000091;
618 pub const PRODUCT_STANDARD_A_SERVER_CORE: ULONG = 0x00000092;
619 pub const PRODUCT_DATACENTER_WS_SERVER_CORE: ULONG = 0x00000093;
620 pub const PRODUCT_STANDARD_WS_SERVER_CORE: ULONG = 0x00000094;
621 pub const PRODUCT_UTILITY_VM: ULONG = 0x00000095;
622 pub const PRODUCT_DATACENTER_EVALUATION_SERVER_CORE: ULONG = 0x0000009F;
623 pub const PRODUCT_STANDARD_EVALUATION_SERVER_CORE: ULONG = 0x000000A0;
624 pub const PRODUCT_PRO_WORKSTATION: ULONG = 0x000000A1;
625 pub const PRODUCT_PRO_WORKSTATION_N: ULONG = 0x000000A2;
626 pub const PRODUCT_PRO_FOR_EDUCATION: ULONG = 0x000000A4;
627 pub const PRODUCT_PRO_FOR_EDUCATION_N: ULONG = 0x000000A5;
628 pub const PRODUCT_AZURE_SERVER_CORE: ULONG = 0x000000A8;
629 pub const PRODUCT_AZURE_NANO_SERVER: ULONG = 0x000000A9;
630 pub const PRODUCT_UNLICENSED: ULONG = 0xABCDABCD;
631 pub const LANG_NEUTRAL: USHORT = 0x00;
632 pub const LANG_INVARIANT: USHORT = 0x7f;
633 pub const LANG_AFRIKAANS: USHORT = 0x36;
634 pub const LANG_ALBANIAN: USHORT = 0x1c;
635 pub const LANG_ALSATIAN: USHORT = 0x84;
636 pub const LANG_AMHARIC: USHORT = 0x5e;
637 pub const LANG_ARABIC: USHORT = 0x01;
638 pub const LANG_ARMENIAN: USHORT = 0x2b;
639 pub const LANG_ASSAMESE: USHORT = 0x4d;
640 pub const LANG_AZERI: USHORT = 0x2c;
641 pub const LANG_AZERBAIJANI: USHORT = 0x2c;
642 pub const LANG_BANGLA: USHORT = 0x45;
643 pub const LANG_BASHKIR: USHORT = 0x6d;
644 pub const LANG_BASQUE: USHORT = 0x2d;
645 pub const LANG_BELARUSIAN: USHORT = 0x23;
646 pub const LANG_BENGALI: USHORT = 0x45;
647 pub const LANG_BRETON: USHORT = 0x7e;
648 pub const LANG_BOSNIAN: USHORT = 0x1a;
649 pub const LANG_BOSNIAN_NEUTRAL: USHORT = 0x781a;
650 pub const LANG_BULGARIAN: USHORT = 0x02;
651 pub const LANG_CATALAN: USHORT = 0x03;
652 pub const LANG_CENTRAL_KURDISH: USHORT = 0x92;
653 pub const LANG_CHEROKEE: USHORT = 0x5c;
654 pub const LANG_CHINESE: USHORT = 0x04;
655 pub const LANG_CHINESE_SIMPLIFIED: USHORT = 0x04;
656 pub const LANG_CHINESE_TRADITIONAL: USHORT = 0x7c04;
657 pub const LANG_CORSICAN: USHORT = 0x83;
658 pub const LANG_CROATIAN: USHORT = 0x1a;
659 pub const LANG_CZECH: USHORT = 0x05;
660 pub const LANG_DANISH: USHORT = 0x06;
661 pub const LANG_DARI: USHORT = 0x8c;
662 pub const LANG_DIVEHI: USHORT = 0x65;
663 pub const LANG_DUTCH: USHORT = 0x13;
664 pub const LANG_ENGLISH: USHORT = 0x09;
665 pub const LANG_ESTONIAN: USHORT = 0x25;
666 pub const LANG_FAEROESE: USHORT = 0x38;
667 pub const LANG_FARSI: USHORT = 0x29;
668 pub const LANG_FILIPINO: USHORT = 0x64;
669 pub const LANG_FINNISH: USHORT = 0x0b;
670 pub const LANG_FRENCH: USHORT = 0x0c;
671 pub const LANG_FRISIAN: USHORT = 0x62;
672 pub const LANG_FULAH: USHORT = 0x67;
673 pub const LANG_GALICIAN: USHORT = 0x56;
674 pub const LANG_GEORGIAN: USHORT = 0x37;
675 pub const LANG_GERMAN: USHORT = 0x07;
676 pub const LANG_GREEK: USHORT = 0x08;
677 pub const LANG_GREENLANDIC: USHORT = 0x6f;
678 pub const LANG_GUJARATI: USHORT = 0x47;
679 pub const LANG_HAUSA: USHORT = 0x68;
680 pub const LANG_HAWAIIAN: USHORT = 0x75;
681 pub const LANG_HEBREW: USHORT = 0x0d;
682 pub const LANG_HINDI: USHORT = 0x39;
683 pub const LANG_HUNGARIAN: USHORT = 0x0e;
684 pub const LANG_ICELANDIC: USHORT = 0x0f;
685 pub const LANG_IGBO: USHORT = 0x70;
686 pub const LANG_INDONESIAN: USHORT = 0x21;
687 pub const LANG_INUKTITUT: USHORT = 0x5d;
688 pub const LANG_IRISH: USHORT = 0x3c;
689 pub const LANG_ITALIAN: USHORT = 0x10;
690 pub const LANG_JAPANESE: USHORT = 0x11;
691 pub const LANG_KANNADA: USHORT = 0x4b;
692 pub const LANG_KASHMIRI: USHORT = 0x60;
693 pub const LANG_KAZAK: USHORT = 0x3f;
694 pub const LANG_KHMER: USHORT = 0x53;
695 pub const LANG_KICHE: USHORT = 0x86;
696 pub const LANG_KINYARWANDA: USHORT = 0x87;
697 pub const LANG_KONKANI: USHORT = 0x57;
698 pub const LANG_KOREAN: USHORT = 0x12;
699 pub const LANG_KYRGYZ: USHORT = 0x40;
700 pub const LANG_LAO: USHORT = 0x54;
701 pub const LANG_LATVIAN: USHORT = 0x26;
702 pub const LANG_LITHUANIAN: USHORT = 0x27;
703 pub const LANG_LOWER_SORBIAN: USHORT = 0x2e;
704 pub const LANG_LUXEMBOURGISH: USHORT = 0x6e;
705 pub const LANG_MACEDONIAN: USHORT = 0x2f;
706 pub const LANG_MALAY: USHORT = 0x3e;
707 pub const LANG_MALAYALAM: USHORT = 0x4c;
708 pub const LANG_MALTESE: USHORT = 0x3a;
709 pub const LANG_MANIPURI: USHORT = 0x58;
710 pub const LANG_MAORI: USHORT = 0x81;
711 pub const LANG_MAPUDUNGUN: USHORT = 0x7a;
712 pub const LANG_MARATHI: USHORT = 0x4e;
713 pub const LANG_MOHAWK: USHORT = 0x7c;
714 pub const LANG_MONGOLIAN: USHORT = 0x50;
715 pub const LANG_NEPALI: USHORT = 0x61;
716 pub const LANG_NORWEGIAN: USHORT = 0x14;
717 pub const LANG_OCCITAN: USHORT = 0x82;
718 pub const LANG_ODIA: USHORT = 0x48;
719 pub const LANG_ORIYA: USHORT = 0x48;
720 pub const LANG_PASHTO: USHORT = 0x63;
721 pub const LANG_PERSIAN: USHORT = 0x29;
722 pub const LANG_POLISH: USHORT = 0x15;
723 pub const LANG_PORTUGUESE: USHORT = 0x16;
724 pub const LANG_PULAR: USHORT = 0x67;
725 pub const LANG_PUNJABI: USHORT = 0x46;
726 pub const LANG_QUECHUA: USHORT = 0x6b;
727 pub const LANG_ROMANIAN: USHORT = 0x18;
728 pub const LANG_ROMANSH: USHORT = 0x17;
729 pub const LANG_RUSSIAN: USHORT = 0x19;
730 pub const LANG_SAKHA: USHORT = 0x85;
731 pub const LANG_SAMI: USHORT = 0x3b;
732 pub const LANG_SANSKRIT: USHORT = 0x4f;
733 pub const LANG_SCOTTISH_GAELIC: USHORT = 0x91;
734 pub const LANG_SERBIAN: USHORT = 0x1a;
735 pub const LANG_SERBIAN_NEUTRAL: USHORT = 0x7c1a;
736 pub const LANG_SINDHI: USHORT = 0x59;
737 pub const LANG_SINHALESE: USHORT = 0x5b;
738 pub const LANG_SLOVAK: USHORT = 0x1b;
739 pub const LANG_SLOVENIAN: USHORT = 0x24;
740 pub const LANG_SOTHO: USHORT = 0x6c;
741 pub const LANG_SPANISH: USHORT = 0x0a;
742 pub const LANG_SWAHILI: USHORT = 0x41;
743 pub const LANG_SWEDISH: USHORT = 0x1d;
744 pub const LANG_SYRIAC: USHORT = 0x5a;
745 pub const LANG_TAJIK: USHORT = 0x28;
746 pub const LANG_TAMAZIGHT: USHORT = 0x5f;
747 pub const LANG_TAMIL: USHORT = 0x49;
748 pub const LANG_TATAR: USHORT = 0x44;
749 pub const LANG_TELUGU: USHORT = 0x4a;
750 pub const LANG_THAI: USHORT = 0x1e;
751 pub const LANG_TIBETAN: USHORT = 0x51;
752 pub const LANG_TIGRIGNA: USHORT = 0x73;
753 pub const LANG_TIGRINYA: USHORT = 0x73;
754 pub const LANG_TSWANA: USHORT = 0x32;
755 pub const LANG_TURKISH: USHORT = 0x1f;
756 pub const LANG_TURKMEN: USHORT = 0x42;
757 pub const LANG_UIGHUR: USHORT = 0x80;
758 pub const LANG_UKRAINIAN: USHORT = 0x22;
759 pub const LANG_UPPER_SORBIAN: USHORT = 0x2e;
760 pub const LANG_URDU: USHORT = 0x20;
761 pub const LANG_UZBEK: USHORT = 0x43;
762 pub const LANG_VALENCIAN: USHORT = 0x03;
763 pub const LANG_VIETNAMESE: USHORT = 0x2a;
764 pub const LANG_WELSH: USHORT = 0x52;
765 pub const LANG_WOLOF: USHORT = 0x88;
766 pub const LANG_XHOSA: USHORT = 0x34;
767 pub const LANG_YAKUT: USHORT = 0x85;
768 pub const LANG_YI: USHORT = 0x78;
769 pub const LANG_YORUBA: USHORT = 0x6a;
770 pub const LANG_ZULU: USHORT = 0x35;
771 pub const SUBLANG_NEUTRAL: USHORT = 0x00;
772 pub const SUBLANG_DEFAULT: USHORT = 0x01;
773 pub const SUBLANG_SYS_DEFAULT: USHORT = 0x02;
774 pub const SUBLANG_CUSTOM_DEFAULT: USHORT = 0x03;
775 pub const SUBLANG_CUSTOM_UNSPECIFIED: USHORT = 0x04;
776 pub const SUBLANG_UI_CUSTOM_DEFAULT: USHORT = 0x05;
777 pub const SUBLANG_AFRIKAANS_SOUTH_AFRICA: USHORT = 0x01;
778 pub const SUBLANG_ALBANIAN_ALBANIA: USHORT = 0x01;
779 pub const SUBLANG_ALSATIAN_FRANCE: USHORT = 0x01;
780 pub const SUBLANG_AMHARIC_ETHIOPIA: USHORT = 0x01;
781 pub const SUBLANG_ARABIC_SAUDI_ARABIA: USHORT = 0x01;
782 pub const SUBLANG_ARABIC_IRAQ: USHORT = 0x02;
783 pub const SUBLANG_ARABIC_EGYPT: USHORT = 0x03;
784 pub const SUBLANG_ARABIC_LIBYA: USHORT = 0x04;
785 pub const SUBLANG_ARABIC_ALGERIA: USHORT = 0x05;
786 pub const SUBLANG_ARABIC_MOROCCO: USHORT = 0x06;
787 pub const SUBLANG_ARABIC_TUNISIA: USHORT = 0x07;
788 pub const SUBLANG_ARABIC_OMAN: USHORT = 0x08;
789 pub const SUBLANG_ARABIC_YEMEN: USHORT = 0x09;
790 pub const SUBLANG_ARABIC_SYRIA: USHORT = 0x0a;
791 pub const SUBLANG_ARABIC_JORDAN: USHORT = 0x0b;
792 pub const SUBLANG_ARABIC_LEBANON: USHORT = 0x0c;
793 pub const SUBLANG_ARABIC_KUWAIT: USHORT = 0x0d;
794 pub const SUBLANG_ARABIC_UAE: USHORT = 0x0e;
795 pub const SUBLANG_ARABIC_BAHRAIN: USHORT = 0x0f;
796 pub const SUBLANG_ARABIC_QATAR: USHORT = 0x10;
797 pub const SUBLANG_ARMENIAN_ARMENIA: USHORT = 0x01;
798 pub const SUBLANG_ASSAMESE_INDIA: USHORT = 0x01;
799 pub const SUBLANG_AZERI_LATIN: USHORT = 0x01;
800 pub const SUBLANG_AZERI_CYRILLIC: USHORT = 0x02;
801 pub const SUBLANG_AZERBAIJANI_AZERBAIJAN_LATIN: USHORT = 0x01;
802 pub const SUBLANG_AZERBAIJANI_AZERBAIJAN_CYRILLIC: USHORT = 0x02;
803 pub const SUBLANG_BANGLA_INDIA: USHORT = 0x01;
804 pub const SUBLANG_BANGLA_BANGLADESH: USHORT = 0x02;
805 pub const SUBLANG_BASHKIR_RUSSIA: USHORT = 0x01;
806 pub const SUBLANG_BASQUE_BASQUE: USHORT = 0x01;
807 pub const SUBLANG_BELARUSIAN_BELARUS: USHORT = 0x01;
808 pub const SUBLANG_BENGALI_INDIA: USHORT = 0x01;
809 pub const SUBLANG_BENGALI_BANGLADESH: USHORT = 0x02;
810 pub const SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN: USHORT = 0x05;
811 pub const SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC: USHORT = 0x08;
812 pub const SUBLANG_BRETON_FRANCE: USHORT = 0x01;
813 pub const SUBLANG_BULGARIAN_BULGARIA: USHORT = 0x01;
814 pub const SUBLANG_CATALAN_CATALAN: USHORT = 0x01;
815 pub const SUBLANG_CENTRAL_KURDISH_IRAQ: USHORT = 0x01;
816 pub const SUBLANG_CHEROKEE_CHEROKEE: USHORT = 0x01;
817 pub const SUBLANG_CHINESE_TRADITIONAL: USHORT = 0x01;
818 pub const SUBLANG_CHINESE_SIMPLIFIED: USHORT = 0x02;
819 pub const SUBLANG_CHINESE_HONGKONG: USHORT = 0x03;
820 pub const SUBLANG_CHINESE_SINGAPORE: USHORT = 0x04;
821 pub const SUBLANG_CHINESE_MACAU: USHORT = 0x05;
822 pub const SUBLANG_CORSICAN_FRANCE: USHORT = 0x01;
823 pub const SUBLANG_CZECH_CZECH_REPUBLIC: USHORT = 0x01;
824 pub const SUBLANG_CROATIAN_CROATIA: USHORT = 0x01;
825 pub const SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN: USHORT = 0x04;
826 pub const SUBLANG_DANISH_DENMARK: USHORT = 0x01;
827 pub const SUBLANG_DARI_AFGHANISTAN: USHORT = 0x01;
828 pub const SUBLANG_DIVEHI_MALDIVES: USHORT = 0x01;
829 pub const SUBLANG_DUTCH: USHORT = 0x01;
830 pub const SUBLANG_DUTCH_BELGIAN: USHORT = 0x02;
831 pub const SUBLANG_ENGLISH_US: USHORT = 0x01;
832 pub const SUBLANG_ENGLISH_UK: USHORT = 0x02;
833 pub const SUBLANG_ENGLISH_AUS: USHORT = 0x03;
834 pub const SUBLANG_ENGLISH_CAN: USHORT = 0x04;
835 pub const SUBLANG_ENGLISH_NZ: USHORT = 0x05;
836 pub const SUBLANG_ENGLISH_EIRE: USHORT = 0x06;
837 pub const SUBLANG_ENGLISH_SOUTH_AFRICA: USHORT = 0x07;
838 pub const SUBLANG_ENGLISH_JAMAICA: USHORT = 0x08;
839 pub const SUBLANG_ENGLISH_CARIBBEAN: USHORT = 0x09;
840 pub const SUBLANG_ENGLISH_BELIZE: USHORT = 0x0a;
841 pub const SUBLANG_ENGLISH_TRINIDAD: USHORT = 0x0b;
842 pub const SUBLANG_ENGLISH_ZIMBABWE: USHORT = 0x0c;
843 pub const SUBLANG_ENGLISH_PHILIPPINES: USHORT = 0x0d;
844 pub const SUBLANG_ENGLISH_INDIA: USHORT = 0x10;
845 pub const SUBLANG_ENGLISH_MALAYSIA: USHORT = 0x11;
846 pub const SUBLANG_ENGLISH_SINGAPORE: USHORT = 0x12;
847 pub const SUBLANG_ESTONIAN_ESTONIA: USHORT = 0x01;
848 pub const SUBLANG_FAEROESE_FAROE_ISLANDS: USHORT = 0x01;
849 pub const SUBLANG_FILIPINO_PHILIPPINES: USHORT = 0x01;
850 pub const SUBLANG_FINNISH_FINLAND: USHORT = 0x01;
851 pub const SUBLANG_FRENCH: USHORT = 0x01;
852 pub const SUBLANG_FRENCH_BELGIAN: USHORT = 0x02;
853 pub const SUBLANG_FRENCH_CANADIAN: USHORT = 0x03;
854 pub const SUBLANG_FRENCH_SWISS: USHORT = 0x04;
855 pub const SUBLANG_FRENCH_LUXEMBOURG: USHORT = 0x05;
856 pub const SUBLANG_FRENCH_MONACO: USHORT = 0x06;
857 pub const SUBLANG_FRISIAN_NETHERLANDS: USHORT = 0x01;
858 pub const SUBLANG_FULAH_SENEGAL: USHORT = 0x02;
859 pub const SUBLANG_GALICIAN_GALICIAN: USHORT = 0x01;
860 pub const SUBLANG_GEORGIAN_GEORGIA: USHORT = 0x01;
861 pub const SUBLANG_GERMAN: USHORT = 0x01;
862 pub const SUBLANG_GERMAN_SWISS: USHORT = 0x02;
863 pub const SUBLANG_GERMAN_AUSTRIAN: USHORT = 0x03;
864 pub const SUBLANG_GERMAN_LUXEMBOURG: USHORT = 0x04;
865 pub const SUBLANG_GERMAN_LIECHTENSTEIN: USHORT = 0x05;
866 pub const SUBLANG_GREEK_GREECE: USHORT = 0x01;
867 pub const SUBLANG_GREENLANDIC_GREENLAND: USHORT = 0x01;
868 pub const SUBLANG_GUJARATI_INDIA: USHORT = 0x01;
869 pub const SUBLANG_HAUSA_NIGERIA_LATIN: USHORT = 0x01;
870 pub const SUBLANG_HAWAIIAN_US: USHORT = 0x01;
871 pub const SUBLANG_HEBREW_ISRAEL: USHORT = 0x01;
872 pub const SUBLANG_HINDI_INDIA: USHORT = 0x01;
873 pub const SUBLANG_HUNGARIAN_HUNGARY: USHORT = 0x01;
874 pub const SUBLANG_ICELANDIC_ICELAND: USHORT = 0x01;
875 pub const SUBLANG_IGBO_NIGERIA: USHORT = 0x01;
876 pub const SUBLANG_INDONESIAN_INDONESIA: USHORT = 0x01;
877 pub const SUBLANG_INUKTITUT_CANADA: USHORT = 0x01;
878 pub const SUBLANG_INUKTITUT_CANADA_LATIN: USHORT = 0x02;
879 pub const SUBLANG_IRISH_IRELAND: USHORT = 0x02;
880 pub const SUBLANG_ITALIAN: USHORT = 0x01;
881 pub const SUBLANG_ITALIAN_SWISS: USHORT = 0x02;
882 pub const SUBLANG_JAPANESE_JAPAN: USHORT = 0x01;
883 pub const SUBLANG_KANNADA_INDIA: USHORT = 0x01;
884 pub const SUBLANG_KASHMIRI_SASIA: USHORT = 0x02;
885 pub const SUBLANG_KASHMIRI_INDIA: USHORT = 0x02;
886 pub const SUBLANG_KAZAK_KAZAKHSTAN: USHORT = 0x01;
887 pub const SUBLANG_KHMER_CAMBODIA: USHORT = 0x01;
888 pub const SUBLANG_KICHE_GUATEMALA: USHORT = 0x01;
889 pub const SUBLANG_KINYARWANDA_RWANDA: USHORT = 0x01;
890 pub const SUBLANG_KONKANI_INDIA: USHORT = 0x01;
891 pub const SUBLANG_KOREAN: USHORT = 0x01;
892 pub const SUBLANG_KYRGYZ_KYRGYZSTAN: USHORT = 0x01;
893 pub const SUBLANG_LAO_LAO: USHORT = 0x01;
894 pub const SUBLANG_LATVIAN_LATVIA: USHORT = 0x01;
895 pub const SUBLANG_LITHUANIAN: USHORT = 0x01;
896 pub const SUBLANG_LOWER_SORBIAN_GERMANY: USHORT = 0x02;
897 pub const SUBLANG_LUXEMBOURGISH_LUXEMBOURG: USHORT = 0x01;
898 pub const SUBLANG_MACEDONIAN_MACEDONIA: USHORT = 0x01;
899 pub const SUBLANG_MALAY_MALAYSIA: USHORT = 0x01;
900 pub const SUBLANG_MALAY_BRUNEI_DARUSSALAM: USHORT = 0x02;
901 pub const SUBLANG_MALAYALAM_INDIA: USHORT = 0x01;
902 pub const SUBLANG_MALTESE_MALTA: USHORT = 0x01;
903 pub const SUBLANG_MAORI_NEW_ZEALAND: USHORT = 0x01;
904 pub const SUBLANG_MAPUDUNGUN_CHILE: USHORT = 0x01;
905 pub const SUBLANG_MARATHI_INDIA: USHORT = 0x01;
906 pub const SUBLANG_MOHAWK_MOHAWK: USHORT = 0x01;
907 pub const SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA: USHORT = 0x01;
908 pub const SUBLANG_MONGOLIAN_PRC: USHORT = 0x02;
909 pub const SUBLANG_NEPALI_INDIA: USHORT = 0x02;
910 pub const SUBLANG_NEPALI_NEPAL: USHORT = 0x01;
911 pub const SUBLANG_NORWEGIAN_BOKMAL: USHORT = 0x01;
912 pub const SUBLANG_NORWEGIAN_NYNORSK: USHORT = 0x02;
913 pub const SUBLANG_OCCITAN_FRANCE: USHORT = 0x01;
914 pub const SUBLANG_ODIA_INDIA: USHORT = 0x01;
915 pub const SUBLANG_ORIYA_INDIA: USHORT = 0x01;
916 pub const SUBLANG_PASHTO_AFGHANISTAN: USHORT = 0x01;
917 pub const SUBLANG_PERSIAN_IRAN: USHORT = 0x01;
918 pub const SUBLANG_POLISH_POLAND: USHORT = 0x01;
919 pub const SUBLANG_PORTUGUESE: USHORT = 0x02;
920 pub const SUBLANG_PORTUGUESE_BRAZILIAN: USHORT = 0x01;
921 pub const SUBLANG_PULAR_SENEGAL: USHORT = 0x02;
922 pub const SUBLANG_PUNJABI_INDIA: USHORT = 0x01;
923 pub const SUBLANG_PUNJABI_PAKISTAN: USHORT = 0x02;
924 pub const SUBLANG_QUECHUA_BOLIVIA: USHORT = 0x01;
925 pub const SUBLANG_QUECHUA_ECUADOR: USHORT = 0x02;
926 pub const SUBLANG_QUECHUA_PERU: USHORT = 0x03;
927 pub const SUBLANG_ROMANIAN_ROMANIA: USHORT = 0x01;
928 pub const SUBLANG_ROMANSH_SWITZERLAND: USHORT = 0x01;
929 pub const SUBLANG_RUSSIAN_RUSSIA: USHORT = 0x01;
930 pub const SUBLANG_SAKHA_RUSSIA: USHORT = 0x01;
931 pub const SUBLANG_SAMI_NORTHERN_NORWAY: USHORT = 0x01;
932 pub const SUBLANG_SAMI_NORTHERN_SWEDEN: USHORT = 0x02;
933 pub const SUBLANG_SAMI_NORTHERN_FINLAND: USHORT = 0x03;
934 pub const SUBLANG_SAMI_LULE_NORWAY: USHORT = 0x04;
935 pub const SUBLANG_SAMI_LULE_SWEDEN: USHORT = 0x05;
936 pub const SUBLANG_SAMI_SOUTHERN_NORWAY: USHORT = 0x06;
937 pub const SUBLANG_SAMI_SOUTHERN_SWEDEN: USHORT = 0x07;
938 pub const SUBLANG_SAMI_SKOLT_FINLAND: USHORT = 0x08;
939 pub const SUBLANG_SAMI_INARI_FINLAND: USHORT = 0x09;
940 pub const SUBLANG_SANSKRIT_INDIA: USHORT = 0x01;
941 pub const SUBLANG_SCOTTISH_GAELIC: USHORT = 0x01;
942 pub const SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN: USHORT = 0x06;
943 pub const SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC: USHORT = 0x07;
944 pub const SUBLANG_SERBIAN_MONTENEGRO_LATIN: USHORT = 0x0b;
945 pub const SUBLANG_SERBIAN_MONTENEGRO_CYRILLIC: USHORT = 0x0c;
946 pub const SUBLANG_SERBIAN_SERBIA_LATIN: USHORT = 0x09;
947 pub const SUBLANG_SERBIAN_SERBIA_CYRILLIC: USHORT = 0x0a;
948 pub const SUBLANG_SERBIAN_CROATIA: USHORT = 0x01;
949 pub const SUBLANG_SERBIAN_LATIN: USHORT = 0x02;
950 pub const SUBLANG_SERBIAN_CYRILLIC: USHORT = 0x03;
951 pub const SUBLANG_SINDHI_INDIA: USHORT = 0x01;
952 pub const SUBLANG_SINDHI_PAKISTAN: USHORT = 0x02;
953 pub const SUBLANG_SINDHI_AFGHANISTAN: USHORT = 0x02;
954 pub const SUBLANG_SINHALESE_SRI_LANKA: USHORT = 0x01;
955 pub const SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA: USHORT = 0x01;
956 pub const SUBLANG_SLOVAK_SLOVAKIA: USHORT = 0x01;
957 pub const SUBLANG_SLOVENIAN_SLOVENIA: USHORT = 0x01;
958 pub const SUBLANG_SPANISH: USHORT = 0x01;
959 pub const SUBLANG_SPANISH_MEXICAN: USHORT = 0x02;
960 pub const SUBLANG_SPANISH_MODERN: USHORT = 0x03;
961 pub const SUBLANG_SPANISH_GUATEMALA: USHORT = 0x04;
962 pub const SUBLANG_SPANISH_COSTA_RICA: USHORT = 0x05;
963 pub const SUBLANG_SPANISH_PANAMA: USHORT = 0x06;
964 pub const SUBLANG_SPANISH_DOMINICAN_REPUBLIC: USHORT = 0x07;
965 pub const SUBLANG_SPANISH_VENEZUELA: USHORT = 0x08;
966 pub const SUBLANG_SPANISH_COLOMBIA: USHORT = 0x09;
967 pub const SUBLANG_SPANISH_PERU: USHORT = 0x0a;
968 pub const SUBLANG_SPANISH_ARGENTINA: USHORT = 0x0b;
969 pub const SUBLANG_SPANISH_ECUADOR: USHORT = 0x0c;
970 pub const SUBLANG_SPANISH_CHILE: USHORT = 0x0d;
971 pub const SUBLANG_SPANISH_URUGUAY: USHORT = 0x0e;
972 pub const SUBLANG_SPANISH_PARAGUAY: USHORT = 0x0f;
973 pub const SUBLANG_SPANISH_BOLIVIA: USHORT = 0x10;
974 pub const SUBLANG_SPANISH_EL_SALVADOR: USHORT = 0x11;
975 pub const SUBLANG_SPANISH_HONDURAS: USHORT = 0x12;
976 pub const SUBLANG_SPANISH_NICARAGUA: USHORT = 0x13;
977 pub const SUBLANG_SPANISH_PUERTO_RICO: USHORT = 0x14;
978 pub const SUBLANG_SPANISH_US: USHORT = 0x15;
979 pub const SUBLANG_SWAHILI_KENYA: USHORT = 0x01;
980 pub const SUBLANG_SWEDISH: USHORT = 0x01;
981 pub const SUBLANG_SWEDISH_FINLAND: USHORT = 0x02;
982 pub const SUBLANG_SYRIAC_SYRIA: USHORT = 0x01;
983 pub const SUBLANG_TAJIK_TAJIKISTAN: USHORT = 0x01;
984 pub const SUBLANG_TAMAZIGHT_ALGERIA_LATIN: USHORT = 0x02;
985 pub const SUBLANG_TAMAZIGHT_MOROCCO_TIFINAGH: USHORT = 0x04;
986 pub const SUBLANG_TAMIL_INDIA: USHORT = 0x01;
987 pub const SUBLANG_TAMIL_SRI_LANKA: USHORT = 0x02;
988 pub const SUBLANG_TATAR_RUSSIA: USHORT = 0x01;
989 pub const SUBLANG_TELUGU_INDIA: USHORT = 0x01;
990 pub const SUBLANG_THAI_THAILAND: USHORT = 0x01;
991 pub const SUBLANG_TIBETAN_PRC: USHORT = 0x01;
992 pub const SUBLANG_TIGRIGNA_ERITREA: USHORT = 0x02;
993 pub const SUBLANG_TIGRINYA_ERITREA: USHORT = 0x02;
994 pub const SUBLANG_TIGRINYA_ETHIOPIA: USHORT = 0x01;
995 pub const SUBLANG_TSWANA_BOTSWANA: USHORT = 0x02;
996 pub const SUBLANG_TSWANA_SOUTH_AFRICA: USHORT = 0x01;
997 pub const SUBLANG_TURKISH_TURKEY: USHORT = 0x01;
998 pub const SUBLANG_TURKMEN_TURKMENISTAN: USHORT = 0x01;
999 pub const SUBLANG_UIGHUR_PRC: USHORT = 0x01;
1000 pub const SUBLANG_UKRAINIAN_UKRAINE: USHORT = 0x01;
1001 pub const SUBLANG_UPPER_SORBIAN_GERMANY: USHORT = 0x01;
1002 pub const SUBLANG_URDU_PAKISTAN: USHORT = 0x01;
1003 pub const SUBLANG_URDU_INDIA: USHORT = 0x02;
1004 pub const SUBLANG_UZBEK_LATIN: USHORT = 0x01;
1005 pub const SUBLANG_UZBEK_CYRILLIC: USHORT = 0x02;
1006 pub const SUBLANG_VALENCIAN_VALENCIA: USHORT = 0x02;
1007 pub const SUBLANG_VIETNAMESE_VIETNAM: USHORT = 0x01;
1008 pub const SUBLANG_WELSH_UNITED_KINGDOM: USHORT = 0x01;
1009 pub const SUBLANG_WOLOF_SENEGAL: USHORT = 0x01;
1010 pub const SUBLANG_XHOSA_SOUTH_AFRICA: USHORT = 0x01;
1011 pub const SUBLANG_YAKUT_RUSSIA: USHORT = 0x01;
1012 pub const SUBLANG_YI_PRC: USHORT = 0x01;
1013 pub const SUBLANG_YORUBA_NIGERIA: USHORT = 0x01;
1014 pub const SUBLANG_ZULU_SOUTH_AFRICA: USHORT = 0x01;
1015 pub const SORT_DEFAULT: USHORT = 0x0;
1016 pub const SORT_INVARIANT_MATH: USHORT = 0x1;
1017 pub const SORT_JAPANESE_XJIS: USHORT = 0x0;
1018 pub const SORT_JAPANESE_UNICODE: USHORT = 0x1;
1019 pub const SORT_JAPANESE_RADICALSTROKE: USHORT = 0x4;
1020 pub const SORT_CHINESE_BIG5: USHORT = 0x0;
1021 pub const SORT_CHINESE_PRCP: USHORT = 0x0;
1022 pub const SORT_CHINESE_UNICODE: USHORT = 0x1;
1023 pub const SORT_CHINESE_PRC: USHORT = 0x2;
1024 pub const SORT_CHINESE_BOPOMOFO: USHORT = 0x3;
1025 pub const SORT_CHINESE_RADICALSTROKE: USHORT = 0x4;
1026 pub const SORT_KOREAN_KSC: USHORT = 0x0;
1027 pub const SORT_KOREAN_UNICODE: USHORT = 0x1;
1028 pub const SORT_GERMAN_PHONE_BOOK: USHORT = 0x1;
1029 pub const SORT_HUNGARIAN_DEFAULT: USHORT = 0x0;
1030 pub const SORT_HUNGARIAN_TECHNICAL: USHORT = 0x1;
1031 pub const SORT_GEORGIAN_TRADITIONAL: USHORT = 0x0;
1032 pub const SORT_GEORGIAN_MODERN: USHORT = 0x1;
1033 macro_rules! MAKELANGID {
1034     ($p:expr, $s:expr) => {
1035         (($s as USHORT) << 10) | ($p as USHORT)
1036     }
1037 }
1038 #[inline]
MAKELANGID(p: USHORT, s: USHORT) -> LANGID1039 pub fn MAKELANGID(p: USHORT, s: USHORT) -> LANGID { (s << 10) | p }
1040 #[inline]
PRIMARYLANGID(lgid: LANGID) -> USHORT1041 pub fn PRIMARYLANGID(lgid: LANGID) -> USHORT { lgid & 0x3ff }
1042 #[inline]
SUBLANGID(lgid: LANGID) -> USHORT1043 pub fn SUBLANGID(lgid: LANGID) -> USHORT { lgid >> 10 }
1044 pub const NLS_VALID_LOCALE_MASK: ULONG = 0x000fffff;
1045 macro_rules! MAKELCID {
1046     ($lgid:expr, $srtid:expr) => {
1047         (($srtid as ULONG) << 16) | ($lgid as ULONG)
1048     }
1049 }
1050 #[inline]
MAKELCID(lgid: LANGID, srtid: USHORT) -> LCID1051 pub fn MAKELCID(lgid: LANGID, srtid: USHORT) -> LCID {
1052     ((srtid as ULONG) << 16) | (lgid as ULONG)
1053 }
1054 #[inline]
MAKESORTLCID(lgid: LANGID, srtid: USHORT, ver: USHORT) -> LCID1055 pub fn MAKESORTLCID(lgid: LANGID, srtid: USHORT, ver: USHORT) -> LCID {
1056     MAKELCID(lgid, srtid) | ((ver as ULONG) << 20)
1057 }
1058 #[inline]
LANGIDFROMLCID(lcid: LCID) -> LANGID1059 pub fn LANGIDFROMLCID(lcid: LCID) -> LANGID { lcid as LANGID }
1060 #[inline]
SORTIDFROMLCID(lcid: LCID) -> USHORT1061 pub fn SORTIDFROMLCID(lcid: LCID) -> USHORT { ((lcid >> 16) & 0xf) as USHORT }
1062 #[inline]
SORTVERSIONFROMLCID(lcid: LCID) -> USHORT1063 pub fn SORTVERSIONFROMLCID(lcid: LCID) -> USHORT { ((lcid >> 16) & 0xf) as USHORT }
1064 pub const LOCALE_NAME_MAX_LENGTH: usize = 85;
1065 pub const LANG_SYSTEM_DEFAULT: LANGID = MAKELANGID!(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT);
1066 pub const LANG_USER_DEFAULT: LANGID = MAKELANGID!(LANG_NEUTRAL, SUBLANG_DEFAULT);
1067 pub const LOCALE_SYSTEM_DEFAULT: LCID = MAKELCID!(LANG_SYSTEM_DEFAULT, SORT_DEFAULT);
1068 pub const LOCALE_USER_DEFAULT: LCID = MAKELCID!(LANG_USER_DEFAULT, SORT_DEFAULT);
1069 pub const LOCALE_CUSTOM_DEFAULT: LCID
1070     = MAKELCID!(MAKELANGID!(LANG_NEUTRAL, SUBLANG_CUSTOM_DEFAULT), SORT_DEFAULT);
1071 pub const LOCALE_CUSTOM_UNSPECIFIED: LCID
1072     = MAKELCID!(MAKELANGID!(LANG_NEUTRAL, SUBLANG_CUSTOM_UNSPECIFIED), SORT_DEFAULT);
1073 pub const LOCALE_CUSTOM_UI_DEFAULT: LCID
1074     = MAKELCID!(MAKELANGID!(LANG_NEUTRAL, SUBLANG_UI_CUSTOM_DEFAULT), SORT_DEFAULT);
1075 pub const LOCALE_NEUTRAL: LCID
1076     = MAKELCID!(MAKELANGID!(LANG_NEUTRAL, SUBLANG_NEUTRAL), SORT_DEFAULT);
1077 pub const LOCALE_INVARIANT: LCID
1078     = MAKELCID!(MAKELANGID!(LANG_INVARIANT, SUBLANG_NEUTRAL), SORT_DEFAULT);
1079 pub const LOCALE_TRANSIENT_KEYBOARD1: LCID = 0x2000;
1080 pub const LOCALE_TRANSIENT_KEYBOARD2: LCID = 0x2400;
1081 pub const LOCALE_TRANSIENT_KEYBOARD3: LCID = 0x2800;
1082 pub const LOCALE_TRANSIENT_KEYBOARD4: LCID = 0x2c00;
1083 pub const LOCALE_UNASSIGNED_LCID: LCID = LOCALE_CUSTOM_UNSPECIFIED;
1084