c46a0e03984eb294128555277e8892bd387cb728
[reactos.git] / include / xdk / rtltypes.h
1 /******************************************************************************
2 * Runtime Library Types *
3 ******************************************************************************/
4
5 #define RTL_REGISTRY_ABSOLUTE 0
6 #define RTL_REGISTRY_SERVICES 1
7 #define RTL_REGISTRY_CONTROL 2
8 #define RTL_REGISTRY_WINDOWS_NT 3
9 #define RTL_REGISTRY_DEVICEMAP 4
10 #define RTL_REGISTRY_USER 5
11 #define RTL_REGISTRY_MAXIMUM 6
12 #define RTL_REGISTRY_HANDLE 0x40000000
13 #define RTL_REGISTRY_OPTIONAL 0x80000000
14
15 /* RTL_QUERY_REGISTRY_TABLE.Flags */
16 #define RTL_QUERY_REGISTRY_SUBKEY 0x00000001
17 #define RTL_QUERY_REGISTRY_TOPKEY 0x00000002
18 #define RTL_QUERY_REGISTRY_REQUIRED 0x00000004
19 #define RTL_QUERY_REGISTRY_NOVALUE 0x00000008
20 #define RTL_QUERY_REGISTRY_NOEXPAND 0x00000010
21 #define RTL_QUERY_REGISTRY_DIRECT 0x00000020
22 #define RTL_QUERY_REGISTRY_DELETE 0x00000040
23
24 #define HASH_STRING_ALGORITHM_DEFAULT 0
25 #define HASH_STRING_ALGORITHM_X65599 1
26 #define HASH_STRING_ALGORITHM_INVALID 0xffffffff
27
28 typedef struct _RTL_BITMAP {
29 ULONG SizeOfBitMap;
30 PULONG Buffer;
31 } RTL_BITMAP, *PRTL_BITMAP;
32
33 typedef struct _RTL_BITMAP_RUN {
34 ULONG StartingIndex;
35 ULONG NumberOfBits;
36 } RTL_BITMAP_RUN, *PRTL_BITMAP_RUN;
37
38 typedef NTSTATUS
39 (DDKAPI *PRTL_QUERY_REGISTRY_ROUTINE)(
40 IN PWSTR ValueName,
41 IN ULONG ValueType,
42 IN PVOID ValueData,
43 IN ULONG ValueLength,
44 IN PVOID Context,
45 IN PVOID EntryContext);
46
47 typedef struct _RTL_QUERY_REGISTRY_TABLE {
48 PRTL_QUERY_REGISTRY_ROUTINE QueryRoutine;
49 ULONG Flags;
50 PCWSTR Name;
51 PVOID EntryContext;
52 ULONG DefaultType;
53 PVOID DefaultData;
54 ULONG DefaultLength;
55 } RTL_QUERY_REGISTRY_TABLE, *PRTL_QUERY_REGISTRY_TABLE;
56
57 typedef struct _TIME_FIELDS {
58 CSHORT Year;
59 CSHORT Month;
60 CSHORT Day;
61 CSHORT Hour;
62 CSHORT Minute;
63 CSHORT Second;
64 CSHORT Milliseconds;
65 CSHORT Weekday;
66 } TIME_FIELDS, *PTIME_FIELDS;
67
68 /* Slist Header */
69 #ifndef _SLIST_HEADER_
70 #define _SLIST_HEADER_
71
72 #if defined(_WIN64)
73 typedef struct DECLSPEC_ALIGN(16) _SLIST_ENTRY *PSLIST_ENTRY;
74 typedef struct DECLSPEC_ALIGN(16) _SLIST_ENTRY {
75 PSLIST_ENTRY Next;
76 } SLIST_ENTRY;
77 typedef union DECLSPEC_ALIGN(16) _SLIST_HEADER {
78 struct {
79 ULONGLONG Alignment;
80 ULONGLONG Region;
81 } DUMMYSTRUCTNAME;
82 struct {
83 ULONGLONG Depth:16;
84 ULONGLONG Sequence:9;
85 ULONGLONG NextEntry:39;
86 ULONGLONG HeaderType:1;
87 ULONGLONG Init:1;
88 ULONGLONG Reserved:59;
89 ULONGLONG Region:3;
90 } Header8;
91 struct {
92 ULONGLONG Depth:16;
93 ULONGLONG Sequence:48;
94 ULONGLONG HeaderType:1;
95 ULONGLONG Init:1;
96 ULONGLONG Reserved:2;
97 ULONGLONG NextEntry:60;
98 } Header16;
99 } SLIST_HEADER, *PSLIST_HEADER;
100 #else
101 #define SLIST_ENTRY SINGLE_LIST_ENTRY
102 #define _SLIST_ENTRY _SINGLE_LIST_ENTRY
103 #define PSLIST_ENTRY PSINGLE_LIST_ENTRY
104 typedef union _SLIST_HEADER {
105 ULONGLONG Alignment;
106 struct {
107 SLIST_ENTRY Next;
108 USHORT Depth;
109 USHORT Sequence;
110 } DUMMYSTRUCTNAME;
111 } SLIST_HEADER, *PSLIST_HEADER;
112 #endif
113
114 #endif /* _SLIST_HEADER_ */
115
116
117 /* HACK HACK HACK - GCC (or perhaps LD) is messing this up */
118 #if defined(_NTSYSTEM_) || defined(__GNUC__)
119 #define NLS_MB_CODE_PAGE_TAG NlsMbCodePageTag
120 #define NLS_MB_OEM_CODE_PAGE_TAG NlsMbOemCodePageTag
121 #else
122 #define NLS_MB_CODE_PAGE_TAG (*NlsMbCodePageTag)
123 #define NLS_MB_OEM_CODE_PAGE_TAG (*NlsMbOemCodePageTag)
124 #endif /* _NT_SYSTEM */
125 extern BOOLEAN NTSYSAPI NLS_MB_CODE_PAGE_TAG;
126 extern BOOLEAN NTSYSAPI NLS_MB_OEM_CODE_PAGE_TAG;
127
128