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