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