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