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