ReactOS  0.4.9-dev-718-gaba6ce5
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 /*
106  * RTL_SYSTEM_TIME and RTL_TIME_ZONE_INFORMATION are the same as
107  * the SYSTEMTIME and TIME_ZONE_INFORMATION structures defined
108  * in winbase.h, however we need to define them separately so
109  * winternl.h doesn't depend on winbase.h. They are used by
110  * RtlQueryTimeZoneInformation and RtlSetTimeZoneInformation.
111  * The names are guessed; if anybody knows the real names, let me know.
112  */
113 typedef struct _RTL_SYSTEM_TIME {
123 
133 
135 {
146 
147 typedef struct _CLIENT_ID
148 {
152 
153 typedef struct _CURDIR
154 {
157 } CURDIR, *PCURDIR;
158 
160 {
166 
167 typedef struct tagRTL_BITMAP {
168  ULONG SizeOfBitMap; /* Number of bits in the bitmap */
169  PULONG Buffer; /* Bitmap data, assumed sized to a DWORD boundary */
171 
172 typedef const RTL_BITMAP *PCRTL_BITMAP;
173 
174 typedef struct tagRTL_BITMAP_RUN {
175  ULONG StartingIndex; /* Bit position at which run starts */
176  ULONG NumberOfBits; /* Size of the run in bits */
178 
180 
181 typedef struct _RTL_USER_PROCESS_PARAMETERS
182 {
185  ULONG Flags;
212 
213 /* value for Flags field (FIXME: not the correct name) */
214 #define PROCESS_PARAMS_FLAG_NORMALIZED 1
215 
216 typedef struct _PEB_LDR_DATA
217 {
218  ULONG Length;
220  PVOID SsHandle;
226 
227 typedef struct _GDI_TEB_BATCH
228 {
229  ULONG Offset;
230  HANDLE HDC;
231  ULONG Buffer[0x136];
232 } GDI_TEB_BATCH;
233 
235 {
240 
241 typedef struct _ACTIVATION_CONTEXT_STACK
242 {
243  ULONG Flags;
248 
249 typedef struct _TEB_ACTIVE_FRAME_CONTEXT
250 {
251  ULONG Flags;
252  const char *FrameName;
254 
255 typedef struct _TEB_ACTIVE_FRAME_CONTEXT_EX
256 {
258  const char *SourceLocation;
260 
261 typedef struct _TEB_ACTIVE_FRAME
262 {
263  ULONG Flags;
264  struct _TEB_ACTIVE_FRAME *Previous;
267 
268 typedef struct _TEB_ACTIVE_FRAME_EX
269 {
273 
274 #define TEB_ACTIVE_FRAME_CONTEXT_FLAG_EXTENDED 0x00000001
275 #define TEB_ACTIVE_FRAME_FLAG_EXTENDED 0x00000001
276 
277 /***********************************************************************
278  * PEB data structure
279  */
280 typedef struct _PEB
281 { /* win32/win64 */
282  BOOLEAN InheritedAddressSpace; /* 000/000 */
283  BOOLEAN ReadImageFileExecOptions; /* 001/001 */
284  BOOLEAN BeingDebugged; /* 002/002 */
285  BOOLEAN SpareBool; /* 003/003 */
286  HANDLE Mutant; /* 004/008 */
287  HMODULE ImageBaseAddress; /* 008/010 */
288  PPEB_LDR_DATA LdrData; /* 00c/018 */
290  PVOID SubSystemData; /* 014/028 */
291  HANDLE ProcessHeap; /* 018/030 */
293  PVOID /*PPEBLOCKROUTINE*/ FastPebLockRoutine; /* 020/040 */
294  PVOID /*PPEBLOCKROUTINE*/ FastPebUnlockRoutine; /* 024/048 */
295  ULONG EnvironmentUpdateCount; /* 028/050 */
296  PVOID KernelCallbackTable; /* 02c/058 */
297  ULONG Reserved[2]; /* 030/060 */
298  PVOID /*PPEB_FREE_BLOCK*/ FreeList; /* 038/068 */
299  ULONG TlsExpansionCounter; /* 03c/070 */
300  PRTL_BITMAP TlsBitmap; /* 040/078 */
301  ULONG TlsBitmapBits[2]; /* 044/080 */
302  PVOID ReadOnlySharedMemoryBase; /* 04c/088 */
303  PVOID ReadOnlySharedMemoryHeap; /* 050/090 */
304  PVOID *ReadOnlyStaticServerData; /* 054/098 */
305  PVOID AnsiCodePageData; /* 058/0a0 */
306  PVOID OemCodePageData; /* 05c/0a8 */
307  PVOID UnicodeCaseTableData; /* 060/0b0 */
308  ULONG NumberOfProcessors; /* 064/0b8 */
309  ULONG NtGlobalFlag; /* 068/0bc */
311  SIZE_T HeapSegmentReserve; /* 078/0c8 */
312  SIZE_T HeapSegmentCommit; /* 07c/0d0 */
315  ULONG NumberOfHeaps; /* 088/0e8 */
316  ULONG MaximumNumberOfHeaps; /* 08c/0ec */
317  PVOID *ProcessHeaps; /* 090/0f0 */
318  PVOID GdiSharedHandleTable; /* 094/0f8 */
319  PVOID ProcessStarterHelper; /* 098/100 */
320  PVOID GdiDCAttributeList; /* 09c/108 */
321  PVOID LoaderLock; /* 0a0/110 */
322  ULONG OSMajorVersion; /* 0a4/118 */
323  ULONG OSMinorVersion; /* 0a8/11c */
324  ULONG OSBuildNumber; /* 0ac/120 */
325  ULONG OSPlatformId; /* 0b0/124 */
326  ULONG ImageSubSystem; /* 0b4/128 */
329  ULONG ImageProcessAffinityMask; /* 0c0/134 */
330  HANDLE GdiHandleBuffer[28]; /* 0c4/138 */
331  ULONG unknown[6]; /* 134/218 */
333  PRTL_BITMAP TlsExpansionBitmap; /* 150/238 */
334  ULONG TlsExpansionBitmapBits[32]; /* 154/240 */
335  ULONG SessionId; /* 1d4/2c0 */
338  PVOID ShimData; /* 1e8/2d8 */
339  PVOID AppCompatInfo; /* 1ec/2e0 */
340  UNICODE_STRING CSDVersion; /* 1f0/2e8 */
345  SIZE_T MinimumStackCommit; /* 208/318 */
346  PVOID *FlsCallback; /* 20c/320 */
347  LIST_ENTRY FlsListHead; /* 210/328 */
348  PRTL_BITMAP FlsBitmap; /* 218/338 */
349  ULONG FlsBitmapBits[4]; /* 21c/340 */
350 } PEB, *PPEB;
351 
352 
353 /***********************************************************************
354  * TEB data structure
355  */
356 typedef struct _TEB
357 { /* win32/win64 */
358  NT_TIB Tib; /* 000/0000 */
359  PVOID EnvironmentPointer; /* 01c/0038 */
360  CLIENT_ID ClientId; /* 020/0040 */
361  PVOID ActiveRpcHandle; /* 028/0050 */
362  PVOID ThreadLocalStoragePointer; /* 02c/0058 */
363  PPEB Peb; /* 030/0060 */
364  ULONG LastErrorValue; /* 034/0068 */
365  ULONG CountOfOwnedCriticalSections; /* 038/006c */
366  PVOID CsrClientThread; /* 03c/0070 */
367  PVOID Win32ThreadInfo; /* 040/0078 */
368  ULONG Win32ClientInfo[31]; /* 044/0080 used for user32 private data in Wine */
369  PVOID WOW32Reserved; /* 0c0/0100 used for ntdll syscall thunks */
370  ULONG CurrentLocale; /* 0c4/0108 */
371  ULONG FpSoftwareStatusRegister; /* 0c8/010c */
372  PVOID SystemReserved1[54]; /* 0cc/0110 used for krnl386.exe16 private data in Wine */
373  LONG ExceptionCode; /* 1a4/02c0 */
375  BYTE SpareBytes1[24]; /* 1bc/02e8 */
376  PVOID SystemReserved2[10]; /* 1d4/0300 used for ntdll platform-specific private data in Wine */
377  GDI_TEB_BATCH GdiTebBatch; /* 1fc/0350 used for ntdll private data in Wine */
378  HANDLE gdiRgn; /* 6dc/0838 */
379  HANDLE gdiPen; /* 6e0/0840 */
380  HANDLE gdiBrush; /* 6e4/0848 */
381  CLIENT_ID RealClientId; /* 6e8/0850 */
382  HANDLE GdiCachedProcessHandle; /* 6f0/0860 */
383  ULONG GdiClientPID; /* 6f4/0868 */
384  ULONG GdiClientTID; /* 6f8/086c */
385  PVOID GdiThreadLocaleInfo; /* 6fc/0870 */
386  ULONG UserReserved[5]; /* 700/0878 */
387  PVOID glDispatchTable[280]; /* 714/0890 */
388  PVOID glReserved1[26]; /* b74/1150 */
389  PVOID glReserved2; /* bdc/1220 */
390  PVOID glSectionInfo; /* be0/1228 */
391  PVOID glSection; /* be4/1230 */
392  PVOID glTable; /* be8/1238 */
393  PVOID glCurrentRC; /* bec/1240 */
394  PVOID glContext; /* bf0/1248 */
395  ULONG LastStatusValue; /* bf4/1250 */
396  UNICODE_STRING StaticUnicodeString; /* bf8/1258 used by advapi32 */
397  WCHAR StaticUnicodeBuffer[261]; /* c00/1268 used by advapi32 */
398  PVOID DeallocationStack; /* e0c/1478 */
399  PVOID TlsSlots[64]; /* e10/1480 */
400  LIST_ENTRY TlsLinks; /* f10/1680 */
401  PVOID Vdm; /* f18/1690 */
402  PVOID ReservedForNtRpc; /* f1c/1698 */
403  PVOID DbgSsReserved[2]; /* f20/16a0 */
404  ULONG HardErrorDisabled; /* f28/16b0 */
405  PVOID Instrumentation[16]; /* f2c/16b8 */
406  PVOID WinSockData; /* f6c/1738 */
407  ULONG GdiBatchCount; /* f70/1740 */
408  ULONG Spare2; /* f74/1744 */
409  PVOID Spare3; /* f78/1748 used for fakedll thunks */
410  PVOID Spare4; /* f7c/1750 */
411  PVOID ReservedForOle; /* f80/1758 */
412  ULONG WaitingOnLoaderLock; /* f84/1760 */
413  PVOID Reserved5[3]; /* f88/1768 used for x86_64 OSX and wineserver shared memory */
414  PVOID *TlsExpansionSlots; /* f94/1780 */
415 #ifdef _WIN64
416  PVOID DeallocationBStore; /* /1788 */
417  PVOID BStoreLimit; /* /1790 */
418 #endif
419  ULONG ImpersonationLocale; /* f98/1798 */
420  ULONG IsImpersonating; /* f9c/179c */
421  PVOID NlsCache; /* fa0/17a0 */
422  PVOID ShimData; /* fa4/17a8 */
423  ULONG HeapVirtualAffinity; /* fa8/17b0 */
425  TEB_ACTIVE_FRAME *ActiveFrame; /* fb0/17c0 */
426  PVOID *FlsSlots; /* fb4/17c8 */
427 } TEB, *PTEB;
428 
429 /***********************************************************************
430  * Enums
431  */
432 
499 
513 
529 
545 
563 
581 
598 
599 typedef struct _FILE_BASIC_INFORMATION {
606 
607 typedef struct _FILE_STANDARD_INFORMATION {
614 
615 typedef struct _FILE_INTERNAL_INFORMATION {
618 
619 typedef struct _FILE_ID_128 {
622 
623 typedef struct _FILE_ID_INFORMATION {
627 
628 typedef struct _FILE_EA_INFORMATION {
631 
632 typedef struct _FILE_ACCESS_INFORMATION {
635 
636 typedef struct _FILE_NAME_INFORMATION {
640 
641 typedef struct _FILE_RENAME_INFORMATION {
647 
648 typedef struct _FILE_LINK_INFORMATION {
652  WCHAR FileName[1];
654 
655 typedef struct _FILE_NAMES_INFORMATION {
659  WCHAR FileName[1];
661 
662 typedef struct _FILE_DISPOSITION_INFORMATION {
665 
666 typedef struct _FILE_POSITION_INFORMATION {
669 
670 typedef struct _FILE_ALIGNMENT_INFORMATION {
673 
677 
678 typedef struct _FILE_END_OF_FILE_INFORMATION {
681 
682 typedef struct _FILE_NETWORK_OPEN_INFORMATION {
691 
692 typedef struct _FILE_FULL_EA_INFORMATION {
694  UCHAR Flags;
697  CHAR EaName[1];
699 
700 typedef struct _FILE_MODE_INFORMATION {
703 
705 {
712 
714 {
718 
726 
730 
731 typedef struct _FILE_PIPE_INFORMATION {
735 
748 
752  union {
753  struct {
757  } DUMMYSTRUCTNAME;
759  } DUMMYUNIONNAME;
761 
762 typedef struct _FILE_QUOTA_INFORMATION {
771 
776 
777 #define FILE_PIPE_DISCONNECTED_STATE 0x01
778 #define FILE_PIPE_LISTENING_STATE 0x02
779 #define FILE_PIPE_CONNECTED_STATE 0x03
780 #define FILE_PIPE_CLOSING_STATE 0x04
781 
782 typedef struct _FILE_ALL_INFORMATION {
793 
797 
798 #define FILE_SKIP_COMPLETION_PORT_ON_SUCCESS 0x1
799 #define FILE_SKIP_SET_EVENT_ON_HANDLE 0x2
800 #define FILE_SKIP_SET_USER_EVENT_ON_FAST_IO 0x4
801 
802 typedef enum _FSINFOCLASS {
813 
825 
833 
841 
842 typedef enum _PROCESSINFOCLASS {
895 
896 #define MEM_EXECUTE_OPTION_DISABLE 0x01
897 #define MEM_EXECUTE_OPTION_ENABLE 0x02
898 #define MEM_EXECUTE_OPTION_DISABLE_THUNK_EMULATION 0x04
899 #define MEM_EXECUTE_OPTION_PERMANENT 0x08
900 
901 typedef enum _SECTION_INHERIT {
905 
910  SystemTimeOfDayInformation = 3, /* was SystemTimeInformation */
991 
992 typedef enum _THREADINFOCLASS {
1028 } THREADINFOCLASS;
1029 
1030 typedef struct _THREAD_BASIC_INFORMATION
1031 {
1032  NTSTATUS ExitStatus;
1039 
1041 {
1045 
1046 typedef struct _KERNEL_USER_TIMES {
1052 
1053 typedef enum _WINSTATIONINFOCLASS {
1056 
1063 
1064 typedef struct _MEMORY_SECTION_NAME
1065 {
1068 
1070 {
1073 
1074 typedef struct _MUTANT_BASIC_INFORMATION {
1079 
1081 {
1084 
1085 typedef struct _TIMER_BASIC_INFORMATION
1086 {
1090 
1091 
1092 /* return type of RtlDetermineDosPathNameType_U (FIXME: not the correct names) */
1093 typedef enum
1094 {
1096  UNC_PATH, /* "//foo" */
1097  ABSOLUTE_DRIVE_PATH, /* "c:/foo" */
1098  RELATIVE_DRIVE_PATH, /* "c:foo" */
1099  ABSOLUTE_PATH, /* "/foo" */
1100  RELATIVE_PATH, /* "foo" */
1101  DEVICE_PATH, /* "//./foo" */
1102  UNC_DOT_PATH /* "//." */
1104 
1105 
1106 /***********************************************************************
1107  * Types and data structures
1108  */
1109 
1110 /* This is used by NtQuerySystemInformation */
1111 typedef struct _SYSTEM_THREAD_INFORMATION
1112 { /* win32/win64 */
1113  LARGE_INTEGER KernelTime; /* 00/00 */
1114  LARGE_INTEGER UserTime; /* 08/08 */
1115  LARGE_INTEGER CreateTime; /* 10/10 */
1116  DWORD dwTickCount; /* 18/18 */
1117  LPVOID StartAddress; /* 1c/20 */
1118  CLIENT_ID ClientId; /* 20/28 */
1120  DWORD dwBasePriority; /* 2c/3c */
1122  DWORD dwThreadState; /* 34/44 */
1123  DWORD dwWaitReason; /* 38/48 */
1124  DWORD dwUnknown; /* 3c/4c */
1126 
1127 typedef struct _IO_STATUS_BLOCK {
1128  union {
1129  NTSTATUS Status;
1130  PVOID Pointer;
1131  } DUMMYUNIONNAME;
1132 
1135 
1137 
1138 typedef struct _KEY_BASIC_INFORMATION {
1140  ULONG TitleIndex;
1141  ULONG NameLength;
1142  WCHAR Name[1];
1144 
1145 typedef struct _KEY_NODE_INFORMATION
1146 {
1148  ULONG TitleIndex;
1151  ULONG NameLength;
1152  WCHAR Name[1];
1153  /* Class[1]; */
1155 
1156 typedef struct _KEY_FULL_INFORMATION
1157 {
1159  ULONG TitleIndex;
1162  ULONG SubKeys;
1163  ULONG MaxNameLen;
1165  ULONG Values;
1168  WCHAR Class[1];
1170 
1171 typedef struct _KEY_NAME_INFORMATION {
1175 
1177 {
1187 
1188 typedef struct _KEY_VALUE_ENTRY
1189 {
1190  PUNICODE_STRING ValueName;
1191  ULONG DataLength;
1192  ULONG DataOffset;
1193  ULONG Type;
1195 
1196 typedef struct _KEY_VALUE_BASIC_INFORMATION {
1197  ULONG TitleIndex;
1198  ULONG Type;
1199  ULONG NameLength;
1200  WCHAR Name[1];
1202 
1203 typedef struct _KEY_VALUE_FULL_INFORMATION {
1204  ULONG TitleIndex;
1205  ULONG Type;
1206  ULONG DataOffset;
1207  ULONG DataLength;
1208  ULONG NameLength;
1209  WCHAR Name[1];
1211 
1212 typedef struct _KEY_VALUE_PARTIAL_INFORMATION {
1213  ULONG TitleIndex;
1214  ULONG Type;
1215  ULONG DataLength;
1216  UCHAR Data[1];
1218 
1219 #ifndef __OBJECT_ATTRIBUTES_DEFINED__
1220 #define __OBJECT_ATTRIBUTES_DEFINED__
1221 typedef struct _OBJECT_ATTRIBUTES {
1222  ULONG Length;
1224  PUNICODE_STRING ObjectName;
1225  ULONG Attributes;
1226  PVOID SecurityDescriptor; /* type SECURITY_DESCRIPTOR */
1227  PVOID SecurityQualityOfService; /* type SECURITY_QUALITY_OF_SERVICE */
1229 #endif
1230 
1235 
1249 
1250 typedef struct _OBJECT_NAME_INFORMATION {
1253 
1279 
1281 {
1284 
1285 typedef struct _PROCESS_BASIC_INFORMATION {
1286 #ifdef __WINESRC__
1288  PPEB PebBaseAddress;
1293 #else
1294  PVOID Reserved1;
1295  PPEB PebBaseAddress;
1296  PVOID Reserved2[2];
1298  PVOID Reserved3;
1299 #endif
1301 
1302 #define PROCESS_PRIOCLASS_IDLE 1
1303 #define PROCESS_PRIOCLASS_NORMAL 2
1304 #define PROCESS_PRIOCLASS_HIGH 3
1305 #define PROCESS_PRIOCLASS_REALTIME 4
1306 #define PROCESS_PRIOCLASS_BELOW_NORMAL 5
1307 #define PROCESS_PRIOCLASS_ABOVE_NORMAL 6
1308 
1309 typedef struct _PROCESS_PRIORITY_CLASS {
1313 
1314 typedef struct _RTL_HEAP_DEFINITION {
1315  ULONG Length; /* = sizeof(RTL_HEAP_DEFINITION) */
1316 
1319 
1320 typedef struct _RTL_RWLOCK {
1322 
1325 
1328 
1332  PVOID pDebugInfo;
1334 
1335 /* System Information Class 0x00 */
1336 
1337 typedef struct _SYSTEM_BASIC_INFORMATION {
1338 #ifdef __WINESRC__
1339  DWORD unknown;
1341  ULONG PageSize;
1346  PVOID LowestUserAddress;
1347  PVOID HighestUserAddress;
1350 #else
1351  BYTE Reserved1[24];
1352  PVOID Reserved2[4];
1354 #endif
1356 
1357 /* System Information Class 0x01 */
1358 
1359 typedef struct _SYSTEM_CPU_INFORMATION {
1362  WORD Revision; /* combination of CPU model and stepping */
1363  WORD Reserved; /* always zero */
1364  DWORD FeatureSet; /* see bit flags below */
1366 
1367 /* definitions of bits in the Feature set for the x86 processors */
1368 #define CPU_FEATURE_VME 0x00000005 /* Virtual 86 Mode Extensions */
1369 #define CPU_FEATURE_TSC 0x00000002 /* Time Stamp Counter available */
1370 #define CPU_FEATURE_CMOV 0x00000008 /* Conditional Move instruction*/
1371 #define CPU_FEATURE_PGE 0x00000014 /* Page table Entry Global bit */
1372 #define CPU_FEATURE_PSE 0x00000024 /* Page Size Extension */
1373 #define CPU_FEATURE_MTRR 0x00000040 /* Memory Type Range Registers */
1374 #define CPU_FEATURE_CX8 0x00000080 /* Compare and eXchange 8 byte instr. */
1375 #define CPU_FEATURE_MMX 0x00000100 /* Multi Media eXtensions */
1376 #define CPU_FEATURE_X86 0x00000200 /* seems to be always ON, on the '86 */
1377 #define CPU_FEATURE_PAT 0x00000400 /* Page Attribute Table */
1378 #define CPU_FEATURE_FXSR 0x00000800 /* FXSAVE and FXSTORE instructions */
1379 #define CPU_FEATURE_SEP 0x00001000 /* SYSENTER and SYSEXIT instructions */
1380 #define CPU_FEATURE_SSE 0x00002000 /* SSE extensions (ext. MMX) */
1381 #define CPU_FEATURE_3DNOW 0x00004000 /* 3DNOW instructions available */
1382 #define CPU_FEATURE_SSE2 0x00010000 /* SSE2 extensions (XMMI64) */
1383 #define CPU_FEATURE_DS 0x00020000 /* Debug Store */
1384 #define CPU_FEATURE_HTT 0x00040000 /* Hyper Threading Technology */
1385 
1386 /* System Information Class 0x02 */
1387 
1388 /* Documented in "Windows NT/2000 Native API Reference" by Gary Nebbett. */
1389 typedef struct _SYSTEM_PERFORMANCE_INFORMATION {
1464 
1465 /* System Information Class 0x03 */
1466 
1467 typedef struct _SYSTEM_TIMEOFDAY_INFORMATION {
1468 #ifdef __WINESRC__
1469  LARGE_INTEGER liKeBootTime;
1470  LARGE_INTEGER liKeSystemTime;
1471  LARGE_INTEGER liExpTimeZoneBias;
1472  ULONG uCurrentTimeZoneId;
1473  DWORD dwUnknown1[5];
1474 #else
1475  BYTE Reserved1[48];
1476 #endif
1477 } SYSTEM_TIMEOFDAY_INFORMATION, *PSYSTEM_TIMEOFDAY_INFORMATION; /* was SYSTEM_TIME_INFORMATION */
1478 
1479 /* System Information Class 0x08 */
1480 
1486  ULONG Reserved2;
1488 
1489 /* System Information Class 0x0b */
1490 
1492  PVOID pvAddress;
1497  char szName[MAX_PATH + 1];
1499 
1500 /* System Information Class 0x10 */
1501 
1502 typedef struct _SYSTEM_HANDLE_ENTRY {
1510 
1511 typedef struct _SYSTEM_HANDLE_INFORMATION {
1515 
1516 /* System Information Class 0x40 */
1517 
1519 {
1520  PVOID Object;
1527  ULONG Reserved;
1529 
1530 typedef struct _SYSTEM_HANDLE_INFORMATION_EX
1531 {
1532  ULONG_PTR Count;
1536 
1537 /* System Information Class 0x15 */
1538 
1546 #ifdef _WIN64
1547  ULONG unknown64[7];
1548 #endif
1550 
1551 /* System Information Class 0x17 */
1552 
1553 typedef struct _SYSTEM_INTERRUPT_INFORMATION {
1554  BYTE Reserved1[24];
1556 
1558  union {
1560  struct {
1563  } tag1;
1564  } tag2;
1575 
1576 typedef struct _SYSTEM_EXCEPTION_INFORMATION {
1577  BYTE Reserved1[16];
1579 
1580 typedef struct _SYSTEM_LOOKASIDE_INFORMATION {
1581  BYTE Reserved1[32];
1583 
1584 typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION {
1588 
1589 /* System Information Class 0x05 */
1590 
1591 typedef struct _VM_COUNTERS_ {
1605 
1606 typedef struct _SYSTEM_PROCESS_INFORMATION {
1607 #ifdef __WINESRC__ /* win32/win64 */
1608  ULONG NextEntryOffset; /* 00/00 */
1609  DWORD dwThreadCount; /* 04/04 */
1610  DWORD dwUnknown1[6]; /* 08/08 */
1611  LARGE_INTEGER CreationTime; /* 20/20 */
1612  LARGE_INTEGER UserTime; /* 28/28 */
1613  LARGE_INTEGER KernelTime; /* 30/30 */
1614  UNICODE_STRING ProcessName; /* 38/38 */
1615  DWORD dwBasePriority; /* 40/48 */
1616  HANDLE UniqueProcessId; /* 44/50 */
1617  HANDLE ParentProcessId; /* 48/58 */
1618  ULONG HandleCount; /* 4c/60 */
1619  ULONG SessionId; /* 50/64 */
1620  DWORD dwUnknown4; /* 54/68 */
1621  VM_COUNTERS vmCounters; /* 58/70 */
1622  IO_COUNTERS ioCounters; /* 88/d0 */
1623  SYSTEM_THREAD_INFORMATION ti[1]; /* b8/100 */
1624 #else
1625  ULONG NextEntryOffset; /* 00/00 */
1626  BYTE Reserved1[52]; /* 04/04 */
1627  PVOID Reserved2[3]; /* 38/38 */
1628  HANDLE UniqueProcessId; /* 44/50 */
1629  PVOID Reserved3; /* 48/58 */
1630  ULONG HandleCount; /* 4c/60 */
1631  BYTE Reserved4[4]; /* 50/64 */
1632  PVOID Reserved5[11]; /* 54/68 */
1633  SIZE_T PeakPagefileUsage; /* 80/c0 */
1634  SIZE_T PrivatePageCount; /* 84/c8 */
1635  LARGE_INTEGER Reserved6[6]; /* 88/d0 */
1636 #endif
1638 
1639 typedef struct _SYSTEM_REGISTRY_QUOTA_INFORMATION {
1642  PVOID Reserved1;
1644 
1645 typedef struct _SYSTEM_TIME_ADJUSTMENT {
1649 
1650 typedef struct _TIME_FIELDS
1651 { CSHORT Year;
1652  CSHORT Month;
1653  CSHORT Day;
1654  CSHORT Hour;
1655  CSHORT Minute;
1656  CSHORT Second;
1657  CSHORT Milliseconds;
1658  CSHORT Weekday;
1660 
1661 typedef struct _WINSTATIONINFORMATIONW {
1662  BYTE Reserved2[70];
1663  ULONG LogonId;
1664  BYTE Reserved3[1140];
1666 
1668 
1669 typedef struct _LDR_RESOURCE_INFO
1670 {
1671  ULONG_PTR Type;
1672  ULONG_PTR Name;
1673  ULONG Language;
1675 
1676 
1677 /* debug buffer definitions */
1678 
1679 typedef struct _DEBUG_BUFFER {
1685  ULONG Unknown[2];
1688  ULONG SizeOfInfo;
1695  PVOID Reserved[8];
1697 
1698 #define PDI_MODULES 0x01
1699 #define PDI_BACKTRACE 0x02
1700 #define PDI_HEAPS 0x04
1701 #define PDI_HEAP_TAGS 0x08
1702 #define PDI_HEAP_BLOCKS 0x10
1703 #define PDI_LOCKS 0x20
1704 
1706  ULONG Reserved[2];
1707  ULONG Base;
1708  ULONG Size;
1709  ULONG Flags;
1716 
1717 typedef struct _DEBUG_HEAP_INFORMATION {
1718  ULONG Base;
1719  ULONG Flags;
1722  ULONG Allocated;
1723  ULONG Committed;
1724  ULONG TagCount;
1725  ULONG BlockCount;
1726  ULONG Reserved[7];
1727  PVOID Tags;
1728  PVOID Blocks;
1730 
1731 typedef struct _DEBUG_LOCK_INFORMATION {
1732  PVOID Address;
1738  ULONG EntryCount;
1743 
1744 typedef struct _PORT_MESSAGE_HEADER {
1750  ULONG MessageId;
1753 
1754 typedef unsigned short RTL_ATOM, *PRTL_ATOM;
1755 
1756 /* Wine doesn't implement atom table as NT does:
1757  * - in NT, atom tables are user space tables, which ntdll directly accesses
1758  * - on Wine, (even local) atom tables are wineserver objects, hence a HANDLE
1759  */
1760 typedef struct atom_table *RTL_ATOM_TABLE, **PRTL_ATOM_TABLE;
1761 
1766 
1767 typedef struct _ATOM_BASIC_INFORMATION {
1771  WCHAR Name[1];
1773 
1774 /* FIXME: names probably not correct */
1775 typedef struct _RTL_HANDLE
1776 {
1777  struct _RTL_HANDLE * Next;
1778 } RTL_HANDLE;
1779 
1780 /* FIXME: names probably not correct */
1781 typedef struct _RTL_HANDLE_TABLE
1782 {
1783  ULONG MaxHandleCount; /* 0x00 */
1784  ULONG HandleSize; /* 0x04 */
1785  ULONG Unused[2]; /* 0x08-0x0c */
1786  PVOID NextFree; /* 0x10 */
1787  PVOID FirstHandle; /* 0x14 */
1788  PVOID ReservedMemory; /* 0x18 */
1789  PVOID MaxHandle; /* 0x1c */
1791 
1792 /***********************************************************************
1793  * Defines
1794  */
1795 
1796 /* flags for NtCreateFile and NtOpenFile */
1797 #define FILE_DIRECTORY_FILE 0x00000001
1798 #define FILE_WRITE_THROUGH 0x00000002
1799 #define FILE_SEQUENTIAL_ONLY 0x00000004
1800 #define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008
1801 #define FILE_SYNCHRONOUS_IO_ALERT 0x00000010
1802 #define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020
1803 #define FILE_NON_DIRECTORY_FILE 0x00000040
1804 #define FILE_CREATE_TREE_CONNECTION 0x00000080
1805 #define FILE_COMPLETE_IF_OPLOCKED 0x00000100
1806 #define FILE_NO_EA_KNOWLEDGE 0x00000200
1807 #define FILE_OPEN_FOR_RECOVERY 0x00000400
1808 #define FILE_RANDOM_ACCESS 0x00000800
1809 #define FILE_DELETE_ON_CLOSE 0x00001000
1810 #define FILE_OPEN_BY_FILE_ID 0x00002000
1811 #define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000
1812 #define FILE_NO_COMPRESSION 0x00008000
1813 #define FILE_RESERVE_OPFILTER 0x00100000
1814 #define FILE_TRANSACTED_MODE 0x00200000
1815 #define FILE_OPEN_OFFLINE_FILE 0x00400000
1816 #define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000
1817 
1818 #define FILE_ATTRIBUTE_VALID_FLAGS 0x00007fb7
1819 #define FILE_ATTRIBUTE_VALID_SET_FLAGS 0x000031a7
1820 
1821 /* status for NtCreateFile or NtOpenFile */
1822 #define FILE_SUPERSEDED 0
1823 #define FILE_OPENED 1
1824 #define FILE_CREATED 2
1825 #define FILE_OVERWRITTEN 3
1826 #define FILE_EXISTS 4
1827 #define FILE_DOES_NOT_EXIST 5
1828 
1829 /* disposition for NtCreateFile */
1830 #define FILE_SUPERSEDE 0
1831 #define FILE_OPEN 1
1832 #define FILE_CREATE 2
1833 #define FILE_OPEN_IF 3
1834 #define FILE_OVERWRITE 4
1835 #define FILE_OVERWRITE_IF 5
1836 #define FILE_MAXIMUM_DISPOSITION 5
1837 
1838 /* Characteristics of a File System */
1839 #define FILE_REMOVABLE_MEDIA 0x00000001
1840 #define FILE_READ_ONLY_DEVICE 0x00000002
1841 #define FILE_FLOPPY_DISKETTE 0x00000004
1842 #define FILE_WRITE_ONE_MEDIA 0x00000008
1843 #define FILE_REMOTE_DEVICE 0x00000010
1844 #define FILE_DEVICE_IS_MOUNTED 0x00000020
1845 #define FILE_VIRTUAL_VOLUME 0x00000040
1846 #define FILE_AUTOGENERATED_DEVICE_NAME 0x00000080
1847 #define FILE_DEVICE_SECURE_OPEN 0x00000100
1848 #define FILE_CHARACTERISTIC_PNP_DEVICE 0x00000800
1849 #define FILE_CHARACTERISTIC_TS_DEVICE 0x00001000
1850 #define FILE_CHARACTERISTIC_WEBDAV_DEVICE 0x00002000
1851 #define FILE_CHARACTERISTIC_CSV 0x00010000
1852 #define FILE_DEVICE_ALLOW_APPCONTAINER_TRAVERSAL 0x00020000
1853 #define FILE_PORTABLE_DEVICE 0x00040000
1854 
1855 /* options for NtCreateNamedPipeFile */
1856 #define FILE_PIPE_INBOUND 0x00000000
1857 #define FILE_PIPE_OUTBOUND 0x00000001
1858 #define FILE_PIPE_FULL_DUPLEX 0x00000002
1859 
1860 /* options for pipe's type */
1861 #define FILE_PIPE_TYPE_MESSAGE 0x00000001
1862 #define FILE_PIPE_TYPE_BYTE 0x00000000
1863 /* options for pipe's message mode */
1864 #define FILE_PIPE_MESSAGE_MODE 0x00000001
1865 #define FILE_PIPE_BYTE_STREAM_MODE 0x00000000
1866 /* options for pipe's blocking mode */
1867 #define FILE_PIPE_COMPLETE_OPERATION 0x00000001
1868 #define FILE_PIPE_QUEUE_OPERATION 0x00000000
1869 /* and client / server end */
1870 #define FILE_PIPE_SERVER_END 0x00000001
1871 #define FILE_PIPE_CLIENT_END 0x00000000
1872 
1873 #define INTERNAL_TS_ACTIVE_CONSOLE_ID ( *((volatile ULONG*)(0x7ffe02d8)) )
1874 
1875 #define LOGONID_CURRENT ((ULONG)-1)
1876 
1877 #define OBJ_INHERIT 0x00000002
1878 #define OBJ_PERMANENT 0x00000010
1879 #define OBJ_EXCLUSIVE 0x00000020
1880 #define OBJ_CASE_INSENSITIVE 0x00000040
1881 #define OBJ_OPENIF 0x00000080
1882 #define OBJ_OPENLINK 0x00000100
1883 #define OBJ_KERNEL_HANDLE 0x00000200
1884 #define OBJ_FORCE_ACCESS_CHECK 0x00000400
1885 #define OBJ_VALID_ATTRIBUTES 0x000007F2
1886 
1887 #define SERVERNAME_CURRENT ((HANDLE)NULL)
1888 
1889 typedef void (CALLBACK *PNTAPCFUNC)(ULONG_PTR,ULONG_PTR,ULONG_PTR); /* FIXME: not the right name */
1890 typedef void (CALLBACK *PRTL_THREAD_START_ROUTINE)(LPVOID); /* FIXME: not the right name */
1891 typedef DWORD (CALLBACK *PRTL_WORK_ITEM_ROUTINE)(LPVOID); /* FIXME: not the right name */
1892 typedef void (NTAPI *RTL_WAITORTIMERCALLBACKFUNC)(PVOID,BOOLEAN); /* FIXME: not the right name */
1893 
1894 
1895 /* DbgPrintEx default levels */
1896 #define DPFLTR_ERROR_LEVEL 0
1897 #define DPFLTR_WARNING_LEVEL 1
1898 #define DPFLTR_TRACE_LEVEL 2
1899 #define DPFLTR_INFO_LEVEL 3
1900 #define DPFLTR_MASK 0x8000000
1901 
1902 /* Well-known LUID values */
1903 #define SE_MIN_WELL_KNOWN_PRIVILEGE 2
1904 #define SE_CREATE_TOKEN_PRIVILEGE 2
1905 #define SE_ASSIGNPRIMARYTOKEN_PRIVILEGE 3
1906 #define SE_LOCK_MEMORY_PRIVILEGE 4
1907 #define SE_INCREASE_QUOTA_PRIVILEGE 5
1908 #define SE_UNSOLICITED_INPUT_PRIVILEGE 6 /* obsolete */
1909 #define SE_MACHINE_ACCOUNT_PRIVILEGE 6
1910 #define SE_TCB_PRIVILEGE 7
1911 #define SE_SECURITY_PRIVILEGE 8
1912 #define SE_TAKE_OWNERSHIP_PRIVILEGE 9
1913 #define SE_LOAD_DRIVER_PRIVILEGE 10
1914 #define SE_SYSTEM_PROFILE_PRIVILEGE 11
1915 #define SE_SYSTEMTIME_PRIVILEGE 12
1916 #define SE_PROF_SINGLE_PROCESS_PRIVILEGE 13
1917 #define SE_INC_BASE_PRIORITY_PRIVILEGE 14
1918 #define SE_CREATE_PAGEFILE_PRIVILEGE 15
1919 #define SE_CREATE_PERMANENT_PRIVILEGE 16
1920 #define SE_BACKUP_PRIVILEGE 17
1921 #define SE_RESTORE_PRIVILEGE 18
1922 #define SE_SHUTDOWN_PRIVILEGE 19
1923 #define SE_DEBUG_PRIVILEGE 20
1924 #define SE_AUDIT_PRIVILEGE 21
1925 #define SE_SYSTEM_ENVIRONMENT_PRIVILEGE 22
1926 #define SE_CHANGE_NOTIFY_PRIVILEGE 23
1927 #define SE_REMOTE_SHUTDOWN_PRIVILEGE 24
1928 #define SE_UNDOCK_PRIVILEGE 25
1929 #define SE_SYNC_AGENT_PRIVILEGE 26
1930 #define SE_ENABLE_DELEGATION_PRIVILEGE 27
1931 #define SE_MANAGE_VOLUME_PRIVILEGE 28
1932 #define SE_IMPERSONATE_PRIVILEGE 29
1933 #define SE_CREATE_GLOBAL_PRIVILEGE 30
1934 #define SE_MAX_WELL_KNOWN_PRIVILEGE SE_CREATE_GLOBAL_PRIVILEGE
1935 
1936 /* NtGlobalFlag bits */
1937 #define FLG_STOP_ON_EXCEPTION 0x00000001
1938 #define FLG_SHOW_LDR_SNAPS 0x00000002
1939 #define FLG_DEBUG_INITIAL_COMMAND 0x00000004
1940 #define FLG_STOP_ON_HUNG_GUI 0x00000008
1941 #define FLG_HEAP_ENABLE_TAIL_CHECK 0x00000010
1942 #define FLG_HEAP_ENABLE_FREE_CHECK 0x00000020
1943 #define FLG_HEAP_VALIDATE_PARAMETERS 0x00000040
1944 #define FLG_HEAP_VALIDATE_ALL 0x00000080
1945 #define FLG_APPLICATION_VERIFIER 0x00000100
1946 #define FLG_POOL_ENABLE_TAGGING 0x00000400
1947 #define FLG_HEAP_ENABLE_TAGGING 0x00000800
1948 #define FLG_USER_STACK_TRACE_DB 0x00001000
1949 #define FLG_KERNEL_STACK_TRACE_DB 0x00002000
1950 #define FLG_MAINTAIN_OBJECT_TYPELIST 0x00004000
1951 #define FLG_HEAP_ENABLE_TAG_BY_DLL 0x00008000
1952 #define FLG_DISABLE_STACK_EXTENSION 0x00010000
1953 #define FLG_ENABLE_CSRDEBUG 0x00020000
1954 #define FLG_ENABLE_KDEBUG_SYMBOL_LOAD 0x00040000
1955 #define FLG_DISABLE_PAGE_KERNEL_STACKS 0x00080000
1956 #define FLG_ENABLE_SYSTEM_CRIT_BREAKS 0x00100000
1957 #define FLG_HEAP_DISABLE_COALESCING 0x00200000
1958 #define FLG_ENABLE_CLOSE_EXCEPTIONS 0x00400000
1959 #define FLG_ENABLE_EXCEPTION_LOGGING 0x00800000
1960 #define FLG_ENABLE_HANDLE_TYPE_TAGGING 0x01000000
1961 #define FLG_HEAP_PAGE_ALLOCS 0x02000000
1962 #define FLG_DEBUG_INITIAL_COMMAND_EX 0x04000000
1963 #define FLG_DISABLE_DBGPRINT 0x08000000
1964 #define FLG_CRITSEC_EVENT_CREATION 0x10000000
1965 #define FLG_LDR_TOP_DOWN 0x20000000
1966 #define FLG_ENABLE_HANDLE_EXCEPTIONS 0x40000000
1967 #define FLG_DISABLE_PROTDLLS 0x80000000
1968 
1969 /* Rtl*Registry* functions structs and defines */
1970 #define RTL_REGISTRY_ABSOLUTE 0
1971 #define RTL_REGISTRY_SERVICES 1
1972 #define RTL_REGISTRY_CONTROL 2
1973 #define RTL_REGISTRY_WINDOWS_NT 3
1974 #define RTL_REGISTRY_DEVICEMAP 4
1975 #define RTL_REGISTRY_USER 5
1976 
1977 #define RTL_REGISTRY_HANDLE 0x40000000
1978 #define RTL_REGISTRY_OPTIONAL 0x80000000
1979 
1980 #define RTL_QUERY_REGISTRY_SUBKEY 0x00000001
1981 #define RTL_QUERY_REGISTRY_TOPKEY 0x00000002
1982 #define RTL_QUERY_REGISTRY_REQUIRED 0x00000004
1983 #define RTL_QUERY_REGISTRY_NOVALUE 0x00000008
1984 #define RTL_QUERY_REGISTRY_NOEXPAND 0x00000010
1985 #define RTL_QUERY_REGISTRY_DIRECT 0x00000020
1986 #define RTL_QUERY_REGISTRY_DELETE 0x00000040
1987 
1989  ULONG ValueType,
1990  PVOID ValueData,
1991  ULONG ValueLength,
1992  PVOID Context,
1993  PVOID EntryContext);
1994 
1995 typedef struct _RTL_QUERY_REGISTRY_TABLE
1996 {
1998  ULONG Flags;
1999  PWSTR Name;
2000  PVOID EntryContext;
2001  ULONG DefaultType;
2002  PVOID DefaultData;
2003  ULONG DefaultLength;
2005 
2007 {
2008  PUNICODE_STRING ValueName;
2009  ULONG DataLength;
2010  ULONG DataOffset;
2011  ULONG Type;
2013 
2015 
2017 
2021 
2022 typedef struct _EVENT_BASIC_INFORMATION {
2024  LONG EventState;
2026 
2030 
2031 typedef struct _SEMAPHORE_BASIC_INFORMATION {
2035 
2037 {
2041 
2042 typedef struct _SECTION_BASIC_INFORMATION {
2043  PVOID BaseAddress;
2044  ULONG Attributes;
2047 
2048 typedef struct _SECTION_IMAGE_INFORMATION {
2049  PVOID TransferAddress;
2050  ULONG ZeroBits;
2053  ULONG SubSystemType;
2056  ULONG GpValue;
2059  USHORT Machine;
2061  union
2062  {
2063  UCHAR ImageFlags;
2064  struct
2065  {
2067  UCHAR ComPlusILOnly : 1;
2069  UCHAR ImageMappedFlat : 1;
2071  UCHAR Reserved : 3;
2072  } DUMMYSTRUCTNAME;
2073  } DUMMYUNIONNAME;
2074  ULONG LoaderFlags;
2075  ULONG ImageFileSize;
2076  ULONG CheckSum;
2078 
2079 typedef struct _LPC_SECTION_WRITE {
2080  ULONG Length;
2081  HANDLE SectionHandle;
2082  ULONG SectionOffset;
2083  ULONG ViewSize;
2084  PVOID ViewBase;
2085  PVOID TargetViewBase;
2087 
2088 typedef struct _LPC_SECTION_READ {
2089  ULONG Length;
2090  ULONG ViewSize;
2091  PVOID ViewBase;
2093 
2094 typedef struct _LPC_MESSAGE {
2095  USHORT DataSize;
2100  ULONG_PTR MessageId;
2101  ULONG_PTR SectionSize;
2104 
2105 typedef struct _RTL_USER_PROCESS_INFORMATION
2106 {
2107  ULONG Length;
2108  HANDLE Process;
2109  HANDLE Thread;
2113 
2114 typedef enum _SHUTDOWN_ACTION {
2119 
2120 typedef enum _KPROFILE_SOURCE {
2147 
2152 
2153 typedef struct _INITIAL_TEB {
2154  PVOID StackBase;
2155  PVOID StackLimit;
2160 
2164 
2168 
2171  ULONG_PTR CompletionKey;
2173 
2174 #define IO_COMPLETION_QUERY_STATE 0x0001
2175 #define IO_COMPLETION_MODIFY_STATE 0x0002
2176 #define IO_COMPLETION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
2177 
2187 
2188 typedef enum _HARDERROR_RESPONSE {
2199 
2200 typedef enum _SYSDBG_COMMAND {
2222 
2223 
2224 /*************************************************************************
2225  * Loader structures
2226  *
2227  * Those are not part of standard Winternl.h
2228  */
2229 typedef struct _LDR_MODULE
2230 {
2235  void* EntryPoint;
2239  ULONG Flags;
2250  ULONG_PTR OriginalBase;
2252 
2253  /* Not part of Win7 but used by Wine */
2256 
2257 typedef struct _LDR_DLL_LOADED_NOTIFICATION_DATA
2258 {
2259  ULONG Flags;
2260  PCUNICODE_STRING FullDllName;
2261  PCUNICODE_STRING BaseDllName;
2262  PVOID DllBase;
2263  ULONG SizeOfImage;
2265 
2267 {
2268  ULONG Flags;
2269  PCUNICODE_STRING FullDllName;
2270  PCUNICODE_STRING BaseDllName;
2271  PVOID DllBase;
2274 
2276 {
2280 
2282 
2283 /* those defines are (some of the) regular LDR_MODULE.Flags values */
2284 #define LDR_IMAGE_IS_DLL 0x00000004
2285 #define LDR_LOAD_IN_PROGRESS 0x00001000
2286 #define LDR_UNLOAD_IN_PROGRESS 0x00002000
2287 #define LDR_NO_DLL_CALLS 0x00040000
2288 #define LDR_PROCESS_ATTACHED 0x00080000
2289 #define LDR_MODULE_REBASED 0x00200000
2290 
2291 /* these ones is Wine specific */
2292 #define LDR_DONT_RESOLVE_REFS 0x40000000
2293 #define LDR_WINE_INTERNAL 0x80000000
2294 
2295 /* flag for LdrAddRefDll */
2296 #define LDR_ADDREF_DLL_PIN 0x00000001
2297 
2298 /* FIXME: to be checked */
2299 #define MAXIMUM_FILENAME_LENGTH 256
2300 
2301 #define LDR_DLL_NOTIFICATION_REASON_LOADED 1
2302 #define LDR_DLL_NOTIFICATION_REASON_UNLOADED 2
2303 
2304 typedef struct _SYSTEM_MODULE
2305 {
2306  PVOID Reserved1; /* 00/00 */
2307  PVOID Reserved2; /* 04/08 */
2308  PVOID ImageBaseAddress; /* 08/10 */
2309  ULONG ImageSize; /* 0c/18 */
2310  ULONG Flags; /* 10/1c */
2311  WORD Id; /* 14/20 */
2312  WORD Rank; /* 16/22 */
2313  WORD Unknown; /* 18/24 */
2314  WORD NameOffset; /* 1a/26 */
2317 
2318 typedef struct _SYSTEM_MODULE_INFORMATION
2319 {
2321  SYSTEM_MODULE Modules[1]; /* FIXME: should be Modules[0] */
2323 
2324 #define THREAD_CREATE_FLAGS_CREATE_SUSPENDED 0x00000001
2325 #define THREAD_CREATE_FLAGS_SKIP_THREAD_ATTACH 0x00000002
2326 #define THREAD_CREATE_FLAGS_HIDE_FROM_DEBUGGER 0x00000004
2327 #define THREAD_CREATE_FLAGS_HAS_SECURITY_DESCRIPTOR 0x00000010
2328 #define THREAD_CREATE_FLAGS_ACCESS_CHECK_IN_TARGET 0x00000020
2329 #define THREAD_CREATE_FLAGS_INITIAL_THREAD 0x00000080
2330 
2331 /***********************************************************************
2332  * Function declarations
2333  */
2334 
2335 #if defined(__i386__) && defined(__GNUC__)
2336 static inline void WINAPI DbgBreakPoint(void) { __asm__ __volatile__("int3"); }
2337 static inline void WINAPI DbgUserBreakPoint(void) { __asm__ __volatile__("int3"); }
2338 #else /* __i386__ && __GNUC__ */
2339 NTSYSAPI void WINAPI DbgBreakPoint(void);
2340 NTSYSAPI void WINAPI DbgUserBreakPoint(void);
2341 #endif /* __i386__ && __GNUC__ */
2342 #ifndef __REACTOS__
2343 NTSYSAPI NTSTATUS WINAPIV DbgPrint(LPCSTR fmt, ...);
2344 #endif /* __REACTOS__ */
2345 NTSYSAPI NTSTATUS WINAPIV DbgPrintEx(ULONG iComponentId, ULONG Level, LPCSTR fmt, ...);
2347 NTSYSAPI NTSTATUS WINAPI LdrAddRefDll(ULONG,HMODULE);
2351 NTSYSAPI NTSTATUS WINAPI LdrFindEntryForAddress(const void*, PLDR_MODULE*);
2352 NTSYSAPI NTSTATUS WINAPI LdrGetDllHandle(LPCWSTR, ULONG, const UNICODE_STRING*, HMODULE*);
2353 NTSYSAPI NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE, const ANSI_STRING*, ULONG, void**);
2354 NTSYSAPI void WINAPI LdrInitializeThunk(void*,ULONG_PTR,ULONG_PTR,ULONG_PTR);
2355 NTSYSAPI NTSTATUS WINAPI LdrLoadDll(LPCWSTR, DWORD, const UNICODE_STRING*, HMODULE*);
2356 NTSYSAPI NTSTATUS WINAPI LdrLockLoaderLock(ULONG,ULONG*,ULONG_PTR*);
2358 NTSYSAPI NTSTATUS WINAPI LdrQueryImageFileExecutionOptions(const UNICODE_STRING*,LPCWSTR,ULONG,void*,ULONG,ULONG*);
2361 NTSYSAPI void WINAPI LdrShutdownThread(void);
2363 NTSYSAPI NTSTATUS WINAPI LdrUnlockLoaderLock(ULONG,ULONG_PTR);
2364 NTSYSAPI NTSTATUS WINAPI NtAcceptConnectPort(PHANDLE,ULONG,PLPC_MESSAGE,BOOLEAN,PLPC_SECTION_WRITE,PLPC_SECTION_READ);
2366 NTSYSAPI NTSTATUS WINAPI NtAccessCheckAndAuditAlarm(PUNICODE_STRING,HANDLE,PUNICODE_STRING,PUNICODE_STRING,PSECURITY_DESCRIPTOR,ACCESS_MASK,PGENERIC_MAPPING,BOOLEAN,PACCESS_MASK,PBOOLEAN,PBOOLEAN);
2367 NTSYSAPI NTSTATUS WINAPI NtAddAtom(const WCHAR*,ULONG,RTL_ATOM*);
2370 NTSYSAPI NTSTATUS WINAPI NtAlertResumeThread(HANDLE,PULONG);
2371 NTSYSAPI NTSTATUS WINAPI NtAlertThread(HANDLE ThreadHandle);
2374 NTSYSAPI NTSTATUS WINAPI NtAllocateVirtualMemory(HANDLE,PVOID*,ULONG,SIZE_T*,ULONG,ULONG);
2375 NTSYSAPI NTSTATUS WINAPI NtAreMappedFilesTheSame(PVOID,PVOID);
2376 NTSYSAPI NTSTATUS WINAPI NtAssignProcessToJobObject(HANDLE,HANDLE);
2377 NTSYSAPI NTSTATUS WINAPI NtCallbackReturn(PVOID,ULONG,NTSTATUS);
2378 NTSYSAPI NTSTATUS WINAPI NtCancelIoFile(HANDLE,PIO_STATUS_BLOCK);
2379 NTSYSAPI NTSTATUS WINAPI NtCancelIoFileEx(HANDLE,PIO_STATUS_BLOCK,PIO_STATUS_BLOCK);
2380 NTSYSAPI NTSTATUS WINAPI NtCancelTimer(HANDLE, BOOLEAN*);
2381 NTSYSAPI NTSTATUS WINAPI NtClearEvent(HANDLE);
2382 NTSYSAPI NTSTATUS WINAPI NtClose(HANDLE);
2383 NTSYSAPI NTSTATUS WINAPI NtCloseObjectAuditAlarm(PUNICODE_STRING,HANDLE,BOOLEAN);
2384 NTSYSAPI NTSTATUS WINAPI NtCompleteConnectPort(HANDLE);
2385 NTSYSAPI NTSTATUS WINAPI NtConnectPort(PHANDLE,PUNICODE_STRING,PSECURITY_QUALITY_OF_SERVICE,PLPC_SECTION_WRITE,PLPC_SECTION_READ,PULONG,PVOID,PULONG);
2387 NTSYSAPI NTSTATUS WINAPI NtCreateDirectoryObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
2389 NTSYSAPI NTSTATUS WINAPI NtCreateEventPair(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
2390 NTSYSAPI NTSTATUS WINAPI NtCreateFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,PLARGE_INTEGER,ULONG,ULONG,ULONG,ULONG,PVOID,ULONG);
2391 NTSYSAPI NTSTATUS WINAPI NtCreateIoCompletion(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,ULONG);
2394 NTSYSAPI NTSTATUS WINAPI NtCreateKeyTransacted(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,HANDLE,ULONG*);
2395 NTSYSAPI NTSTATUS WINAPI NtCreateKeyedEvent(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG);
2396 NTSYSAPI NTSTATUS WINAPI NtCreateMailslotFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG,ULONG,PLARGE_INTEGER);
2398 NTSYSAPI NTSTATUS WINAPI NtCreateNamedPipeFile(PHANDLE,ULONG,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,PLARGE_INTEGER);
2400 NTSYSAPI NTSTATUS WINAPI NtCreatePort(PHANDLE,POBJECT_ATTRIBUTES,ULONG,ULONG,PULONG);
2401 NTSYSAPI NTSTATUS WINAPI NtCreateProcess(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,HANDLE,BOOLEAN,HANDLE,HANDLE,HANDLE);
2402 NTSYSAPI NTSTATUS WINAPI NtCreateProfile(PHANDLE,HANDLE,PVOID,ULONG,ULONG,PVOID,ULONG,KPROFILE_SOURCE,KAFFINITY);
2403 NTSYSAPI NTSTATUS WINAPI NtCreateSection(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const LARGE_INTEGER*,ULONG,ULONG,HANDLE);
2405 NTSYSAPI NTSTATUS WINAPI NtCreateSymbolicLinkObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PUNICODE_STRING);
2406 NTSYSAPI NTSTATUS WINAPI NtCreateThread(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,HANDLE,PCLIENT_ID,PCONTEXT,PINITIAL_TEB,BOOLEAN);
2410 NTSYSAPI NTSTATUS WINAPI NtDeleteAtom(RTL_ATOM);
2411 NTSYSAPI NTSTATUS WINAPI NtDeleteFile(POBJECT_ATTRIBUTES);
2412 NTSYSAPI NTSTATUS WINAPI NtDeleteKey(HANDLE);
2413 NTSYSAPI NTSTATUS WINAPI NtDeleteValueKey(HANDLE,const UNICODE_STRING *);
2414 NTSYSAPI NTSTATUS WINAPI NtDeviceIoControlFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,PVOID,ULONG,PVOID,ULONG);
2415 NTSYSAPI NTSTATUS WINAPI NtDisplayString(PUNICODE_STRING);
2416 NTSYSAPI NTSTATUS WINAPI NtDuplicateObject(HANDLE,HANDLE,HANDLE,PHANDLE,ACCESS_MASK,ULONG,ULONG);
2418 NTSYSAPI NTSTATUS WINAPI NtEnumerateKey(HANDLE,ULONG,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *);
2419 NTSYSAPI NTSTATUS WINAPI NtEnumerateValueKey(HANDLE,ULONG,KEY_VALUE_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2421 NTSYSAPI NTSTATUS WINAPI NtFilterToken(HANDLE,ULONG,TOKEN_GROUPS*,TOKEN_PRIVILEGES*,TOKEN_GROUPS*,HANDLE*);
2422 NTSYSAPI NTSTATUS WINAPI NtFindAtom(const WCHAR*,ULONG,RTL_ATOM*);
2425 NTSYSAPI NTSTATUS WINAPI NtFlushKey(HANDLE);
2426 NTSYSAPI NTSTATUS WINAPI NtFlushVirtualMemory(HANDLE,LPCVOID*,SIZE_T*,ULONG);
2428 NTSYSAPI NTSTATUS WINAPI NtFreeVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
2429 NTSYSAPI NTSTATUS WINAPI NtFsControlFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,PVOID,ULONG,PVOID,ULONG);
2430 NTSYSAPI NTSTATUS WINAPI NtGetContextThread(HANDLE,CONTEXT*);
2432 NTSYSAPI NTSTATUS WINAPI NtGetPlugPlayEvent(ULONG,ULONG,PVOID,ULONG);
2434 NTSYSAPI NTSTATUS WINAPI NtGetWriteWatch(HANDLE,ULONG,PVOID,SIZE_T,PVOID*,ULONG_PTR*,ULONG*);
2436 NTSYSAPI NTSTATUS WINAPI NtImpersonateClientOfPort(HANDLE,PPORT_MESSAGE);
2440 NTSYSAPI NTSTATUS WINAPI NtIsProcessInJob(HANDLE,HANDLE);
2441 NTSYSAPI NTSTATUS WINAPI NtListenPort(HANDLE,PLPC_MESSAGE);
2442 NTSYSAPI NTSTATUS WINAPI NtLoadDriver(const UNICODE_STRING *);
2444 NTSYSAPI NTSTATUS WINAPI NtLockFile(HANDLE,HANDLE,PIO_APC_ROUTINE,void*,PIO_STATUS_BLOCK,PLARGE_INTEGER,PLARGE_INTEGER,ULONG*,BOOLEAN,BOOLEAN);
2445 NTSYSAPI NTSTATUS WINAPI NtLockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
2446 NTSYSAPI NTSTATUS WINAPI NtMakeTemporaryObject(HANDLE);
2447 NTSYSAPI NTSTATUS WINAPI NtMapViewOfSection(HANDLE,HANDLE,PVOID*,ULONG,SIZE_T,const LARGE_INTEGER*,SIZE_T*,SECTION_INHERIT,ULONG,ULONG);
2448 NTSYSAPI NTSTATUS WINAPI NtNotifyChangeDirectoryFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,ULONG,BOOLEAN);
2449 NTSYSAPI NTSTATUS WINAPI NtNotifyChangeKey(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,BOOLEAN,PVOID,ULONG,BOOLEAN);
2450 NTSYSAPI NTSTATUS WINAPI NtNotifyChangeMultipleKeys(HANDLE,ULONG,OBJECT_ATTRIBUTES*,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,BOOLEAN,PVOID,ULONG,BOOLEAN);
2454 NTSYSAPI NTSTATUS WINAPI NtOpenFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG);
2463 NTSYSAPI NTSTATUS WINAPI NtOpenObjectAuditAlarm(PUNICODE_STRING,PHANDLE,PUNICODE_STRING,PUNICODE_STRING,PSECURITY_DESCRIPTOR,HANDLE,ACCESS_MASK,ACCESS_MASK,PPRIVILEGE_SET,BOOLEAN,BOOLEAN,PBOOLEAN);
2465 NTSYSAPI NTSTATUS WINAPI NtOpenProcessToken(HANDLE,DWORD,HANDLE *);
2466 NTSYSAPI NTSTATUS WINAPI NtOpenProcessTokenEx(HANDLE,DWORD,DWORD,HANDLE *);
2467 NTSYSAPI NTSTATUS WINAPI NtOpenSection(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
2470 NTSYSAPI NTSTATUS WINAPI NtOpenThread(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const CLIENT_ID*);
2471 NTSYSAPI NTSTATUS WINAPI NtOpenThreadToken(HANDLE,DWORD,BOOLEAN,HANDLE *);
2472 NTSYSAPI NTSTATUS WINAPI NtOpenThreadTokenEx(HANDLE,DWORD,BOOLEAN,DWORD,HANDLE *);
2473 NTSYSAPI NTSTATUS WINAPI NtOpenTimer(HANDLE*, ACCESS_MASK, const OBJECT_ATTRIBUTES*);
2474 NTSYSAPI NTSTATUS WINAPI NtPowerInformation(POWER_INFORMATION_LEVEL,PVOID,ULONG,PVOID,ULONG);
2476 NTSYSAPI NTSTATUS WINAPI NtPrivilegeObjectAuditAlarm(PUNICODE_STRING,HANDLE,HANDLE,ULONG,PPRIVILEGE_SET,BOOLEAN);
2477 NTSYSAPI NTSTATUS WINAPI NtPrivilegedServiceAuditAlarm(PUNICODE_STRING,PUNICODE_STRING,HANDLE,PPRIVILEGE_SET,BOOLEAN);
2478 NTSYSAPI NTSTATUS WINAPI NtProtectVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG,ULONG*);
2479 NTSYSAPI NTSTATUS WINAPI NtPulseEvent(HANDLE,PULONG);
2480 NTSYSAPI NTSTATUS WINAPI NtQueueApcThread(HANDLE,PNTAPCFUNC,ULONG_PTR,ULONG_PTR,ULONG_PTR);
2484 NTSYSAPI NTSTATUS WINAPI NtQueryDirectoryFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,FILE_INFORMATION_CLASS,BOOLEAN,PUNICODE_STRING,BOOLEAN);
2485 NTSYSAPI NTSTATUS WINAPI NtQueryDirectoryObject(HANDLE,PDIRECTORY_BASIC_INFORMATION,ULONG,BOOLEAN,BOOLEAN,PULONG,PULONG);
2486 NTSYSAPI NTSTATUS WINAPI NtQueryEaFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,BOOLEAN,PVOID,ULONG,PULONG,BOOLEAN);
2487 NTSYSAPI NTSTATUS WINAPI NtQueryEvent(HANDLE,EVENT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2489 NTSYSAPI NTSTATUS WINAPI NtQueryInformationAtom(RTL_ATOM,ATOM_INFORMATION_CLASS,PVOID,ULONG,ULONG*);
2490 NTSYSAPI NTSTATUS WINAPI NtQueryInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,LONG,FILE_INFORMATION_CLASS);
2493 NTSYSAPI NTSTATUS WINAPI NtQueryInformationProcess(HANDLE,PROCESSINFOCLASS,PVOID,ULONG,PULONG);
2494 NTSYSAPI NTSTATUS WINAPI NtQueryInformationThread(HANDLE,THREADINFOCLASS,PVOID,ULONG,PULONG);
2499 NTSYSAPI NTSTATUS WINAPI NtQueryKey(HANDLE,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *);
2500 NTSYSAPI NTSTATUS WINAPI NtQueryMultipleValueKey(HANDLE,PKEY_MULTIPLE_VALUE_INFORMATION,ULONG,PVOID,ULONG,PULONG);
2501 NTSYSAPI NTSTATUS WINAPI NtQueryMutant(HANDLE,MUTANT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2502 NTSYSAPI NTSTATUS WINAPI NtQueryObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG, PULONG);
2503 NTSYSAPI NTSTATUS WINAPI NtQueryOpenSubKeys(POBJECT_ATTRIBUTES,PULONG);
2508 NTSYSAPI NTSTATUS WINAPI NtQuerySymbolicLinkObject(HANDLE,PUNICODE_STRING,PULONG);
2509 NTSYSAPI NTSTATUS WINAPI NtQuerySystemEnvironmentValue(PUNICODE_STRING,PWCHAR,ULONG,PULONG);
2511 NTSYSAPI NTSTATUS WINAPI NtQuerySystemInformationEx(SYSTEM_INFORMATION_CLASS,void*,ULONG,void*,ULONG,ULONG*);
2513 NTSYSAPI NTSTATUS WINAPI NtQueryTimer(HANDLE,TIMER_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2515 NTSYSAPI NTSTATUS WINAPI NtQueryValueKey(HANDLE,const UNICODE_STRING *,KEY_VALUE_INFORMATION_CLASS,void *,DWORD,DWORD *);
2516 NTSYSAPI NTSTATUS WINAPI NtQueryLicenseValue(const UNICODE_STRING *,ULONG *,PVOID,ULONG,ULONG *);
2518 NTSYSAPI NTSTATUS WINAPI NtQueryVolumeInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS);
2520 NTSYSAPI NTSTATUS WINAPI NtRaiseHardError(NTSTATUS,ULONG,PUNICODE_STRING,PVOID*,HARDERROR_RESPONSE_OPTION,PHARDERROR_RESPONSE);
2521 NTSYSAPI NTSTATUS WINAPI NtReadFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,PLARGE_INTEGER,PULONG);
2522 NTSYSAPI NTSTATUS WINAPI NtReadFileScatter(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,FILE_SEGMENT_ELEMENT*,ULONG,PLARGE_INTEGER,PULONG);
2523 NTSYSAPI NTSTATUS WINAPI NtReadRequestData(HANDLE,PLPC_MESSAGE,ULONG,PVOID,ULONG,PULONG);
2524 NTSYSAPI NTSTATUS WINAPI NtReadVirtualMemory(HANDLE,const void*,void*,SIZE_T,SIZE_T*);
2526 NTSYSAPI NTSTATUS WINAPI NtReleaseKeyedEvent(HANDLE,const void*,BOOLEAN,const LARGE_INTEGER*);
2527 NTSYSAPI NTSTATUS WINAPI NtReleaseMutant(HANDLE,PLONG);
2528 NTSYSAPI NTSTATUS WINAPI NtReleaseSemaphore(HANDLE,ULONG,PULONG);
2529 NTSYSAPI NTSTATUS WINAPI NtRemoveIoCompletion(HANDLE,PULONG_PTR,PULONG_PTR,PIO_STATUS_BLOCK,PLARGE_INTEGER);
2530 NTSYSAPI NTSTATUS WINAPI NtRenameKey(HANDLE,UNICODE_STRING*);
2531 NTSYSAPI NTSTATUS WINAPI NtReplaceKey(POBJECT_ATTRIBUTES,HANDLE,POBJECT_ATTRIBUTES);
2532 NTSYSAPI NTSTATUS WINAPI NtReplyPort(HANDLE,PLPC_MESSAGE);
2533 NTSYSAPI NTSTATUS WINAPI NtReplyWaitReceivePort(HANDLE,PULONG,PLPC_MESSAGE,PLPC_MESSAGE);
2534 NTSYSAPI NTSTATUS WINAPI NtReplyWaitReceivePortEx(HANDLE,PVOID*,PPORT_MESSAGE,PPORT_MESSAGE,PLARGE_INTEGER);
2535 NTSYSAPI NTSTATUS WINAPI NtReplyWaitReplyPort(HANDLE,PLPC_MESSAGE);
2536 NTSYSAPI NTSTATUS WINAPI NtRequestPort(HANDLE,PLPC_MESSAGE);
2537 NTSYSAPI NTSTATUS WINAPI NtRequestWaitReplyPort(HANDLE,PLPC_MESSAGE,PLPC_MESSAGE);
2538 NTSYSAPI NTSTATUS WINAPI NtResetEvent(HANDLE,PULONG);
2539 NTSYSAPI NTSTATUS WINAPI NtResetWriteWatch(HANDLE,PVOID,SIZE_T);
2540 NTSYSAPI NTSTATUS WINAPI NtRestoreKey(HANDLE,HANDLE,ULONG);
2541 NTSYSAPI NTSTATUS WINAPI NtResumeThread(HANDLE,PULONG);
2542 NTSYSAPI NTSTATUS WINAPI NtSaveKey(HANDLE,HANDLE);
2543 NTSYSAPI NTSTATUS WINAPI NtSecureConnectPort(PHANDLE,PUNICODE_STRING,PSECURITY_QUALITY_OF_SERVICE,PLPC_SECTION_WRITE,PSID,PLPC_SECTION_READ,PULONG,PVOID,PULONG);
2544 NTSYSAPI NTSTATUS WINAPI NtSetContextThread(HANDLE,const CONTEXT*);
2545 NTSYSAPI NTSTATUS WINAPI NtSetDefaultHardErrorPort(HANDLE);
2548 NTSYSAPI NTSTATUS WINAPI NtSetEaFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG);
2549 NTSYSAPI NTSTATUS WINAPI NtSetEvent(HANDLE,PULONG);
2550 NTSYSAPI NTSTATUS WINAPI NtSetHighEventPair(HANDLE);
2551 NTSYSAPI NTSTATUS WINAPI NtSetHighWaitLowEventPair(HANDLE);
2553 NTSYSAPI NTSTATUS WINAPI NtSetInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FILE_INFORMATION_CLASS);
2554 NTSYSAPI NTSTATUS WINAPI NtSetInformationJobObject(HANDLE,JOBOBJECTINFOCLASS,PVOID,ULONG);
2555 NTSYSAPI NTSTATUS WINAPI NtSetInformationKey(HANDLE,const int,PVOID,ULONG);
2556 NTSYSAPI NTSTATUS WINAPI NtSetInformationObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG);
2557 NTSYSAPI NTSTATUS WINAPI NtSetInformationProcess(HANDLE,PROCESS_INFORMATION_CLASS,PVOID,ULONG);
2559 NTSYSAPI NTSTATUS WINAPI NtSetInformationToken(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,ULONG);
2561 NTSYSAPI NTSTATUS WINAPI NtSetIoCompletion(HANDLE,ULONG_PTR,ULONG_PTR,NTSTATUS,SIZE_T);
2562 NTSYSAPI NTSTATUS WINAPI NtSetLdtEntries(ULONG,ULONG,ULONG,ULONG,ULONG,ULONG);
2563 NTSYSAPI NTSTATUS WINAPI NtSetLowEventPair(HANDLE);
2564 NTSYSAPI NTSTATUS WINAPI NtSetLowWaitHighEventPair(HANDLE);
2567 NTSYSAPI NTSTATUS WINAPI NtSetSystemEnvironmentValue(PUNICODE_STRING,PUNICODE_STRING);
2571 NTSYSAPI NTSTATUS WINAPI NtSetTimer(HANDLE, const LARGE_INTEGER*, PTIMER_APC_ROUTINE, PVOID, BOOLEAN, ULONG, BOOLEAN*);
2573 NTSYSAPI NTSTATUS WINAPI NtSetValueKey(HANDLE,const UNICODE_STRING *,ULONG,ULONG,const void *,ULONG);
2574 NTSYSAPI NTSTATUS WINAPI NtSetVolumeInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS);
2575 NTSYSAPI NTSTATUS WINAPI NtSignalAndWaitForSingleObject(HANDLE,HANDLE,BOOLEAN,const LARGE_INTEGER*);
2577 NTSYSAPI NTSTATUS WINAPI NtStartProfile(HANDLE);
2578 NTSYSAPI NTSTATUS WINAPI NtStopProfile(HANDLE);
2579 NTSYSAPI NTSTATUS WINAPI NtSuspendThread(HANDLE,PULONG);
2580 NTSYSAPI NTSTATUS WINAPI NtSystemDebugControl(SYSDBG_COMMAND,PVOID,ULONG,PVOID,ULONG,PULONG);
2581 NTSYSAPI NTSTATUS WINAPI NtTerminateJobObject(HANDLE,NTSTATUS);
2582 NTSYSAPI NTSTATUS WINAPI NtTerminateProcess(HANDLE,LONG);
2583 NTSYSAPI NTSTATUS WINAPI NtTerminateThread(HANDLE,LONG);
2584 NTSYSAPI NTSTATUS WINAPI NtTestAlert(VOID);
2585 NTSYSAPI NTSTATUS WINAPI NtUnloadDriver(const UNICODE_STRING *);
2586 NTSYSAPI NTSTATUS WINAPI NtUnloadKey(POBJECT_ATTRIBUTES);
2587 NTSYSAPI NTSTATUS WINAPI NtUnloadKeyEx(POBJECT_ATTRIBUTES,HANDLE);
2588 NTSYSAPI NTSTATUS WINAPI NtUnlockFile(HANDLE,PIO_STATUS_BLOCK,PLARGE_INTEGER,PLARGE_INTEGER,PULONG);
2589 NTSYSAPI NTSTATUS WINAPI NtUnlockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
2590 NTSYSAPI NTSTATUS WINAPI NtUnmapViewOfSection(HANDLE,PVOID);
2591 NTSYSAPI NTSTATUS WINAPI NtVdmControl(ULONG,PVOID);
2592 NTSYSAPI NTSTATUS WINAPI NtWaitForKeyedEvent(HANDLE,const void*,BOOLEAN,const LARGE_INTEGER*);
2594 NTSYSAPI NTSTATUS WINAPI NtWaitForMultipleObjects(ULONG,const HANDLE*,BOOLEAN,BOOLEAN,const LARGE_INTEGER*);
2595 NTSYSAPI NTSTATUS WINAPI NtWaitHighEventPair(HANDLE);
2596 NTSYSAPI NTSTATUS WINAPI NtWaitLowEventPair(HANDLE);
2597 NTSYSAPI NTSTATUS WINAPI NtWriteFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,const void*,ULONG,PLARGE_INTEGER,PULONG);
2598 NTSYSAPI NTSTATUS WINAPI NtWriteFileGather(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,FILE_SEGMENT_ELEMENT*,ULONG,PLARGE_INTEGER,PULONG);
2599 NTSYSAPI NTSTATUS WINAPI NtWriteRequestData(HANDLE,PLPC_MESSAGE,ULONG,PVOID,ULONG,PULONG);
2600 NTSYSAPI NTSTATUS WINAPI NtWriteVirtualMemory(HANDLE,void*,const void*,SIZE_T,SIZE_T*);
2601 NTSYSAPI NTSTATUS WINAPI NtYieldExecution(void);
2602 
2603 NTSYSAPI void WINAPI RtlAcquirePebLock(void);
2608 NTSYSAPI NTSTATUS WINAPI RtlActivateActivationContext(DWORD,HANDLE,ULONG_PTR*);
2609 NTSYSAPI NTSTATUS WINAPI RtlAddAce(PACL,DWORD,DWORD,PACE_HEADER,DWORD);
2610 NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedAce(PACL,DWORD,DWORD,PSID);
2611 NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
2612 NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedObjectAce(PACL,DWORD,DWORD,DWORD,GUID*,GUID*,PSID);
2613 NTSYSAPI NTSTATUS WINAPI RtlAddAccessDeniedAce(PACL,DWORD,DWORD,PSID);
2614 NTSYSAPI NTSTATUS WINAPI RtlAddAccessDeniedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
2615 NTSYSAPI NTSTATUS WINAPI RtlAddAccessDeniedObjectAce(PACL,DWORD,DWORD,DWORD,GUID*,GUID*,PSID);
2616 NTSYSAPI NTSTATUS WINAPI RtlAddAtomToAtomTable(RTL_ATOM_TABLE,const WCHAR*,RTL_ATOM*);
2617 NTSYSAPI NTSTATUS WINAPI RtlAddAuditAccessAce(PACL,DWORD,DWORD,PSID,BOOL,BOOL);
2618 NTSYSAPI NTSTATUS WINAPI RtlAddAuditAccessAceEx(PACL,DWORD,DWORD,DWORD,PSID,BOOL,BOOL);
2619 NTSYSAPI NTSTATUS WINAPI RtlAddAuditAccessObjectAce(PACL,DWORD,DWORD,DWORD,GUID*,GUID*,PSID,BOOL,BOOL);
2620 NTSYSAPI NTSTATUS WINAPI RtlAddMandatoryAce(PACL,DWORD,DWORD,DWORD,DWORD,PSID);
2624 NTSYSAPI NTSTATUS WINAPI RtlAllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY,BYTE,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,PSID *);
2626 NTSYSAPI PVOID WINAPI RtlAllocateHeap(HANDLE,ULONG,SIZE_T) __WINE_ALLOC_SIZE(3);
2629 NTSYSAPI NTSTATUS WINAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING,PCANSI_STRING,BOOLEAN);
2630 NTSYSAPI NTSTATUS WINAPI RtlAppendAsciizToString(STRING *,LPCSTR);
2631 NTSYSAPI NTSTATUS WINAPI RtlAppendStringToString(STRING *,const STRING *);
2633 NTSYSAPI NTSTATUS WINAPI RtlAppendUnicodeToString(UNICODE_STRING *,LPCWSTR);
2635 NTSYSAPI BOOLEAN WINAPI RtlAreAnyAccessesGranted(ACCESS_MASK,ACCESS_MASK);
2636 NTSYSAPI BOOLEAN WINAPI RtlAreBitsSet(PCRTL_BITMAP,ULONG,ULONG);
2637 NTSYSAPI BOOLEAN WINAPI RtlAreBitsClear(PCRTL_BITMAP,ULONG,ULONG);
2638 NTSYSAPI NTSTATUS WINAPI RtlCharToInteger(PCSZ,ULONG,PULONG);
2639 NTSYSAPI NTSTATUS WINAPI RtlCheckRegistryKey(ULONG, PWSTR);
2640 NTSYSAPI void WINAPI RtlClearAllBits(PRTL_BITMAP);
2641 NTSYSAPI void WINAPI RtlClearBits(PRTL_BITMAP,ULONG,ULONG);
2642 NTSYSAPI NTSTATUS WINAPI RtlCreateActivationContext(HANDLE*,const void*);
2643 NTSYSAPI PDEBUG_BUFFER WINAPI RtlCreateQueryDebugBuffer(ULONG,BOOLEAN);
2644 NTSYSAPI ULONG WINAPI RtlCompactHeap(HANDLE,ULONG);
2645 NTSYSAPI LONG WINAPI RtlCompareString(const STRING*,const STRING*,BOOLEAN);
2646 NTSYSAPI LONG WINAPI RtlCompareUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
2648 NTSYSAPI NTSTATUS WINAPI RtlCompressBuffer(USHORT,PUCHAR,ULONG,PUCHAR,ULONG,ULONG,PULONG,PVOID);
2650 NTSYSAPI NTSTATUS WINAPI RtlConvertSidToUnicodeString(PUNICODE_STRING,PSID,BOOLEAN);
2653 NTSYSAPI BOOLEAN WINAPI RtlCopySid(DWORD,PSID,PSID);
2654 NTSYSAPI NTSTATUS WINAPI RtlCopySecurityDescriptor(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR);
2655 NTSYSAPI void WINAPI RtlCopyString(STRING*,const STRING*);
2656 NTSYSAPI void WINAPI RtlCopyUnicodeString(UNICODE_STRING*,const UNICODE_STRING*);
2657 NTSYSAPI NTSTATUS WINAPI RtlCreateAcl(PACL,DWORD,DWORD);
2658 NTSYSAPI NTSTATUS WINAPI RtlCreateAtomTable(ULONG,RTL_ATOM_TABLE*);
2659 NTSYSAPI NTSTATUS WINAPI RtlCreateEnvironment(BOOLEAN, PWSTR*);
2660 NTSYSAPI HANDLE WINAPI RtlCreateHeap(ULONG,PVOID,SIZE_T,SIZE_T,PVOID,PRTL_HEAP_DEFINITION);
2661 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*);
2662 NTSYSAPI NTSTATUS WINAPI RtlCreateSecurityDescriptor(PSECURITY_DESCRIPTOR,DWORD);
2664 NTSYSAPI NTSTATUS WINAPI RtlCreateTimer(PHANDLE, HANDLE, RTL_WAITORTIMERCALLBACKFUNC, PVOID, DWORD, DWORD, ULONG);
2665 NTSYSAPI BOOLEAN WINAPI RtlCreateUnicodeString(PUNICODE_STRING,LPCWSTR);
2666 NTSYSAPI BOOLEAN WINAPI RtlCreateUnicodeStringFromAsciiz(PUNICODE_STRING,LPCSTR);
2667 NTSYSAPI NTSTATUS WINAPI RtlCreateUserProcess(UNICODE_STRING*,ULONG,RTL_USER_PROCESS_PARAMETERS*,SECURITY_DESCRIPTOR*,SECURITY_DESCRIPTOR*,HANDLE,BOOLEAN,HANDLE,HANDLE,RTL_USER_PROCESS_INFORMATION*);
2668 NTSYSAPI NTSTATUS WINAPI RtlCreateUserThread(HANDLE,const SECURITY_DESCRIPTOR*,BOOLEAN,PVOID,SIZE_T,SIZE_T,PRTL_THREAD_START_ROUTINE,void*,HANDLE*,CLIENT_ID*);
2669 NTSYSAPI void WINAPI RtlDeactivateActivationContext(DWORD,ULONG_PTR);
2670 NTSYSAPI PVOID WINAPI RtlDecodePointer(PVOID);
2671 NTSYSAPI NTSTATUS WINAPI RtlDecompressBuffer(USHORT,PUCHAR,ULONG,PUCHAR,ULONG,PULONG);
2672 NTSYSAPI NTSTATUS WINAPI RtlDeleteAce(PACL,DWORD);
2673 NTSYSAPI NTSTATUS WINAPI RtlDeleteAtomFromAtomTable(RTL_ATOM_TABLE,RTL_ATOM);
2675 NTSYSAPI NTSTATUS WINAPI RtlDeleteRegistryValue(ULONG, PCWSTR, PCWSTR);
2676 NTSYSAPI void WINAPI RtlDeleteResource(LPRTL_RWLOCK);
2677 NTSYSAPI NTSTATUS WINAPI RtlDeleteSecurityObject(PSECURITY_DESCRIPTOR*);
2678 NTSYSAPI NTSTATUS WINAPI RtlDeleteTimer(HANDLE, HANDLE, HANDLE);
2679 NTSYSAPI NTSTATUS WINAPI RtlDeleteTimerQueueEx(HANDLE, HANDLE);
2680 NTSYSAPI PRTL_USER_PROCESS_PARAMETERS WINAPI RtlDeNormalizeProcessParams(RTL_USER_PROCESS_PARAMETERS*);
2681 NTSYSAPI NTSTATUS WINAPI RtlDeregisterWait(HANDLE);
2682 NTSYSAPI NTSTATUS WINAPI RtlDeregisterWaitEx(HANDLE,HANDLE);
2683 NTSYSAPI NTSTATUS WINAPI RtlDestroyAtomTable(RTL_ATOM_TABLE);
2684 NTSYSAPI NTSTATUS WINAPI RtlDestroyEnvironment(PWSTR);
2686 NTSYSAPI HANDLE WINAPI RtlDestroyHeap(HANDLE);
2687 NTSYSAPI void WINAPI RtlDestroyProcessParameters(RTL_USER_PROCESS_PARAMETERS*);
2688 NTSYSAPI NTSTATUS WINAPI RtlDestroyQueryDebugBuffer(PDEBUG_BUFFER);
2691 NTSYSAPI BOOLEAN WINAPI RtlDoesFileExists_U(LPCWSTR);
2692 NTSYSAPI BOOLEAN WINAPI RtlDosPathNameToNtPathName_U(PCWSTR,PUNICODE_STRING,PWSTR*,CURDIR*);
2693 NTSYSAPI NTSTATUS WINAPI RtlDosPathNameToNtPathName_U_WithStatus(PCWSTR,PUNICODE_STRING,PWSTR*,CURDIR*);
2694 NTSYSAPI ULONG WINAPI RtlDosSearchPath_U(LPCWSTR, LPCWSTR, LPCWSTR, ULONG, LPWSTR, LPWSTR*);
2696 NTSYSAPI NTSTATUS WINAPI RtlDowncaseUnicodeString(UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
2697 NTSYSAPI void WINAPI RtlDumpResource(LPRTL_RWLOCK);
2698 NTSYSAPI NTSTATUS WINAPI RtlDuplicateUnicodeString(int,const UNICODE_STRING*,UNICODE_STRING*);
2699 NTSYSAPI NTSTATUS WINAPI RtlEmptyAtomTable(RTL_ATOM_TABLE,BOOLEAN);
2700 NTSYSAPI PVOID WINAPI RtlEncodePointer(PVOID);
2701 NTSYSAPI NTSTATUS WINAPI RtlEnterCriticalSection(RTL_CRITICAL_SECTION *);
2702 NTSYSAPI void WINAPI RtlEraseUnicodeString(UNICODE_STRING*);
2703 NTSYSAPI NTSTATUS WINAPI RtlEqualComputerName(const UNICODE_STRING*,const UNICODE_STRING*);
2704 NTSYSAPI NTSTATUS WINAPI RtlEqualDomainName(const UNICODE_STRING*,const UNICODE_STRING*);
2705 NTSYSAPI BOOLEAN WINAPI RtlEqualLuid(const LUID*,const LUID*);
2707 NTSYSAPI BOOL WINAPI RtlEqualSid(PSID,PSID);
2708 NTSYSAPI BOOLEAN WINAPI RtlEqualString(const STRING*,const STRING*,BOOLEAN);
2709 NTSYSAPI BOOLEAN WINAPI RtlEqualUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
2712 NTSYSAPI NTSTATUS WINAPI RtlExpandEnvironmentStrings_U(PCWSTR, const UNICODE_STRING*, UNICODE_STRING*, ULONG*);
2713 NTSYSAPI NTSTATUS WINAPI RtlFindActivationContextSectionString(ULONG,const GUID*,ULONG,const UNICODE_STRING*,PVOID);
2714 NTSYSAPI NTSTATUS WINAPI RtlFindActivationContextSectionGuid(ULONG,const GUID*,ULONG,const GUID*,PVOID);
2715 NTSYSAPI NTSTATUS WINAPI RtlFindCharInUnicodeString(int,const UNICODE_STRING*,const UNICODE_STRING*,USHORT*);
2716 NTSYSAPI ULONG WINAPI RtlFindClearBits(PCRTL_BITMAP,ULONG,ULONG);
2717 NTSYSAPI ULONG WINAPI RtlFindClearBitsAndSet(PRTL_BITMAP,ULONG,ULONG);
2718 NTSYSAPI ULONG WINAPI RtlFindClearRuns(PCRTL_BITMAP,PRTL_BITMAP_RUN,ULONG,BOOLEAN);
2719 NTSYSAPI ULONG WINAPI RtlFindLastBackwardRunSet(PCRTL_BITMAP,ULONG,PULONG);
2720 NTSYSAPI ULONG WINAPI RtlFindLastBackwardRunClear(PCRTL_BITMAP,ULONG,PULONG);
2722 NTSYSAPI ULONG WINAPI RtlFindLongestRunSet(PCRTL_BITMAP,PULONG);
2723 NTSYSAPI ULONG WINAPI RtlFindLongestRunClear(PCRTL_BITMAP,PULONG);
2724 NTSYSAPI NTSTATUS WINAPI RtlFindMessage(HMODULE,ULONG,ULONG,ULONG,const MESSAGE_RESOURCE_ENTRY**);
2726 NTSYSAPI ULONG WINAPI RtlFindNextForwardRunSet(PCRTL_BITMAP,ULONG,PULONG);
2727 NTSYSAPI ULONG WINAPI RtlFindNextForwardRunClear(PCRTL_BITMAP,ULONG,PULONG);
2728 NTSYSAPI ULONG WINAPI RtlFindSetBits(PCRTL_BITMAP,ULONG,ULONG);
2729 NTSYSAPI ULONG WINAPI RtlFindSetBitsAndClear(PRTL_BITMAP,ULONG,ULONG);
2730 NTSYSAPI ULONG WINAPI RtlFindSetRuns(PCRTL_BITMAP,PRTL_BITMAP_RUN,ULONG,BOOLEAN);
2731 NTSYSAPI BOOLEAN WINAPI RtlFirstFreeAce(PACL,PACE_HEADER *);
2732 NTSYSAPI NTSTATUS WINAPI RtlFormatCurrentUserKeyPath(PUNICODE_STRING);
2733 NTSYSAPI NTSTATUS WINAPI RtlFormatMessage(LPWSTR,UCHAR,BOOLEAN,BOOLEAN,BOOLEAN,__ms_va_list *,LPWSTR,ULONG);
2734 NTSYSAPI void WINAPI RtlFreeAnsiString(PANSI_STRING);
2735 NTSYSAPI BOOLEAN WINAPI RtlFreeHandle(RTL_HANDLE_TABLE *,RTL_HANDLE *);
2736 NTSYSAPI BOOLEAN WINAPI RtlFreeHeap(HANDLE,ULONG,PVOID);
2737 NTSYSAPI void WINAPI RtlFreeOemString(POEM_STRING);
2738 NTSYSAPI DWORD WINAPI RtlFreeSid(PSID);
2740 NTSYSAPI void WINAPI RtlFreeUnicodeString(PUNICODE_STRING);
2741 NTSYSAPI NTSTATUS WINAPI RtlGetAce(PACL,DWORD,LPVOID *);
2743 NTSYSAPI NTSTATUS WINAPI RtlGetCompressionWorkSpaceSize(USHORT,PULONG,PULONG);
2745 NTSYSAPI ULONG WINAPI RtlGetCurrentDirectory_U(ULONG, LPWSTR);
2747 NTSYSAPI NTSTATUS WINAPI RtlGetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR,PBOOLEAN,PACL *,PBOOLEAN);
2749 NTSYSAPI ULONG WINAPI RtlGetFullPathName_U(PCWSTR,ULONG,PWSTR,PWSTR*);
2750 NTSYSAPI NTSTATUS WINAPI RtlGetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID *,PBOOLEAN);
2751 NTSYSAPI NTSTATUS WINAPI RtlGetLastNtStatus(void);
2754 NTSYSAPI ULONG WINAPI RtlGetNtGlobalFlags(void);
2755 NTSYSAPI BOOLEAN WINAPI RtlGetNtProductType(LPDWORD);
2756 NTSYSAPI NTSTATUS WINAPI RtlGetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID *,PBOOLEAN);
2757 NTSYSAPI ULONG WINAPI RtlGetProcessHeaps(ULONG,HANDLE*);
2759 NTSYSAPI NTSTATUS WINAPI RtlGetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR,PBOOLEAN,PACL *,PBOOLEAN);
2761 NTSYSAPI NTSTATUS WINAPI RtlGUIDFromString(PUNICODE_STRING,GUID*);
2763 NTSYSAPI PVOID WINAPI RtlImageDirectoryEntryToData(HMODULE,BOOL,WORD,ULONG *);
2766 NTSYSAPI PVOID WINAPI RtlImageRvaToVa(const IMAGE_NT_HEADERS *,HMODULE,DWORD,IMAGE_SECTION_HEADER **);
2768 NTSYSAPI void WINAPI RtlInitString(PSTRING,PCSZ);
2769 NTSYSAPI void WINAPI RtlInitAnsiString(PANSI_STRING,PCSZ);
2770 NTSYSAPI NTSTATUS WINAPI RtlInitAnsiStringEx(PANSI_STRING,PCSZ);
2771 NTSYSAPI void WINAPI RtlInitUnicodeString(PUNICODE_STRING,PCWSTR);
2772 NTSYSAPI NTSTATUS WINAPI RtlInitUnicodeStringEx(PUNICODE_STRING,PCWSTR);
2773 NTSYSAPI void WINAPI RtlInitializeBitMap(PRTL_BITMAP,PULONG,ULONG);
2775 NTSYSAPI NTSTATUS WINAPI RtlInitializeCriticalSection(RTL_CRITICAL_SECTION *);
2776 NTSYSAPI NTSTATUS WINAPI RtlInitializeCriticalSectionAndSpinCount(RTL_CRITICAL_SECTION *,ULONG);
2777 NTSYSAPI NTSTATUS WINAPI RtlInitializeCriticalSectionEx(RTL_CRITICAL_SECTION *,ULONG,ULONG);
2778 NTSYSAPI void WINAPI RtlInitializeHandleTable(ULONG,ULONG,RTL_HANDLE_TABLE *);
2779 NTSYSAPI void WINAPI RtlInitializeResource(LPRTL_RWLOCK);
2782 NTSYSAPI NTSTATUS WINAPI RtlInt64ToUnicodeString(ULONGLONG,ULONG,UNICODE_STRING *);
2783 NTSYSAPI NTSTATUS WINAPI RtlIntegerToChar(ULONG,ULONG,ULONG,PCHAR);
2784 NTSYSAPI NTSTATUS WINAPI RtlIntegerToUnicodeString(ULONG,ULONG,UNICODE_STRING *);
2786 NTSYSAPI BOOL WINAPI RtlIsCriticalSectionLocked(RTL_CRITICAL_SECTION *);
2787 NTSYSAPI BOOL WINAPI RtlIsCriticalSectionLockedByThread(RTL_CRITICAL_SECTION *);
2788 NTSYSAPI ULONG WINAPI RtlIsDosDeviceName_U(PCWSTR);
2789 NTSYSAPI BOOLEAN WINAPI RtlIsNameLegalDOS8Dot3(const UNICODE_STRING*,POEM_STRING,PBOOLEAN);
2790 NTSYSAPI BOOLEAN WINAPI RtlIsTextUnicode(LPCVOID,INT,INT *);
2791 NTSYSAPI BOOLEAN WINAPI RtlIsValidHandle(const RTL_HANDLE_TABLE *, const RTL_HANDLE *);
2792 NTSYSAPI BOOLEAN WINAPI RtlIsValidIndexHandle(const RTL_HANDLE_TABLE *, ULONG Index, RTL_HANDLE **);
2793 NTSYSAPI NTSTATUS WINAPI RtlLeaveCriticalSection(RTL_CRITICAL_SECTION *);
2794 NTSYSAPI DWORD WINAPI RtlLengthRequiredSid(DWORD);
2795 NTSYSAPI ULONG WINAPI RtlLengthSecurityDescriptor(PSECURITY_DESCRIPTOR);
2796 NTSYSAPI DWORD WINAPI RtlLengthSid(PSID);
2798 NTSYSAPI BOOLEAN WINAPI RtlLockHeap(HANDLE);
2799 NTSYSAPI NTSTATUS WINAPI RtlLookupAtomInAtomTable(RTL_ATOM_TABLE,const WCHAR*,RTL_ATOM*);
2800 NTSYSAPI NTSTATUS WINAPI RtlMakeSelfRelativeSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,LPDWORD);
2802 NTSYSAPI NTSTATUS WINAPI RtlMultiByteToUnicodeN(LPWSTR,DWORD,LPDWORD,LPCSTR,DWORD);
2803 NTSYSAPI NTSTATUS WINAPI RtlMultiByteToUnicodeSize(DWORD*,LPCSTR,UINT);
2804 NTSYSAPI NTSTATUS WINAPI RtlNewSecurityObject(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR*,BOOLEAN,HANDLE,PGENERIC_MAPPING);
2805 NTSYSAPI PRTL_USER_PROCESS_PARAMETERS WINAPI RtlNormalizeProcessParams(RTL_USER_PROCESS_PARAMETERS*);
2806 NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS);
2808 NTSYSAPI ULONG WINAPI RtlNumberOfSetBits(PCRTL_BITMAP);
2809 NTSYSAPI ULONG WINAPI RtlNumberOfClearBits(PCRTL_BITMAP);
2811 NTSYSAPI NTSTATUS WINAPI RtlOemStringToUnicodeString(UNICODE_STRING*,const STRING*,BOOLEAN);
2812 NTSYSAPI NTSTATUS WINAPI RtlOemToUnicodeN(LPWSTR,DWORD,LPDWORD,LPCSTR,DWORD);
2813 NTSYSAPI NTSTATUS WINAPI RtlOpenCurrentUser(ACCESS_MASK,PHANDLE);
2814 NTSYSAPI PVOID WINAPI RtlPcToFileHeader(PVOID,PVOID*);
2815 NTSYSAPI NTSTATUS WINAPI RtlPinAtomInAtomTable(RTL_ATOM_TABLE,RTL_ATOM);
2817 NTSYSAPI BOOLEAN WINAPI RtlPrefixString(const STRING*,const STRING*,BOOLEAN);
2818 NTSYSAPI BOOLEAN WINAPI RtlPrefixUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
2819 NTSYSAPI void WINAPI RtlPushFrame(TEB_ACTIVE_FRAME*);
2820 NTSYSAPI NTSTATUS WINAPI RtlQueryAtomInAtomTable(RTL_ATOM_TABLE,RTL_ATOM,ULONG*,ULONG*,WCHAR*,ULONG*);
2822 NTSYSAPI NTSTATUS WINAPI RtlQueryEnvironmentVariable_U(PWSTR,PUNICODE_STRING,PUNICODE_STRING);
2824 NTSYSAPI NTSTATUS WINAPI RtlQueryInformationAcl(PACL,LPVOID,DWORD,ACL_INFORMATION_CLASS);
2825 NTSYSAPI NTSTATUS WINAPI RtlQueryInformationActivationContext(ULONG,HANDLE,PVOID,ULONG,PVOID,SIZE_T,SIZE_T*);
2826 NTSYSAPI NTSTATUS WINAPI RtlQueryProcessDebugInformation(ULONG,ULONG,PDEBUG_BUFFER);
2827