4 * This file is part of the ReactOS PSDK package.
7 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
9 * THIS SOFTWARE IS NOT COPYRIGHTED
11 * This source code is offered for use in the public domain. You may
12 * use, modify or distribute it freely.
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.
30 #include <sdkddkver.h>
31 #include <specstrings.h>
32 #include <kernelspecs.h>
38 /* Default to strict */
45 /* Pseudo Modifiers for Input Parameters */
67 /* Constant modifier */
82 #define NULL ((void *)0)
83 #define NULL64 ((void * POINTER_64)0)
87 /* Defines the "size" of an any-size array */
89 #define ANYSIZE_ARRAY 1
92 /* Helper macro to enable gcc's extension. */
93 #ifndef __GNU_EXTENSION
95 #define __GNU_EXTENSION __extension__
97 #define __GNU_EXTENSION
101 #ifndef DUMMYUNIONNAME
102 #if defined(NONAMELESSUNION)// || !defined(_MSC_EXTENSIONS)
103 #define _ANONYMOUS_UNION
104 #define _UNION_NAME(x) x
105 #define DUMMYUNIONNAME u
106 #define DUMMYUNIONNAME1 u1
107 #define DUMMYUNIONNAME2 u2
108 #define DUMMYUNIONNAME3 u3
109 #define DUMMYUNIONNAME4 u4
110 #define DUMMYUNIONNAME5 u5
111 #define DUMMYUNIONNAME6 u6
112 #define DUMMYUNIONNAME7 u7
113 #define DUMMYUNIONNAME8 u8
114 #define DUMMYUNIONNAME9 u9
116 #define _ANONYMOUS_UNION __GNU_EXTENSION
117 #define _UNION_NAME(x)
118 #define DUMMYUNIONNAME
119 #define DUMMYUNIONNAME1
120 #define DUMMYUNIONNAME2
121 #define DUMMYUNIONNAME3
122 #define DUMMYUNIONNAME4
123 #define DUMMYUNIONNAME5
124 #define DUMMYUNIONNAME6
125 #define DUMMYUNIONNAME7
126 #define DUMMYUNIONNAME8
127 #define DUMMYUNIONNAME9
128 #endif /* NONAMELESSUNION */
129 #endif /* !DUMMYUNIONNAME */
131 #ifndef DUMMYSTRUCTNAME
132 #if defined(NONAMELESSUNION)// || !defined(_MSC_EXTENSIONS)
133 #define _ANONYMOUS_STRUCT
134 #define _STRUCT_NAME(x) x
135 #define DUMMYSTRUCTNAME s
136 #define DUMMYSTRUCTNAME1 s1
137 #define DUMMYSTRUCTNAME2 s2
138 #define DUMMYSTRUCTNAME3 s3
139 #define DUMMYSTRUCTNAME4 s4
140 #define DUMMYSTRUCTNAME5 s5
142 #define _ANONYMOUS_STRUCT __GNU_EXTENSION
143 #define _STRUCT_NAME(x)
144 #define DUMMYSTRUCTNAME
145 #define DUMMYSTRUCTNAME1
146 #define DUMMYSTRUCTNAME2
147 #define DUMMYSTRUCTNAME3
148 #define DUMMYSTRUCTNAME4
149 #define DUMMYSTRUCTNAME5
150 #endif /* NONAMELESSUNION */
151 #endif /* DUMMYSTRUCTNAME */
153 #if defined(STRICT_GS_ENABLED)
154 #pragma strict_gs_check(push, on)
157 #if defined(_M_MRX000) || defined(_M_ALPHA) || defined(_M_PPC) || defined(_M_IA64) || defined(_M_AMD64) || defined(_M_ARM)
158 #define ALIGNMENT_MACHINE
159 #define UNALIGNED __unaligned
161 #define UNALIGNED64 __unaligned
166 #undef ALIGNMENT_MACHINE
171 #if defined(_WIN64) || defined(_M_ALPHA)
172 #define MAX_NATURAL_ALIGNMENT sizeof(ULONGLONG)
173 #define MEMORY_ALLOCATION_ALIGNMENT 16
175 #define MAX_NATURAL_ALIGNMENT sizeof(ULONG)
176 #define MEMORY_ALLOCATION_ALIGNMENT 8
179 /* C99 restrict support */
180 #if defined(ENABLE_RESTRICTED) && defined(_M_MRX000) && !defined(MIDL_PASS) && !defined(RC_INVOKED)
181 #define RESTRICTED_POINTER __restrict
183 #define RESTRICTED_POINTER
186 #define ARGUMENT_PRESENT(ArgumentPointer) \
187 ((CHAR*)((ULONG_PTR)(ArgumentPointer)) != (CHAR*)NULL)
189 /* Returns the base address of a structure from a structure member */
190 #ifndef CONTAINING_RECORD
191 #define CONTAINING_RECORD(address, type, field) \
192 ((type *)(((ULONG_PTR)address) - (ULONG_PTR)(&(((type *)0)->field))))
195 /* Returns the byte offset of the specified structure's member */
197 #define FIELD_OFFSET(Type, Field) ((LONG)(LONG_PTR)&(((Type*) 0)->Field))
199 #define FIELD_OFFSET(Type, Field) ((LONG)__builtin_offsetof(Type, Field))
202 /* Returns the type's alignment */
203 #if defined(_MSC_VER)
204 #define TYPE_ALIGNMENT(t) __alignof(t)
206 #define TYPE_ALIGNMENT(t) FIELD_OFFSET(struct { char x; t test; }, test)
209 #if defined(_AMD64_) || defined(_X86_)
210 #define PROBE_ALIGNMENT(_s) TYPE_ALIGNMENT(ULONG)
211 #elif defined(_IA64_) || defined(_ARM_)
212 #define PROBE_ALIGNMENT(_s) max((TYPE_ALIGNMENT(_s), TYPE_ALIGNMENT(ULONG))
214 #error "unknown architecture"
218 #define PROBE_ALIGNMENT32(_s) TYPE_ALIGNMENT(ULONG)
222 #define EXTERN_C extern "C"
224 #define EXTERN_C extern
227 /* Calling Conventions */
228 #if defined(_MANAGED)
229 #define FASTCALL __stdcall
230 #elif defined(_M_IX86)
231 #define FASTCALL __fastcall
236 #define NTAPI __stdcall
238 #ifndef STDMETHODCALLTYPE
239 #define STDMETHODCALLTYPE __stdcall
240 #define STDMETHODVCALLTYPE __cdecl
241 #define STDAPICALLTYPE __stdcall
242 #define STDAPIVCALLTYPE __cdecl
243 #define STDAPI EXTERN_C HRESULT STDAPICALLTYPE
244 #define STDAPI_(t) EXTERN_C t STDAPICALLTYPE
245 #define STDMETHODIMP HRESULT STDMETHODCALLTYPE
246 #define STDMETHODIMP_(t) t STDMETHODCALLTYPE
247 #define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE
248 #define STDAPIV_(t) EXTERN_C t STDAPIVCALLTYPE
249 #define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE
250 #define STDMETHODIMPV_(t) t STDMETHODVCALLTYPE
251 #endif /* !STDMETHODCALLTYPE */
253 #define STDOVERRIDEMETHODIMP __override STDMETHODIMP
254 #define STDOVERRIDEMETHODIMP_(t) __override STDMETHODIMP_(t)
255 #define IFACEMETHODIMP __override STDMETHODIMP
256 #define IFACEMETHODIMP_(t) __override STDMETHODIMP_(t)
257 #define STDOVERRIDEMETHODIMPV __override STDMETHODIMPV
258 #define STDOVERRIDEMETHODIMPV_(t) __override STDMETHODIMPV_(t)
259 #define IFACEMETHODIMPV __override STDMETHODIMPV
260 #define IFACEMETHODIMPV_(t) __override STDMETHODIMPV_(t)
262 /* Import and Export Specifiers */
264 /* Done the same way as in windef.h for now */
265 #define DECLSPEC_IMPORT __declspec(dllimport)
266 #define DECLSPEC_NORETURN __declspec(noreturn)
268 #ifndef DECLSPEC_ADDRSAFE
269 #if defined(_MSC_VER) && (defined(_M_ALPHA) || defined(_M_AXP64))
270 #define DECLSPEC_ADDRSAFE __declspec(address_safe)
272 #define DECLSPEC_ADDRSAFE
274 #endif /* DECLSPEC_ADDRSAFE */
276 #ifndef DECLSPEC_NOTHROW
277 #if !defined(MIDL_PASS)
278 #define DECLSPEC_NOTHROW __declspec(nothrow)
280 #define DECLSPEC_NOTHROW
285 #if defined(_MSC_VER)
286 #define NOP_FUNCTION __noop
288 #define NOP_FUNCTION (void)0
292 #if !defined(_NTSYSTEM_)
293 #define NTSYSAPI DECLSPEC_IMPORT
294 #define NTSYSCALLAPI DECLSPEC_IMPORT
297 #if defined(_NTDLLBUILD_)
300 #define NTSYSCALLAPI DECLSPEC_ADDRSAFE
306 # if defined(_MSC_VER)
307 # define FORCEINLINE __forceinline
308 # elif ( __MINGW_GNUC_PREREQ(4, 3) && __STDC_VERSION__ >= 199901L)
309 # define FORCEINLINE extern inline __attribute__((__always_inline__,__gnu_inline__))
311 # define FORCEINLINE extern __inline__ __attribute__((__always_inline__))
313 #endif /* FORCEINLINE */
315 #ifndef DECLSPEC_NOINLINE
316 # if (_MSC_VER >= 1300)
317 # define DECLSPEC_NOINLINE __declspec(noinline)
318 # elif defined(__GNUC__)
319 # define DECLSPEC_NOINLINE __attribute__((noinline))
321 # define DECLSPEC_NOINLINE
323 #endif /* DECLSPEC_NOINLINE */
325 #if !defined(_M_CEE_PURE)
326 # define NTAPI_INLINE NTAPI
328 # define NTAPI_INLINE
331 /* Use to specify structure alignment. Note: VS and GCC behave slightly
332 different. Therefore it is important to stick to the following rules:
333 - If you want a struct to be aligned, put DECLSPEC_ALIGN after "struct":
334 "typedef struct DECLSPEC_ALIGN(16) _FOO { ... } FOO, *PFOO;"
335 _alignof(PFOO) is sizeof(void*) here as usual.
336 - If you don't want the struct, but only the typedef to be aligned,
337 use an extra typedef.
339 typedef DECLSPEC_ALIGN(16) struct _BAR BAR, *ALIGNEDPBAR;
340 _alignof(ALIGNEDPBAR) is 16 now! */
341 #ifndef DECLSPEC_ALIGN
342 # if defined(_MSC_VER) && !defined(MIDL_PASS)
343 # define DECLSPEC_ALIGN(x) __declspec(align(x))
344 # elif defined(__GNUC__)
345 # define DECLSPEC_ALIGN(x) __attribute__ ((__aligned__(x)))
347 # define DECLSPEC_ALIGN(x)
349 #endif /* DECLSPEC_ALIGN */
351 #ifndef SYSTEM_CACHE_ALIGNMENT_SIZE
352 # if defined(_AMD64_) || defined(_X86_)
353 # define SYSTEM_CACHE_ALIGNMENT_SIZE 64
355 # define SYSTEM_CACHE_ALIGNMENT_SIZE 128
359 #ifndef DECLSPEC_CACHEALIGN
360 # define DECLSPEC_CACHEALIGN DECLSPEC_ALIGN(SYSTEM_CACHE_ALIGNMENT_SIZE)
363 #ifndef DECLSPEC_UUID
364 # if defined(_MSC_VER) && defined(__cplusplus)
365 # define DECLSPEC_UUID(x) __declspec(uuid(x))
367 # define DECLSPEC_UUID(x)
371 #ifndef DECLSPEC_NOVTABLE
372 # if defined(_MSC_VER) && defined(__cplusplus)
373 # define DECLSPEC_NOVTABLE __declspec(novtable)
375 # define DECLSPEC_NOVTABLE
379 #ifndef DECLSPEC_SELECTANY
380 # if defined(_MSC_VER) || defined(__GNUC__)
381 # define DECLSPEC_SELECTANY __declspec(selectany)
383 # define DECLSPEC_SELECTANY
387 #ifndef DECLSPEC_DEPRECATED
388 # if (defined(_MSC_VER) || defined(__GNUC__)) && !defined(MIDL_PASS)
389 # define DECLSPEC_DEPRECATED __declspec(deprecated)
390 # define DEPRECATE_SUPPORTED
392 # define DECLSPEC_DEPRECATED
393 # undef DEPRECATE_SUPPORTED
397 #ifdef DEPRECATE_DDK_FUNCTIONS
399 # define DECLSPEC_DEPRECATED_DDK DECLSPEC_DEPRECATED
400 # ifdef DEPRECATE_SUPPORTED
401 # define PRAGMA_DEPRECATED_DDK 1
404 # define DECLSPEC_DEPRECATED_DDK
405 # define PRAGMA_DEPRECATED_DDK 1
408 # define DECLSPEC_DEPRECATED_DDK
409 # define PRAGMA_DEPRECATED_DDK 0
412 /* Use to silence unused variable warnings when it is intentional */
413 #define UNREFERENCED_PARAMETER(P) {(P)=(P);}
414 #define UNREFERENCED_LOCAL_VARIABLE(L) ((void)(L))
415 #define DBG_UNREFERENCED_PARAMETER(P) {(P)=(P);}
416 #define DBG_UNREFERENCED_LOCAL_VARIABLE(L) ((void)(L))
418 /* min/max helper macros */
421 # define min(a,b) (((a) < (b)) ? (a) : (b))
424 # define max(a,b) (((a) > (b)) ? (a) : (b))
426 #endif /* NOMINMAX */
428 /* Tell windef.h that we have defined some basic types */
433 typedef void * POINTER_64 PVOID64
;
436 typedef void *HANDLE
, **PHANDLE
;;
438 # define DECLARE_HANDLE(n) typedef struct n##__{int unused;} *n
440 # define DECLARE_HANDLE(n) typedef HANDLE n
443 /* Upper-Case Versions of Some Standard C Types */
449 # if defined(__ROS_LONG64__) && !defined(_M_AMD64)
455 # if !defined(MIDL_PASS)
457 # endif /* !MIDL_PASS */
460 /* Avoid redefinition in windef.h */
464 typedef unsigned char UCHAR
, *PUCHAR
;
465 typedef unsigned short USHORT
, *PUSHORT
;
466 typedef unsigned long ULONG
, *PULONG
;
468 typedef CONST UCHAR
*PCUCHAR
;
469 typedef CONST USHORT
*PCUSHORT
;
470 typedef CONST ULONG
*PCULONG
;
472 typedef double DOUBLE
;
475 typedef SHORT
*PSHORT
;
479 typedef unsigned char FCHAR
;
480 typedef unsigned short FSHORT
;
481 typedef unsigned long FLONG
;
483 typedef unsigned char BOOLEAN
, *PBOOLEAN
;
484 typedef ULONG LOGICAL
, *PLOGICAL
;
485 typedef _Return_type_success_(return >= 0) LONG NTSTATUS
, *PNTSTATUS
;;
486 typedef signed char SCHAR
, *PSCHAR
;
488 #ifndef _HRESULT_DEFINED
489 # define _HRESULT_DEFINED
490 typedef _Return_type_success_(return >= 0) LONG HRESULT
;
495 __GNU_EXTENSION
typedef __int64 LONGLONG
, *PLONGLONG
;
496 __GNU_EXTENSION
typedef unsigned __int64 ULONGLONG
, *PULONGLONG
;
498 typedef ULONGLONG DWORDLONG
, *PDWORDLONG
;
500 /* Update Sequence Number */
501 typedef LONGLONG USN
;
503 /* ANSI (Multi-byte Character) types */
504 typedef CHAR
*PCHAR
, *LPCH
, *PCH
, *PNZCH
;
505 typedef CONST CHAR
*LPCCH
, *PCCH
, *PCNZCH
;
506 typedef _Null_terminated_ CHAR
*NPSTR
, *LPSTR
, *PSTR
;
507 typedef _Null_terminated_ PSTR
*PZPSTR
;
508 typedef _Null_terminated_ CONST PSTR
*PCZPSTR
;
509 typedef _Null_terminated_ CONST CHAR
*LPCSTR
, *PCSTR
;
510 typedef _Null_terminated_ PCSTR
*PZPCSTR
;
512 typedef _NullNull_terminated_ CHAR
*PZZSTR
;
513 typedef _NullNull_terminated_ CONST CHAR
*PCZZSTR
;
515 /* Pointer to an Asciiz string */
516 typedef _Null_terminated_ CHAR
*PSZ
;
517 typedef _Null_terminated_ CONST
char *PCSZ
;
519 /* UNICODE (Wide Character) types */
520 typedef wchar_t WCHAR
;
521 typedef WCHAR
*PWCHAR
, *LPWCH
, *PWCH
;
522 typedef CONST WCHAR
*LPCWCH
, *PCWCH
;
523 typedef _Null_terminated_ WCHAR
*NWPSTR
, *LPWSTR
, *PWSTR
;
524 typedef _Null_terminated_ PWSTR
*PZPWSTR
;
525 typedef _Null_terminated_ CONST PWSTR
*PCZPWSTR
;
526 typedef _Null_terminated_ WCHAR UNALIGNED
*LPUWSTR
, *PUWSTR
;
527 typedef _Null_terminated_ CONST WCHAR
*LPCWSTR
, *PCWSTR
;
528 typedef _Null_terminated_ PCWSTR
*PZPCWSTR
;
529 typedef _Null_terminated_ CONST WCHAR UNALIGNED
*LPCUWSTR
, *PCUWSTR
;
531 typedef _NullNull_terminated_ WCHAR
*PZZWSTR
;
532 typedef _NullNull_terminated_ CONST WCHAR
*PCZZWSTR
;
533 typedef _NullNull_terminated_ WCHAR UNALIGNED
*PUZZWSTR
;
534 typedef _NullNull_terminated_ CONST WCHAR UNALIGNED
*PCUZZWSTR
;
536 typedef WCHAR
*PNZWCH
;
537 typedef CONST WCHAR
*PCNZWCH
;
538 typedef WCHAR UNALIGNED
*PUNZWCH
;
539 typedef CONST WCHAR UNALIGNED
*PCUNZWCH
;
541 #if (_WIN32_WINNT >= 0x0600) || (defined(__cplusplus) && defined(WINDOWS_ENABLE_CPLUSPLUS))
542 typedef CONST WCHAR
*LPCWCHAR
, *PCWCHAR
;
543 typedef CONST WCHAR UNALIGNED
*LPCUWCHAR
, *PCUWCHAR
;
544 typedef unsigned long UCSCHAR
, *PUCSCHAR
, *PUCSSTR
;
545 typedef const UCSCHAR
*PCUCSCHAR
, *PCUCSSTR
;
546 typedef UCSCHAR UNALIGNED
*PUUCSCHAR
, *PUUCSSTR
;
547 typedef const UCSCHAR UNALIGNED
*PCUUCSCHAR
, *PCUUCSSTR
;
548 # define UCSCHAR_INVALID_CHARACTER (0xffffffff)
549 # define MIN_UCSCHAR (0)
550 # define MAX_UCSCHAR (0x0010FFFF)
551 #endif /* _WIN32_WINNT >= 0x0600 */
555 # ifndef _TCHAR_DEFINED
556 typedef WCHAR TCHAR
, *PTCHAR
;
557 typedef WCHAR TUCHAR
, *PTUCHAR
;
558 # define _TCHAR_DEFINED
559 # endif /* !_TCHAR_DEFINED */
561 typedef LPWCH LPTCH
, PTCH
;
562 typedef LPCWCH LPCTCH
, PCTCH
;
563 typedef LPWSTR PTSTR
, LPTSTR
;
564 typedef LPCWSTR PCTSTR
, LPCTSTR
;
565 typedef LPUWSTR PUTSTR
, LPUTSTR
;
566 typedef LPCUWSTR PCUTSTR
, LPCUTSTR
;
568 typedef PZZWSTR PZZTSTR
;
569 typedef PCZZWSTR PCZZTSTR
;
570 typedef PUZZWSTR PUZZTSTR
;
571 typedef PCUZZWSTR PCUZZTSTR
;
572 typedef PZPWSTR PZPTSTR
;
573 typedef PNZWCH PNZTCH
;
574 typedef PCNZWCH PCNZTCH
;
575 typedef PUNZWCH PUNZTCH
;
576 typedef PCUNZWCH PCUNZTCH
;
577 # define __TEXT(quote) L##quote
581 # ifndef _TCHAR_DEFINED
582 typedef char TCHAR
, *PTCHAR
;
583 typedef unsigned char TUCHAR
, *PTUCHAR
;
584 # define _TCHAR_DEFINED
585 # endif /* !_TCHAR_DEFINED */
586 typedef LPCH LPTCH
, PTCH
;
587 typedef LPCCH LPCTCH
, PCTCH
;
588 typedef LPSTR PTSTR
, LPTSTR
, PUTSTR
, LPUTSTR
;
589 typedef LPCSTR PCTSTR
, LPCTSTR
, PCUTSTR
, LPCUTSTR
;
590 typedef PZZSTR PZZTSTR
, PUZZTSTR
;
591 typedef PCZZSTR PCZZTSTR
, PCUZZTSTR
;
592 typedef PZPSTR PZPTSTR
;
593 typedef PNZCH PNZTCH
, PUNZTCH
;
594 typedef PCNZCH PCNZTCH
, PCUNZTCH
;
595 #define __TEXT(quote) quote
599 #define TEXT(quote) __TEXT(quote)
601 /* Cardinal Data Types */
603 typedef CCHAR
*PCCHAR
;
604 typedef short CSHORT
, *PCSHORT
;
605 typedef ULONG CLONG
, *PCLONG
;
607 /* NLS basics (Locale and Language Ids) */
608 typedef ULONG LCID
, *PLCID
;
609 typedef USHORT LANGID
;
611 #ifndef __COMPARTMENT_ID_DEFINED__
612 # define __COMPARTMENT_ID_DEFINED__
615 UNSPECIFIED_COMPARTMENT_ID
= 0,
616 DEFAULT_COMPARTMENT_ID
617 } COMPARTMENT_ID
, *PCOMPARTMENT_ID
;
618 #endif /* __COMPARTMENT_ID_DEFINED__ */
620 #ifndef __OBJECTID_DEFINED
621 # define __OBJECTID_DEFINED
622 typedef struct _OBJECTID
{
629 #pragma warning(push)
630 #pragma warning(disable:4201)
633 /* Used to store a non-float 8 byte aligned structure */
636 _ANONYMOUS_UNION
union
638 __GNU_EXTENSION __int64 UseThisFieldToCopy
;
639 double DoNotUseThisField
;
641 } QUAD
, *PQUAD
, UQUAD
, *PUQUAD
;
651 typedef FLOAT128
*PFLOAT128
;
653 /* Large Integer Unions */
654 #if defined(MIDL_PASS)
655 typedef struct _LARGE_INTEGER
{
657 typedef union _LARGE_INTEGER
{
658 _ANONYMOUS_STRUCT
struct
668 #endif /* MIDL_PASS */
670 } LARGE_INTEGER
, *PLARGE_INTEGER
;
672 #if defined(MIDL_PASS)
673 typedef struct _ULARGE_INTEGER
{
675 typedef union _ULARGE_INTEGER
{
676 _ANONYMOUS_STRUCT
struct
686 #endif /* MIDL_PASS */
688 } ULARGE_INTEGER
, *PULARGE_INTEGER
;
691 #pragma warning(pop) /* disable:4201 */
694 /* Physical Addresses are always treated as 64-bit wide */
695 typedef LARGE_INTEGER PHYSICAL_ADDRESS
, *PPHYSICAL_ADDRESS
;
697 /* Locally Unique Identifier */
698 typedef struct _LUID
{
703 #define APPLICATION_ERROR_MASK 0x20000000
704 #define ERROR_SEVERITY_SUCCESS 0x00000000
705 #define ERROR_SEVERITY_INFORMATIONAL 0x40000000
706 #define ERROR_SEVERITY_WARNING 0x80000000
707 #define ERROR_SEVERITY_ERROR 0xC0000000
709 /* Native API Return Value Macros */
710 #define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0)
711 #define NT_INFORMATION(Status) ((((ULONG)(Status)) >> 30) == 1)
712 #define NT_WARNING(Status) ((((ULONG)(Status)) >> 30) == 2)
713 #define NT_ERROR(Status) ((((ULONG)(Status)) >> 30) == 3)
716 typedef struct _STRING
{
718 USHORT MaximumLength
;
720 [size_is(MaximumLength
), length_is(Length
) ]
722 _Field_size_bytes_part_opt_(MaximumLength
, Length
) PCHAR Buffer
;
724 ANSI_STRING
, *PANSI_STRING
,
725 OEM_STRING
, *POEM_STRING
;
727 typedef CONST STRING
* PCOEM_STRING
;
728 typedef STRING CANSI_STRING
;
729 typedef PSTRING PCANSI_STRING
;
731 typedef struct _STRING32
{
733 USHORT MaximumLength
;
735 } STRING32
, *PSTRING32
,
736 UNICODE_STRING32
, *PUNICODE_STRING32
,
737 ANSI_STRING32
, *PANSI_STRING32
;
739 typedef struct _STRING64
{
741 USHORT MaximumLength
;
743 } STRING64
, *PSTRING64
,
744 UNICODE_STRING64
, *PUNICODE_STRING64
,
745 ANSI_STRING64
, *PANSI_STRING64
;
747 typedef struct _CSTRING
{
749 USHORT MaximumLength
;
751 } CSTRING
, *PCSTRING
;
753 typedef struct _UNICODE_STRING
{
755 USHORT MaximumLength
;
757 [size_is(MaximumLength
/ 2), length_is((Length
) / 2)] PUSHORT Buffer
;
759 _Field_size_bytes_part_(MaximumLength
, Length
) PWCH Buffer
;
761 } UNICODE_STRING
, *PUNICODE_STRING
;
762 typedef const UNICODE_STRING
* PCUNICODE_STRING
;
764 typedef USHORT RTL_STRING_LENGTH_TYPE
;
767 extern "C++" template<typename _Type
> struct _RTL_remove_const_template
;
768 extern "C++" template<typename _Type
> struct _RTL_remove_const_template
<const _Type
&> { typedef _Type type
; };
769 #define _RTL_CONSTANT_STRING_remove_const_macro(s) \
770 (const_cast<_RTL_remove_const_template<decltype((s)[0])>::type*>(s))
771 extern "C++" template<class _Ty
> struct _RTL_CONSTANT_STRING_type_check_template
;
772 extern "C++" template<class _Ty
, int _Count
> struct _RTL_CONSTANT_STRING_type_check_template
<const _Ty (&)[_Count
]> { typedef char type
; };
773 #define _RTL_CONSTANT_STRING_type_check(s) _RTL_CONSTANT_STRING_type_check_template<decltype(s)>::type
775 # define _RTL_CONSTANT_STRING_remove_const_macro(s) (s)
776 char _RTL_CONSTANT_STRING_type_check(const void *s
);
778 #define RTL_CONSTANT_STRING(s) { \
779 sizeof(s)-sizeof((s)[0]), \
780 sizeof(s) / sizeof(_RTL_CONSTANT_STRING_type_check(s)), \
781 _RTL_CONSTANT_STRING_remove_const_macro(s) }
783 #define DECLARE_UNICODE_STRING_SIZE(_var, _size) \
784 WCHAR _var ## _buffer[_size]; \
785 __pragma(warning(push)) __pragma(warning(disable:4221)) __pragma(warning(disable:4204)) \
786 UNICODE_STRING _var = { 0, (_size) * sizeof(WCHAR) , _var ## _buffer } \
787 __pragma(warning(pop))
789 #define DECLARE_CONST_UNICODE_STRING(_var, _string) \
790 const WCHAR _var##_buffer[] = _string; \
791 __pragma(warning(push)) __pragma(warning(disable:4221)) __pragma(warning(disable:4204)) \
792 const UNICODE_STRING _var = { sizeof(_string) - sizeof(WCHAR), sizeof(_string), (PWCH)_var##_buffer } \
793 __pragma(warning(pop))
795 #define DECLARE_GLOBAL_CONST_UNICODE_STRING(_var, _str) \
796 extern const __declspec(selectany) UNICODE_STRING _var = RTL_CONSTANT_STRING(_str)
798 #define ANSI_NULL ((CHAR)0)
799 #define UNICODE_NULL ((WCHAR)0)
800 #define UNICODE_STRING_MAX_BYTES ((USHORT) 65534)
801 #define UNICODE_STRING_MAX_CHARS (32767)
803 /* Object Attributes */
804 typedef struct _OBJECT_ATTRIBUTES
{
806 HANDLE RootDirectory
;
807 PUNICODE_STRING ObjectName
;
809 PVOID SecurityDescriptor
;
810 PVOID SecurityQualityOfService
;
811 } OBJECT_ATTRIBUTES
, *POBJECT_ATTRIBUTES
;
812 typedef CONST OBJECT_ATTRIBUTES
*PCOBJECT_ATTRIBUTES
;
814 typedef struct _OBJECT_ATTRIBUTES32
{
819 ULONG SecurityDescriptor
;
820 ULONG SecurityQualityOfService
;
821 } OBJECT_ATTRIBUTES32
, *POBJECT_ATTRIBUTES32
;
822 typedef CONST OBJECT_ATTRIBUTES32
*PCOBJECT_ATTRIBUTES32
;
824 typedef struct _OBJECT_ATTRIBUTES64
{
826 ULONG64 RootDirectory
;
829 ULONG64 SecurityDescriptor
;
830 ULONG64 SecurityQualityOfService
;
831 } OBJECT_ATTRIBUTES64
, *POBJECT_ATTRIBUTES64
;
832 typedef CONST OBJECT_ATTRIBUTES64
*PCOBJECT_ATTRIBUTES64
;
834 /* Values for the Attributes member */
835 #define OBJ_INHERIT 0x00000002L
836 #define OBJ_PERMANENT 0x00000010L
837 #define OBJ_EXCLUSIVE 0x00000020L
838 #define OBJ_CASE_INSENSITIVE 0x00000040L
839 #define OBJ_OPENIF 0x00000080L
840 #define OBJ_OPENLINK 0x00000100L
841 #define OBJ_KERNEL_HANDLE 0x00000200L
842 #define OBJ_FORCE_ACCESS_CHECK 0x00000400L
843 #define OBJ_VALID_ATTRIBUTES 0x000007F2L
846 #define InitializeObjectAttributes(p,n,a,r,s) { \
847 (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
848 (p)->RootDirectory = (r); \
849 (p)->ObjectName = (n); \
850 (p)->Attributes = (a); \
851 (p)->SecurityDescriptor = (s); \
852 (p)->SecurityQualityOfService = NULL; \
855 #define RTL_CONSTANT_OBJECT_ATTRIBUTES(n,a) { \
856 sizeof(OBJECT_ATTRIBUTES), \
858 RTL_CONST_CAST(PUNICODE_STRING)(n), \
864 #define RTL_INIT_OBJECT_ATTRIBUTES(n, a) \
865 RTL_CONSTANT_OBJECT_ATTRIBUTES(n, a)
868 typedef enum _NT_PRODUCT_TYPE
{
872 } NT_PRODUCT_TYPE
, *PNT_PRODUCT_TYPE
;
874 typedef enum _EVENT_TYPE
{
879 typedef enum _TIMER_TYPE
{
884 typedef enum _WAIT_TYPE
{
889 /* Doubly Linked Lists */
890 typedef struct _LIST_ENTRY
{
891 struct _LIST_ENTRY
*Flink
;
892 struct _LIST_ENTRY
*Blink
;
893 } LIST_ENTRY
, *PLIST_ENTRY
, *RESTRICTED_POINTER PRLIST_ENTRY
;
895 typedef struct LIST_ENTRY32
{
898 } LIST_ENTRY32
, *PLIST_ENTRY32
;
900 typedef struct LIST_ENTRY64
{
903 } LIST_ENTRY64
, *PLIST_ENTRY64
;
905 /* Singly Linked Lists */
906 typedef struct _SINGLE_LIST_ENTRY
{
907 struct _SINGLE_LIST_ENTRY
*Next
;
908 } SINGLE_LIST_ENTRY
, *PSINGLE_LIST_ENTRY
;
910 typedef struct _SINGLE_LIST_ENTRY32
{
912 } SINGLE_LIST_ENTRY32
, *PSINGLE_LIST_ENTRY32
;
914 typedef struct _PROCESSOR_NUMBER
{
918 } PROCESSOR_NUMBER
, *PPROCESSOR_NUMBER
;
920 #define ALL_PROCESSOR_GROUPS 0xffff
923 _Function_class_(EXCEPTION_ROUTINE
)
925 EXCEPTION_DISPOSITION
928 _Inout_
struct _EXCEPTION_RECORD
*ExceptionRecord
,
929 _In_ PVOID EstablisherFrame
,
930 _Inout_
struct _CONTEXT
*ContextRecord
,
931 _In_ PVOID DispatcherContext
);
933 typedef EXCEPTION_ROUTINE
*PEXCEPTION_ROUTINE
;
935 typedef struct _GROUP_AFFINITY
{
939 } GROUP_AFFINITY
, *PGROUP_AFFINITY
;
943 #define RTL_FIELD_TYPE(type, field) (((type*)0)->field)
944 #define RTL_BITS_OF(sizeOfArg) (sizeof(sizeOfArg) * 8)
945 #define RTL_BITS_OF_FIELD(type, field) (RTL_BITS_OF(RTL_FIELD_TYPE(type, field)))
946 #define RTL_FIELD_SIZE(type, field) (sizeof(((type *)0)->field))
948 #define RTL_SIZEOF_THROUGH_FIELD(type, field) \
949 (FIELD_OFFSET(type, field) + RTL_FIELD_SIZE(type, field))
951 #define RTL_CONTAINS_FIELD(Struct, Size, Field) \
952 ( (((PCHAR)(&(Struct)->Field)) + sizeof((Struct)->Field)) <= (((PCHAR)(Struct))+(Size)) )
954 #define RTL_NUMBER_OF_V1(A) (sizeof(A)/sizeof((A)[0]))
957 #define RTL_NUMBER_OF_V2(A) \
958 (({ int _check_array_type[__builtin_types_compatible_p(typeof(A), typeof(&A[0])) ? -1 : 1]; (void)_check_array_type; }), \
961 /// \todo implement security checks for cplusplus / MSVC
962 #define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
965 #ifdef ENABLE_RTL_NUMBER_OF_V2
966 #define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V2(A)
968 #define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V1(A)
971 #define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
972 #define _ARRAYSIZE(A) RTL_NUMBER_OF_V1(A)
974 #define RTL_NUMBER_OF_FIELD(type, field) \
975 (RTL_NUMBER_OF(RTL_FIELD_TYPE(type, field)))
977 #define RTL_PADDING_BETWEEN_FIELDS(type, field1, field2) \
978 ((FIELD_OFFSET(type, field2) > FIELD_OFFSET(type, field1)) \
979 ? (FIELD_OFFSET(type, field2) - FIELD_OFFSET(type, field1) - RTL_FIELD_SIZE(type, field1)) \
980 : (FIELD_OFFSET(type, field1) - FIELD_OFFSET(type, field2) - RTL_FIELD_SIZE(type, field2)))
982 #if defined(__cplusplus)
983 # define RTL_CONST_CAST(type) const_cast<type>
985 # define RTL_CONST_CAST(type) (type)
991 #define MINSHORT 0x8000
992 #define MAXSHORT 0x7fff
993 #define MINLONG 0x80000000
994 #define MAXLONG 0x7fffffff
995 #define MAXUCHAR 0xff
996 #define MAXUSHORT 0xffff
997 #define MAXULONG 0xffffffff
998 #define MAXLONGLONG (0x7fffffffffffffffLL)
1000 /* Multiplication and Shift Operations. Note: we don't use inline
1001 asm functions, the compiler can optimize this better. */
1002 #define Int32x32To64(a,b) (((__int64)(long)(a))*((__int64)(long)(b)))
1003 #define UInt32x32To64(a,b) ((unsigned __int64)(unsigned int)(a)*(unsigned __int64)(unsigned int)(b))
1005 #if defined(MIDL_PASS)|| defined(RC_INVOKED) || defined(_M_CEE_PURE)
1006 /* Use native math */
1007 # define Int64ShllMod32(a,b) ((unsigned __int64)(a)<<(b))
1008 # define Int64ShraMod32(a,b) (((__int64)(a))>>(b))
1009 # define Int64ShrlMod32(a,b) (((unsigned __int64)(a))>>(b))
1011 /* Use intrinsics */
1012 # define Int64ShllMod32(a,b) __ll_lshift(a,b)
1013 # define Int64ShraMod32(a,b) __ll_rshift(a,b)
1014 # define Int64ShrlMod32(a,b) __ull_rshift(a,b)
1017 #define RotateLeft32 _rotl
1018 #define RotateLeft64 _rotl64
1019 #define RotateRight32 _rotr
1020 #define RotateRight64 _rotr64
1022 #if defined(_M_AMD64)
1023 # define RotateLeft8 _rotl8
1024 # define RotateLeft16 _rotl16
1025 # define RotateRight8 _rotr8
1026 # define RotateRight16 _rotr16
1027 #endif /* _M_AMD64 */
1029 /* C_ASSERT Definition */
1030 #define C_ASSERT(expr) extern char (*c_assert(void)) [(expr) ? 1 : -1]
1032 /* Eliminate Microsoft C/C++ compiler warning 4715 */
1033 #if defined(_MSC_VER)
1034 # define DEFAULT_UNREACHABLE default: __assume(0)
1035 #elif defined(__clang__) || (defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5))))
1036 # define DEFAULT_UNREACHABLE default: __builtin_unreachable()
1038 # define DEFAULT_UNREACHABLE default: break
1041 #define VER_WORKSTATION_NT 0x40000000
1042 #define VER_SERVER_NT 0x80000000
1043 #define VER_SUITE_SMALLBUSINESS 0x00000001
1044 #define VER_SUITE_ENTERPRISE 0x00000002
1045 #define VER_SUITE_BACKOFFICE 0x00000004
1046 #define VER_SUITE_COMMUNICATIONS 0x00000008
1047 #define VER_SUITE_TERMINAL 0x00000010
1048 #define VER_SUITE_SMALLBUSINESS_RESTRICTED 0x00000020
1049 #define VER_SUITE_EMBEDDEDNT 0x00000040
1050 #define VER_SUITE_DATACENTER 0x00000080
1051 #define VER_SUITE_SINGLEUSERTS 0x00000100
1052 #define VER_SUITE_PERSONAL 0x00000200
1053 #define VER_SUITE_BLADE 0x00000400
1054 #define VER_SUITE_EMBEDDED_RESTRICTED 0x00000800
1055 #define VER_SUITE_SECURITY_APPLIANCE 0x00001000
1056 #define VER_SUITE_STORAGE_SERVER 0x00002000
1057 #define VER_SUITE_COMPUTE_SERVER 0x00004000
1058 #define VER_SUITE_WH_SERVER 0x00008000
1060 #define PRODUCT_UNDEFINED 0x00000000
1061 #define PRODUCT_ULTIMATE 0x00000001
1062 #define PRODUCT_HOME_BASIC 0x00000002
1063 #define PRODUCT_HOME_PREMIUM 0x00000003
1064 #define PRODUCT_ENTERPRISE 0x00000004
1065 #define PRODUCT_HOME_BASIC_N 0x00000005
1066 #define PRODUCT_BUSINESS 0x00000006
1067 #define PRODUCT_STANDARD_SERVER 0x00000007
1068 #define PRODUCT_DATACENTER_SERVER 0x00000008
1069 #define PRODUCT_SMALLBUSINESS_SERVER 0x00000009
1070 #define PRODUCT_ENTERPRISE_SERVER 0x0000000A
1071 #define PRODUCT_STARTER 0x0000000B
1072 #define PRODUCT_DATACENTER_SERVER_CORE 0x0000000C
1073 #define PRODUCT_STANDARD_SERVER_CORE 0x0000000D
1074 #define PRODUCT_ENTERPRISE_SERVER_CORE 0x0000000E
1075 #define PRODUCT_ENTERPRISE_SERVER_IA64 0x0000000F
1076 #define PRODUCT_BUSINESS_N 0x00000010
1077 #define PRODUCT_WEB_SERVER 0x00000011
1078 #define PRODUCT_CLUSTER_SERVER 0x00000012
1079 #define PRODUCT_HOME_SERVER 0x00000013
1080 #define PRODUCT_STORAGE_EXPRESS_SERVER 0x00000014
1081 #define PRODUCT_STORAGE_STANDARD_SERVER 0x00000015
1082 #define PRODUCT_STORAGE_WORKGROUP_SERVER 0x00000016
1083 #define PRODUCT_STORAGE_ENTERPRISE_SERVER 0x00000017
1084 #define PRODUCT_SERVER_FOR_SMALLBUSINESS 0x00000018
1085 #define PRODUCT_SMALLBUSINESS_SERVER_PREMIUM 0x00000019
1086 #define PRODUCT_HOME_PREMIUM_N 0x0000001A
1087 #define PRODUCT_ENTERPRISE_N 0x0000001B
1088 #define PRODUCT_ULTIMATE_N 0x0000001C
1089 #define PRODUCT_WEB_SERVER_CORE 0x0000001D
1090 #define PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT 0x0000001E
1091 #define PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY 0x0000001F
1092 #define PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING 0x00000020
1093 #define PRODUCT_SERVER_FOUNDATION 0x00000021
1094 #define PRODUCT_HOME_PREMIUM_SERVER 0x00000022
1095 #define PRODUCT_SERVER_FOR_SMALLBUSINESS_V 0x00000023
1096 #define PRODUCT_STANDARD_SERVER_V 0x00000024
1097 #define PRODUCT_DATACENTER_SERVER_V 0x00000025
1098 #define PRODUCT_ENTERPRISE_SERVER_V 0x00000026
1099 #define PRODUCT_DATACENTER_SERVER_CORE_V 0x00000027
1100 #define PRODUCT_STANDARD_SERVER_CORE_V 0x00000028
1101 #define PRODUCT_ENTERPRISE_SERVER_CORE_V 0x00000029
1102 #define PRODUCT_HYPERV 0x0000002A
1103 #define PRODUCT_STORAGE_EXPRESS_SERVER_CORE 0x0000002B
1104 #define PRODUCT_STORAGE_STANDARD_SERVER_CORE 0x0000002C
1105 #define PRODUCT_STORAGE_WORKGROUP_SERVER_CORE 0x0000002D
1106 #define PRODUCT_STORAGE_ENTERPRISE_SERVER_CORE 0x0000002E
1107 #define PRODUCT_STARTER_N 0x0000002F
1108 #define PRODUCT_PROFESSIONAL 0x00000030
1109 #define PRODUCT_PROFESSIONAL_N 0x00000031
1110 #define PRODUCT_SB_SOLUTION_SERVER 0x00000032
1111 #define PRODUCT_SERVER_FOR_SB_SOLUTIONS 0x00000033
1112 #define PRODUCT_STANDARD_SERVER_SOLUTIONS 0x00000034
1113 #define PRODUCT_STANDARD_SERVER_SOLUTIONS_CORE 0x00000035
1114 #define PRODUCT_SB_SOLUTION_SERVER_EM 0x00000036
1115 #define PRODUCT_SERVER_FOR_SB_SOLUTIONS_EM 0x00000037
1116 #define PRODUCT_SOLUTION_EMBEDDEDSERVER 0x00000038
1117 #define PRODUCT_SOLUTION_EMBEDDEDSERVER_CORE 0x00000039
1118 #define PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT 0x0000003B
1119 #define PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL 0x0000003C
1120 #define PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC 0x0000003D
1121 #define PRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC 0x0000003E
1122 #define PRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE 0x0000003F
1123 #define PRODUCT_CLUSTER_SERVER_V 0x00000040
1124 #define PRODUCT_EMBEDDED 0x00000041
1125 #define PRODUCT_STARTER_E 0x00000042
1126 #define PRODUCT_HOME_BASIC_E 0x00000043
1127 #define PRODUCT_HOME_PREMIUM_E 0x00000044
1128 #define PRODUCT_PROFESSIONAL_E 0x00000045
1129 #define PRODUCT_ENTERPRISE_E 0x00000046
1130 #define PRODUCT_ULTIMATE_E 0x00000047
1131 #define PRODUCT_ENTERPRISE_EVALUATION 0x00000048
1132 #define PRODUCT_MULTIPOINT_STANDARD_SERVER 0x0000004C
1133 #define PRODUCT_MULTIPOINT_PREMIUM_SERVER 0x0000004D
1134 #define PRODUCT_STANDARD_EVALUATION_SERVER 0x0000004F
1135 #define PRODUCT_DATACENTER_EVALUATION_SERVER 0x00000050
1136 #define PRODUCT_ENTERPRISE_N_EVALUATION 0x00000054
1137 #define PRODUCT_EMBEDDED_AUTOMOTIVE 0x00000055
1138 #define PRODUCT_EMBEDDED_INDUSTRY_A 0x00000056
1139 #define PRODUCT_THINPC 0x00000057
1140 #define PRODUCT_EMBEDDED_A 0x00000058
1141 #define PRODUCT_EMBEDDED_INDUSTRY 0x00000059
1142 #define PRODUCT_EMBEDDED_E 0x0000005A
1143 #define PRODUCT_EMBEDDED_INDUSTRY_E 0x0000005B
1144 #define PRODUCT_EMBEDDED_INDUSTRY_A_E 0x0000005C
1145 #define PRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER 0x0000005F
1146 #define PRODUCT_STORAGE_STANDARD_EVALUATION_SERVER 0x00000060
1147 #define PRODUCT_CORE_ARM 0x00000061
1148 #define PRODUCT_CORE_N 0x00000062
1149 #define PRODUCT_CORE_COUNTRYSPECIFIC 0x00000063
1150 #define PRODUCT_CORE_SINGLELANGUAGE 0x00000064
1151 #define PRODUCT_CORE 0x00000065
1152 #define PRODUCT_PROFESSIONAL_WMC 0x00000067
1153 #define PRODUCT_UNLICENSED 0xABCDABCD
1155 /* LangID and NLS */
1156 #define MAKELANGID(p, s) ((((USHORT)(s)) << 10) | (USHORT)(p))
1157 #define PRIMARYLANGID(lgid) ((USHORT)(lgid) & 0x3ff)
1158 #define SUBLANGID(lgid) ((USHORT)(lgid) >> 10)
1159 #define MAKELCID(lgid, srtid) ((ULONG)((((ULONG)((USHORT)(srtid))) << 16) | \
1160 ((ULONG)((USHORT)(lgid)))))
1161 #define MAKESORTLCID(lgid, srtid, ver) \
1162 ((ULONG)((MAKELCID(lgid, srtid)) | \
1163 (((ULONG)((USHORT)(ver))) << 20)))
1164 #define LANGIDFROMLCID(lcid) ((USHORT)(lcid))
1165 #define SORTIDFROMLCID(lcid) ((USHORT)((((ULONG)(lcid)) >> 16) & 0xf))
1166 #define SORTVERSIONFROMLCID(lcid) ((USHORT)((((ULONG)(lcid)) >> 20) & 0xf))
1168 #define NLS_VALID_LOCALE_MASK 0x000fffff
1169 #define LOCALE_NAME_MAX_LENGTH 85
1171 /* Primary language IDs. */
1172 #define LANG_NEUTRAL 0x00
1173 #define LANG_INVARIANT 0x7f
1174 #define LANG_AFRIKAANS 0x36
1175 #define LANG_ALBANIAN 0x1c
1176 #define LANG_ALSATIAN 0x84
1177 #define LANG_AMHARIC 0x5e
1178 #define LANG_ARABIC 0x01
1179 #define LANG_ARMENIAN 0x2b
1180 #define LANG_ASSAMESE 0x4d
1181 #define LANG_AZERI 0x2c
1182 #define LANG_AZERBAIJANI 0x2c
1183 #define LANG_BANGLA 0x45
1184 #define LANG_BASHKIR 0x6d
1185 #define LANG_BASQUE 0x2d
1186 #define LANG_BELARUSIAN 0x23
1187 #define LANG_BENGALI 0x45
1188 #define LANG_BOSNIAN 0x1a
1189 #define LANG_BOSNIAN_NEUTRAL 0x781a
1190 #define LANG_BRETON 0x7e
1191 #define LANG_BULGARIAN 0x02
1192 #define LANG_CATALAN 0x03
1193 #define LANG_CENTRAL_KURDISH 0x92
1194 #define LANG_CHEROKEE 0x5c
1195 #define LANG_CHINESE 0x04
1196 #define LANG_CHINESE_SIMPLIFIED 0x04
1197 #define LANG_CHINESE_TRADITIONAL 0x7c04
1198 #define LANG_CORSICAN 0x83
1199 #define LANG_CROATIAN 0x1a
1200 #define LANG_CZECH 0x05
1201 #define LANG_DANISH 0x06
1202 #define LANG_DARI 0x8c
1203 #define LANG_DIVEHI 0x65
1204 #define LANG_DUTCH 0x13
1205 #define LANG_ENGLISH 0x09
1206 #define LANG_ESTONIAN 0x25
1207 #define LANG_FAEROESE 0x38
1208 #define LANG_FARSI 0x29
1209 #define LANG_FILIPINO 0x64
1210 #define LANG_FINNISH 0x0b
1211 #define LANG_FRENCH 0x0c
1212 #define LANG_FRISIAN 0x62
1213 #define LANG_FULAH 0x67
1214 #define LANG_GALICIAN 0x56
1215 #define LANG_GEORGIAN 0x37
1216 #define LANG_GERMAN 0x07
1217 #define LANG_GREEK 0x08
1218 #define LANG_GREENLANDIC 0x6f
1219 #define LANG_GUJARATI 0x47
1220 #define LANG_HAUSA 0x68
1221 #define LANG_HAWAIIAN 0x75
1222 #define LANG_HEBREW 0x0d
1223 #define LANG_HINDI 0x39
1224 #define LANG_HUNGARIAN 0x0e
1225 #define LANG_ICELANDIC 0x0f
1226 #define LANG_IGBO 0x70
1227 #define LANG_INDONESIAN 0x21
1228 #define LANG_INUKTITUT 0x5d
1229 #define LANG_IRISH 0x3c
1230 #define LANG_ITALIAN 0x10
1231 #define LANG_JAPANESE 0x11
1232 #define LANG_KANNADA 0x4b
1233 #define LANG_KASHMIRI 0x60
1234 #define LANG_KAZAK 0x3f
1235 #define LANG_KHMER 0x53
1236 #define LANG_KICHE 0x86
1237 #define LANG_KINYARWANDA 0x87
1238 #define LANG_KONKANI 0x57
1239 #define LANG_KOREAN 0x12
1240 #define LANG_KYRGYZ 0x40
1241 #define LANG_LAO 0x54
1242 #define LANG_LATVIAN 0x26
1243 #define LANG_LITHUANIAN 0x27
1244 #define LANG_LOWER_SORBIAN 0x2e
1245 #define LANG_LUXEMBOURGISH 0x6e
1246 #define LANG_MACEDONIAN 0x2f
1247 #define LANG_MALAY 0x3e
1248 #define LANG_MALAYALAM 0x4c
1249 #define LANG_MALTESE 0x3a
1250 #define LANG_MANIPURI 0x58
1251 #define LANG_MAORI 0x81
1252 #define LANG_MAPUDUNGUN 0x7a
1253 #define LANG_MARATHI 0x4e
1254 #define LANG_MOHAWK 0x7c
1255 #define LANG_MONGOLIAN 0x50
1256 #define LANG_NEPALI 0x61
1257 #define LANG_NORWEGIAN 0x14
1258 #define LANG_OCCITAN 0x82
1259 #define LANG_ODIA 0x48
1260 #define LANG_ORIYA 0x48
1261 #define LANG_PASHTO 0x63
1262 #define LANG_PERSIAN 0x29
1263 #define LANG_POLISH 0x15
1264 #define LANG_PORTUGUESE 0x16
1265 #define LANG_PULAR 0x67
1266 #define LANG_PUNJABI 0x46
1267 #define LANG_QUECHUA 0x6b
1268 #define LANG_ROMANIAN 0x18
1269 #define LANG_ROMANSH 0x17
1270 #define LANG_RUSSIAN 0x19
1271 #define LANG_SAKHA 0x85
1272 #define LANG_SAMI 0x3b
1273 #define LANG_SANSKRIT 0x4f
1274 #define LANG_SCOTTISH_GAELIC 0x91
1275 #define LANG_SERBIAN 0x1a
1276 #define LANG_SERBIAN_NEUTRAL 0x7c1a
1277 #define LANG_SINDHI 0x59
1278 #define LANG_SINHALESE 0x5b
1279 #define LANG_SLOVAK 0x1b
1280 #define LANG_SLOVENIAN 0x24
1281 #define LANG_SOTHO 0x6c
1282 #define LANG_SPANISH 0x0a
1283 #define LANG_SWAHILI 0x41
1284 #define LANG_SWEDISH 0x1d
1285 #define LANG_SYRIAC 0x5a
1286 #define LANG_TAJIK 0x28
1287 #define LANG_TAMAZIGHT 0x5f
1288 #define LANG_TAMIL 0x49
1289 #define LANG_TATAR 0x44
1290 #define LANG_TELUGU 0x4a
1291 #define LANG_THAI 0x1e
1292 #define LANG_TIBETAN 0x51
1293 #define LANG_TIGRIGNA 0x73
1294 #define LANG_TIGRINYA 0x73
1295 #define LANG_TSWANA 0x32
1296 #define LANG_TURKISH 0x1f
1297 #define LANG_TURKMEN 0x42
1298 #define LANG_UIGHUR 0x80
1299 #define LANG_UKRAINIAN 0x22
1300 #define LANG_UPPER_SORBIAN 0x2e
1301 #define LANG_URDU 0x20
1302 #define LANG_UZBEK 0x43
1303 #define LANG_VALENCIAN 0x03
1304 #define LANG_VIETNAMESE 0x2a
1305 #define LANG_WELSH 0x52
1306 #define LANG_WOLOF 0x88
1307 #define LANG_XHOSA 0x34
1308 #define LANG_YAKUT 0x85
1309 #define LANG_YI 0x78
1310 #define LANG_YORUBA 0x6a
1311 #define LANG_ZULU 0x35
1313 #define SUBLANG_NEUTRAL 0x00
1314 #define SUBLANG_DEFAULT 0x01
1315 #define SUBLANG_SYS_DEFAULT 0x02
1316 #define SUBLANG_CUSTOM_DEFAULT 0x03
1317 #define SUBLANG_CUSTOM_UNSPECIFIED 0x04
1318 #define SUBLANG_UI_CUSTOM_DEFAULT 0x05
1319 #define SUBLANG_AFRIKAANS_SOUTH_AFRICA 0x01
1320 #define SUBLANG_ALBANIAN_ALBANIA 0x01
1321 #define SUBLANG_ALSATIAN_FRANCE 0x01
1322 #define SUBLANG_AMHARIC_ETHIOPIA 0x01
1323 #define SUBLANG_ARABIC_SAUDI_ARABIA 0x01
1324 #define SUBLANG_ARABIC_IRAQ 0x02
1325 #define SUBLANG_ARABIC_EGYPT 0x03
1326 #define SUBLANG_ARABIC_LIBYA 0x04
1327 #define SUBLANG_ARABIC_ALGERIA 0x05
1328 #define SUBLANG_ARABIC_MOROCCO 0x06
1329 #define SUBLANG_ARABIC_TUNISIA 0x07
1330 #define SUBLANG_ARABIC_OMAN 0x08
1331 #define SUBLANG_ARABIC_YEMEN 0x09
1332 #define SUBLANG_ARABIC_SYRIA 0x0a
1333 #define SUBLANG_ARABIC_JORDAN 0x0b
1334 #define SUBLANG_ARABIC_LEBANON 0x0c
1335 #define SUBLANG_ARABIC_KUWAIT 0x0d
1336 #define SUBLANG_ARABIC_UAE 0x0e
1337 #define SUBLANG_ARABIC_BAHRAIN 0x0f
1338 #define SUBLANG_ARABIC_QATAR 0x10
1339 #define SUBLANG_ARMENIAN_ARMENIA 0x01
1340 #define SUBLANG_ASSAMESE_INDIA 0x01
1341 #define SUBLANG_AZERI_LATIN 0x01
1342 #define SUBLANG_AZERI_CYRILLIC 0x02
1343 #define SUBLANG_AZERBAIJANI_AZERBAIJAN_LATIN 0x01
1344 #define SUBLANG_AZERBAIJANI_AZERBAIJAN_CYRILLIC 0x02
1345 #define SUBLANG_BANGLA_INDIA 0x01
1346 #define SUBLANG_BANGLA_BANGLADESH 0x02
1347 #define SUBLANG_BASHKIR_RUSSIA 0x01
1348 #define SUBLANG_BASQUE_BASQUE 0x01
1349 #define SUBLANG_BELARUSIAN_BELARUS 0x01
1350 #define SUBLANG_BENGALI_INDIA 0x01
1351 #define SUBLANG_BENGALI_BANGLADESH 0x02
1352 #define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN 0x05
1353 #define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x08
1354 #define SUBLANG_BRETON_FRANCE 0x01
1355 #define SUBLANG_BULGARIAN_BULGARIA 0x01
1356 #define SUBLANG_CATALAN_CATALAN 0x01
1357 #define SUBLANG_CENTRAL_KURDISH_IRAQ 0x01
1358 #define SUBLANG_CHEROKEE_CHEROKEE 0x01
1359 #define SUBLANG_CHINESE_TRADITIONAL 0x01
1360 #define SUBLANG_CHINESE_SIMPLIFIED 0x02
1361 #define SUBLANG_CHINESE_HONGKONG 0x03
1362 #define SUBLANG_CHINESE_SINGAPORE 0x04
1363 #define SUBLANG_CHINESE_MACAU 0x05
1364 #define SUBLANG_CORSICAN_FRANCE 0x01
1365 #define SUBLANG_CZECH_CZECH_REPUBLIC 0x01
1366 #define SUBLANG_CROATIAN_CROATIA 0x01
1367 #define SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN 0x04
1368 #define SUBLANG_DANISH_DENMARK 0x01
1369 #define SUBLANG_DARI_AFGHANISTAN 0x01
1370 #define SUBLANG_DIVEHI_MALDIVES 0x01
1371 #define SUBLANG_DUTCH 0x01
1372 #define SUBLANG_DUTCH_BELGIAN 0x02
1373 #define SUBLANG_ENGLISH_US 0x01
1374 #define SUBLANG_ENGLISH_UK 0x02
1375 #define SUBLANG_ENGLISH_AUS 0x03
1376 #define SUBLANG_ENGLISH_CAN 0x04
1377 #define SUBLANG_ENGLISH_NZ 0x05
1378 #define SUBLANG_ENGLISH_EIRE 0x06
1379 #define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07
1380 #define SUBLANG_ENGLISH_JAMAICA 0x08
1381 #define SUBLANG_ENGLISH_CARIBBEAN 0x09
1382 #define SUBLANG_ENGLISH_BELIZE 0x0a
1383 #define SUBLANG_ENGLISH_TRINIDAD 0x0b
1384 #define SUBLANG_ENGLISH_ZIMBABWE 0x0c
1385 #define SUBLANG_ENGLISH_PHILIPPINES 0x0d
1386 #define SUBLANG_ENGLISH_INDIA 0x10
1387 #define SUBLANG_ENGLISH_MALAYSIA 0x11
1388 #define SUBLANG_ENGLISH_SINGAPORE 0x12
1389 #define SUBLANG_ESTONIAN_ESTONIA 0x01
1390 #define SUBLANG_FAEROESE_FAROE_ISLANDS 0x01
1391 #define SUBLANG_FILIPINO_PHILIPPINES 0x01
1392 #define SUBLANG_FINNISH_FINLAND 0x01
1393 #define SUBLANG_FRENCH 0x01
1394 #define SUBLANG_FRENCH_BELGIAN 0x02
1395 #define SUBLANG_FRENCH_CANADIAN 0x03
1396 #define SUBLANG_FRENCH_SWISS 0x04
1397 #define SUBLANG_FRENCH_LUXEMBOURG 0x05
1398 #define SUBLANG_FRENCH_MONACO 0x06
1399 #define SUBLANG_FRISIAN_NETHERLANDS 0x01
1400 #define SUBLANG_FULAH_SENEGAL 0x02
1401 #define SUBLANG_GALICIAN_GALICIAN 0x01
1402 #define SUBLANG_GEORGIAN_GEORGIA 0x01
1403 #define SUBLANG_GERMAN 0x01
1404 #define SUBLANG_GERMAN_SWISS 0x02
1405 #define SUBLANG_GERMAN_AUSTRIAN 0x03
1406 #define SUBLANG_GERMAN_LUXEMBOURG 0x04
1407 #define SUBLANG_GERMAN_LIECHTENSTEIN 0x05
1408 #define SUBLANG_GREEK_GREECE 0x01
1409 #define SUBLANG_GREENLANDIC_GREENLAND 0x01
1410 #define SUBLANG_GUJARATI_INDIA 0x01
1411 #define SUBLANG_HAUSA_NIGERIA_LATIN 0x01
1412 #define SUBLANG_HAWAIIAN_US 0x01
1413 #define SUBLANG_HEBREW_ISRAEL 0x01
1414 #define SUBLANG_HINDI_INDIA 0x01
1415 #define SUBLANG_HUNGARIAN_HUNGARY 0x01
1416 #define SUBLANG_ICELANDIC_ICELAND 0x01
1417 #define SUBLANG_IGBO_NIGERIA 0x01
1418 #define SUBLANG_INDONESIAN_INDONESIA 0x01
1419 #define SUBLANG_INUKTITUT_CANADA 0x01
1420 #define SUBLANG_INUKTITUT_CANADA_LATIN 0x02
1421 #define SUBLANG_IRISH_IRELAND 0x02
1422 #define SUBLANG_ITALIAN 0x01
1423 #define SUBLANG_ITALIAN_SWISS 0x02
1424 #define SUBLANG_JAPANESE_JAPAN 0x01
1425 #define SUBLANG_KANNADA_INDIA 0x01
1426 #define SUBLANG_KASHMIRI_SASIA 0x02
1427 #define SUBLANG_KASHMIRI_INDIA 0x02
1428 #define SUBLANG_KAZAK_KAZAKHSTAN 0x01
1429 #define SUBLANG_KHMER_CAMBODIA 0x01
1430 #define SUBLANG_KICHE_GUATEMALA 0x01
1431 #define SUBLANG_KINYARWANDA_RWANDA 0x01
1432 #define SUBLANG_KONKANI_INDIA 0x01
1433 #define SUBLANG_KOREAN 0x01
1434 #define SUBLANG_KYRGYZ_KYRGYZSTAN 0x01
1435 #define SUBLANG_LAO_LAO 0x01
1436 #define SUBLANG_LATVIAN_LATVIA 0x01
1437 #define SUBLANG_LITHUANIAN 0x01
1438 #define SUBLANG_LOWER_SORBIAN_GERMANY 0x02
1439 #define SUBLANG_LUXEMBOURGISH_LUXEMBOURG 0x01
1440 #define SUBLANG_MACEDONIAN_MACEDONIA 0x01
1441 #define SUBLANG_MALAY_MALAYSIA 0x01
1442 #define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02
1443 #define SUBLANG_MALAYALAM_INDIA 0x01
1444 #define SUBLANG_MALTESE_MALTA 0x01
1445 #define SUBLANG_MAORI_NEW_ZEALAND 0x01
1446 #define SUBLANG_MAPUDUNGUN_CHILE 0x01
1447 #define SUBLANG_MARATHI_INDIA 0x01
1448 #define SUBLANG_MOHAWK_MOHAWK 0x01
1449 #define SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA 0x01
1450 #define SUBLANG_MONGOLIAN_PRC 0x02
1451 #define SUBLANG_NEPALI_INDIA 0x02
1452 #define SUBLANG_NEPALI_NEPAL 0x01
1453 #define SUBLANG_NORWEGIAN_BOKMAL 0x01
1454 #define SUBLANG_NORWEGIAN_NYNORSK 0x02
1455 #define SUBLANG_OCCITAN_FRANCE 0x01
1456 #define SUBLANG_ODIA_INDIA 0x01
1457 #define SUBLANG_ORIYA_INDIA 0x01
1458 #define SUBLANG_PASHTO_AFGHANISTAN 0x01
1459 #define SUBLANG_PERSIAN_IRAN 0x01
1460 #define SUBLANG_POLISH_POLAND 0x01
1461 #define SUBLANG_PORTUGUESE 0x02
1462 #define SUBLANG_PORTUGUESE_BRAZILIAN 0x01
1463 #define SUBLANG_PULAR_SENEGAL 0x02
1464 #define SUBLANG_PUNJABI_INDIA 0x01
1465 #define SUBLANG_PUNJABI_PAKISTAN 0x02
1466 #define SUBLANG_QUECHUA_BOLIVIA 0x01
1467 #define SUBLANG_QUECHUA_ECUADOR 0x02
1468 #define SUBLANG_QUECHUA_PERU 0x03
1469 #define SUBLANG_ROMANIAN_ROMANIA 0x01
1470 #define SUBLANG_ROMANSH_SWITZERLAND 0x01
1471 #define SUBLANG_RUSSIAN_RUSSIA 0x01
1472 #define SUBLANG_SAKHA_RUSSIA 0x01
1473 #define SUBLANG_SAMI_NORTHERN_NORWAY 0x01
1474 #define SUBLANG_SAMI_NORTHERN_SWEDEN 0x02
1475 #define SUBLANG_SAMI_NORTHERN_FINLAND 0x03
1476 #define SUBLANG_SAMI_LULE_NORWAY 0x04
1477 #define SUBLANG_SAMI_LULE_SWEDEN 0x05
1478 #define SUBLANG_SAMI_SOUTHERN_NORWAY 0x06
1479 #define SUBLANG_SAMI_SOUTHERN_SWEDEN 0x07
1480 #define SUBLANG_SAMI_SKOLT_FINLAND 0x08
1481 #define SUBLANG_SAMI_INARI_FINLAND 0x09
1482 #define SUBLANG_SANSKRIT_INDIA 0x01
1483 #define SUBLANG_SCOTTISH_GAELIC 0x01
1484 #define SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN 0x06
1485 #define SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x07
1486 #define SUBLANG_SERBIAN_MONTENEGRO_LATIN 0x0b
1487 #define SUBLANG_SERBIAN_MONTENEGRO_CYRILLIC 0x0c
1488 #define SUBLANG_SERBIAN_SERBIA_LATIN 0x09
1489 #define SUBLANG_SERBIAN_SERBIA_CYRILLIC 0x0a
1490 #define SUBLANG_SERBIAN_CROATIA 0x01
1491 #define SUBLANG_SERBIAN_LATIN 0x02
1492 #define SUBLANG_SERBIAN_CYRILLIC 0x03
1493 #define SUBLANG_SINDHI_INDIA 0x01
1494 #define SUBLANG_SINDHI_PAKISTAN 0x02
1495 #define SUBLANG_SINDHI_AFGHANISTAN 0x02
1496 #define SUBLANG_SINHALESE_SRI_LANKA 0x01
1497 #define SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA 0x01
1498 #define SUBLANG_SLOVAK_SLOVAKIA 0x01
1499 #define SUBLANG_SLOVENIAN_SLOVENIA 0x01
1500 #define SUBLANG_SPANISH 0x01
1501 #define SUBLANG_SPANISH_MEXICAN 0x02
1502 #define SUBLANG_SPANISH_MODERN 0x03
1503 #define SUBLANG_SPANISH_GUATEMALA 0x04
1504 #define SUBLANG_SPANISH_COSTA_RICA 0x05
1505 #define SUBLANG_SPANISH_PANAMA 0x06
1506 #define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07
1507 #define SUBLANG_SPANISH_VENEZUELA 0x08
1508 #define SUBLANG_SPANISH_COLOMBIA 0x09
1509 #define SUBLANG_SPANISH_PERU 0x0a
1510 #define SUBLANG_SPANISH_ARGENTINA 0x0b
1511 #define SUBLANG_SPANISH_ECUADOR 0x0c
1512 #define SUBLANG_SPANISH_CHILE 0x0d
1513 #define SUBLANG_SPANISH_URUGUAY 0x0e
1514 #define SUBLANG_SPANISH_PARAGUAY 0x0f
1515 #define SUBLANG_SPANISH_BOLIVIA 0x10
1516 #define SUBLANG_SPANISH_EL_SALVADOR 0x11
1517 #define SUBLANG_SPANISH_HONDURAS 0x12
1518 #define SUBLANG_SPANISH_NICARAGUA 0x13
1519 #define SUBLANG_SPANISH_PUERTO_RICO 0x14
1520 #define SUBLANG_SPANISH_US 0x15
1521 #define SUBLANG_SWAHILI_KENYA 0x01
1522 #define SUBLANG_SWEDISH 0x01
1523 #define SUBLANG_SWEDISH_FINLAND 0x02
1524 #define SUBLANG_SYRIAC_SYRIA 0x01
1525 #define SUBLANG_TAJIK_TAJIKISTAN 0x01
1526 #define SUBLANG_TAMAZIGHT_ALGERIA_LATIN 0x02
1527 #define SUBLANG_TAMAZIGHT_MOROCCO_TIFINAGH 0x04
1528 #define SUBLANG_TAMIL_INDIA 0x01
1529 #define SUBLANG_TAMIL_SRI_LANKA 0x02
1530 #define SUBLANG_TATAR_RUSSIA 0x01
1531 #define SUBLANG_TELUGU_INDIA 0x01
1532 #define SUBLANG_THAI_THAILAND 0x01
1533 #define SUBLANG_TIBETAN_PRC 0x01
1534 #define SUBLANG_TIGRIGNA_ERITREA 0x02
1535 #define SUBLANG_TIGRINYA_ERITREA 0x02
1536 #define SUBLANG_TIGRINYA_ETHIOPIA 0x01
1537 #define SUBLANG_TSWANA_BOTSWANA 0x02
1538 #define SUBLANG_TSWANA_SOUTH_AFRICA 0x01
1539 #define SUBLANG_TURKISH_TURKEY 0x01
1540 #define SUBLANG_TURKMEN_TURKMENISTAN 0x01
1541 #define SUBLANG_UIGHUR_PRC 0x01
1542 #define SUBLANG_UKRAINIAN_UKRAINE 0x01
1543 #define SUBLANG_UPPER_SORBIAN_GERMANY 0x01
1544 #define SUBLANG_URDU_PAKISTAN 0x01
1545 #define SUBLANG_URDU_INDIA 0x02
1546 #define SUBLANG_UZBEK_LATIN 0x01
1547 #define SUBLANG_UZBEK_CYRILLIC 0x02
1548 #define SUBLANG_VALENCIAN_VALENCIA 0x02
1549 #define SUBLANG_VIETNAMESE_VIETNAM 0x01
1550 #define SUBLANG_WELSH_UNITED_KINGDOM 0x01
1551 #define SUBLANG_WOLOF_SENEGAL 0x01
1552 #define SUBLANG_XHOSA_SOUTH_AFRICA 0x01
1553 #define SUBLANG_YAKUT_RUSSIA 0x01
1554 #define SUBLANG_YI_PRC 0x01
1555 #define SUBLANG_YORUBA_NIGERIA 0x01
1556 #define SUBLANG_ZULU_SOUTH_AFRICA 0x01
1558 #define SORT_DEFAULT 0x0
1559 #define SORT_INVARIANT_MATH 0x1
1560 #define SORT_JAPANESE_XJIS 0x0
1561 #define SORT_JAPANESE_UNICODE 0x1
1562 #define SORT_JAPANESE_RADICALSTROKE 0x4
1563 #define SORT_CHINESE_BIG5 0x0
1564 #define SORT_CHINESE_PRCP 0x0
1565 #define SORT_CHINESE_UNICODE 0x1
1566 #define SORT_CHINESE_PRC 0x2
1567 #define SORT_CHINESE_BOPOMOFO 0x3
1568 #define SORT_CHINESE_RADICALSTROKE 0x4
1569 #define SORT_KOREAN_KSC 0x0
1570 #define SORT_KOREAN_UNICODE 0x1
1571 #define SORT_GERMAN_PHONE_BOOK 0x1
1572 #define SORT_HUNGARIAN_DEFAULT 0x0
1573 #define SORT_HUNGARIAN_TECHNICAL 0x1
1574 #define SORT_GEORGIAN_TRADITIONAL 0x0
1575 #define SORT_GEORGIAN_MODERN 0x1
1577 #define LANG_SYSTEM_DEFAULT MAKELANGID(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT)
1578 #define LANG_USER_DEFAULT MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT)
1580 #define LOCALE_SYSTEM_DEFAULT MAKELCID(LANG_SYSTEM_DEFAULT, SORT_DEFAULT)
1581 #define LOCALE_USER_DEFAULT MAKELCID(LANG_USER_DEFAULT, SORT_DEFAULT)
1582 #define LOCALE_CUSTOM_DEFAULT MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_CUSTOM_DEFAULT), SORT_DEFAULT)
1583 #define LOCALE_CUSTOM_UNSPECIFIED MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_CUSTOM_UNSPECIFIED), SORT_DEFAULT)
1584 #define LOCALE_CUSTOM_UI_DEFAULT MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_UI_CUSTOM_DEFAULT), SORT_DEFAULT)
1585 #define LOCALE_NEUTRAL MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), SORT_DEFAULT)
1586 #define LOCALE_INVARIANT MAKELCID(MAKELANGID(LANG_INVARIANT, SUBLANG_NEUTRAL), SORT_DEFAULT)
1592 #endif /* _NTDEF_ */