[PSDK]
[reactos.git] / reactos / include / psdk / ntdef.h
1 /*
2 * ntdef.h
3 *
4 * This file is part of the ReactOS PSDK package.
5 *
6 * Contributors:
7 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
8 *
9 * THIS SOFTWARE IS NOT COPYRIGHTED
10 *
11 * This source code is offered for use in the public domain. You may
12 * use, modify or distribute it freely.
13 *
14 * This code is distributed in the hope that it will be useful but
15 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
16 * DISCLAIMED. This includes but is not limited to warranties of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 *
19 */
20
21 #ifndef _NTDEF_
22 #define _NTDEF_
23
24 /* Dependencies */
25 #include <ctype.h>
26 #include <basetsd.h>
27 #include <excpt.h>
28 #include <sdkddkver.h>
29
30 // FIXME: Shouldn't be included!
31 #include <stdarg.h>
32 #include <string.h>
33
34 /* Helper macro to enable gcc's extension. */
35 #ifndef __GNU_EXTENSION
36 #ifdef __GNUC__
37 #define __GNU_EXTENSION __extension__
38 #else
39 #define __GNU_EXTENSION
40 #endif
41 #endif
42
43 /* Pseudo Modifiers for Input Parameters */
44
45 #ifndef IN
46 #define IN
47 #endif
48
49 #ifndef OUT
50 #define OUT
51 #endif
52
53 #ifndef OPTIONAL
54 #define OPTIONAL
55 #endif
56
57 #ifndef NOTHING
58 #define NOTHING
59 #endif
60
61 #ifndef CRITICAL
62 #define CRITICAL
63 #endif
64
65 #ifndef FAR
66 #define FAR
67 #endif
68
69
70 /* Defines the "size" of an any-size array */
71 #ifndef ANYSIZE_ARRAY
72 #define ANYSIZE_ARRAY 1
73 #endif
74
75 /* Constant modifier */
76 #ifndef CONST
77 #define CONST const
78 #endif
79
80 /* TRUE/FALSE */
81 #define FALSE 0
82 #define TRUE 1
83
84 /* NULL/NULL64 */
85 #ifndef NULL
86 #ifdef __cplusplus
87 #define NULL 0
88 #define NULL64 0
89 #else
90 #define NULL ((void *)0)
91 #define NULL64 ((void * POINTER_64)0)
92 #endif
93 #endif /* NULL */
94
95
96 //
97 // FIXME
98 // We should use the -fms-extensions compiler flag for gcc,
99 // and clean up the mess.
100 //
101 #ifndef __ANONYMOUS_DEFINED
102 #define __ANONYMOUS_DEFINED
103
104 #ifndef NONAMELESSUNION
105 #ifdef __GNUC__
106 #define _ANONYMOUS_UNION __GNU_EXTENSION
107 #define _ANONYMOUS_STRUCT __GNU_EXTENSION
108 #elif defined(__WATCOMC__) || defined(_MSC_VER)
109 #define _ANONYMOUS_UNION
110 #define _ANONYMOUS_STRUCT
111 #endif /* __GNUC__/__WATCOMC__ */
112 #endif /* NONAMELESSUNION */
113
114 #ifndef _ANONYMOUS_UNION
115 #define _ANONYMOUS_UNION
116 #define _UNION_NAME(x) x
117 #define DUMMYUNIONNAME u
118 #define DUMMYUNIONNAME2 u2
119 #define DUMMYUNIONNAME3 u3
120 #define DUMMYUNIONNAME4 u4
121 #define DUMMYUNIONNAME5 u5
122 #define DUMMYUNIONNAME6 u6
123 #define DUMMYUNIONNAME7 u7
124 #define DUMMYUNIONNAME8 u8
125 #else
126 #define _UNION_NAME(x)
127 #define DUMMYUNIONNAME
128 #define DUMMYUNIONNAME2
129 #define DUMMYUNIONNAME3
130 #define DUMMYUNIONNAME4
131 #define DUMMYUNIONNAME5
132 #define DUMMYUNIONNAME6
133 #define DUMMYUNIONNAME7
134 #define DUMMYUNIONNAME8
135 #endif
136
137 #ifndef _ANONYMOUS_STRUCT
138 #define _ANONYMOUS_STRUCT
139 #define _STRUCT_NAME(x) x
140 #define DUMMYSTRUCTNAME s
141 #define DUMMYSTRUCTNAME2 s2
142 #define DUMMYSTRUCTNAME3 s3
143 #define DUMMYSTRUCTNAME4 s4
144 #define DUMMYSTRUCTNAME5 s5
145 #else
146 #define _STRUCT_NAME(x)
147 #define DUMMYSTRUCTNAME
148 #define DUMMYSTRUCTNAME2
149 #define DUMMYSTRUCTNAME3
150 #define DUMMYSTRUCTNAME4
151 #define DUMMYSTRUCTNAME5
152 #endif
153
154 #endif /* __ANONYMOUS_DEFINED */
155
156 // FIXME
157 #undef UNALIGNED
158 #define UNALIGNED
159 #define RESTRICTED_POINTER
160
161
162 #define ARGUMENT_PRESENT(ArgumentPointer) \
163 ((CHAR*)((ULONG_PTR)(ArgumentPointer)) != (CHAR*)NULL)
164
165 /* Returns the base address of a structure from a structure member */
166 #ifndef CONTAINING_RECORD
167 #define CONTAINING_RECORD(address, type, field) \
168 ((type *)(((ULONG_PTR)address) - (ULONG_PTR)(&(((type *)0)->field))))
169 #endif
170
171 /* Returns the byte offset of the specified structure's member */
172 #ifndef __GNUC__
173 #define FIELD_OFFSET(Type, Field) ((LONG)(LONG_PTR)&(((Type*) 0)->Field))
174 #else
175 #define FIELD_OFFSET(Type, Field) __builtin_offsetof(Type, Field)
176 #endif
177
178 /* Returns the type's alignment */
179 #if defined(_MSC_VER) && (_MSC_VER >= 1300)
180 #define TYPE_ALIGNMENT(t) __alignof(t)
181 #else
182 #define TYPE_ALIGNMENT(t) FIELD_OFFSET( struct { char x; t test; }, test )
183 #endif
184
185 /* Calling Conventions */
186 #if defined(_M_IX86)
187 #define FASTCALL __fastcall
188 #else
189 #define FASTCALL
190 #endif
191
192 #define NTAPI __stdcall
193
194
195 /* Import and Export Specifiers */
196
197 /* Done the same way as in windef.h for now */
198 #define DECLSPEC_IMPORT __declspec(dllimport)
199 #define DECLSPEC_NORETURN __declspec(noreturn)
200
201 #ifndef DECLSPEC_ADDRSAFE
202 #if (_MSC_VER >= 1200) && (defined(_M_ALPHA) || defined(_M_AXP64))
203 #define DECLSPEC_ADDRSAFE __declspec(address_safe)
204 #else
205 #define DECLSPEC_ADDRSAFE
206 #endif
207 #endif
208
209 #if !defined(_NTSYSTEM_)
210 #define NTSYSAPI DECLSPEC_IMPORT
211 #define NTSYSCALLAPI DECLSPEC_IMPORT
212 #else
213 #define NTSYSAPI
214 #if defined(_NTDLLBUILD_)
215 #define NTSYSCALLAPI
216 #else
217 #define NTSYSCALLAPI DECLSPEC_ADDRSAFE
218 #endif
219 #endif
220
221 /* Inlines */
222 #ifndef FORCEINLINE
223 #if (_MSC_VER >= 1200)
224 #define FORCEINLINE __forceinline
225 #elif (_MSC_VER)
226 #define FORCEINLINE __inline
227 #else
228 #define FORCEINLINE static __inline__ __attribute__((always_inline))
229 #endif
230 #endif
231
232 #ifndef DECLSPEC_NOINLINE
233 #if (_MSC_VER >= 1300)
234 #define DECLSPEC_NOINLINE __declspec(noinline)
235 #elif defined(__GNUC__)
236 #define DECLSPEC_NOINLINE __attribute__((noinline))
237 #else
238 #define DECLSPEC_NOINLINE
239 #endif
240 #endif
241
242 #if !defined(_M_CEE_PURE)
243 #define NTAPI_INLINE NTAPI
244 #else
245 #define NTAPI_INLINE
246 #endif
247
248 /* Use to specify structure alignment */
249 #ifndef DECLSPEC_ALIGN
250 #if defined(_MSC_VER) && (_MSC_VER >= 1300) && !defined(MIDL_PASS)
251 #define DECLSPEC_ALIGN(x) __declspec(align(x))
252 #elif defined(__GNUC__)
253 #define DECLSPEC_ALIGN(x) __attribute__((aligned(x)))
254 #else
255 #define DECLSPEC_ALIGN(x)
256 #endif
257 #endif
258
259 /* Use to silence unused variable warnings when it is intentional */
260 #define UNREFERENCED_PARAMETER(P) {(P)=(P);}
261 #define UNREFERENCED_LOCAL_VARIABLE(L) {(L)=(L);}
262 #define DBG_UNREFERENCED_PARAMETER(P)
263 #define DBG_UNREFERENCED_LOCAL_VARIABLE(L)
264
265 /* min/max helper macros */
266 #ifndef NOMINMAX
267
268 #ifndef min
269 #define min(a,b) (((a) < (b)) ? (a) : (b))
270 #endif
271
272 #ifndef max
273 #define max(a,b) (((a) > (b)) ? (a) : (b))
274 #endif
275
276 #endif /* NOMINMAX */
277
278 /* Tell windef.h that we have defined some basic types */
279 #define BASETYPES
280
281 /* Void Pointers */
282 typedef void *PVOID;
283 //typedef void * POINTER_64 PVOID64;
284 typedef PVOID PVOID64; // FIXME!
285
286 /* Handle Type */
287 #ifdef STRICT
288 typedef void *HANDLE;
289 #define DECLARE_HANDLE(n) typedef struct n##__{int i;}*n
290 #else
291 typedef PVOID HANDLE;
292 #define DECLARE_HANDLE(n) typedef HANDLE n
293 #endif
294 typedef HANDLE *PHANDLE;
295
296 /* Upper-Case Versions of Some Standard C Types */
297 #ifndef VOID
298 #define VOID void
299 typedef char CHAR;
300 typedef short SHORT;
301 typedef long LONG;
302 #if !defined(MIDL_PASS)
303 typedef int INT;
304 #endif
305 #endif
306 typedef double DOUBLE;
307
308 /* Unsigned Types */
309 typedef unsigned char UCHAR, *PUCHAR;
310 typedef unsigned short USHORT, *PUSHORT;
311 typedef unsigned long ULONG, *PULONG;
312 typedef CONST UCHAR *PCUCHAR;
313 typedef CONST USHORT *PCUSHORT;
314 typedef CONST ULONG *PCULONG;
315 typedef UCHAR FCHAR;
316 typedef USHORT FSHORT;
317 typedef ULONG FLONG;
318 typedef UCHAR BOOLEAN, *PBOOLEAN;
319 typedef ULONG LOGICAL;
320 typedef ULONG *PLOGICAL;
321
322 /* Signed Types */
323 typedef SHORT *PSHORT;
324 typedef LONG *PLONG;
325 typedef LONG NTSTATUS;
326 typedef NTSTATUS *PNTSTATUS;
327 typedef signed char SCHAR;
328 typedef SCHAR *PSCHAR;
329
330 #ifndef _HRESULT_DEFINED
331 #define _HRESULT_DEFINED
332 typedef LONG HRESULT;
333 #endif
334
335 /* 64-bit types */
336 __GNU_EXTENSION typedef __int64 LONGLONG, *PLONGLONG;
337 __GNU_EXTENSION typedef unsigned __int64 ULONGLONG, *PULONGLONG;
338 typedef ULONGLONG DWORDLONG, *PDWORDLONG;
339
340 /* Update Sequence Number */
341 typedef LONGLONG USN;
342
343 /* ANSI (Multi-byte Character) types */
344 typedef CHAR *PCHAR, *LPCH, *PCH;
345 typedef CONST CHAR *LPCCH, *PCCH;
346 typedef CHAR *NPSTR, *LPSTR, *PSTR;
347 typedef PSTR *PZPSTR;
348 typedef CONST PSTR *PCZPSTR;
349 typedef CONST CHAR *LPCSTR, *PCSTR;
350 typedef PCSTR *PZPCSTR;
351
352 /* Pointer to an Asciiz string */
353 typedef CHAR *PSZ;
354 typedef CONST char *PCSZ;
355
356 /* UNICODE (Wide Character) types */
357 typedef wchar_t WCHAR;
358 typedef WCHAR *PWCHAR, *LPWCH, *PWCH;
359 typedef CONST WCHAR *LPCWCH, *PCWCH;
360 typedef WCHAR *NWPSTR, *LPWSTR, *PWSTR;
361 typedef PWSTR *PZPWSTR;
362 typedef CONST PWSTR *PCZPWSTR;
363 typedef WCHAR UNALIGNED *LPUWSTR, *PUWSTR;
364 typedef CONST WCHAR *LPCWSTR, *PCWSTR;
365 typedef PCWSTR *PZPCWSTR;
366 typedef CONST WCHAR UNALIGNED *LPCUWSTR, *PCUWSTR;
367
368 /* Cardinal Data Types */
369 typedef char CCHAR, *PCCHAR;
370 typedef short CSHORT, *PCSHORT;
371 typedef ULONG CLONG, *PCLONG;
372
373 /* NLS basics (Locale and Language Ids) */
374 typedef ULONG LCID;
375 typedef PULONG PLCID;
376 typedef USHORT LANGID;
377
378 /* Used to store a non-float 8 byte aligned structure */
379 typedef struct _QUAD
380 {
381 _ANONYMOUS_UNION union
382 {
383 __GNU_EXTENSION __int64 UseThisFieldToCopy;
384 double DoNotUseThisField;
385 } DUMMYUNIONNAME;
386 } QUAD, *PQUAD, UQUAD, *PUQUAD;
387
388 /* Large Integer Unions */
389 #if defined(MIDL_PASS)
390 typedef struct _LARGE_INTEGER {
391 #else
392 typedef union _LARGE_INTEGER {
393 _ANONYMOUS_STRUCT struct
394 {
395 ULONG LowPart;
396 LONG HighPart;
397 } DUMMYSTRUCTNAME;
398 struct
399 {
400 ULONG LowPart;
401 LONG HighPart;
402 } u;
403 #endif /* MIDL_PASS */
404 LONGLONG QuadPart;
405 } LARGE_INTEGER, *PLARGE_INTEGER;
406
407 #if defined(MIDL_PASS)
408 typedef struct _ULARGE_INTEGER {
409 #else
410 typedef union _ULARGE_INTEGER {
411 _ANONYMOUS_STRUCT struct
412 {
413 ULONG LowPart;
414 ULONG HighPart;
415 } DUMMYSTRUCTNAME;
416 struct
417 {
418 ULONG LowPart;
419 ULONG HighPart;
420 } u;
421 #endif /* MIDL_PASS */
422 ULONGLONG QuadPart;
423 } ULARGE_INTEGER, *PULARGE_INTEGER;
424
425 /* Physical Addresses are always treated as 64-bit wide */
426 typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS;
427
428 /* Locally Unique Identifier */
429 typedef struct _LUID {
430 ULONG LowPart;
431 LONG HighPart;
432 } LUID, *PLUID;
433
434 /* Native API Return Value Macros */
435 #define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0)
436 #define NT_INFORMATION(Status) ((((ULONG)(Status)) >> 30) == 1)
437 #define NT_WARNING(Status) ((((ULONG)(Status)) >> 30) == 2)
438 #define NT_ERROR(Status) ((((ULONG)(Status)) >> 30) == 3)
439
440 /* String Types */
441 typedef struct _UNICODE_STRING {
442 USHORT Length;
443 USHORT MaximumLength;
444 PWSTR Buffer;
445 } UNICODE_STRING, *PUNICODE_STRING;
446 typedef const UNICODE_STRING* PCUNICODE_STRING;
447 #define UNICODE_NULL ((WCHAR)0)
448
449 typedef struct _CSTRING {
450 USHORT Length;
451 USHORT MaximumLength;
452 CONST CHAR *Buffer;
453 } CSTRING, *PCSTRING;
454 #define ANSI_NULL ((CHAR)0)
455
456 typedef struct _STRING {
457 USHORT Length;
458 USHORT MaximumLength;
459 PCHAR Buffer;
460 } STRING, *PSTRING;
461
462 typedef STRING ANSI_STRING;
463 typedef PSTRING PANSI_STRING;
464 typedef STRING OEM_STRING;
465 typedef PSTRING POEM_STRING;
466 typedef CONST STRING* PCOEM_STRING;
467 typedef STRING CANSI_STRING;
468 typedef PSTRING PCANSI_STRING;
469
470 typedef struct _STRING32 {
471 USHORT Length;
472 USHORT MaximumLength;
473 ULONG Buffer;
474 } STRING32, *PSTRING32,
475 UNICODE_STRING32, *PUNICODE_STRING32,
476 ANSI_STRING32, *PANSI_STRING32;
477
478 typedef struct _STRING64 {
479 USHORT Length;
480 USHORT MaximumLength;
481 ULONGLONG Buffer;
482 } STRING64, *PSTRING64,
483 UNICODE_STRING64, *PUNICODE_STRING64,
484 ANSI_STRING64, *PANSI_STRING64;
485
486 /* LangID and NLS */
487 #define MAKELANGID(p, s) ((((USHORT)(s)) << 10) | (USHORT)(p))
488 #define PRIMARYLANGID(lgid) ((USHORT)(lgid) & 0x3ff)
489 #define SUBLANGID(lgid) ((USHORT)(lgid) >> 10)
490
491 #define NLS_VALID_LOCALE_MASK 0x000fffff
492
493 #define MAKELCID(lgid, srtid) ((ULONG)((((ULONG)((USHORT)(srtid))) << 16) | \
494 ((ULONG)((USHORT)(lgid)))))
495 #define MAKESORTLCID(lgid, srtid, ver) \
496 ((ULONG)((MAKELCID(lgid, srtid)) | \
497 (((ULONG)((USHORT)(ver))) << 20)))
498 #define LANGIDFROMLCID(lcid) ((USHORT)(lcid))
499 #define SORTIDFROMLCID(lcid) ((USHORT)((((ULONG)(lcid)) >> 16) & 0xf))
500 #define SORTVERSIONFROMLCID(lcid) ((USHORT)((((ULONG)(lcid)) >> 20) & 0xf))
501
502
503 /* Object Attributes */
504 typedef struct _OBJECT_ATTRIBUTES {
505 ULONG Length;
506 HANDLE RootDirectory;
507 PUNICODE_STRING ObjectName;
508 ULONG Attributes;
509 PVOID SecurityDescriptor;
510 PVOID SecurityQualityOfService;
511 } OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
512 typedef CONST OBJECT_ATTRIBUTES *PCOBJECT_ATTRIBUTES;
513
514 /* Values for the Attributes member */
515 #define OBJ_INHERIT 0x00000002
516 #define OBJ_PERMANENT 0x00000010
517 #define OBJ_EXCLUSIVE 0x00000020
518 #define OBJ_CASE_INSENSITIVE 0x00000040
519 #define OBJ_OPENIF 0x00000080
520 #define OBJ_OPENLINK 0x00000100
521 #define OBJ_KERNEL_HANDLE 0x00000200
522 #define OBJ_FORCE_ACCESS_CHECK 0x00000400
523 #define OBJ_VALID_ATTRIBUTES 0x000007F2
524
525 /* Helper Macro */
526 #define InitializeObjectAttributes(p,n,a,r,s) { \
527 (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
528 (p)->RootDirectory = (r); \
529 (p)->Attributes = (a); \
530 (p)->ObjectName = (n); \
531 (p)->SecurityDescriptor = (s); \
532 (p)->SecurityQualityOfService = NULL; \
533 }
534
535 /* Product Types */
536 typedef enum _NT_PRODUCT_TYPE {
537 NtProductWinNt = 1,
538 NtProductLanManNt,
539 NtProductServer
540 } NT_PRODUCT_TYPE, *PNT_PRODUCT_TYPE;
541
542 typedef enum _EVENT_TYPE {
543 NotificationEvent,
544 SynchronizationEvent
545 } EVENT_TYPE;
546
547 typedef enum _TIMER_TYPE {
548 NotificationTimer,
549 SynchronizationTimer
550 } TIMER_TYPE;
551
552 typedef enum _WAIT_TYPE {
553 WaitAll,
554 WaitAny
555 } WAIT_TYPE;
556
557 /* Doubly Linked Lists */
558 typedef struct _LIST_ENTRY {
559 struct _LIST_ENTRY *Flink;
560 struct _LIST_ENTRY *Blink;
561 } LIST_ENTRY, *PLIST_ENTRY, *RESTRICTED_POINTER PRLIST_ENTRY;
562
563 typedef struct LIST_ENTRY32
564 {
565 ULONG Flink;
566 ULONG Blink;
567 } LIST_ENTRY32, *PLIST_ENTRY32;
568
569 typedef struct LIST_ENTRY64
570 {
571 ULONGLONG Flink;
572 ULONGLONG Blink;
573 } LIST_ENTRY64, *PLIST_ENTRY64;
574
575 /* Singly Linked Lists */
576 typedef struct _SINGLE_LIST_ENTRY {
577 struct _SINGLE_LIST_ENTRY *Next;
578 } SINGLE_LIST_ENTRY, *PSINGLE_LIST_ENTRY;
579
580 typedef struct _PROCESSOR_NUMBER {
581 USHORT Group;
582 UCHAR Number;
583 UCHAR Reserved;
584 } PROCESSOR_NUMBER, *PPROCESSOR_NUMBER;
585
586 struct _CONTEXT;
587 struct _EXCEPTION_RECORD;
588
589 typedef EXCEPTION_DISPOSITION
590 (NTAPI *PEXCEPTION_ROUTINE)(
591 IN struct _EXCEPTION_RECORD *ExceptionRecord,
592 IN PVOID EstablisherFrame,
593 IN OUT struct _CONTEXT *ContextRecord,
594 IN OUT PVOID DispatcherContext);
595
596 typedef struct _GROUP_AFFINITY {
597 KAFFINITY Mask;
598 USHORT Group;
599 USHORT Reserved[3];
600 } GROUP_AFFINITY, *PGROUP_AFFINITY;
601
602 /* Helper Macros */
603 #define RTL_CONSTANT_STRING(s) { sizeof(s)-sizeof((s)[0]), sizeof(s), s }
604
605 #define RTL_FIELD_SIZE(type, field) (sizeof(((type *)0)->field))
606
607 #define RTL_NUMBER_OF_V1(A) (sizeof(A)/sizeof((A)[0]))
608 #define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
609 #ifdef ENABLE_RTL_NUMBER_OF_V2
610 #define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V2(A)
611 #else
612 #define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V1(A)
613 #endif
614 #define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
615
616 /* Type Limits */
617 #define MINCHAR 0x80
618 #define MAXCHAR 0x7f
619 #define MINSHORT 0x8000
620 #define MAXSHORT 0x7fff
621 #define MINLONG 0x80000000
622 #define MAXLONG 0x7fffffff
623 #define MAXUCHAR 0xff
624 #define MAXUSHORT 0xffff
625 #define MAXULONG 0xffffffff
626 #define MAXLONGLONG (0x7fffffffffffffffLL)
627
628 /* Multiplication and Shift Operations */
629 #define Int32x32To64(a,b) ((LONGLONG)(a)*(LONGLONG)(b))
630 #define UInt32x32To64(a,b) ((DWORDLONG)(a)*(DWORDLONG)(b))
631 #define Int64ShllMod32(a,b) ((DWORDLONG)(a)<<(b))
632 #define Int64ShraMod32(a,b) ((LONGLONG)(a)>>(b))
633 #define Int64ShrlMod32(a,b) ((DWORDLONG)(a)>>(b))
634
635 /* C_ASSERT Definition */
636 #define C_ASSERT(expr) extern char (*c_assert(void)) [(expr) ? 1 : -1]
637
638 /* Primary language IDs. */
639 #define LANG_NEUTRAL 0x00
640 #define LANG_INVARIANT 0x7f
641
642 #define LANG_AFRIKAANS 0x36
643 #define LANG_ALBANIAN 0x1c
644 #define LANG_ALSATIAN 0x84
645 #define LANG_AMHARIC 0x5e
646 #define LANG_ARABIC 0x01
647 #define LANG_ARMENIAN 0x2b
648 #define LANG_ASSAMESE 0x4d
649 #define LANG_AZERI 0x2c
650 #define LANG_BASHKIR 0x6d
651 #define LANG_BASQUE 0x2d
652 #define LANG_BELARUSIAN 0x23
653 #define LANG_BENGALI 0x45
654 #define LANG_BRETON 0x7e
655 #define LANG_BOSNIAN 0x1a
656 #define LANG_BOSNIAN_NEUTRAL 0x781a
657 #define LANG_BULGARIAN 0x02
658 #define LANG_CATALAN 0x03
659 #define LANG_CHINESE 0x04
660 #define LANG_CHINESE_SIMPLIFIED 0x04
661 #define LANG_CHINESE_TRADITIONAL 0x7c04
662 #define LANG_CORSICAN 0x83
663 #define LANG_CROATIAN 0x1a
664 #define LANG_CZECH 0x05
665 #define LANG_DANISH 0x06
666 #define LANG_DARI 0x8c
667 #define LANG_DIVEHI 0x65
668 #define LANG_DUTCH 0x13
669 #define LANG_ENGLISH 0x09
670 #define LANG_ESTONIAN 0x25
671 #define LANG_FAEROESE 0x38
672 #define LANG_FARSI 0x29
673 #define LANG_FILIPINO 0x64
674 #define LANG_FINNISH 0x0b
675 #define LANG_FRENCH 0x0c
676 #define LANG_FRISIAN 0x62
677 #define LANG_GALICIAN 0x56
678 #define LANG_GEORGIAN 0x37
679 #define LANG_GERMAN 0x07
680 #define LANG_GREEK 0x08
681 #define LANG_GREENLANDIC 0x6f
682 #define LANG_GUJARATI 0x47
683 #define LANG_HAUSA 0x68
684 #define LANG_HEBREW 0x0d
685 #define LANG_HINDI 0x39
686 #define LANG_HUNGARIAN 0x0e
687 #define LANG_ICELANDIC 0x0f
688 #define LANG_IGBO 0x70
689 #define LANG_INDONESIAN 0x21
690 #define LANG_INUKTITUT 0x5d
691 #define LANG_IRISH 0x3c
692 #define LANG_ITALIAN 0x10
693 #define LANG_JAPANESE 0x11
694 #define LANG_KANNADA 0x4b
695 #define LANG_KASHMIRI 0x60
696 #define LANG_KAZAK 0x3f
697 #define LANG_KHMER 0x53
698 #define LANG_KICHE 0x86
699 #define LANG_KINYARWANDA 0x87
700 #define LANG_KONKANI 0x57
701 #define LANG_KOREAN 0x12
702 #define LANG_KYRGYZ 0x40
703 #define LANG_LAO 0x54
704 #define LANG_LATVIAN 0x26
705 #define LANG_LITHUANIAN 0x27
706 #define LANG_LOWER_SORBIAN 0x2e
707 #define LANG_LUXEMBOURGISH 0x6e
708 #define LANG_MACEDONIAN 0x2f
709 #define LANG_MALAY 0x3e
710 #define LANG_MALAYALAM 0x4c
711 #define LANG_MALTESE 0x3a
712 #define LANG_MANIPURI 0x58
713 #define LANG_MAORI 0x81
714 #define LANG_MAPUDUNGUN 0x7a
715 #define LANG_MARATHI 0x4e
716 #define LANG_MOHAWK 0x7c
717 #define LANG_MONGOLIAN 0x50
718 #define LANG_NEPALI 0x61
719 #define LANG_NORWEGIAN 0x14
720 #define LANG_OCCITAN 0x82
721 #define LANG_ORIYA 0x48
722 #define LANG_PASHTO 0x63
723 #define LANG_PERSIAN 0x29
724 #define LANG_POLISH 0x15
725 #define LANG_PORTUGUESE 0x16
726 #define LANG_PUNJABI 0x46
727 #define LANG_QUECHUA 0x6b
728 #define LANG_ROMANIAN 0x18
729 #define LANG_ROMANSH 0x17
730 #define LANG_RUSSIAN 0x19
731 #define LANG_SAMI 0x3b
732 #define LANG_SANSKRIT 0x4f
733 #define LANG_SERBIAN 0x1a
734 #define LANG_SERBIAN_NEUTRAL 0x7c1a
735 #define LANG_SINDHI 0x59
736 #define LANG_SINHALESE 0x5b
737 #define LANG_SLOVAK 0x1b
738 #define LANG_SLOVENIAN 0x24
739 #define LANG_SOTHO 0x6c
740 #define LANG_SPANISH 0x0a
741 #define LANG_SWAHILI 0x41
742 #define LANG_SWEDISH 0x1d
743 #define LANG_SYRIAC 0x5a
744 #define LANG_TAJIK 0x28
745 #define LANG_TAMAZIGHT 0x5f
746 #define LANG_TAMIL 0x49
747 #define LANG_TATAR 0x44
748 #define LANG_TELUGU 0x4a
749 #define LANG_THAI 0x1e
750 #define LANG_TIBETAN 0x51
751 #define LANG_TIGRIGNA 0x73
752 #define LANG_TSWANA 0x32
753 #define LANG_TURKISH 0x1f
754 #define LANG_TURKMEN 0x42
755 #define LANG_UIGHUR 0x80
756 #define LANG_UKRAINIAN 0x22
757 #define LANG_UPPER_SORBIAN 0x2e
758 #define LANG_URDU 0x20
759 #define LANG_UZBEK 0x43
760 #define LANG_VIETNAMESE 0x2a
761 #define LANG_WELSH 0x52
762 #define LANG_WOLOF 0x88
763 #define LANG_XHOSA 0x34
764 #define LANG_YAKUT 0x85
765 #define LANG_YI 0x78
766 #define LANG_YORUBA 0x6a
767 #define LANG_ZULU 0x35
768
769 #define VER_WORKSTATION_NT 0x40000000
770 #define VER_SERVER_NT 0x80000000
771
772 #define VER_SUITE_SMALLBUSINESS 1
773 #define VER_SUITE_ENTERPRISE 2
774 #define VER_SUITE_BACKOFFICE 4
775 #define VER_SUITE_COMMUNICATIONS 8
776 #define VER_SUITE_TERMINAL 16
777 #define VER_SUITE_SMALLBUSINESS_RESTRICTED 32
778 #define VER_SUITE_EMBEDDEDNT 64
779 #define VER_SUITE_DATACENTER 128
780 #define VER_SUITE_SINGLEUSERTS 256
781 #define VER_SUITE_PERSONAL 512
782 #define VER_SUITE_BLADE 1024
783 #define VER_SUITE_EMBEDDED_RESTRICTED 2048
784 #define VER_SUITE_SECURITY_APPLIANCE 4096
785 #define VER_SUITE_STORAGE_SERVER 8192
786 #define VER_SUITE_COMPUTE_SERVER 16384
787 #define VER_SUITE_WH_SERVER 32768
788
789 #endif /* _NTDEF_ */