ReactOS  0.4.10-dev-348-gbcec1fd
winternl.h
Go to the documentation of this file.
1 /*
2  * Internal NT APIs and data structures
3  *
4  * Copyright (C) the Wine project
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20 
21 #ifndef __WINE_WINTERNL_H
22 #define __WINE_WINTERNL_H
23 
24 #ifndef __REACTOS__
25 #include <ntdef.h>
26 #endif /* __REACTOS__ */
27 #include <windef.h>
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif /* defined(__cplusplus) */
32 
33 #ifdef __REACTOS__
34 typedef enum _TIMER_TYPE {
37 } TIMER_TYPE;
38 typedef enum _EVENT_TYPE {
41 } EVENT_TYPE, *PEVENT_TYPE;
42 #define FSCTL_PIPE_LISTEN CTL_CODE(FILE_DEVICE_NAMED_PIPE, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
43 #endif /* __REACTOS__ */
44 
45 /**********************************************************************
46  * Fundamental types and data structures
47  */
48 
49 #ifndef WINE_NTSTATUS_DECLARED
50 #define WINE_NTSTATUS_DECLARED
51 typedef LONG NTSTATUS;
52 #ifdef __REACTOS__
53 typedef NTSTATUS *PNTSTATUS;
54 #endif /* __REACTOS__ */
55 #endif
56 
57 typedef const char *PCSZ;
58 
59 typedef short CSHORT;
60 typedef CSHORT *PCSHORT;
61 
62 #ifndef __STRING_DEFINED__
63 #define __STRING_DEFINED__
64 typedef struct _STRING {
65  USHORT Length;
67  PCHAR Buffer;
68 } STRING, *PSTRING;
69 #endif
70 
72 typedef PSTRING PANSI_STRING;
73 typedef const STRING *PCANSI_STRING;
74 
76 typedef PSTRING POEM_STRING;
77 typedef const STRING *PCOEM_STRING;
78 
79 #ifndef __UNICODE_STRING_DEFINED__
80 #define __UNICODE_STRING_DEFINED__
81 typedef struct _UNICODE_STRING {
82  USHORT Length; /* bytes */
83  USHORT MaximumLength; /* bytes */
84  PWSTR Buffer;
86 #endif
87 
89 
90 #ifndef _FILETIME_
91 #define _FILETIME_
92 /* 64 bit number of 100 nanoseconds intervals since January 1, 1601 */
93 typedef struct _FILETIME
94 {
95 #ifdef WORDS_BIGENDIAN
98 #else
101 #endif
103 #endif /* _FILETIME_ */
104 
105 #if 0
106 /*
107  * RTL_SYSTEM_TIME and RTL_TIME_ZONE_INFORMATION are the same as
108  * the SYSTEMTIME and TIME_ZONE_INFORMATION structures defined
109  * in winbase.h, however we need to define them separately so
110  * winternl.h doesn't depend on winbase.h. They are used by
111  * RtlQueryTimeZoneInformation and RtlSetTimeZoneInformation.
112  * The names are guessed; if anybody knows the real names, let me know.
113  */
114 typedef struct _RTL_SYSTEM_TIME {
115  WORD wYear;
116  WORD wMonth;
117  WORD wDayOfWeek;
118  WORD wDay;
119  WORD wHour;
120  WORD wMinute;
121  WORD wSecond;
122  WORD wMilliseconds;
123 } RTL_SYSTEM_TIME, *PRTL_SYSTEM_TIME;
124 #endif
125 
126 typedef struct _TIME_FIELDS {
127  CSHORT Year;
128  CSHORT Month;
129  CSHORT Day;
130  CSHORT Hour;
131  CSHORT Minute;
132  CSHORT Second;
133  CSHORT Milliseconds;
134  CSHORT Weekday;
136 
137 typedef struct _RTL_TIME_ZONE_INFORMATION {
138  LONG Bias;
139  WCHAR StandardName[32];
142  WCHAR DaylightName[32];
146 
148 {
159 
160 typedef struct _CLIENT_ID
161 {
165 
166 typedef struct _CURDIR
167 {
170 } CURDIR, *PCURDIR;
171 
173 {
179 
180 typedef struct tagRTL_BITMAP {
181  ULONG SizeOfBitMap; /* Number of bits in the bitmap */
182  PULONG Buffer; /* Bitmap data, assumed sized to a DWORD boundary */
184 
185 typedef const RTL_BITMAP *PCRTL_BITMAP;
186 
187 typedef struct tagRTL_BITMAP_RUN {
188  ULONG StartingIndex; /* Bit position at which run starts */
189  ULONG NumberOfBits; /* Size of the run in bits */
191 
193 
194 typedef struct _RTL_USER_PROCESS_PARAMETERS
195 {
198  ULONG Flags;
225 
226 /* value for Flags field (FIXME: not the correct name) */
227 #define PROCESS_PARAMS_FLAG_NORMALIZED 1
228 
229 typedef struct _PEB_LDR_DATA
230 {
231  ULONG Length;
233  PVOID SsHandle;
239 
240 typedef struct _GDI_TEB_BATCH
241 {
242  ULONG Offset;
243  HANDLE HDC;
244  ULONG Buffer[0x136];
245 } GDI_TEB_BATCH;
246 
248 {
253 
254 typedef struct _ACTIVATION_CONTEXT_STACK
255 {
256  ULONG Flags;
261 
262 typedef struct _TEB_ACTIVE_FRAME_CONTEXT
263 {
264  ULONG Flags;
265  const char *FrameName;
267 
268 typedef struct _TEB_ACTIVE_FRAME_CONTEXT_EX
269 {
271  const char *SourceLocation;
273 
274 typedef struct _TEB_ACTIVE_FRAME
275 {
276  ULONG Flags;
277  struct _TEB_ACTIVE_FRAME *Previous;
280 
281 typedef struct _TEB_ACTIVE_FRAME_EX
282 {
286 
287 #define TEB_ACTIVE_FRAME_CONTEXT_FLAG_EXTENDED 0x00000001
288 #define TEB_ACTIVE_FRAME_FLAG_EXTENDED 0x00000001
289 
290 /***********************************************************************
291  * PEB data structure
292  */
293 typedef struct _PEB
294 { /* win32/win64 */
295  BOOLEAN InheritedAddressSpace; /* 000/000 */
296  BOOLEAN ReadImageFileExecOptions; /* 001/001 */
297  BOOLEAN BeingDebugged; /* 002/002 */
298  BOOLEAN SpareBool; /* 003/003 */
299  HANDLE Mutant; /* 004/008 */
300  HMODULE ImageBaseAddress; /* 008/010 */
301  PPEB_LDR_DATA LdrData; /* 00c/018 */
303  PVOID SubSystemData; /* 014/028 */
304  HANDLE ProcessHeap; /* 018/030 */
306  PVOID /*PPEBLOCKROUTINE*/ FastPebLockRoutine; /* 020/040 */
307  PVOID /*PPEBLOCKROUTINE*/ FastPebUnlockRoutine; /* 024/048 */
308  ULONG EnvironmentUpdateCount; /* 028/050 */
309  PVOID KernelCallbackTable; /* 02c/058 */
310  ULONG Reserved[2]; /* 030/060 */
311  PVOID /*PPEB_FREE_BLOCK*/ FreeList; /* 038/068 */
312  ULONG TlsExpansionCounter; /* 03c/070 */
313  PRTL_BITMAP TlsBitmap; /* 040/078 */
314  ULONG TlsBitmapBits[2]; /* 044/080 */
315  PVOID ReadOnlySharedMemoryBase; /* 04c/088 */
316  PVOID ReadOnlySharedMemoryHeap; /* 050/090 */
317  PVOID *ReadOnlyStaticServerData; /* 054/098 */
318  PVOID AnsiCodePageData; /* 058/0a0 */
319  PVOID OemCodePageData; /* 05c/0a8 */
320  PVOID UnicodeCaseTableData; /* 060/0b0 */
321  ULONG NumberOfProcessors; /* 064/0b8 */
322  ULONG NtGlobalFlag; /* 068/0bc */
324  SIZE_T HeapSegmentReserve; /* 078/0c8 */
325  SIZE_T HeapSegmentCommit; /* 07c/0d0 */
328  ULONG NumberOfHeaps; /* 088/0e8 */
329  ULONG MaximumNumberOfHeaps; /* 08c/0ec */
330  PVOID *ProcessHeaps; /* 090/0f0 */
331  PVOID GdiSharedHandleTable; /* 094/0f8 */
332  PVOID ProcessStarterHelper; /* 098/100 */
333  PVOID GdiDCAttributeList; /* 09c/108 */
334  PVOID LoaderLock; /* 0a0/110 */
335  ULONG OSMajorVersion; /* 0a4/118 */
336  ULONG OSMinorVersion; /* 0a8/11c */
337  ULONG OSBuildNumber; /* 0ac/120 */
338  ULONG OSPlatformId; /* 0b0/124 */
339  ULONG ImageSubSystem; /* 0b4/128 */
342  ULONG ImageProcessAffinityMask; /* 0c0/134 */
343  HANDLE GdiHandleBuffer[28]; /* 0c4/138 */
344  ULONG unknown[6]; /* 134/218 */
346  PRTL_BITMAP TlsExpansionBitmap; /* 150/238 */
347  ULONG TlsExpansionBitmapBits[32]; /* 154/240 */
348  ULONG SessionId; /* 1d4/2c0 */
351  PVOID ShimData; /* 1e8/2d8 */
352  PVOID AppCompatInfo; /* 1ec/2e0 */
353  UNICODE_STRING CSDVersion; /* 1f0/2e8 */
358  SIZE_T MinimumStackCommit; /* 208/318 */
359  PVOID *FlsCallback; /* 20c/320 */
360  LIST_ENTRY FlsListHead; /* 210/328 */
361  PRTL_BITMAP FlsBitmap; /* 218/338 */
362  ULONG FlsBitmapBits[4]; /* 21c/340 */
363 } PEB, *PPEB;
364 
365 
366 /***********************************************************************
367  * TEB data structure
368  */
369 typedef struct _TEB
370 { /* win32/win64 */
371  NT_TIB Tib; /* 000/0000 */
372  PVOID EnvironmentPointer; /* 01c/0038 */
373  CLIENT_ID ClientId; /* 020/0040 */
374  PVOID ActiveRpcHandle; /* 028/0050 */
375  PVOID ThreadLocalStoragePointer; /* 02c/0058 */
376  PPEB Peb; /* 030/0060 */
377  ULONG LastErrorValue; /* 034/0068 */
378  ULONG CountOfOwnedCriticalSections; /* 038/006c */
379  PVOID CsrClientThread; /* 03c/0070 */
380  PVOID Win32ThreadInfo; /* 040/0078 */
381  ULONG Win32ClientInfo[31]; /* 044/0080 used for user32 private data in Wine */
382  PVOID WOW32Reserved; /* 0c0/0100 used for ntdll syscall thunks */
383  ULONG CurrentLocale; /* 0c4/0108 */
384  ULONG FpSoftwareStatusRegister; /* 0c8/010c */
385  PVOID SystemReserved1[54]; /* 0cc/0110 used for krnl386.exe16 private data in Wine */
386  LONG ExceptionCode; /* 1a4/02c0 */
388  BYTE SpareBytes1[24]; /* 1bc/02e8 */
389  PVOID SystemReserved2[10]; /* 1d4/0300 used for ntdll platform-specific private data in Wine */
390  GDI_TEB_BATCH GdiTebBatch; /* 1fc/0350 used for ntdll private data in Wine */
391  HANDLE gdiRgn; /* 6dc/0838 */
392  HANDLE gdiPen; /* 6e0/0840 */
393  HANDLE gdiBrush; /* 6e4/0848 */
394  CLIENT_ID RealClientId; /* 6e8/0850 */
395  HANDLE GdiCachedProcessHandle; /* 6f0/0860 */
396  ULONG GdiClientPID; /* 6f4/0868 */
397  ULONG GdiClientTID; /* 6f8/086c */
398  PVOID GdiThreadLocaleInfo; /* 6fc/0870 */
399  ULONG UserReserved[5]; /* 700/0878 */
400  PVOID glDispatchTable[280]; /* 714/0890 */
401  PVOID glReserved1[26]; /* b74/1150 */
402  PVOID glReserved2; /* bdc/1220 */
403  PVOID glSectionInfo; /* be0/1228 */
404  PVOID glSection; /* be4/1230 */
405  PVOID glTable; /* be8/1238 */
406  PVOID glCurrentRC; /* bec/1240 */
407  PVOID glContext; /* bf0/1248 */
408  ULONG LastStatusValue; /* bf4/1250 */
409  UNICODE_STRING StaticUnicodeString; /* bf8/1258 used by advapi32 */
410  WCHAR StaticUnicodeBuffer[261]; /* c00/1268 used by advapi32 */
411  PVOID DeallocationStack; /* e0c/1478 */
412  PVOID TlsSlots[64]; /* e10/1480 */
413  LIST_ENTRY TlsLinks; /* f10/1680 */
414  PVOID Vdm; /* f18/1690 */
415  PVOID ReservedForNtRpc; /* f1c/1698 */
416  PVOID DbgSsReserved[2]; /* f20/16a0 */
417  ULONG HardErrorDisabled; /* f28/16b0 */
418  PVOID Instrumentation[16]; /* f2c/16b8 */
419  PVOID WinSockData; /* f6c/1738 */
420  ULONG GdiBatchCount; /* f70/1740 */
421  ULONG Spare2; /* f74/1744 */
422  PVOID Spare3; /* f78/1748 used for fakedll thunks */
423  PVOID Spare4; /* f7c/1750 */
424  PVOID ReservedForOle; /* f80/1758 */
425  ULONG WaitingOnLoaderLock; /* f84/1760 */
426  PVOID Reserved5[3]; /* f88/1768 used for x86_64 OSX and wineserver shared memory */
427  PVOID *TlsExpansionSlots; /* f94/1780 */
428 #ifdef _WIN64
429  PVOID DeallocationBStore; /* /1788 */
430  PVOID BStoreLimit; /* /1790 */
431 #endif
432  ULONG ImpersonationLocale; /* f98/1798 */
433  ULONG IsImpersonating; /* f9c/179c */
434  PVOID NlsCache; /* fa0/17a0 */
435  PVOID ShimData; /* fa4/17a8 */
436  ULONG HeapVirtualAffinity; /* fa8/17b0 */
438  TEB_ACTIVE_FRAME *ActiveFrame; /* fb0/17c0 */
439  PVOID *FlsSlots; /* fb4/17c8 */
440 } TEB, *PTEB;
441 
442 /***********************************************************************
443  * Enums
444  */
445 
512 
526 
542 
558 
576 
594 
611 
612 typedef struct _FILE_BASIC_INFORMATION {
619 
620 typedef struct _FILE_STANDARD_INFORMATION {
627 
628 typedef struct _FILE_INTERNAL_INFORMATION {
631 
632 typedef struct _FILE_ID_128 {
635 
636 typedef struct _FILE_ID_INFORMATION {
640 
641 typedef struct _FILE_EA_INFORMATION {
644 
645 typedef struct _FILE_ACCESS_INFORMATION {
648 
649 typedef struct _FILE_NAME_INFORMATION {
653 
654 typedef struct _FILE_RENAME_INFORMATION {
660 
661 typedef struct _FILE_LINK_INFORMATION {
665  WCHAR FileName[1];
667 
668 typedef struct _FILE_NAMES_INFORMATION {
672  WCHAR FileName[1];
674 
675 typedef struct _FILE_DISPOSITION_INFORMATION {
678 
679 typedef struct _FILE_POSITION_INFORMATION {
682 
683 typedef struct _FILE_ALIGNMENT_INFORMATION {
686 
690 
691 typedef struct _FILE_END_OF_FILE_INFORMATION {
694 
695 typedef struct _FILE_NETWORK_OPEN_INFORMATION {
704 
705 typedef struct _FILE_FULL_EA_INFORMATION {
707  UCHAR Flags;
710  CHAR EaName[1];
712 
713 typedef struct _FILE_MODE_INFORMATION {
716 
718 {
725 
727 {
731 
739 
743 
744 typedef struct _FILE_PIPE_INFORMATION {
748 
761 
765  union {
766  struct {
770  } DUMMYSTRUCTNAME;
772  } DUMMYUNIONNAME;
774 
775 typedef struct _FILE_QUOTA_INFORMATION {
784 
789 
790 #define FILE_PIPE_DISCONNECTED_STATE 0x01
791 #define FILE_PIPE_LISTENING_STATE 0x02
792 #define FILE_PIPE_CONNECTED_STATE 0x03
793 #define FILE_PIPE_CLOSING_STATE 0x04
794 
795 typedef struct _FILE_ALL_INFORMATION {
806 
810 
811 #define FILE_SKIP_COMPLETION_PORT_ON_SUCCESS 0x1
812 #define FILE_SKIP_SET_EVENT_ON_HANDLE 0x2
813 #define FILE_SKIP_SET_USER_EVENT_ON_FAST_IO 0x4
814 
815 typedef enum _FSINFOCLASS {
826 
838 
846 
854 
855 typedef enum _PROCESSINFOCLASS {
908 
909 #define MEM_EXECUTE_OPTION_DISABLE 0x01
910 #define MEM_EXECUTE_OPTION_ENABLE 0x02
911 #define MEM_EXECUTE_OPTION_DISABLE_THUNK_EMULATION 0x04
912 #define MEM_EXECUTE_OPTION_PERMANENT 0x08
913 
914 typedef enum _SECTION_INHERIT {
918 
923  SystemTimeOfDayInformation = 3, /* was SystemTimeInformation */
1004 
1005 typedef enum _THREADINFOCLASS {
1041 } THREADINFOCLASS;
1042 
1043 typedef struct _THREAD_BASIC_INFORMATION
1044 {
1045  NTSTATUS ExitStatus;
1052 
1054 {
1058 
1059 typedef struct _KERNEL_USER_TIMES {
1065 
1066 typedef enum _WINSTATIONINFOCLASS {
1069 
1076 
1077 typedef struct _MEMORY_SECTION_NAME
1078 {
1081 
1083 {
1086 
1087 typedef struct _MUTANT_BASIC_INFORMATION {
1092 
1094 {
1097 
1098 typedef struct _TIMER_BASIC_INFORMATION
1099 {
1103 
1104 
1105 /* return type of RtlDetermineDosPathNameType_U (FIXME: not the correct names) */
1106 typedef enum
1107 {
1109  UNC_PATH, /* "//foo" */
1110  ABSOLUTE_DRIVE_PATH, /* "c:/foo" */
1111  RELATIVE_DRIVE_PATH, /* "c:foo" */
1112  ABSOLUTE_PATH, /* "/foo" */
1113  RELATIVE_PATH, /* "foo" */
1114  DEVICE_PATH, /* "//./foo" */
1115  UNC_DOT_PATH /* "//." */
1117 
1118 
1119 /***********************************************************************
1120  * Types and data structures
1121  */
1122 
1123 /* This is used by NtQuerySystemInformation */
1124 typedef struct _SYSTEM_THREAD_INFORMATION
1125 { /* win32/win64 */
1126  LARGE_INTEGER KernelTime; /* 00/00 */
1127  LARGE_INTEGER UserTime; /* 08/08 */
1128  LARGE_INTEGER CreateTime; /* 10/10 */
1129  DWORD dwTickCount; /* 18/18 */
1130  LPVOID StartAddress; /* 1c/20 */
1131  CLIENT_ID ClientId; /* 20/28 */
1133  DWORD dwBasePriority; /* 2c/3c */
1135  DWORD dwThreadState; /* 34/44 */
1136  DWORD dwWaitReason; /* 38/48 */
1137  DWORD dwUnknown; /* 3c/4c */
1139 
1140 typedef struct _IO_STATUS_BLOCK {
1141  union {
1142  NTSTATUS Status;
1143  PVOID Pointer;
1144  } DUMMYUNIONNAME;
1145 
1148 
1150 
1151 typedef struct _KEY_BASIC_INFORMATION {
1153  ULONG TitleIndex;
1154  ULONG NameLength;
1155  WCHAR Name[1];
1157 
1158 typedef struct _KEY_NODE_INFORMATION
1159 {
1161  ULONG TitleIndex;
1164  ULONG NameLength;
1165  WCHAR Name[1];
1166  /* Class[1]; */
1168 
1169 typedef struct _KEY_FULL_INFORMATION
1170 {
1172  ULONG TitleIndex;
1175  ULONG SubKeys;
1176  ULONG MaxNameLen;
1178  ULONG Values;
1181  WCHAR Class[1];
1183 
1184 typedef struct _KEY_NAME_INFORMATION {
1188 
1190 {
1200 
1201 typedef struct _KEY_VALUE_ENTRY
1202 {
1203  PUNICODE_STRING ValueName;
1204  ULONG DataLength;
1205  ULONG DataOffset;
1206  ULONG Type;
1208 
1209 typedef struct _KEY_VALUE_BASIC_INFORMATION {
1210  ULONG TitleIndex;
1211  ULONG Type;
1212  ULONG NameLength;
1213  WCHAR Name[1];
1215 
1216 typedef struct _KEY_VALUE_FULL_INFORMATION {
1217  ULONG TitleIndex;
1218  ULONG Type;
1219  ULONG DataOffset;
1220  ULONG DataLength;
1221  ULONG NameLength;
1222  WCHAR Name[1];
1224 
1225 typedef struct _KEY_VALUE_PARTIAL_INFORMATION {
1226  ULONG TitleIndex;
1227  ULONG Type;
1228  ULONG DataLength;
1229  UCHAR Data[1];
1231 
1232 #ifndef __OBJECT_ATTRIBUTES_DEFINED__
1233 #define __OBJECT_ATTRIBUTES_DEFINED__
1234 typedef struct _OBJECT_ATTRIBUTES {
1235  ULONG Length;
1237  PUNICODE_STRING ObjectName;
1238  ULONG Attributes;
1239  PVOID SecurityDescriptor; /* type SECURITY_DESCRIPTOR */
1240  PVOID SecurityQualityOfService; /* type SECURITY_QUALITY_OF_SERVICE */
1242 #endif
1243 
1248 
1262 
1263 typedef struct _OBJECT_NAME_INFORMATION {
1266 
1292 
1294 {
1297 
1298 typedef struct _PROCESS_BASIC_INFORMATION {
1299 #ifdef __WINESRC__
1301  PPEB PebBaseAddress;
1306 #else
1307  PVOID Reserved1;
1308  PPEB PebBaseAddress;
1309  PVOID Reserved2[2];
1311  PVOID Reserved3;
1312 #endif
1314 
1315 #define PROCESS_PRIOCLASS_IDLE 1
1316 #define PROCESS_PRIOCLASS_NORMAL 2
1317 #define PROCESS_PRIOCLASS_HIGH 3
1318 #define PROCESS_PRIOCLASS_REALTIME 4
1319 #define PROCESS_PRIOCLASS_BELOW_NORMAL 5
1320 #define PROCESS_PRIOCLASS_ABOVE_NORMAL 6
1321 
1322 typedef struct _PROCESS_PRIORITY_CLASS {
1326 
1327 typedef struct _RTL_HEAP_DEFINITION {
1328  ULONG Length; /* = sizeof(RTL_HEAP_DEFINITION) */
1329 
1332 
1333 typedef struct _RTL_RWLOCK {
1335 
1338 
1341 
1345  PVOID pDebugInfo;
1347 
1348 /* System Information Class 0x00 */
1349 
1350 typedef struct _SYSTEM_BASIC_INFORMATION {
1351 #ifdef __WINESRC__
1352  DWORD unknown;
1354  ULONG PageSize;
1359  PVOID LowestUserAddress;
1360  PVOID HighestUserAddress;
1363 #else
1364  BYTE Reserved1[24];
1365  PVOID Reserved2[4];
1367 #endif
1369 
1370 /* System Information Class 0x01 */
1371 
1372 typedef struct _SYSTEM_CPU_INFORMATION {
1375  WORD Revision; /* combination of CPU model and stepping */
1376  WORD Reserved; /* always zero */
1377  DWORD FeatureSet; /* see bit flags below */
1379 
1380 /* definitions of bits in the Feature set for the x86 processors */
1381 #define CPU_FEATURE_VME 0x00000005 /* Virtual 86 Mode Extensions */
1382 #define CPU_FEATURE_TSC 0x00000002 /* Time Stamp Counter available */
1383 #define CPU_FEATURE_CMOV 0x00000008 /* Conditional Move instruction*/
1384 #define CPU_FEATURE_PGE 0x00000014 /* Page table Entry Global bit */
1385 #define CPU_FEATURE_PSE 0x00000024 /* Page Size Extension */
1386 #define CPU_FEATURE_MTRR 0x00000040 /* Memory Type Range Registers */
1387 #define CPU_FEATURE_CX8 0x00000080 /* Compare and eXchange 8 byte instr. */
1388 #define CPU_FEATURE_MMX 0x00000100 /* Multi Media eXtensions */
1389 #define CPU_FEATURE_X86 0x00000200 /* seems to be always ON, on the '86 */
1390 #define CPU_FEATURE_PAT 0x00000400 /* Page Attribute Table */
1391 #define CPU_FEATURE_FXSR 0x00000800 /* FXSAVE and FXSTORE instructions */
1392 #define CPU_FEATURE_SEP 0x00001000 /* SYSENTER and SYSEXIT instructions */
1393 #define CPU_FEATURE_SSE 0x00002000 /* SSE extensions (ext. MMX) */
1394 #define CPU_FEATURE_3DNOW 0x00004000 /* 3DNOW instructions available */
1395 #define CPU_FEATURE_SSE2 0x00010000 /* SSE2 extensions (XMMI64) */
1396 #define CPU_FEATURE_DS 0x00020000 /* Debug Store */
1397 #define CPU_FEATURE_HTT 0x00040000 /* Hyper Threading Technology */
1398 
1399 /* System Information Class 0x02 */
1400 
1401 /* Documented in "Windows NT/2000 Native API Reference" by Gary Nebbett. */
1402 typedef struct _SYSTEM_PERFORMANCE_INFORMATION {
1477 
1478 /* System Information Class 0x03 */
1479 
1480 typedef struct _SYSTEM_TIMEOFDAY_INFORMATION {
1481 #ifdef __WINESRC__
1482  LARGE_INTEGER liKeBootTime;
1483  LARGE_INTEGER liKeSystemTime;
1484  LARGE_INTEGER liExpTimeZoneBias;
1485  ULONG uCurrentTimeZoneId;
1486  DWORD dwUnknown1[5];
1487 #else
1488  BYTE Reserved1[48];
1489 #endif
1490 } SYSTEM_TIMEOFDAY_INFORMATION, *PSYSTEM_TIMEOFDAY_INFORMATION; /* was SYSTEM_TIME_INFORMATION */
1491 
1492 /* System Information Class 0x08 */
1493 
1499  ULONG Reserved2;
1501 
1502 /* System Information Class 0x0b */
1503 
1505  PVOID pvAddress;
1510  char szName[MAX_PATH + 1];
1512 
1513 /* System Information Class 0x10 */
1514 
1515 typedef struct _SYSTEM_HANDLE_ENTRY {
1523 
1524 typedef struct _SYSTEM_HANDLE_INFORMATION {
1528 
1529 /* System Information Class 0x40 */
1530 
1532 {
1533  PVOID Object;
1540  ULONG Reserved;
1542 
1543 typedef struct _SYSTEM_HANDLE_INFORMATION_EX
1544 {
1545  ULONG_PTR Count;
1549 
1550 /* System Information Class 0x15 */
1551 
1559 #ifdef _WIN64
1560  ULONG unknown64[7];
1561 #endif
1563 
1564 /* System Information Class 0x17 */
1565 
1566 typedef struct _SYSTEM_INTERRUPT_INFORMATION {
1567  BYTE Reserved1[24];
1569 
1571  union {
1573  struct {
1576  } tag1;
1577  } tag2;
1588 
1589 typedef struct _SYSTEM_EXCEPTION_INFORMATION {
1590  BYTE Reserved1[16];
1592 
1593 typedef struct _SYSTEM_LOOKASIDE_INFORMATION {
1594  BYTE Reserved1[32];
1596 
1597 typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION {
1601 
1602 /* System Information Class 0x05 */
1603 
1604 typedef struct _VM_COUNTERS_ {
1618 
1619 typedef struct _SYSTEM_PROCESS_INFORMATION {
1620 #ifdef __WINESRC__ /* win32/win64 */
1621  ULONG NextEntryOffset; /* 00/00 */
1622  DWORD dwThreadCount; /* 04/04 */
1623  DWORD dwUnknown1[6]; /* 08/08 */
1624  LARGE_INTEGER CreationTime; /* 20/20 */
1625  LARGE_INTEGER UserTime; /* 28/28 */
1626  LARGE_INTEGER KernelTime; /* 30/30 */
1627  UNICODE_STRING ProcessName; /* 38/38 */
1628  DWORD dwBasePriority; /* 40/48 */
1629  HANDLE UniqueProcessId; /* 44/50 */
1630  HANDLE ParentProcessId; /* 48/58 */
1631  ULONG HandleCount; /* 4c/60 */
1632  ULONG SessionId; /* 50/64 */
1633  DWORD dwUnknown4; /* 54/68 */
1634  VM_COUNTERS vmCounters; /* 58/70 */
1635  IO_COUNTERS ioCounters; /* 88/d0 */
1636  SYSTEM_THREAD_INFORMATION ti[1]; /* b8/100 */
1637 #else
1638  ULONG NextEntryOffset; /* 00/00 */
1639  BYTE Reserved1[52]; /* 04/04 */
1640  PVOID Reserved2[3]; /* 38/38 */
1641  HANDLE UniqueProcessId; /* 44/50 */
1642  PVOID Reserved3; /* 48/58 */
1643  ULONG HandleCount; /* 4c/60 */
1644  BYTE Reserved4[4]; /* 50/64 */
1645  PVOID Reserved5[11]; /* 54/68 */
1646  SIZE_T PeakPagefileUsage; /* 80/c0 */
1647  SIZE_T PrivatePageCount; /* 84/c8 */
1648  LARGE_INTEGER Reserved6[6]; /* 88/d0 */
1649 #endif
1651 
1652 typedef struct _SYSTEM_REGISTRY_QUOTA_INFORMATION {
1655  PVOID Reserved1;
1657 
1658 typedef struct _SYSTEM_TIME_ADJUSTMENT {
1662 
1663 typedef struct _WINSTATIONINFORMATIONW {
1664  BYTE Reserved2[70];
1665  ULONG LogonId;
1666  BYTE Reserved3[1140];
1668 
1670 
1671 typedef struct _LDR_RESOURCE_INFO
1672 {
1673  ULONG_PTR Type;
1674  ULONG_PTR Name;
1675  ULONG Language;
1677 
1678 
1679 /* debug buffer definitions */
1680 
1681 typedef struct _DEBUG_BUFFER {
1687  ULONG Unknown[2];
1690  ULONG SizeOfInfo;
1697  PVOID Reserved[8];
1699 
1700 #define PDI_MODULES 0x01
1701 #define PDI_BACKTRACE 0x02
1702 #define PDI_HEAPS 0x04
1703 #define PDI_HEAP_TAGS 0x08
1704 #define PDI_HEAP_BLOCKS 0x10
1705 #define PDI_LOCKS 0x20
1706 
1708  ULONG Reserved[2];
1709  ULONG Base;
1710  ULONG Size;
1711  ULONG Flags;
1718 
1719 typedef struct _DEBUG_HEAP_INFORMATION {
1720  ULONG Base;
1721  ULONG Flags;
1724  ULONG Allocated;
1725  ULONG Committed;
1726  ULONG TagCount;
1727  ULONG BlockCount;
1728  ULONG Reserved[7];
1729  PVOID Tags;
1730  PVOID Blocks;
1732 
1733 typedef struct _DEBUG_LOCK_INFORMATION {
1734  PVOID Address;
1740  ULONG EntryCount;
1745 
1746 typedef struct _PORT_MESSAGE_HEADER {
1752  ULONG MessageId;
1755 
1756 typedef unsigned short RTL_ATOM, *PRTL_ATOM;
1757 
1758 /* Wine doesn't implement atom table as NT does:
1759  * - in NT, atom tables are user space tables, which ntdll directly accesses
1760  * - on Wine, (even local) atom tables are wineserver objects, hence a HANDLE
1761  */
1762 typedef struct atom_table *RTL_ATOM_TABLE, **PRTL_ATOM_TABLE;
1763 
1768 
1769 typedef struct _ATOM_BASIC_INFORMATION {
1773  WCHAR Name[1];
1775 
1776 /* FIXME: names probably not correct */
1777 typedef struct _RTL_HANDLE
1778 {
1779  struct _RTL_HANDLE * Next;
1780 } RTL_HANDLE;
1781 
1782 /* FIXME: names probably not correct */
1783 typedef struct _RTL_HANDLE_TABLE
1784 {
1785  ULONG MaxHandleCount; /* 0x00 */
1786  ULONG HandleSize; /* 0x04 */
1787  ULONG Unused[2]; /* 0x08-0x0c */
1788  PVOID NextFree; /* 0x10 */
1789  PVOID FirstHandle; /* 0x14 */
1790  PVOID ReservedMemory; /* 0x18 */
1791  PVOID MaxHandle; /* 0x1c */
1793 
1794 /***********************************************************************
1795  * Defines
1796  */
1797 
1798 /* flags for NtCreateFile and NtOpenFile */
1799 #define FILE_DIRECTORY_FILE 0x00000001
1800 #define FILE_WRITE_THROUGH 0x00000002
1801 #define FILE_SEQUENTIAL_ONLY 0x00000004
1802 #define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008
1803 #define FILE_SYNCHRONOUS_IO_ALERT 0x00000010
1804 #define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020
1805 #define FILE_NON_DIRECTORY_FILE 0x00000040
1806 #define FILE_CREATE_TREE_CONNECTION 0x00000080
1807 #define FILE_COMPLETE_IF_OPLOCKED 0x00000100
1808 #define FILE_NO_EA_KNOWLEDGE 0x00000200
1809 #define FILE_OPEN_FOR_RECOVERY 0x00000400
1810 #define FILE_RANDOM_ACCESS 0x00000800
1811 #define FILE_DELETE_ON_CLOSE 0x00001000
1812 #define FILE_OPEN_BY_FILE_ID 0x00002000
1813 #define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000
1814 #define FILE_NO_COMPRESSION 0x00008000
1815 #define FILE_RESERVE_OPFILTER 0x00100000
1816 #define FILE_TRANSACTED_MODE 0x00200000
1817 #define FILE_OPEN_OFFLINE_FILE 0x00400000
1818 #define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000
1819 
1820 #define FILE_ATTRIBUTE_VALID_FLAGS 0x00007fb7
1821 #define FILE_ATTRIBUTE_VALID_SET_FLAGS 0x000031a7
1822 
1823 /* status for NtCreateFile or NtOpenFile */
1824 #define FILE_SUPERSEDED 0
1825 #define FILE_OPENED 1
1826 #define FILE_CREATED 2
1827 #define FILE_OVERWRITTEN 3
1828 #define FILE_EXISTS 4
1829 #define FILE_DOES_NOT_EXIST 5
1830 
1831 /* disposition for NtCreateFile */
1832 #define FILE_SUPERSEDE 0
1833 #define FILE_OPEN 1
1834 #define FILE_CREATE 2
1835 #define FILE_OPEN_IF 3
1836 #define FILE_OVERWRITE 4
1837 #define FILE_OVERWRITE_IF 5
1838 #define FILE_MAXIMUM_DISPOSITION 5
1839 
1840 /* Characteristics of a File System */
1841 #define FILE_REMOVABLE_MEDIA 0x00000001
1842 #define FILE_READ_ONLY_DEVICE 0x00000002
1843 #define FILE_FLOPPY_DISKETTE 0x00000004
1844 #define FILE_WRITE_ONE_MEDIA 0x00000008
1845 #define FILE_REMOTE_DEVICE 0x00000010
1846 #define FILE_DEVICE_IS_MOUNTED 0x00000020
1847 #define FILE_VIRTUAL_VOLUME 0x00000040
1848 #define FILE_AUTOGENERATED_DEVICE_NAME 0x00000080
1849 #define FILE_DEVICE_SECURE_OPEN 0x00000100
1850 #define FILE_CHARACTERISTIC_PNP_DEVICE 0x00000800
1851 #define FILE_CHARACTERISTIC_TS_DEVICE 0x00001000
1852 #define FILE_CHARACTERISTIC_WEBDAV_DEVICE 0x00002000
1853 #define FILE_CHARACTERISTIC_CSV 0x00010000
1854 #define FILE_DEVICE_ALLOW_APPCONTAINER_TRAVERSAL 0x00020000
1855 #define FILE_PORTABLE_DEVICE 0x00040000
1856 
1857 /* options for NtCreateNamedPipeFile */
1858 #define FILE_PIPE_INBOUND 0x00000000
1859 #define FILE_PIPE_OUTBOUND 0x00000001
1860 #define FILE_PIPE_FULL_DUPLEX 0x00000002
1861 
1862 /* options for pipe's type */
1863 #define FILE_PIPE_TYPE_MESSAGE 0x00000001
1864 #define FILE_PIPE_TYPE_BYTE 0x00000000
1865 /* options for pipe's message mode */
1866 #define FILE_PIPE_MESSAGE_MODE 0x00000001
1867 #define FILE_PIPE_BYTE_STREAM_MODE 0x00000000
1868 /* options for pipe's blocking mode */
1869 #define FILE_PIPE_COMPLETE_OPERATION 0x00000001
1870 #define FILE_PIPE_QUEUE_OPERATION 0x00000000
1871 /* and client / server end */
1872 #define FILE_PIPE_SERVER_END 0x00000001
1873 #define FILE_PIPE_CLIENT_END 0x00000000
1874 
1875 #define INTERNAL_TS_ACTIVE_CONSOLE_ID ( *((volatile ULONG*)(0x7ffe02d8)) )
1876 
1877 #define LOGONID_CURRENT ((ULONG)-1)
1878 
1879 #define OBJ_INHERIT 0x00000002
1880 #define OBJ_PERMANENT 0x00000010
1881 #define OBJ_EXCLUSIVE 0x00000020
1882 #define OBJ_CASE_INSENSITIVE 0x00000040
1883 #define OBJ_OPENIF 0x00000080
1884 #define OBJ_OPENLINK 0x00000100
1885 #define OBJ_KERNEL_HANDLE 0x00000200
1886 #define OBJ_FORCE_ACCESS_CHECK 0x00000400
1887 #define OBJ_VALID_ATTRIBUTES 0x000007F2
1888 
1889 #define SERVERNAME_CURRENT ((HANDLE)NULL)
1890 
1891 typedef void (CALLBACK *PNTAPCFUNC)(ULONG_PTR,ULONG_PTR,ULONG_PTR); /* FIXME: not the right name */
1892 typedef void (CALLBACK *PRTL_THREAD_START_ROUTINE)(LPVOID); /* FIXME: not the right name */
1893 typedef DWORD (CALLBACK *PRTL_WORK_ITEM_ROUTINE)(LPVOID); /* FIXME: not the right name */
1894 typedef void (NTAPI *RTL_WAITORTIMERCALLBACKFUNC)(PVOID,BOOLEAN); /* FIXME: not the right name */
1895 
1896 
1897 /* DbgPrintEx default levels */
1898 #define DPFLTR_ERROR_LEVEL 0
1899 #define DPFLTR_WARNING_LEVEL 1
1900 #define DPFLTR_TRACE_LEVEL 2
1901 #define DPFLTR_INFO_LEVEL 3
1902 #define DPFLTR_MASK 0x8000000
1903 
1904 /* Well-known LUID values */
1905 #define SE_MIN_WELL_KNOWN_PRIVILEGE 2
1906 #define SE_CREATE_TOKEN_PRIVILEGE 2
1907 #define SE_ASSIGNPRIMARYTOKEN_PRIVILEGE 3
1908 #define SE_LOCK_MEMORY_PRIVILEGE 4
1909 #define SE_INCREASE_QUOTA_PRIVILEGE 5
1910 #define SE_UNSOLICITED_INPUT_PRIVILEGE 6 /* obsolete */
1911 #define SE_MACHINE_ACCOUNT_PRIVILEGE 6
1912 #define SE_TCB_PRIVILEGE 7
1913 #define SE_SECURITY_PRIVILEGE 8
1914 #define SE_TAKE_OWNERSHIP_PRIVILEGE 9
1915 #define SE_LOAD_DRIVER_PRIVILEGE 10
1916 #define SE_SYSTEM_PROFILE_PRIVILEGE 11
1917 #define SE_SYSTEMTIME_PRIVILEGE 12
1918 #define SE_PROF_SINGLE_PROCESS_PRIVILEGE 13
1919 #define SE_INC_BASE_PRIORITY_PRIVILEGE 14
1920 #define SE_CREATE_PAGEFILE_PRIVILEGE 15
1921 #define SE_CREATE_PERMANENT_PRIVILEGE 16
1922 #define SE_BACKUP_PRIVILEGE 17
1923 #define SE_RESTORE_PRIVILEGE 18
1924 #define SE_SHUTDOWN_PRIVILEGE 19
1925 #define SE_DEBUG_PRIVILEGE 20
1926 #define SE_AUDIT_PRIVILEGE 21
1927 #define SE_SYSTEM_ENVIRONMENT_PRIVILEGE 22
1928 #define SE_CHANGE_NOTIFY_PRIVILEGE 23
1929 #define SE_REMOTE_SHUTDOWN_PRIVILEGE 24
1930 #define SE_UNDOCK_PRIVILEGE 25
1931 #define SE_SYNC_AGENT_PRIVILEGE 26
1932 #define SE_ENABLE_DELEGATION_PRIVILEGE 27
1933 #define SE_MANAGE_VOLUME_PRIVILEGE 28
1934 #define SE_IMPERSONATE_PRIVILEGE 29
1935 #define SE_CREATE_GLOBAL_PRIVILEGE 30
1936 #define SE_MAX_WELL_KNOWN_PRIVILEGE SE_CREATE_GLOBAL_PRIVILEGE
1937 
1938 /* NtGlobalFlag bits */
1939 #define FLG_STOP_ON_EXCEPTION 0x00000001
1940 #define FLG_SHOW_LDR_SNAPS 0x00000002
1941 #define FLG_DEBUG_INITIAL_COMMAND 0x00000004
1942 #define FLG_STOP_ON_HUNG_GUI 0x00000008
1943 #define FLG_HEAP_ENABLE_TAIL_CHECK 0x00000010
1944 #define FLG_HEAP_ENABLE_FREE_CHECK 0x00000020
1945 #define FLG_HEAP_VALIDATE_PARAMETERS 0x00000040
1946 #define FLG_HEAP_VALIDATE_ALL 0x00000080
1947 #define FLG_APPLICATION_VERIFIER 0x00000100
1948 #define FLG_POOL_ENABLE_TAGGING 0x00000400
1949 #define FLG_HEAP_ENABLE_TAGGING 0x00000800
1950 #define FLG_USER_STACK_TRACE_DB 0x00001000
1951 #define FLG_KERNEL_STACK_TRACE_DB 0x00002000
1952 #define FLG_MAINTAIN_OBJECT_TYPELIST 0x00004000
1953 #define FLG_HEAP_ENABLE_TAG_BY_DLL 0x00008000
1954 #define FLG_DISABLE_STACK_EXTENSION 0x00010000
1955 #define FLG_ENABLE_CSRDEBUG 0x00020000
1956 #define FLG_ENABLE_KDEBUG_SYMBOL_LOAD 0x00040000
1957 #define FLG_DISABLE_PAGE_KERNEL_STACKS 0x00080000
1958 #define FLG_ENABLE_SYSTEM_CRIT_BREAKS 0x00100000
1959 #define FLG_HEAP_DISABLE_COALESCING 0x00200000
1960 #define FLG_ENABLE_CLOSE_EXCEPTIONS 0x00400000
1961 #define FLG_ENABLE_EXCEPTION_LOGGING 0x00800000
1962 #define FLG_ENABLE_HANDLE_TYPE_TAGGING 0x01000000
1963 #define FLG_HEAP_PAGE_ALLOCS 0x02000000
1964 #define FLG_DEBUG_INITIAL_COMMAND_EX 0x04000000
1965 #define FLG_DISABLE_DBGPRINT 0x08000000
1966 #define FLG_CRITSEC_EVENT_CREATION 0x10000000
1967 #define FLG_LDR_TOP_DOWN 0x20000000
1968 #define FLG_ENABLE_HANDLE_EXCEPTIONS 0x40000000
1969 #define FLG_DISABLE_PROTDLLS 0x80000000
1970 
1971 /* Rtl*Registry* functions structs and defines */
1972 #define RTL_REGISTRY_ABSOLUTE 0
1973 #define RTL_REGISTRY_SERVICES 1
1974 #define RTL_REGISTRY_CONTROL 2
1975 #define RTL_REGISTRY_WINDOWS_NT 3
1976 #define RTL_REGISTRY_DEVICEMAP 4
1977 #define RTL_REGISTRY_USER 5
1978 
1979 #define RTL_REGISTRY_HANDLE 0x40000000
1980 #define RTL_REGISTRY_OPTIONAL 0x80000000
1981 
1982 #define RTL_QUERY_REGISTRY_SUBKEY 0x00000001
1983 #define RTL_QUERY_REGISTRY_TOPKEY 0x00000002
1984 #define RTL_QUERY_REGISTRY_REQUIRED 0x00000004
1985 #define RTL_QUERY_REGISTRY_NOVALUE 0x00000008
1986 #define RTL_QUERY_REGISTRY_NOEXPAND 0x00000010
1987 #define RTL_QUERY_REGISTRY_DIRECT 0x00000020
1988 #define RTL_QUERY_REGISTRY_DELETE 0x00000040
1989 
1991  ULONG ValueType,
1992  PVOID ValueData,
1993  ULONG ValueLength,
1994  PVOID Context,
1995  PVOID EntryContext);
1996 
1997 typedef struct _RTL_QUERY_REGISTRY_TABLE
1998 {
2000  ULONG Flags;
2001  PWSTR Name;
2002  PVOID EntryContext;
2003  ULONG DefaultType;
2004  PVOID DefaultData;
2005  ULONG DefaultLength;
2007 
2009 {
2010  PUNICODE_STRING ValueName;
2011  ULONG DataLength;
2012  ULONG DataOffset;
2013  ULONG Type;
2015 
2017 
2019 
2023 
2024 typedef struct _EVENT_BASIC_INFORMATION {
2026  LONG EventState;
2028 
2032 
2033 typedef struct _SEMAPHORE_BASIC_INFORMATION {
2037 
2039 {
2043 
2044 typedef struct _SECTION_BASIC_INFORMATION {
2045  PVOID BaseAddress;
2046  ULONG Attributes;
2049 
2050 typedef struct _SECTION_IMAGE_INFORMATION {
2051  PVOID TransferAddress;
2052  ULONG ZeroBits;
2055  ULONG SubSystemType;
2058  ULONG GpValue;
2061  USHORT Machine;
2063  union
2064  {
2065  UCHAR ImageFlags;
2066  struct
2067  {
2069  UCHAR ComPlusILOnly : 1;
2071  UCHAR ImageMappedFlat : 1;
2073  UCHAR Reserved : 3;
2074  } DUMMYSTRUCTNAME;
2075  } DUMMYUNIONNAME;
2076  ULONG LoaderFlags;
2077  ULONG ImageFileSize;
2078  ULONG CheckSum;
2080 
2081 typedef struct _LPC_SECTION_WRITE {
2082  ULONG Length;
2083  HANDLE SectionHandle;
2084  ULONG SectionOffset;
2085  ULONG ViewSize;
2086  PVOID ViewBase;
2087  PVOID TargetViewBase;
2089 
2090 typedef struct _LPC_SECTION_READ {
2091  ULONG Length;
2092  ULONG ViewSize;
2093  PVOID ViewBase;
2095 
2096 typedef struct _LPC_MESSAGE {
2097  USHORT DataSize;
2102  ULONG_PTR MessageId;
2103  ULONG_PTR SectionSize;
2106 
2107 typedef struct _RTL_USER_PROCESS_INFORMATION
2108 {
2109  ULONG Length;
2110  HANDLE Process;
2111  HANDLE Thread;
2115 
2116 typedef enum _SHUTDOWN_ACTION {
2121 
2122 typedef enum _KPROFILE_SOURCE {
2149 
2154 
2155 typedef struct _INITIAL_TEB {
2156  PVOID StackBase;
2157  PVOID StackLimit;
2162 
2166 
2170 
2173  ULONG_PTR CompletionKey;
2175 
2176 #define IO_COMPLETION_QUERY_STATE 0x0001
2177 #define IO_COMPLETION_MODIFY_STATE 0x0002
2178 #define IO_COMPLETION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
2179 
2189 
2190 typedef enum _HARDERROR_RESPONSE {
2201 
2202 typedef enum _SYSDBG_COMMAND {
2224 
2225 
2226 /*************************************************************************
2227  * Loader structures
2228  *
2229  * Those are not part of standard Winternl.h
2230  */
2231 typedef struct _LDR_MODULE
2232 {
2237  void* EntryPoint;
2241  ULONG Flags;
2252  ULONG_PTR OriginalBase;
2254 
2255  /* Not part of Win7 but used by Wine */
2258 
2259 typedef struct _LDR_DLL_LOADED_NOTIFICATION_DATA
2260 {
2261  ULONG Flags;
2262  PCUNICODE_STRING FullDllName;
2263  PCUNICODE_STRING BaseDllName;
2264  PVOID DllBase;
2265  ULONG SizeOfImage;
2267 
2269 {
2270  ULONG Flags;
2271  PCUNICODE_STRING FullDllName;
2272  PCUNICODE_STRING BaseDllName;
2273  PVOID DllBase;
2276 
2278 {
2282 
2284 
2285 /* those defines are (some of the) regular LDR_MODULE.Flags values */
2286 #define LDR_IMAGE_IS_DLL 0x00000004
2287 #define LDR_LOAD_IN_PROGRESS 0x00001000
2288 #define LDR_UNLOAD_IN_PROGRESS 0x00002000
2289 #define LDR_NO_DLL_CALLS 0x00040000
2290 #define LDR_PROCESS_ATTACHED 0x00080000
2291 #define LDR_MODULE_REBASED 0x00200000
2292 
2293 /* these ones is Wine specific */
2294 #define LDR_DONT_RESOLVE_REFS 0x40000000
2295 #define LDR_WINE_INTERNAL 0x80000000
2296 
2297 /* flag for LdrAddRefDll */
2298 #define LDR_ADDREF_DLL_PIN 0x00000001
2299 
2300 /* FIXME: to be checked */
2301 #define MAXIMUM_FILENAME_LENGTH 256
2302 
2303 #define LDR_DLL_NOTIFICATION_REASON_LOADED 1
2304 #define LDR_DLL_NOTIFICATION_REASON_UNLOADED 2
2305 
2306 typedef struct _SYSTEM_MODULE
2307 {
2308  PVOID Reserved1; /* 00/00 */
2309  PVOID Reserved2; /* 04/08 */
2310  PVOID ImageBaseAddress; /* 08/10 */
2311  ULONG ImageSize; /* 0c/18 */
2312  ULONG Flags; /* 10/1c */
2313  WORD Id; /* 14/20 */
2314  WORD Rank; /* 16/22 */
2315  WORD Unknown; /* 18/24 */
2316  WORD NameOffset; /* 1a/26 */
2319 
2320 typedef struct _SYSTEM_MODULE_INFORMATION
2321 {
2323  SYSTEM_MODULE Modules[1]; /* FIXME: should be Modules[0] */
2325 
2326 #define THREAD_CREATE_FLAGS_CREATE_SUSPENDED 0x00000001
2327 #define THREAD_CREATE_FLAGS_SKIP_THREAD_ATTACH 0x00000002
2328 #define THREAD_CREATE_FLAGS_HIDE_FROM_DEBUGGER 0x00000004
2329 #define THREAD_CREATE_FLAGS_HAS_SECURITY_DESCRIPTOR 0x00000010
2330 #define THREAD_CREATE_FLAGS_ACCESS_CHECK_IN_TARGET 0x00000020
2331 #define THREAD_CREATE_FLAGS_INITIAL_THREAD 0x00000080
2332 
2333 /***********************************************************************
2334  * Function declarations
2335  */
2336 
2337 #if defined(__i386__) && defined(__GNUC__)
2338 static inline void WINAPI DbgBreakPoint(void) { __asm__ __volatile__("int3"); }
2339 static inline void WINAPI DbgUserBreakPoint(void) { __asm__ __volatile__("int3"); }
2340 #else /* __i386__ && __GNUC__ */
2341 NTSYSAPI void WINAPI DbgBreakPoint(void);
2342 NTSYSAPI void WINAPI DbgUserBreakPoint(void);
2343 #endif /* __i386__ && __GNUC__ */
2344 #ifndef __REACTOS__
2345 NTSYSAPI NTSTATUS WINAPIV DbgPrint(LPCSTR fmt, ...);
2346 #endif /* __REACTOS__ */
2347 NTSYSAPI NTSTATUS WINAPIV DbgPrintEx(ULONG iComponentId, ULONG Level, LPCSTR fmt, ...);
2349 NTSYSAPI NTSTATUS WINAPI LdrAddRefDll(ULONG,HMODULE);
2353 NTSYSAPI NTSTATUS WINAPI LdrFindEntryForAddress(const void*, PLDR_MODULE*);
2354 NTSYSAPI NTSTATUS WINAPI LdrGetDllHandle(LPCWSTR, ULONG, const UNICODE_STRING*, HMODULE*);
2355 NTSYSAPI NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE, const ANSI_STRING*, ULONG, void**);
2356 NTSYSAPI void WINAPI LdrInitializeThunk(void*,ULONG_PTR,ULONG_PTR,ULONG_PTR);
2357 NTSYSAPI NTSTATUS WINAPI LdrLoadDll(LPCWSTR, DWORD, const UNICODE_STRING*, HMODULE*);
2358 NTSYSAPI NTSTATUS WINAPI LdrLockLoaderLock(ULONG,ULONG*,ULONG_PTR*);
2360 NTSYSAPI NTSTATUS WINAPI LdrQueryImageFileExecutionOptions(const UNICODE_STRING*,LPCWSTR,ULONG,void*,ULONG,ULONG*);
2363 NTSYSAPI void WINAPI LdrShutdownThread(void);
2365 NTSYSAPI NTSTATUS WINAPI LdrUnlockLoaderLock(ULONG,ULONG_PTR);
2366 NTSYSAPI NTSTATUS WINAPI NtAcceptConnectPort(PHANDLE,ULONG,PLPC_MESSAGE,BOOLEAN,PLPC_SECTION_WRITE,PLPC_SECTION_READ);
2368 NTSYSAPI NTSTATUS WINAPI NtAccessCheckAndAuditAlarm(PUNICODE_STRING,HANDLE,PUNICODE_STRING,PUNICODE_STRING,PSECURITY_DESCRIPTOR,ACCESS_MASK,PGENERIC_MAPPING,BOOLEAN,PACCESS_MASK,PBOOLEAN,PBOOLEAN);
2369 NTSYSAPI NTSTATUS WINAPI NtAddAtom(const WCHAR*,ULONG,RTL_ATOM*);
2372 NTSYSAPI NTSTATUS WINAPI NtAlertResumeThread(HANDLE,PULONG);
2373 NTSYSAPI NTSTATUS WINAPI NtAlertThread(HANDLE ThreadHandle);
2376 NTSYSAPI NTSTATUS WINAPI NtAllocateVirtualMemory(HANDLE,PVOID*,ULONG,SIZE_T*,ULONG,ULONG);
2377 NTSYSAPI NTSTATUS WINAPI NtAreMappedFilesTheSame(PVOID,PVOID);
2378 NTSYSAPI NTSTATUS WINAPI NtAssignProcessToJobObject(HANDLE,HANDLE);
2379 NTSYSAPI NTSTATUS WINAPI NtCallbackReturn(PVOID,ULONG,NTSTATUS);
2380 NTSYSAPI NTSTATUS WINAPI NtCancelIoFile(HANDLE,PIO_STATUS_BLOCK);
2381 NTSYSAPI NTSTATUS WINAPI NtCancelIoFileEx(HANDLE,PIO_STATUS_BLOCK,PIO_STATUS_BLOCK);
2382 NTSYSAPI NTSTATUS WINAPI NtCancelTimer(HANDLE, BOOLEAN*);
2383 NTSYSAPI NTSTATUS WINAPI NtClearEvent(HANDLE);
2384 NTSYSAPI NTSTATUS WINAPI NtClose(HANDLE);
2385 NTSYSAPI NTSTATUS WINAPI NtCloseObjectAuditAlarm(PUNICODE_STRING,HANDLE,BOOLEAN);
2386 NTSYSAPI NTSTATUS WINAPI NtCompleteConnectPort(HANDLE);
2387 NTSYSAPI NTSTATUS WINAPI NtConnectPort(PHANDLE,PUNICODE_STRING,PSECURITY_QUALITY_OF_SERVICE,PLPC_SECTION_WRITE,PLPC_SECTION_READ,PULONG,PVOID,PULONG);
2389 NTSYSAPI NTSTATUS WINAPI NtCreateDirectoryObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
2391 NTSYSAPI NTSTATUS WINAPI NtCreateEventPair(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
2392 NTSYSAPI NTSTATUS WINAPI NtCreateFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,PLARGE_INTEGER,ULONG,ULONG,ULONG,ULONG,PVOID,ULONG);
2393 NTSYSAPI NTSTATUS WINAPI NtCreateIoCompletion(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,ULONG);
2396 NTSYSAPI NTSTATUS WINAPI NtCreateKeyTransacted(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,HANDLE,ULONG*);
2397 NTSYSAPI NTSTATUS WINAPI NtCreateKeyedEvent(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG);
2398 NTSYSAPI NTSTATUS WINAPI NtCreateMailslotFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG,ULONG,PLARGE_INTEGER);
2400 NTSYSAPI NTSTATUS WINAPI NtCreateNamedPipeFile(PHANDLE,ULONG,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,PLARGE_INTEGER);
2402 NTSYSAPI NTSTATUS WINAPI NtCreatePort(PHANDLE,POBJECT_ATTRIBUTES,ULONG,ULONG,PULONG);
2403 NTSYSAPI NTSTATUS WINAPI NtCreateProcess(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,HANDLE,BOOLEAN,HANDLE,HANDLE,HANDLE);
2404 NTSYSAPI NTSTATUS WINAPI NtCreateProfile(PHANDLE,HANDLE,PVOID,ULONG,ULONG,PVOID,ULONG,KPROFILE_SOURCE,KAFFINITY);
2405 NTSYSAPI NTSTATUS WINAPI NtCreateSection(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const LARGE_INTEGER*,ULONG,ULONG,HANDLE);
2407 NTSYSAPI NTSTATUS WINAPI NtCreateSymbolicLinkObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PUNICODE_STRING);
2408 NTSYSAPI NTSTATUS WINAPI NtCreateThread(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,HANDLE,PCLIENT_ID,PCONTEXT,PINITIAL_TEB,BOOLEAN);
2412 NTSYSAPI NTSTATUS WINAPI NtDeleteAtom(RTL_ATOM);
2413 NTSYSAPI NTSTATUS WINAPI NtDeleteFile(POBJECT_ATTRIBUTES);
2414 NTSYSAPI NTSTATUS WINAPI NtDeleteKey(HANDLE);
2415 NTSYSAPI NTSTATUS WINAPI NtDeleteValueKey(HANDLE,const UNICODE_STRING *);
2416 NTSYSAPI NTSTATUS WINAPI NtDeviceIoControlFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,PVOID,ULONG,PVOID,ULONG);
2417 NTSYSAPI NTSTATUS WINAPI NtDisplayString(PUNICODE_STRING);
2418 NTSYSAPI NTSTATUS WINAPI NtDuplicateObject(HANDLE,HANDLE,HANDLE,PHANDLE,ACCESS_MASK,ULONG,ULONG);
2420 NTSYSAPI NTSTATUS WINAPI NtEnumerateKey(HANDLE,ULONG,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *);
2421 NTSYSAPI NTSTATUS WINAPI NtEnumerateValueKey(HANDLE,ULONG,KEY_VALUE_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2423 NTSYSAPI NTSTATUS WINAPI NtFilterToken(HANDLE,ULONG,TOKEN_GROUPS*,TOKEN_PRIVILEGES*,TOKEN_GROUPS*,HANDLE*);
2424 NTSYSAPI NTSTATUS WINAPI NtFindAtom(const WCHAR*,ULONG,RTL_ATOM*);
2427 NTSYSAPI NTSTATUS WINAPI NtFlushKey(HANDLE);
2428 NTSYSAPI NTSTATUS WINAPI NtFlushVirtualMemory(HANDLE,LPCVOID*,SIZE_T*,ULONG);
2430 NTSYSAPI NTSTATUS WINAPI NtFreeVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
2431 NTSYSAPI NTSTATUS WINAPI NtFsControlFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,PVOID,ULONG,PVOID,ULONG);
2432 NTSYSAPI NTSTATUS WINAPI NtGetContextThread(HANDLE,CONTEXT*);
2434 NTSYSAPI NTSTATUS WINAPI NtGetPlugPlayEvent(ULONG,ULONG,PVOID,ULONG);
2436 NTSYSAPI NTSTATUS WINAPI NtGetWriteWatch(HANDLE,ULONG,PVOID,SIZE_T,PVOID*,ULONG_PTR*,ULONG*);
2438 NTSYSAPI NTSTATUS WINAPI NtImpersonateClientOfPort(HANDLE,PPORT_MESSAGE);
2442 NTSYSAPI NTSTATUS WINAPI NtIsProcessInJob(HANDLE,HANDLE);
2443 NTSYSAPI NTSTATUS WINAPI NtListenPort(HANDLE,PLPC_MESSAGE);
2444 NTSYSAPI NTSTATUS WINAPI NtLoadDriver(const UNICODE_STRING *);
2446 NTSYSAPI NTSTATUS WINAPI NtLockFile(HANDLE,HANDLE,PIO_APC_ROUTINE,void*,PIO_STATUS_BLOCK,PLARGE_INTEGER,PLARGE_INTEGER,ULONG*,BOOLEAN,BOOLEAN);
2447 NTSYSAPI NTSTATUS WINAPI NtLockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
2448 NTSYSAPI NTSTATUS WINAPI NtMakeTemporaryObject(HANDLE);
2449 NTSYSAPI NTSTATUS WINAPI NtMapViewOfSection(HANDLE,HANDLE,PVOID*,ULONG,SIZE_T,const LARGE_INTEGER*,SIZE_T*,SECTION_INHERIT,ULONG,ULONG);
2450 NTSYSAPI NTSTATUS WINAPI NtNotifyChangeDirectoryFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,ULONG,BOOLEAN);
2451 NTSYSAPI NTSTATUS WINAPI NtNotifyChangeKey(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,BOOLEAN,PVOID,ULONG,BOOLEAN);
2452 NTSYSAPI NTSTATUS WINAPI NtNotifyChangeMultipleKeys(HANDLE,ULONG,OBJECT_ATTRIBUTES*,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,BOOLEAN,PVOID,ULONG,BOOLEAN);
2456 NTSYSAPI NTSTATUS WINAPI NtOpenFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG);
2465 NTSYSAPI NTSTATUS WINAPI NtOpenObjectAuditAlarm(PUNICODE_STRING,PHANDLE,PUNICODE_STRING,PUNICODE_STRING,PSECURITY_DESCRIPTOR,HANDLE,ACCESS_MASK,ACCESS_MASK,PPRIVILEGE_SET,BOOLEAN,BOOLEAN,PBOOLEAN);
2467 NTSYSAPI NTSTATUS WINAPI NtOpenProcessToken(HANDLE,DWORD,HANDLE *);
2468 NTSYSAPI NTSTATUS WINAPI NtOpenProcessTokenEx(HANDLE,DWORD,DWORD,HANDLE *);
2469 NTSYSAPI NTSTATUS WINAPI NtOpenSection(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
2472 NTSYSAPI NTSTATUS WINAPI NtOpenThread(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const CLIENT_ID*);
2473 NTSYSAPI NTSTATUS WINAPI NtOpenThreadToken(HANDLE,DWORD,BOOLEAN,HANDLE *);
2474 NTSYSAPI NTSTATUS WINAPI NtOpenThreadTokenEx(HANDLE,DWORD,BOOLEAN,DWORD,HANDLE *);
2475 NTSYSAPI NTSTATUS WINAPI NtOpenTimer(HANDLE*, ACCESS_MASK, const OBJECT_ATTRIBUTES*);
2476 NTSYSAPI NTSTATUS WINAPI NtPowerInformation(POWER_INFORMATION_LEVEL,PVOID,ULONG,PVOID,ULONG);
2478 NTSYSAPI NTSTATUS WINAPI NtPrivilegeObjectAuditAlarm(PUNICODE_STRING,HANDLE,HANDLE,ULONG,PPRIVILEGE_SET,BOOLEAN);
2479 NTSYSAPI NTSTATUS WINAPI NtPrivilegedServiceAuditAlarm(PUNICODE_STRING,PUNICODE_STRING,HANDLE,PPRIVILEGE_SET,BOOLEAN);
2480 NTSYSAPI NTSTATUS WINAPI NtProtectVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG,ULONG*);
2481 NTSYSAPI NTSTATUS WINAPI NtPulseEvent(HANDLE,PULONG);
2482 NTSYSAPI NTSTATUS WINAPI NtQueueApcThread(HANDLE,PNTAPCFUNC,ULONG_PTR,ULONG_PTR,ULONG_PTR);
2486 NTSYSAPI NTSTATUS WINAPI NtQueryDirectoryFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,FILE_INFORMATION_CLASS,BOOLEAN,PUNICODE_STRING,BOOLEAN);
2487 NTSYSAPI NTSTATUS WINAPI NtQueryDirectoryObject(HANDLE,PDIRECTORY_BASIC_INFORMATION,ULONG,BOOLEAN,BOOLEAN,PULONG,PULONG);
2488 NTSYSAPI NTSTATUS WINAPI NtQueryEaFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,BOOLEAN,PVOID,ULONG,PULONG,BOOLEAN);
2489 NTSYSAPI NTSTATUS WINAPI NtQueryEvent(HANDLE,EVENT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2491 NTSYSAPI NTSTATUS WINAPI NtQueryInformationAtom(RTL_ATOM,ATOM_INFORMATION_CLASS,PVOID,ULONG,ULONG*);
2492 NTSYSAPI NTSTATUS WINAPI NtQueryInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,LONG,FILE_INFORMATION_CLASS);
2495 NTSYSAPI NTSTATUS WINAPI NtQueryInformationProcess(HANDLE,PROCESSINFOCLASS,PVOID,ULONG,PULONG);
2496 NTSYSAPI NTSTATUS WINAPI NtQueryInformationThread(HANDLE,THREADINFOCLASS,PVOID,ULONG,PULONG);
2501 NTSYSAPI NTSTATUS WINAPI NtQueryKey(HANDLE,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *);
2502 NTSYSAPI NTSTATUS WINAPI NtQueryMultipleValueKey(HANDLE,PKEY_MULTIPLE_VALUE_INFORMATION,ULONG,PVOID,ULONG,PULONG);
2503 NTSYSAPI NTSTATUS WINAPI NtQueryMutant(HANDLE,MUTANT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2504 NTSYSAPI NTSTATUS WINAPI NtQueryObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG, PULONG);
2505 NTSYSAPI NTSTATUS WINAPI NtQueryOpenSubKeys(POBJECT_ATTRIBUTES,PULONG);
2510 NTSYSAPI NTSTATUS WINAPI NtQuerySymbolicLinkObject(HANDLE,PUNICODE_STRING,PULONG);
2511 NTSYSAPI NTSTATUS WINAPI NtQuerySystemEnvironmentValue(PUNICODE_STRING,PWCHAR,ULONG,PULONG);
2513 NTSYSAPI NTSTATUS WINAPI NtQuerySystemInformationEx(SYSTEM_INFORMATION_CLASS,void*,ULONG,void*,ULONG,ULONG*);
2515 NTSYSAPI NTSTATUS WINAPI NtQueryTimer(HANDLE,TIMER_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2517 NTSYSAPI NTSTATUS WINAPI NtQueryValueKey(HANDLE,const UNICODE_STRING *,KEY_VALUE_INFORMATION_CLASS,void *,DWORD,DWORD *);
2518 NTSYSAPI NTSTATUS WINAPI NtQueryLicenseValue(const UNICODE_STRING *,ULONG *,PVOID,ULONG,ULONG *);
2520 NTSYSAPI NTSTATUS WINAPI NtQueryVolumeInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS);
2522 NTSYSAPI NTSTATUS WINAPI NtRaiseHardError(NTSTATUS,ULONG,PUNICODE_STRING,PVOID*,HARDERROR_RESPONSE_OPTION,PHARDERROR_RESPONSE);
2523 NTSYSAPI NTSTATUS WINAPI NtReadFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,PLARGE_INTEGER,PULONG);
2524 NTSYSAPI NTSTATUS WINAPI NtReadFileScatter(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,FILE_SEGMENT_ELEMENT*,ULONG,PLARGE_INTEGER,PULONG);
2525 NTSYSAPI NTSTATUS WINAPI NtReadRequestData(HANDLE,PLPC_MESSAGE,ULONG,PVOID,ULONG,PULONG);
2526 NTSYSAPI NTSTATUS WINAPI NtReadVirtualMemory(HANDLE,const void*,void*,SIZE_T,SIZE_T*);
2528 NTSYSAPI NTSTATUS WINAPI NtReleaseKeyedEvent(HANDLE,const void*,BOOLEAN,const LARGE_INTEGER*);
2529 NTSYSAPI NTSTATUS WINAPI NtReleaseMutant(HANDLE,PLONG);
2530 NTSYSAPI NTSTATUS WINAPI NtReleaseSemaphore(HANDLE,ULONG,PULONG);
2531 NTSYSAPI NTSTATUS WINAPI NtRemoveIoCompletion(HANDLE,PULONG_PTR,PULONG_PTR,PIO_STATUS_BLOCK,PLARGE_INTEGER);
2532 NTSYSAPI NTSTATUS WINAPI NtRenameKey(HANDLE,UNICODE_STRING*);
2533 NTSYSAPI NTSTATUS WINAPI NtReplaceKey(POBJECT_ATTRIBUTES,HANDLE,POBJECT_ATTRIBUTES);
2534 NTSYSAPI NTSTATUS WINAPI NtReplyPort(HANDLE,PLPC_MESSAGE);
2535 NTSYSAPI NTSTATUS WINAPI NtReplyWaitReceivePort(HANDLE,PULONG,PLPC_MESSAGE,PLPC_MESSAGE);
2536 NTSYSAPI NTSTATUS WINAPI NtReplyWaitReceivePortEx(HANDLE,PVOID*,PPORT_MESSAGE,PPORT_MESSAGE,PLARGE_INTEGER);
2537 NTSYSAPI NTSTATUS WINAPI NtReplyWaitReplyPort(HANDLE,PLPC_MESSAGE);
2538 NTSYSAPI NTSTATUS WINAPI NtRequestPort(HANDLE,PLPC_MESSAGE);
2539 NTSYSAPI NTSTATUS WINAPI NtRequestWaitReplyPort(HANDLE,PLPC_MESSAGE,PLPC_MESSAGE);
2540 NTSYSAPI NTSTATUS WINAPI NtResetEvent(HANDLE,PULONG);
2541 NTSYSAPI NTSTATUS WINAPI NtResetWriteWatch(HANDLE,PVOID,SIZE_T);
2542 NTSYSAPI NTSTATUS WINAPI NtRestoreKey(HANDLE,HANDLE,ULONG);
2543 NTSYSAPI NTSTATUS WINAPI NtResumeThread(HANDLE,PULONG);
2544 NTSYSAPI NTSTATUS WINAPI NtSaveKey(HANDLE,HANDLE);
2545 NTSYSAPI NTSTATUS WINAPI NtSecureConnectPort(PHANDLE,PUNICODE_STRING,PSECURITY_QUALITY_OF_SERVICE,PLPC_SECTION_WRITE,PSID,PLPC_SECTION_READ,PULONG,PVOID,PULONG);
2546 NTSYSAPI NTSTATUS WINAPI NtSetContextThread(HANDLE,const CONTEXT*);
2547 NTSYSAPI NTSTATUS WINAPI NtSetDefaultHardErrorPort(HANDLE);
2550 NTSYSAPI NTSTATUS WINAPI NtSetEaFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG);
2551 NTSYSAPI NTSTATUS WINAPI NtSetEvent(HANDLE,PULONG);
2552 NTSYSAPI NTSTATUS WINAPI NtSetHighEventPair(HANDLE);
2553 NTSYSAPI NTSTATUS WINAPI NtSetHighWaitLowEventPair(HANDLE);
2555 NTSYSAPI NTSTATUS WINAPI NtSetInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FILE_INFORMATION_CLASS);
2556 NTSYSAPI NTSTATUS WINAPI NtSetInformationJobObject(HANDLE,JOBOBJECTINFOCLASS,PVOID,ULONG);
2557 NTSYSAPI NTSTATUS WINAPI NtSetInformationKey(HANDLE,const int,PVOID,ULONG);
2558 NTSYSAPI NTSTATUS WINAPI NtSetInformationObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG);
2559 NTSYSAPI NTSTATUS WINAPI NtSetInformationProcess(HANDLE,PROCESS_INFORMATION_CLASS,PVOID,ULONG);
2561 NTSYSAPI NTSTATUS WINAPI NtSetInformationToken(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,ULONG);
2563 NTSYSAPI NTSTATUS WINAPI NtSetIoCompletion(HANDLE,ULONG_PTR,ULONG_PTR,NTSTATUS,SIZE_T);
2564 NTSYSAPI NTSTATUS WINAPI NtSetLdtEntries(ULONG,ULONG,ULONG,ULONG,ULONG,ULONG);
2565 NTSYSAPI NTSTATUS WINAPI NtSetLowEventPair(HANDLE);
2566 NTSYSAPI NTSTATUS WINAPI NtSetLowWaitHighEventPair(HANDLE);
2569 NTSYSAPI NTSTATUS WINAPI NtSetSystemEnvironmentValue(PUNICODE_STRING,PUNICODE_STRING);
2573 NTSYSAPI NTSTATUS WINAPI NtSetTimer(HANDLE, const LARGE_INTEGER*, PTIMER_APC_ROUTINE, PVOID, BOOLEAN, ULONG, BOOLEAN*);
2575 NTSYSAPI NTSTATUS WINAPI NtSetValueKey(HANDLE,const UNICODE_STRING *,ULONG,ULONG,const void *,ULONG);
2576 NTSYSAPI NTSTATUS WINAPI NtSetVolumeInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS);
2577 NTSYSAPI NTSTATUS WINAPI NtSignalAndWaitForSingleObject(HANDLE,HANDLE,BOOLEAN,const LARGE_INTEGER*);
2579 NTSYSAPI NTSTATUS WINAPI NtStartProfile(HANDLE);
2580 NTSYSAPI NTSTATUS WINAPI NtStopProfile(HANDLE);
2581 NTSYSAPI NTSTATUS WINAPI NtSuspendThread(HANDLE,PULONG);
2582 NTSYSAPI NTSTATUS WINAPI NtSystemDebugControl(SYSDBG_COMMAND,PVOID,ULONG,PVOID,ULONG,PULONG);
2583 NTSYSAPI NTSTATUS WINAPI NtTerminateJobObject(HANDLE,NTSTATUS);
2584 NTSYSAPI NTSTATUS WINAPI NtTerminateProcess(HANDLE,LONG);
2585 NTSYSAPI NTSTATUS WINAPI NtTerminateThread(HANDLE,LONG);
2586 NTSYSAPI NTSTATUS WINAPI NtTestAlert(VOID);
2587 NTSYSAPI NTSTATUS WINAPI NtUnloadDriver(const UNICODE_STRING *);
2588 NTSYSAPI NTSTATUS WINAPI NtUnloadKey(POBJECT_ATTRIBUTES);
2589 NTSYSAPI NTSTATUS WINAPI NtUnloadKeyEx(POBJECT_ATTRIBUTES,HANDLE);
2590 NTSYSAPI NTSTATUS WINAPI NtUnlockFile(HANDLE,PIO_STATUS_BLOCK,PLARGE_INTEGER,PLARGE_INTEGER,PULONG);
2591 NTSYSAPI NTSTATUS WINAPI NtUnlockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
2592 NTSYSAPI NTSTATUS WINAPI NtUnmapViewOfSection(HANDLE,PVOID);
2593 NTSYSAPI NTSTATUS WINAPI NtVdmControl(ULONG,PVOID);
2594 NTSYSAPI NTSTATUS WINAPI NtWaitForKeyedEvent(HANDLE,const void*,BOOLEAN,const LARGE_INTEGER*);
2596 NTSYSAPI NTSTATUS WINAPI NtWaitForMultipleObjects(ULONG,const HANDLE*,BOOLEAN,BOOLEAN,const LARGE_INTEGER*);
2597 NTSYSAPI NTSTATUS WINAPI NtWaitHighEventPair(HANDLE);
2598 NTSYSAPI NTSTATUS WINAPI NtWaitLowEventPair(HANDLE);
2599 NTSYSAPI NTSTATUS WINAPI NtWriteFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,const void*,ULONG,PLARGE_INTEGER,PULONG);
2600 NTSYSAPI NTSTATUS WINAPI NtWriteFileGather(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,FILE_SEGMENT_ELEMENT*,ULONG,PLARGE_INTEGER,PULONG);
2601 NTSYSAPI NTSTATUS WINAPI NtWriteRequestData(HANDLE,PLPC_MESSAGE,ULONG,PVOID,ULONG,PULONG);
2602 NTSYSAPI NTSTATUS WINAPI NtWriteVirtualMemory(HANDLE,void*,const void*,SIZE_T,SIZE_T*);
2603 NTSYSAPI NTSTATUS WINAPI NtYieldExecution(void);
2604 
2605 NTSYSAPI void WINAPI RtlAcquirePebLock(void);
2610 NTSYSAPI NTSTATUS WINAPI RtlActivateActivationContext(DWORD,HANDLE,ULONG_PTR*);
2611 NTSYSAPI NTSTATUS WINAPI RtlAddAce(PACL,DWORD,DWORD,PACE_HEADER,DWORD);
2612 NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedAce(PACL,DWORD,DWORD,PSID);
2613 NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
2614 NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedObjectAce(PACL,DWORD,DWORD,DWORD,GUID*,GUID*,PSID);
2615 NTSYSAPI NTSTATUS WINAPI RtlAddAccessDeniedAce(PACL,DWORD,DWORD,PSID);
2616 NTSYSAPI NTSTATUS WINAPI RtlAddAccessDeniedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
2617 NTSYSAPI NTSTATUS WINAPI RtlAddAccessDeniedObjectAce(PACL,DWORD,DWORD,DWORD,GUID*,GUID*,PSID);
2618 NTSYSAPI NTSTATUS WINAPI RtlAddAtomToAtomTable(RTL_ATOM_TABLE,const WCHAR*,RTL_ATOM*);
2619 NTSYSAPI NTSTATUS WINAPI RtlAddAuditAccessAce(PACL,DWORD,DWORD,PSID,BOOL,BOOL);
2620 NTSYSAPI NTSTATUS WINAPI RtlAddAuditAccessAceEx(PACL,DWORD,DWORD,DWORD,PSID,BOOL,BOOL);
2621 NTSYSAPI NTSTATUS WINAPI RtlAddAuditAccessObjectAce(PACL,DWORD,DWORD,DWORD,GUID*,GUID*,PSID,BOOL,BOOL);
2622 NTSYSAPI NTSTATUS WINAPI RtlAddMandatoryAce(PACL,DWORD,DWORD,DWORD,DWORD,PSID);
2626 NTSYSAPI NTSTATUS WINAPI RtlAllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY,BYTE,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,PSID *);
2628 NTSYSAPI PVOID WINAPI RtlAllocateHeap(HANDLE,ULONG,SIZE_T) __WINE_ALLOC_SIZE(3);
2631 NTSYSAPI NTSTATUS WINAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING,PCANSI_STRING,BOOLEAN);
2632 NTSYSAPI NTSTATUS WINAPI RtlAppendAsciizToString(STRING *,LPCSTR);
2633 NTSYSAPI NTSTATUS WINAPI RtlAppendStringToString(STRING *,const STRING *);
2635 NTSYSAPI NTSTATUS WINAPI RtlAppendUnicodeToString(UNICODE_STRING *,LPCWSTR);
2637 NTSYSAPI BOOLEAN WINAPI RtlAreAnyAccessesGranted(ACCESS_MASK,ACCESS_MASK);
2638 NTSYSAPI BOOLEAN WINAPI RtlAreBitsSet(PCRTL_BITMAP,ULONG,ULONG);
2639 NTSYSAPI BOOLEAN WINAPI RtlAreBitsClear(PCRTL_BITMAP,ULONG,ULONG);
2640 NTSYSAPI NTSTATUS WINAPI RtlCharToInteger(PCSZ,ULONG,PULONG);
2641 NTSYSAPI NTSTATUS WINAPI RtlCheckRegistryKey(ULONG, PWSTR);
2642 NTSYSAPI void WINAPI RtlClearAllBits(PRTL_BITMAP);
2643 NTSYSAPI void WINAPI RtlClearBits(PRTL_BITMAP,ULONG,ULONG);
2644 NTSYSAPI NTSTATUS WINAPI RtlCreateActivationContext(HANDLE*,const void*);
2645 NTSYSAPI PDEBUG_BUFFER WINAPI RtlCreateQueryDebugBuffer(ULONG,BOOLEAN);
2646 NTSYSAPI ULONG WINAPI RtlCompactHeap(HANDLE,ULONG);
2647 NTSYSAPI LONG WINAPI RtlCompareString(const STRING*,const STRING*,BOOLEAN);
2648 NTSYSAPI LONG WINAPI RtlCompareUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
2650 NTSYSAPI NTSTATUS WINAPI RtlCompressBuffer(USHORT,PUCHAR,ULONG,PUCHAR,ULONG,ULONG,PULONG,PVOID);
2652 NTSYSAPI NTSTATUS WINAPI RtlConvertSidToUnicodeString(PUNICODE_STRING,PSID,BOOLEAN);
2655 NTSYSAPI BOOLEAN WINAPI RtlCopySid(DWORD,PSID,PSID);
2656 NTSYSAPI NTSTATUS WINAPI RtlCopySecurityDescriptor(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR);
2657 NTSYSAPI void WINAPI RtlCopyString(STRING*,const STRING*);
2658 NTSYSAPI void WINAPI RtlCopyUnicodeString(UNICODE_STRING*,const UNICODE_STRING*);
2659 NTSYSAPI NTSTATUS WINAPI RtlCreateAcl(PACL,DWORD,DWORD);
2660 NTSYSAPI NTSTATUS WINAPI RtlCreateAtomTable(ULONG,RTL_ATOM_TABLE*);
2661 NTSYSAPI NTSTATUS WINAPI RtlCreateEnvironment(BOOLEAN, PWSTR*);
2662 NTSYSAPI HANDLE WINAPI RtlCreateHeap(ULONG,PVOID,SIZE_T,SIZE_T,PVOID,PRTL_HEAP_DEFINITION);
2663 NTSYSAPI NTSTATUS WINAPI RtlCreateProcessParameters(RTL_USER_PROCESS_PARAMETERS**,const UNICODE_STRING*,const UNICODE_STRING*,const UNICODE_STRING*,const UNICODE_STRING*,PWSTR,const UNICODE_STRING*,const UNICODE_STRING*,const UNICODE_STRING*,const UNICODE_STRING*);
2664 NTSYSAPI NTSTATUS WINAPI RtlCreateSecurityDescriptor(PSECURITY_DESCRIPTOR,DWORD);
2666 NTSYSAPI NTSTATUS WINAPI RtlCreateTimer(PHANDLE, HANDLE, RTL_WAITORTIMERCALLBACKFUNC, PVOID, DWORD, DWORD, ULONG);
2667 NTSYSAPI BOOLEAN WINAPI RtlCreateUnicodeString(PUNICODE_STRING,LPCWSTR);
2668 NTSYSAPI BOOLEAN WINAPI RtlCreateUnicodeStringFromAsciiz(PUNICODE_STRING,LPCSTR);
2669 NTSYSAPI NTSTATUS WINAPI RtlCreateUserProcess(UNICODE_STRING*,ULONG,RTL_USER_PROCESS_PARAMETERS*,SECURITY_DESCRIPTOR*,SECURITY_DESCRIPTOR*,HANDLE,BOOLEAN,HANDLE,HANDLE,RTL_USER_PROCESS_INFORMATION*);
2670 NTSYSAPI NTSTATUS WINAPI RtlCreateUserThread(HANDLE,const SECURITY_DESCRIPTOR*,BOOLEAN,PVOID,SIZE_T,SIZE_T,PRTL_THREAD_START_ROUTINE,void*,HANDLE*,CLIENT_ID*);
2671 NTSYSAPI void WINAPI RtlDeactivateActivationContext(DWORD,ULONG_PTR);
2672 NTSYSAPI PVOID WINAPI RtlDecodePointer(PVOID);
2673 NTSYSAPI NTSTATUS WINAPI RtlDecompressBuffer(USHORT,PUCHAR,ULONG,PUCHAR,ULONG,PULONG);
2674 NTSYSAPI NTSTATUS WINAPI RtlDeleteAce(PACL,DWORD);
2675 NTSYSAPI NTSTATUS WINAPI RtlDeleteAtomFromAtomTable(RTL_ATOM_TABLE,RTL_ATOM);
2677 NTSYSAPI NTSTATUS WINAPI RtlDeleteRegistryValue(ULONG, PCWSTR, PCWSTR);
2678 NTSYSAPI void WINAPI RtlDeleteResource(LPRTL_RWLOCK);
2679 NTSYSAPI NTSTATUS WINAPI RtlDeleteSecurityObject(PSECURITY_DESCRIPTOR*);
2680 NTSYSAPI NTSTATUS WINAPI RtlDeleteTimer(HANDLE, HANDLE, HANDLE);
2681 NTSYSAPI NTSTATUS WINAPI RtlDeleteTimerQueueEx(HANDLE, HANDLE);
2682 NTSYSAPI PRTL_USER_PROCESS_PARAMETERS WINAPI RtlDeNormalizeProcessParams(RTL_USER_PROCESS_PARAMETERS*);
2683 NTSYSAPI NTSTATUS WINAPI RtlDeregisterWait(HANDLE);
2684 NTSYSAPI NTSTATUS WINAPI RtlDeregisterWaitEx(HANDLE,HANDLE);
2685 NTSYSAPI NTSTATUS WINAPI RtlDestroyAtomTable(RTL_ATOM_TABLE);
2686 NTSYSAPI NTSTATUS WINAPI RtlDestroyEnvironment(PWSTR);
2688 NTSYSAPI HANDLE WINAPI RtlDestroyHeap(HANDLE);
2689 NTSYSAPI void WINAPI RtlDestroyProcessParameters(RTL_USER_PROCESS_PARAMETERS*);
2690 NTSYSAPI NTSTATUS WINAPI RtlDestroyQueryDebugBuffer(PDEBUG_BUFFER);
2693 NTSYSAPI BOOLEAN WINAPI RtlDoesFileExists_U(LPCWSTR);
2694 NTSYSAPI BOOLEAN WINAPI RtlDosPathNameToNtPathName_U(PCWSTR,PUNICODE_STRING,PWSTR*,CURDIR*);
2695 NTSYSAPI NTSTATUS WINAPI RtlDosPathNameToNtPathName_U_WithStatus(PCWSTR,PUNICODE_STRING,PWSTR*,CURDIR*);
2696 NTSYSAPI ULONG WINAPI RtlDosSearchPath_U(LPCWSTR, LPCWSTR, LPCWSTR, ULONG, LPWSTR, LPWSTR*);
2698 NTSYSAPI NTSTATUS WINAPI RtlDowncaseUnicodeString(UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
2699 NTSYSAPI void WINAPI RtlDumpResource(LPRTL_RWLOCK);
2700 NTSYSAPI NTSTATUS WINAPI RtlDuplicateUnicodeString(int,const UNICODE_STRING*,UNICODE_STRING*);
2701 NTSYSAPI NTSTATUS WINAPI RtlEmptyAtomTable(RTL_ATOM_TABLE,BOOLEAN);
2702 NTSYSAPI PVOID WINAPI RtlEncodePointer(PVOID);
2703 NTSYSAPI NTSTATUS WINAPI RtlEnterCriticalSection(RTL_CRITICAL_SECTION *);
2704 NTSYSAPI void WINAPI RtlEraseUnicodeString(UNICODE_STRING*);
2705 NTSYSAPI NTSTATUS WINAPI RtlEqualComputerName(const UNICODE_STRING*,const UNICODE_STRING*);
2706 NTSYSAPI NTSTATUS WINAPI RtlEqualDomainName(const UNICODE_STRING*,const UNICODE_STRING*);
2707 NTSYSAPI BOOLEAN WINAPI RtlEqualLuid(const LUID*,const LUID*);
2709 NTSYSAPI BOOL WINAPI RtlEqualSid(PSID,PSID);
2710 NTSYSAPI BOOLEAN WINAPI RtlEqualString(const STRING*,const STRING*,BOOLEAN);
2711 NTSYSAPI BOOLEAN WINAPI RtlEqualUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
2714 NTSYSAPI NTSTATUS WINAPI RtlExpandEnvironmentStrings_U(PCWSTR, const UNICODE_STRING*, UNICODE_STRING*, ULONG*);
2715 NTSYSAPI NTSTATUS WINAPI RtlFindActivationContextSectionString(ULONG,const GUID*,ULONG,const UNICODE_STRING*,PVOID);
2716 NTSYSAPI NTSTATUS WINAPI RtlFindActivationContextSectionGuid(ULONG,const GUID*,ULONG,const GUID*,PVOID);
2717 NTSYSAPI NTSTATUS WINAPI RtlFindCharInUnicodeString(int,const UNICODE_STRING*,const UNICODE_STRING*,USHORT*);
2718 NTSYSAPI ULONG WINAPI RtlFindClearBits(PCRTL_BITMAP,ULONG,ULONG);
2719 NTSYSAPI ULONG WINAPI RtlFindClearBitsAndSet(PRTL_BITMAP,ULONG,ULONG);
2720 NTSYSAPI ULONG WINAPI RtlFindClearRuns(PCRTL_BITMAP,PRTL_BITMAP_RUN,ULONG,BOOLEAN);
2721 NTSYSAPI ULONG WINAPI RtlFindLastBackwardRunSet(PCRTL_BITMAP,ULONG,PULONG);
2722 NTSYSAPI ULONG WINAPI RtlFindLastBackwardRunClear(PCRTL_BITMAP,ULONG,PULONG);
2724 NTSYSAPI ULONG WINAPI RtlFindLongestRunSet(PCRTL_BITMAP,PULONG);
2725 NTSYSAPI ULONG WINAPI RtlFindLongestRunClear(PCRTL_BITMAP,PULONG);
2726 NTSYSAPI NTSTATUS WINAPI RtlFindMessage(HMODULE,ULONG,ULONG,ULONG,const MESSAGE_RESOURCE_ENTRY**);
2728 NTSYSAPI ULONG WINAPI RtlFindNextForwardRunSet(PCRTL_BITMAP,ULONG,PULONG);
2729 NTSYSAPI ULONG WINAPI RtlFindNextForwardRunClear(PCRTL_BITMAP,ULONG,PULONG);
2730 NTSYSAPI ULONG WINAPI RtlFindSetBits(PCRTL_BITMAP,ULONG,ULONG);
2731 NTSYSAPI ULONG WINAPI RtlFindSetBitsAndClear(PRTL_BITMAP,ULONG,ULONG);
2732 NTSYSAPI ULONG WINAPI RtlFindSetRuns(PCRTL_BITMAP,PRTL_BITMAP_RUN,ULONG,BOOLEAN);
2733 NTSYSAPI BOOLEAN WINAPI RtlFirstFreeAce(PACL,PACE_HEADER *);
2734 NTSYSAPI NTSTATUS WINAPI RtlFormatCurrentUserKeyPath(PUNICODE_STRING);
2735 NTSYSAPI NTSTATUS WINAPI RtlFormatMessage(LPWSTR,UCHAR,BOOLEAN,BOOLEAN,BOOLEAN,__ms_va_list *,LPWSTR,ULONG);
2736 NTSYSAPI void WINAPI RtlFreeAnsiString(PANSI_STRING);
2737 NTSYSAPI BOOLEAN WINAPI RtlFreeHandle(RTL_HANDLE_TABLE *,RTL_HANDLE *);
2738 NTSYSAPI BOOLEAN WINAPI RtlFreeHeap(HANDLE,ULONG,PVOID);
2739 NTSYSAPI void WINAPI RtlFreeOemString(POEM_STRING);
2740 NTSYSAPI DWORD WINAPI RtlFreeSid(PSID);
2742 NTSYSAPI void WINAPI RtlFreeUnicodeString(PUNICODE_STRING);
2743 NTSYSAPI NTSTATUS WINAPI RtlGetAce(PACL,DWORD,LPVOID *);
2745 NTSYSAPI NTSTATUS WINAPI RtlGetCompressionWorkSpaceSize(USHORT,PULONG,PULONG);
2747 NTSYSAPI ULONG WINAPI RtlGetCurrentDirectory_U(ULONG, LPWSTR);
2749 NTSYSAPI NTSTATUS WINAPI RtlGetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR,PBOOLEAN,PACL *,PBOOLEAN);
2751 NTSYSAPI ULONG WINAPI RtlGetFullPathName_U(PCWSTR,ULONG,PWSTR,PWSTR*);
2752 NTSYSAPI NTSTATUS WINAPI RtlGetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID *,PBOOLEAN);
2753 NTSYSAPI NTSTATUS WINAPI RtlGetLastNtStatus(void);
2756 NTSYSAPI ULONG WINAPI RtlGetNtGlobalFlags(void);
2757 NTSYSAPI BOOLEAN WINAPI RtlGetNtProductType(LPDWORD);
2758 NTSYSAPI NTSTATUS WINAPI RtlGetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID *,PBOOLEAN);
2759 NTSYSAPI ULONG WINAPI RtlGetProcessHeaps(ULONG,HANDLE*);
2761 NTSYSAPI NTSTATUS WINAPI RtlGetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR,PBOOLEAN,PACL *,PBOOLEAN);
2763 NTSYSAPI NTSTATUS WINAPI RtlGUIDFromString(PUNICODE_STRING,GUID*);
2765 NTSYSAPI PVOID WINAPI RtlImageDirectoryEntryToData(HMODULE,BOOL,WORD,ULONG *);
2768 NTSYSAPI PVOID WINAPI RtlImageRvaToVa(const IMAGE_NT_HEADERS *,HMODULE,DWORD,IMAGE_SECTION_HEADER **);
2770 NTSYSAPI void WINAPI RtlInitString(PSTRING,PCSZ);
2771 NTSYSAPI void WINAPI RtlInitAnsiString(PANSI_STRING,PCSZ);
2772 NTSYSAPI NTSTATUS WINAPI RtlInitAnsiStringEx(PANSI_STRING,PCSZ);
2773 NTSYSAPI void WINAPI RtlInitUnicodeString(PUNICODE_STRING,PCWSTR);
2774 NTSYSAPI NTSTATUS WINAPI RtlInitUnicodeStringEx(PUNICODE_STRING,PCWSTR);
2775 NTSYSAPI void WINAPI RtlInitializeBitMap(PRTL_BITMAP,PULONG,ULONG);
2777 NTSYSAPI NTSTATUS WINAPI RtlInitializeCriticalSection(RTL_CRITICAL_SECTION *);
2778 NTSYSAPI NTSTATUS WINAPI RtlInitializeCriticalSectionAndSpinCount(RTL_CRITICAL_SECTION *,ULONG);
2779 NTSYSAPI NTSTATUS WINAPI RtlInitializeCriticalSectionEx(RTL_CRITICAL_SECTION *,ULONG,ULONG);
2780 NTSYSAPI void WINAPI RtlInitializeHandleTable(ULONG,ULONG,RTL_HANDLE_TABLE *);
2781 NTSYSAPI void WINAPI RtlInitializeResource(LPRTL_RWLOCK);
2784 NTSYSAPI NTSTATUS WINAPI RtlInt64ToUnicodeString(ULONGLONG,ULONG,UNICODE_STRING *);
2785 NTSYSAPI NTSTATUS WINAPI RtlIntegerToChar(ULONG,ULONG,ULONG,PCHAR);
2786 NTSYSAPI NTSTATUS WINAPI RtlIntegerToUnicodeString(ULONG,ULONG,UNICODE_STRING *);
2788 NTSYSAPI BOOL WINAPI RtlIsCriticalSectionLocked(RTL_CRITICAL_SECTION *);
2789 NTSYSAPI BOOL WINAPI RtlIsCriticalSectionLockedByThread(RTL_CRITICAL_SECTION *);
2790 NTSYSAPI ULONG WINAPI RtlIsDosDeviceName_U(PCWSTR);
2791 NTSYSAPI BOOLEAN WINAPI RtlIsNameLegalDOS8Dot3(const UNICODE_STRING*,POEM_STRING,PBOOLEAN);
2792 NTSYSAPI BOOLEAN WINAPI RtlIsTextUnicode(LPCVOID,INT,INT *);
2793 NTSYSAPI BOOLEAN WINAPI RtlIsValidHandle(const RTL_HANDLE_TABLE *, const RTL_HANDLE *);
2794 NTSYSAPI BOOLEAN WINAPI RtlIsValidIndexHandle(const RTL_HANDLE_TABLE *, ULONG Index, RTL_HANDLE **);
2795 NTSYSAPI NTSTATUS WINAPI RtlLeaveCriticalSection(RTL_CRITICAL_SECTION *);
2796 NTSYSAPI DWORD WINAPI RtlLengthRequiredSid(DWORD);
2797 NTSYSAPI ULONG WINAPI RtlLengthSecurityDescriptor(PSECURITY_DESCRIPTOR);
2798 NTSYSAPI DWORD WINAPI RtlLengthSid(PSID);
2800 NTSYSAPI BOOLEAN WINAPI RtlLockHeap(HANDLE);
2801 NTSYSAPI NTSTATUS WINAPI RtlLookupAtomInAtomTable(RTL_ATOM_TABLE,const WCHAR*,RTL_ATOM*);
2802 NTSYSAPI NTSTATUS WINAPI RtlMakeSelfRelativeSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,LPDWORD);
2804 NTSYSAPI NTSTATUS WINAPI RtlMultiByteToUnicodeN(LPWSTR,DWORD,LPDWORD,LPCSTR,DWORD);
2805 NTSYSAPI NTSTATUS WINAPI RtlMultiByteToUnicodeSize(DWORD*,LPCSTR,UINT);
2806 NTSYSAPI NTSTATUS WINAPI RtlNewSecurityObject(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR*,BOOLEAN,HANDLE,PGENERIC_MAPPING);
2807 NTSYSAPI PRTL_USER_PROCESS_PARAMETERS WINAPI RtlNormalizeProcessParams(RTL_USER_PROCESS_PARAMETERS*);
2808 NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS);
2810 NTSYSAPI ULONG WINAPI RtlNumberOfSetBits(PCRTL_BITMAP);
2811 NTSYSAPI ULONG WINAPI RtlNumberOfClearBits(PCRTL_BITMAP);
2813 NTSYSAPI NTSTATUS WINAPI RtlOemStringToUnicodeString(UNICODE_STRING*,const STRING*,BOOLEAN);
2814 NTSYSAPI NTSTATUS WINAPI RtlOemToUnicodeN(LPWSTR,DWORD,LPDWORD,LPCSTR,DWORD);
2815 NTSYSAPI NTSTATUS WINAPI RtlOpenCurrentUser(ACCESS_MASK,PHANDLE);
2816 NTSYSAPI PVOID WINAPI RtlPcToFileHeader(PVOID,PVOID*);
2817 NTSYSAPI NTSTATUS WINAPI RtlPinAtomInAtomTable(RTL_ATOM_TABLE,RTL_ATOM);
2819 NTSYSAPI BOOLEAN WINAPI RtlPrefixString(const STRING*,const STRING*,BOOLEAN);
2820 NTSYSAPI BOOLEAN WINAPI RtlPrefixUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
2821 NTSYSAPI void WINAPI RtlPushFrame(TEB_ACTIVE_FRAME*);
2822 NTSYSAPI NTSTATUS WINAPI RtlQueryAtomInAtomTable(RTL_ATOM_TABLE,RTL_ATOM,ULONG*,ULONG*,WCHAR*,ULONG*);
2824 NTSYSAPI NTSTATUS WINAPI RtlQueryEnvironmentVariable_U(PWSTR,PUNICODE_STRING,PUNICODE_STRING);
2826 NTSYSAPI NTSTATUS WINAPI RtlQueryInformationAcl(PACL,LPVOID,DWORD,ACL_INFORMATION_CLASS);
2827 NTSYSAPI NTSTATUS WINAPI RtlQueryInformationActivationContext(ULONG,HANDLE,PVOID,ULONG,PVOID,SIZE_T,SIZE_T*);
2828 NTSYSAPI NTSTATUS WINAPI RtlQueryProcessDebugInformation(ULONG,ULONG,PDEBUG_BUFFER);
2829 NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID);
2831 NTSYSAPI NTSTATUS WINAPI RtlQueryUnbiasedInterruptTime(ULONGLONG*);