ReactOS  r76032
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 
242 {
248 
249 /***********************************************************************
250  * PEB data structure
251  */
252 typedef struct _PEB
253 { /* win32/win64 */
254  BOOLEAN InheritedAddressSpace; /* 000/000 */
255  BOOLEAN ReadImageFileExecOptions; /* 001/001 */
256  BOOLEAN BeingDebugged; /* 002/002 */
257  BOOLEAN SpareBool; /* 003/003 */
258  HANDLE Mutant; /* 004/008 */
259  HMODULE ImageBaseAddress; /* 008/010 */
260  PPEB_LDR_DATA LdrData; /* 00c/018 */
262  PVOID SubSystemData; /* 014/028 */
263  HANDLE ProcessHeap; /* 018/030 */
265  PVOID /*PPEBLOCKROUTINE*/ FastPebLockRoutine; /* 020/040 */
266  PVOID /*PPEBLOCKROUTINE*/ FastPebUnlockRoutine; /* 024/048 */
267  ULONG EnvironmentUpdateCount; /* 028/050 */
268  PVOID KernelCallbackTable; /* 02c/058 */
269  ULONG Reserved[2]; /* 030/060 */
270  PVOID /*PPEB_FREE_BLOCK*/ FreeList; /* 038/068 */
271  ULONG TlsExpansionCounter; /* 03c/070 */
272  PRTL_BITMAP TlsBitmap; /* 040/078 */
273  ULONG TlsBitmapBits[2]; /* 044/080 */
274  PVOID ReadOnlySharedMemoryBase; /* 04c/088 */
275  PVOID ReadOnlySharedMemoryHeap; /* 050/090 */
276  PVOID *ReadOnlyStaticServerData; /* 054/098 */
277  PVOID AnsiCodePageData; /* 058/0a0 */
278  PVOID OemCodePageData; /* 05c/0a8 */
279  PVOID UnicodeCaseTableData; /* 060/0b0 */
280  ULONG NumberOfProcessors; /* 064/0b8 */
281  ULONG NtGlobalFlag; /* 068/0bc */
283  SIZE_T HeapSegmentReserve; /* 078/0c8 */
284  SIZE_T HeapSegmentCommit; /* 07c/0d0 */
287  ULONG NumberOfHeaps; /* 088/0e8 */
288  ULONG MaximumNumberOfHeaps; /* 08c/0ec */
289  PVOID *ProcessHeaps; /* 090/0f0 */
290  PVOID GdiSharedHandleTable; /* 094/0f8 */
291  PVOID ProcessStarterHelper; /* 098/100 */
292  PVOID GdiDCAttributeList; /* 09c/108 */
293  PVOID LoaderLock; /* 0a0/110 */
294  ULONG OSMajorVersion; /* 0a4/118 */
295  ULONG OSMinorVersion; /* 0a8/11c */
296  ULONG OSBuildNumber; /* 0ac/120 */
297  ULONG OSPlatformId; /* 0b0/124 */
298  ULONG ImageSubSystem; /* 0b4/128 */
301  ULONG ImageProcessAffinityMask; /* 0c0/134 */
302  HANDLE GdiHandleBuffer[28]; /* 0c4/138 */
303  ULONG unknown[6]; /* 134/218 */
305  PRTL_BITMAP TlsExpansionBitmap; /* 150/238 */
306  ULONG TlsExpansionBitmapBits[32]; /* 154/240 */
307  ULONG SessionId; /* 1d4/2c0 */
310  PVOID ShimData; /* 1e8/2d8 */
311  PVOID AppCompatInfo; /* 1ec/2e0 */
312  UNICODE_STRING CSDVersion; /* 1f0/2e8 */
317  SIZE_T MinimumStackCommit; /* 208/318 */
318  PVOID *FlsCallback; /* 20c/320 */
319  LIST_ENTRY FlsListHead; /* 210/328 */
320  PRTL_BITMAP FlsBitmap; /* 218/338 */
321  ULONG FlsBitmapBits[4]; /* 21c/340 */
322 } PEB, *PPEB;
323 
324 
325 /***********************************************************************
326  * TEB data structure
327  */
328 typedef struct _TEB
329 { /* win32/win64 */
330  NT_TIB Tib; /* 000/0000 */
331  PVOID EnvironmentPointer; /* 01c/0038 */
332  CLIENT_ID ClientId; /* 020/0040 */
333  PVOID ActiveRpcHandle; /* 028/0050 */
334  PVOID ThreadLocalStoragePointer; /* 02c/0058 */
335  PPEB Peb; /* 030/0060 */
336  ULONG LastErrorValue; /* 034/0068 */
337  ULONG CountOfOwnedCriticalSections; /* 038/006c */
338  PVOID CsrClientThread; /* 03c/0070 */
339  PVOID Win32ThreadInfo; /* 040/0078 */
340  ULONG Win32ClientInfo[31]; /* 044/0080 used for user32 private data in Wine */
341  PVOID WOW32Reserved; /* 0c0/0100 */
342  ULONG CurrentLocale; /* 0c4/0108 */
343  ULONG FpSoftwareStatusRegister; /* 0c8/010c */
344  PVOID SystemReserved1[54]; /* 0cc/0110 used for kernel32 private data in Wine */
345  LONG ExceptionCode; /* 1a4/02c0 */
347  BYTE SpareBytes1[24]; /* 1bc/02e8 used for ntdll private data in Wine */
348  PVOID SystemReserved2[10]; /* 1d4/0300 used for ntdll private data in Wine */
349  GDI_TEB_BATCH GdiTebBatch; /* 1fc/0350 used for vm86 private data in Wine */
350  HANDLE gdiRgn; /* 6dc/0838 */
351  HANDLE gdiPen; /* 6e0/0840 */
352  HANDLE gdiBrush; /* 6e4/0848 */
353  CLIENT_ID RealClientId; /* 6e8/0850 */
354  HANDLE GdiCachedProcessHandle; /* 6f0/0860 */
355  ULONG GdiClientPID; /* 6f4/0868 */
356  ULONG GdiClientTID; /* 6f8/086c */
357  PVOID GdiThreadLocaleInfo; /* 6fc/0870 */
358  ULONG UserReserved[5]; /* 700/0878 */
359  PVOID glDispatchTable[280]; /* 714/0890 */
360  PVOID glReserved1[26]; /* b74/1150 */
361  PVOID glReserved2; /* bdc/1220 */
362  PVOID glSectionInfo; /* be0/1228 */
363  PVOID glSection; /* be4/1230 */
364  PVOID glTable; /* be8/1238 */
365  PVOID glCurrentRC; /* bec/1240 */
366  PVOID glContext; /* bf0/1248 */
367  ULONG LastStatusValue; /* bf4/1250 */
368  UNICODE_STRING StaticUnicodeString; /* bf8/1258 used by advapi32 */
369  WCHAR StaticUnicodeBuffer[261]; /* c00/1268 used by advapi32 */
370  PVOID DeallocationStack; /* e0c/1478 */
371  PVOID TlsSlots[64]; /* e10/1480 */
372  LIST_ENTRY TlsLinks; /* f10/1680 */
373  PVOID Vdm; /* f18/1690 */
374  PVOID ReservedForNtRpc; /* f1c/1698 */
375  PVOID DbgSsReserved[2]; /* f20/16a0 */
376  ULONG HardErrorDisabled; /* f28/16b0 */
377  PVOID Instrumentation[16]; /* f2c/16b8 */
378  PVOID WinSockData; /* f6c/1738 */
379  ULONG GdiBatchCount; /* f70/1740 */
380  ULONG Spare2; /* f74/1744 */
381  PVOID Spare3; /* f78/1748 */
382  PVOID Spare4; /* f7c/1750 */
383  PVOID ReservedForOle; /* f80/1758 */
384  ULONG WaitingOnLoaderLock; /* f84/1760 */
385  PVOID Reserved5[3]; /* f88/1768 used for x86_64 OSX and wineserver shared memory */
386  PVOID *TlsExpansionSlots; /* f94/1780 */
387  ULONG ImpersonationLocale; /* f98/1788 */
388  ULONG IsImpersonating; /* f9c/178c */
389  PVOID NlsCache; /* fa0/1790 */
390  PVOID ShimData; /* fa4/1798 */
391  ULONG HeapVirtualAffinity; /* fa8/17a0 */
393  PVOID ActiveFrame; /* fb0/17b0 */
394 #ifdef _WIN64
395  PVOID unknown[2]; /* 17b8 */
396 #endif
397  PVOID *FlsSlots; /* fb4/17c8 */
398 } TEB, *PTEB;
399 
400 /***********************************************************************
401  * Enums
402  */
403 
470 
484 
500 
516 
534 
552 
569 
570 typedef struct _FILE_BASIC_INFORMATION {
577 
578 typedef struct _FILE_STANDARD_INFORMATION {
585 
586 typedef struct _FILE_INTERNAL_INFORMATION {
589 
590 typedef struct _FILE_ID_128 {
593 
594 typedef struct _FILE_ID_INFORMATION {
598 
599 typedef struct _FILE_EA_INFORMATION {
602 
603 typedef struct _FILE_ACCESS_INFORMATION {
606 
607 typedef struct _FILE_NAME_INFORMATION {
611 
612 typedef struct _FILE_RENAME_INFORMATION {
618 
619 typedef struct _FILE_LINK_INFORMATION {
623  WCHAR FileName[1];
625 
626 typedef struct _FILE_NAMES_INFORMATION {
630  WCHAR FileName[1];
632 
633 typedef struct _FILE_DISPOSITION_INFORMATION {
636 
637 typedef struct _FILE_POSITION_INFORMATION {
640 
641 typedef struct _FILE_ALIGNMENT_INFORMATION {
644 
648 
649 typedef struct _FILE_END_OF_FILE_INFORMATION {
652 
653 typedef struct _FILE_NETWORK_OPEN_INFORMATION {
662 
663 typedef struct _FILE_FULL_EA_INFORMATION {
665  UCHAR Flags;
668  CHAR EaName[1];
670 
671 typedef struct _FILE_MODE_INFORMATION {
674 
676 {
683 
685 {
689 
697 
701 
702 typedef struct _FILE_PIPE_INFORMATION {
706 
719 
723  union {
724  struct {
728  } DUMMYSTRUCTNAME;
730  } DUMMYUNIONNAME;
732 
733 typedef struct _FILE_QUOTA_INFORMATION {
742 
747 
748 #define FILE_PIPE_DISCONNECTED_STATE 0x01
749 #define FILE_PIPE_LISTENING_STATE 0x02
750 #define FILE_PIPE_CONNECTED_STATE 0x03
751 #define FILE_PIPE_CLOSING_STATE 0x04
752 
753 typedef struct _FILE_ALL_INFORMATION {
764 
768 
769 #define FILE_SKIP_COMPLETION_PORT_ON_SUCCESS 0x1
770 #define FILE_SKIP_SET_EVENT_ON_HANDLE 0x2
771 #define FILE_SKIP_SET_USER_EVENT_ON_FAST_IO 0x4
772 
773 typedef enum _FSINFOCLASS {
784 
796 
804 
812 
813 typedef enum _PROCESSINFOCLASS {
866 
867 #define MEM_EXECUTE_OPTION_DISABLE 0x01
868 #define MEM_EXECUTE_OPTION_ENABLE 0x02
869 #define MEM_EXECUTE_OPTION_DISABLE_THUNK_EMULATION 0x04
870 #define MEM_EXECUTE_OPTION_PERMANENT 0x08
871 
872 typedef enum _SECTION_INHERIT {
876 
881  SystemTimeOfDayInformation = 3, /* was SystemTimeInformation */
962 
963 typedef enum _THREADINFOCLASS {
1000 
1001 typedef struct _THREAD_BASIC_INFORMATION
1002 {
1003  NTSTATUS ExitStatus;
1010 
1012 {
1016 
1017 typedef struct _KERNEL_USER_TIMES {
1023 
1024 typedef enum _WINSTATIONINFOCLASS {
1027 
1034 
1035 typedef struct _MEMORY_SECTION_NAME
1036 {
1039 
1041 {
1044 
1045 typedef struct _MUTANT_BASIC_INFORMATION {
1050 
1052 {
1055 
1056 typedef struct _TIMER_BASIC_INFORMATION
1057 {
1061 
1062 
1063 /* return type of RtlDetermineDosPathNameType_U (FIXME: not the correct names) */
1064 typedef enum
1065 {
1067  UNC_PATH, /* "//foo" */
1068  ABSOLUTE_DRIVE_PATH, /* "c:/foo" */
1069  RELATIVE_DRIVE_PATH, /* "c:foo" */
1070  ABSOLUTE_PATH, /* "/foo" */
1071  RELATIVE_PATH, /* "foo" */
1072  DEVICE_PATH, /* "//./foo" */
1073  UNC_DOT_PATH /* "//." */
1075 
1076 
1077 /***********************************************************************
1078  * Types and data structures
1079  */
1080 
1081 /* This is used by NtQuerySystemInformation */
1082 typedef struct _SYSTEM_THREAD_INFORMATION
1083 { /* win32/win64 */
1084  LARGE_INTEGER KernelTime; /* 00/00 */
1085  LARGE_INTEGER UserTime; /* 08/08 */
1086  LARGE_INTEGER CreateTime; /* 10/10 */
1087  DWORD dwTickCount; /* 18/18 */
1088  LPVOID StartAddress; /* 1c/20 */
1089  CLIENT_ID ClientId; /* 20/28 */
1091  DWORD dwBasePriority; /* 2c/3c */
1093  DWORD dwThreadState; /* 34/44 */
1094  DWORD dwWaitReason; /* 38/48 */
1095  DWORD dwUnknown; /* 3c/4c */
1097 
1098 typedef struct _IO_STATUS_BLOCK {
1099  union {
1100  NTSTATUS Status;
1101  PVOID Pointer;
1102  } DUMMYUNIONNAME;
1103 
1106 
1108 
1109 typedef struct _KEY_BASIC_INFORMATION {
1111  ULONG TitleIndex;
1112  ULONG NameLength;
1113  WCHAR Name[1];
1115 
1116 typedef struct _KEY_NODE_INFORMATION
1117 {
1119  ULONG TitleIndex;
1122  ULONG NameLength;
1123  WCHAR Name[1];
1124  /* Class[1]; */
1126 
1127 typedef struct _KEY_FULL_INFORMATION
1128 {
1130  ULONG TitleIndex;
1133  ULONG SubKeys;
1134  ULONG MaxNameLen;
1136  ULONG Values;
1139  WCHAR Class[1];
1141 
1142 typedef struct _KEY_NAME_INFORMATION {
1146 
1148 {
1158 
1159 typedef struct _KEY_VALUE_ENTRY
1160 {
1161  PUNICODE_STRING ValueName;
1162  ULONG DataLength;
1163  ULONG DataOffset;
1164  ULONG Type;
1166 
1167 typedef struct _KEY_VALUE_BASIC_INFORMATION {
1168  ULONG TitleIndex;
1169  ULONG Type;
1170  ULONG NameLength;
1171  WCHAR Name[1];
1173 
1174 typedef struct _KEY_VALUE_FULL_INFORMATION {
1175  ULONG TitleIndex;
1176  ULONG Type;
1177  ULONG DataOffset;
1178  ULONG DataLength;
1179  ULONG NameLength;
1180  WCHAR Name[1];
1182 
1183 typedef struct _KEY_VALUE_PARTIAL_INFORMATION {
1184  ULONG TitleIndex;
1185  ULONG Type;
1186  ULONG DataLength;
1187  UCHAR Data[1];
1189 
1190 #ifndef __OBJECT_ATTRIBUTES_DEFINED__
1191 #define __OBJECT_ATTRIBUTES_DEFINED__
1192 typedef struct _OBJECT_ATTRIBUTES {
1193  ULONG Length;
1195  PUNICODE_STRING ObjectName;
1196  ULONG Attributes;
1197  PVOID SecurityDescriptor; /* type SECURITY_DESCRIPTOR */
1198  PVOID SecurityQualityOfService; /* type SECURITY_QUALITY_OF_SERVICE */
1200 #endif
1201 
1206 
1220 
1221 typedef struct _OBJECT_NAME_INFORMATION {
1224 
1250 
1252 {
1255 
1256 typedef struct _PROCESS_BASIC_INFORMATION {
1257 #ifdef __WINESRC__
1259  PPEB PebBaseAddress;
1264 #else
1265  PVOID Reserved1;
1266  PPEB PebBaseAddress;
1267  PVOID Reserved2[2];
1269  PVOID Reserved3;
1270 #endif
1272 
1273 #define PROCESS_PRIOCLASS_IDLE 1
1274 #define PROCESS_PRIOCLASS_NORMAL 2
1275 #define PROCESS_PRIOCLASS_HIGH 3
1276 #define PROCESS_PRIOCLASS_REALTIME 4
1277 #define PROCESS_PRIOCLASS_BELOW_NORMAL 5
1278 #define PROCESS_PRIOCLASS_ABOVE_NORMAL 6
1279 
1280 typedef struct _PROCESS_PRIORITY_CLASS {
1284 
1285 typedef struct _RTL_HEAP_DEFINITION {
1286  ULONG Length; /* = sizeof(RTL_HEAP_DEFINITION) */
1287 
1290 
1291 typedef struct _RTL_RWLOCK {
1293 
1296 
1299 
1303  PVOID pDebugInfo;
1305 
1306 /* System Information Class 0x00 */
1307 
1308 typedef struct _SYSTEM_BASIC_INFORMATION {
1309 #ifdef __WINESRC__
1310  DWORD unknown;
1312  ULONG PageSize;
1317  PVOID LowestUserAddress;
1318  PVOID HighestUserAddress;
1321 #else
1322  BYTE Reserved1[24];
1323  PVOID Reserved2[4];
1325 #endif
1327 
1328 /* System Information Class 0x01 */
1329 
1330 typedef struct _SYSTEM_CPU_INFORMATION {
1333  WORD Revision; /* combination of CPU model and stepping */
1334  WORD Reserved; /* always zero */
1335  DWORD FeatureSet; /* see bit flags below */
1337 
1338 /* definitions of bits in the Feature set for the x86 processors */
1339 #define CPU_FEATURE_VME 0x00000005 /* Virtual 86 Mode Extensions */
1340 #define CPU_FEATURE_TSC 0x00000002 /* Time Stamp Counter available */
1341 #define CPU_FEATURE_CMOV 0x00000008 /* Conditional Move instruction*/
1342 #define CPU_FEATURE_PGE 0x00000014 /* Page table Entry Global bit */
1343 #define CPU_FEATURE_PSE 0x00000024 /* Page Size Extension */
1344 #define CPU_FEATURE_MTRR 0x00000040 /* Memory Type Range Registers */
1345 #define CPU_FEATURE_CX8 0x00000080 /* Compare and eXchange 8 byte instr. */
1346 #define CPU_FEATURE_MMX 0x00000100 /* Multi Media eXtensions */
1347 #define CPU_FEATURE_X86 0x00000200 /* seems to be always ON, on the '86 */
1348 #define CPU_FEATURE_PAT 0x00000400 /* Page Attribute Table */
1349 #define CPU_FEATURE_FXSR 0x00000800 /* FXSAVE and FXSTORE instructions */
1350 #define CPU_FEATURE_SEP 0x00001000 /* SYSENTER and SYSEXIT instructions */
1351 #define CPU_FEATURE_SSE 0x00002000 /* SSE extensions (ext. MMX) */
1352 #define CPU_FEATURE_3DNOW 0x00004000 /* 3DNOW instructions available */
1353 #define CPU_FEATURE_SSE2 0x00010000 /* SSE2 extensions (XMMI64) */
1354 #define CPU_FEATURE_DS 0x00020000 /* Debug Store */
1355 #define CPU_FEATURE_HTT 0x00040000 /* Hyper Threading Technology */
1356 
1357 /* System Information Class 0x02 */
1358 
1359 /* Documented in "Windows NT/2000 Native API Reference" by Gary Nebbett. */
1360 typedef struct _SYSTEM_PERFORMANCE_INFORMATION {
1435 
1436 /* System Information Class 0x03 */
1437 
1438 typedef struct _SYSTEM_TIMEOFDAY_INFORMATION {
1439 #ifdef __WINESRC__
1440  LARGE_INTEGER liKeBootTime;
1441  LARGE_INTEGER liKeSystemTime;
1442  LARGE_INTEGER liExpTimeZoneBias;
1443  ULONG uCurrentTimeZoneId;
1444  DWORD dwUnknown1[5];
1445 #else
1446  BYTE Reserved1[48];
1447 #endif
1448 } SYSTEM_TIMEOFDAY_INFORMATION, *PSYSTEM_TIMEOFDAY_INFORMATION; /* was SYSTEM_TIME_INFORMATION */
1449 
1450 /* System Information Class 0x08 */
1451 
1457  ULONG Reserved2;
1459 
1460 /* System Information Class 0x0b */
1461 
1463  PVOID pvAddress;
1468  char szName[MAX_PATH + 1];
1470 
1471 /* System Information Class 0x10 */
1472 
1473 typedef struct _SYSTEM_HANDLE_ENTRY {
1481 
1482 typedef struct _SYSTEM_HANDLE_INFORMATION {
1486 
1487 /* System Information Class 0x40 */
1488 
1490 {
1491  PVOID Object;
1498  ULONG Reserved;
1500 
1501 typedef struct _SYSTEM_HANDLE_INFORMATION_EX
1502 {
1503  ULONG_PTR Count;
1507 
1508 /* System Information Class 0x15 */
1509 
1517 #ifdef _WIN64
1518  ULONG unknown64[7];
1519 #endif
1521 
1522 /* System Information Class 0x17 */
1523 
1524 typedef struct _SYSTEM_INTERRUPT_INFORMATION {
1525  BYTE Reserved1[24];
1527 
1529  union {
1531  struct {
1534  } tag1;
1535  } tag2;
1546 
1547 typedef struct _SYSTEM_EXCEPTION_INFORMATION {
1548  BYTE Reserved1[16];
1550 
1551 typedef struct _SYSTEM_LOOKASIDE_INFORMATION {
1552  BYTE Reserved1[32];
1554 
1555 typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION {
1559 
1560 /* System Information Class 0x05 */
1561 
1562 typedef struct _VM_COUNTERS_ {
1576 
1577 typedef struct _SYSTEM_PROCESS_INFORMATION {
1578 #ifdef __WINESRC__ /* win32/win64 */
1579  ULONG NextEntryOffset; /* 00/00 */
1580  DWORD dwThreadCount; /* 04/04 */
1581  DWORD dwUnknown1[6]; /* 08/08 */
1582  LARGE_INTEGER CreationTime; /* 20/20 */
1583  LARGE_INTEGER UserTime; /* 28/28 */
1584  LARGE_INTEGER KernelTime; /* 30/30 */
1585  UNICODE_STRING ProcessName; /* 38/38 */
1586  DWORD dwBasePriority; /* 40/48 */
1587  HANDLE UniqueProcessId; /* 44/50 */
1588  HANDLE ParentProcessId; /* 48/58 */
1589  ULONG HandleCount; /* 4c/60 */
1590  ULONG SessionId; /* 50/64 */
1591  DWORD dwUnknown4; /* 54/68 */
1592  VM_COUNTERS vmCounters; /* 58/70 */
1593  IO_COUNTERS ioCounters; /* 88/d0 */
1594  SYSTEM_THREAD_INFORMATION ti[1]; /* b8/100 */
1595 #else
1596  ULONG NextEntryOffset; /* 00/00 */
1597  BYTE Reserved1[52]; /* 04/04 */
1598  PVOID Reserved2[3]; /* 38/38 */
1599  HANDLE UniqueProcessId; /* 44/50 */
1600  PVOID Reserved3; /* 48/58 */
1601  ULONG HandleCount; /* 4c/60 */
1602  BYTE Reserved4[4]; /* 50/64 */
1603  PVOID Reserved5[11]; /* 54/68 */
1604  SIZE_T PeakPagefileUsage; /* 80/c0 */
1605  SIZE_T PrivatePageCount; /* 84/c8 */
1606  LARGE_INTEGER Reserved6[6]; /* 88/d0 */
1607 #endif
1609 
1610 typedef struct _SYSTEM_REGISTRY_QUOTA_INFORMATION {
1613  PVOID Reserved1;
1615 
1616 typedef struct _SYSTEM_TIME_ADJUSTMENT {
1620 
1621 typedef struct _TIME_FIELDS
1622 { CSHORT Year;
1623  CSHORT Month;
1624  CSHORT Day;
1625  CSHORT Hour;
1626  CSHORT Minute;
1627  CSHORT Second;
1628  CSHORT Milliseconds;
1629  CSHORT Weekday;
1631 
1632 typedef struct _WINSTATIONINFORMATIONW {
1633  BYTE Reserved2[70];
1634  ULONG LogonId;
1635  BYTE Reserved3[1140];
1637 
1639 
1640 typedef struct _LDR_RESOURCE_INFO
1641 {
1642  ULONG_PTR Type;
1643  ULONG_PTR Name;
1644  ULONG Language;
1646 
1647 
1648 /* debug buffer definitions */
1649 
1650 typedef struct _DEBUG_BUFFER {
1656  ULONG Unknown[2];
1659  ULONG SizeOfInfo;
1666  PVOID Reserved[8];
1668 
1669 #define PDI_MODULES 0x01
1670 #define PDI_BACKTRACE 0x02
1671 #define PDI_HEAPS 0x04
1672 #define PDI_HEAP_TAGS 0x08
1673 #define PDI_HEAP_BLOCKS 0x10
1674 #define PDI_LOCKS 0x20
1675 
1677  ULONG Reserved[2];
1678  ULONG Base;
1679  ULONG Size;
1680  ULONG Flags;
1687 
1688 typedef struct _DEBUG_HEAP_INFORMATION {
1689  ULONG Base;
1690  ULONG Flags;
1693  ULONG Allocated;
1694  ULONG Committed;
1695  ULONG TagCount;
1696  ULONG BlockCount;
1697  ULONG Reserved[7];
1698  PVOID Tags;
1699  PVOID Blocks;
1701 
1702 typedef struct _DEBUG_LOCK_INFORMATION {
1703  PVOID Address;
1709  ULONG EntryCount;
1714 
1715 typedef struct _PORT_MESSAGE_HEADER {
1721  ULONG MessageId;
1724 
1725 typedef unsigned short RTL_ATOM, *PRTL_ATOM;
1726 
1727 /* Wine doesn't implement atom table as NT does:
1728  * - in NT, atom tables are user space tables, which ntdll directly accesses
1729  * - on Wine, (even local) atom tables are wineserver objects, hence a HANDLE
1730  */
1731 typedef struct atom_table *RTL_ATOM_TABLE, **PRTL_ATOM_TABLE;
1732 
1737 
1738 typedef struct _ATOM_BASIC_INFORMATION {
1742  WCHAR Name[1];
1744 
1745 /* FIXME: names probably not correct */
1746 typedef struct _RTL_HANDLE
1747 {
1748  struct _RTL_HANDLE * Next;
1749 } RTL_HANDLE;
1750 
1751 /* FIXME: names probably not correct */
1752 typedef struct _RTL_HANDLE_TABLE
1753 {
1754  ULONG MaxHandleCount; /* 0x00 */
1755  ULONG HandleSize; /* 0x04 */
1756  ULONG Unused[2]; /* 0x08-0x0c */
1757  PVOID NextFree; /* 0x10 */
1758  PVOID FirstHandle; /* 0x14 */
1759  PVOID ReservedMemory; /* 0x18 */
1760  PVOID MaxHandle; /* 0x1c */
1762 
1763 /***********************************************************************
1764  * Defines
1765  */
1766 
1767 /* flags for NtCreateFile and NtOpenFile */
1768 #define FILE_DIRECTORY_FILE 0x00000001
1769 #define FILE_WRITE_THROUGH 0x00000002
1770 #define FILE_SEQUENTIAL_ONLY 0x00000004
1771 #define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008
1772 #define FILE_SYNCHRONOUS_IO_ALERT 0x00000010
1773 #define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020
1774 #define FILE_NON_DIRECTORY_FILE 0x00000040
1775 #define FILE_CREATE_TREE_CONNECTION 0x00000080
1776 #define FILE_COMPLETE_IF_OPLOCKED 0x00000100
1777 #define FILE_NO_EA_KNOWLEDGE 0x00000200
1778 #define FILE_OPEN_FOR_RECOVERY 0x00000400
1779 #define FILE_RANDOM_ACCESS 0x00000800
1780 #define FILE_DELETE_ON_CLOSE 0x00001000
1781 #define FILE_OPEN_BY_FILE_ID 0x00002000
1782 #define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000
1783 #define FILE_NO_COMPRESSION 0x00008000
1784 #define FILE_RESERVE_OPFILTER 0x00100000
1785 #define FILE_TRANSACTED_MODE 0x00200000
1786 #define FILE_OPEN_OFFLINE_FILE 0x00400000
1787 #define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000
1788 
1789 #define FILE_ATTRIBUTE_VALID_FLAGS 0x00007fb7
1790 #define FILE_ATTRIBUTE_VALID_SET_FLAGS 0x000031a7
1791 
1792 /* status for NtCreateFile or NtOpenFile */
1793 #define FILE_SUPERSEDED 0
1794 #define FILE_OPENED 1
1795 #define FILE_CREATED 2
1796 #define FILE_OVERWRITTEN 3
1797 #define FILE_EXISTS 4
1798 #define FILE_DOES_NOT_EXIST 5
1799 
1800 /* disposition for NtCreateFile */
1801 #define FILE_SUPERSEDE 0
1802 #define FILE_OPEN 1
1803 #define FILE_CREATE 2
1804 #define FILE_OPEN_IF 3
1805 #define FILE_OVERWRITE 4
1806 #define FILE_OVERWRITE_IF 5
1807 #define FILE_MAXIMUM_DISPOSITION 5
1808 
1809 /* Characteristics of a File System */
1810 #define FILE_REMOVABLE_MEDIA 0x00000001
1811 #define FILE_READ_ONLY_DEVICE 0x00000002
1812 #define FILE_FLOPPY_DISKETTE 0x00000004
1813 #define FILE_WRITE_ONE_MEDIA 0x00000008
1814 #define FILE_REMOTE_DEVICE 0x00000010
1815 #define FILE_DEVICE_IS_MOUNTED 0x00000020
1816 #define FILE_VIRTUAL_VOLUME 0x00000040
1817 #define FILE_AUTOGENERATED_DEVICE_NAME 0x00000080
1818 #define FILE_DEVICE_SECURE_OPEN 0x00000100
1819 
1820 /* options for NtCreateNamedPipeFile */
1821 #define FILE_PIPE_INBOUND 0x00000000
1822 #define FILE_PIPE_OUTBOUND 0x00000001
1823 #define FILE_PIPE_FULL_DUPLEX 0x00000002
1824 
1825 /* options for pipe's type */
1826 #define FILE_PIPE_TYPE_MESSAGE 0x00000001
1827 #define FILE_PIPE_TYPE_BYTE 0x00000000
1828 /* options for pipe's message mode */
1829 #define FILE_PIPE_MESSAGE_MODE 0x00000001
1830 #define FILE_PIPE_BYTE_STREAM_MODE 0x00000000
1831 /* options for pipe's blocking mode */
1832 #define FILE_PIPE_COMPLETE_OPERATION 0x00000001
1833 #define FILE_PIPE_QUEUE_OPERATION 0x00000000
1834 /* and client / server end */
1835 #define FILE_PIPE_SERVER_END 0x00000001
1836 #define FILE_PIPE_CLIENT_END 0x00000000
1837 
1838 #define INTERNAL_TS_ACTIVE_CONSOLE_ID ( *((volatile ULONG*)(0x7ffe02d8)) )
1839 
1840 #define LOGONID_CURRENT ((ULONG)-1)
1841 
1842 #define OBJ_INHERIT 0x00000002
1843 #define OBJ_PERMANENT 0x00000010
1844 #define OBJ_EXCLUSIVE 0x00000020
1845 #define OBJ_CASE_INSENSITIVE 0x00000040
1846 #define OBJ_OPENIF 0x00000080
1847 #define OBJ_OPENLINK 0x00000100
1848 #define OBJ_KERNEL_HANDLE 0x00000200
1849 #define OBJ_FORCE_ACCESS_CHECK 0x00000400
1850 #define OBJ_VALID_ATTRIBUTES 0x000007F2
1851 
1852 #define SERVERNAME_CURRENT ((HANDLE)NULL)
1853 
1854 typedef void (CALLBACK *PNTAPCFUNC)(ULONG_PTR,ULONG_PTR,ULONG_PTR); /* FIXME: not the right name */
1855 typedef void (CALLBACK *PRTL_THREAD_START_ROUTINE)(LPVOID); /* FIXME: not the right name */
1856 typedef DWORD (CALLBACK *PRTL_WORK_ITEM_ROUTINE)(LPVOID); /* FIXME: not the right name */
1857 typedef void (NTAPI *RTL_WAITORTIMERCALLBACKFUNC)(PVOID,BOOLEAN); /* FIXME: not the right name */
1858 
1859 
1860 /* DbgPrintEx default levels */
1861 #define DPFLTR_ERROR_LEVEL 0
1862 #define DPFLTR_WARNING_LEVEL 1
1863 #define DPFLTR_TRACE_LEVEL 2
1864 #define DPFLTR_INFO_LEVEL 3
1865 #define DPFLTR_MASK 0x8000000
1866 
1867 /* Well-known LUID values */
1868 #define SE_MIN_WELL_KNOWN_PRIVILEGE 2
1869 #define SE_CREATE_TOKEN_PRIVILEGE 2
1870 #define SE_ASSIGNPRIMARYTOKEN_PRIVILEGE 3
1871 #define SE_LOCK_MEMORY_PRIVILEGE 4
1872 #define SE_INCREASE_QUOTA_PRIVILEGE 5
1873 #define SE_UNSOLICITED_INPUT_PRIVILEGE 6 /* obsolete */
1874 #define SE_MACHINE_ACCOUNT_PRIVILEGE 6
1875 #define SE_TCB_PRIVILEGE 7
1876 #define SE_SECURITY_PRIVILEGE 8
1877 #define SE_TAKE_OWNERSHIP_PRIVILEGE 9
1878 #define SE_LOAD_DRIVER_PRIVILEGE 10
1879 #define SE_SYSTEM_PROFILE_PRIVILEGE 11
1880 #define SE_SYSTEMTIME_PRIVILEGE 12
1881 #define SE_PROF_SINGLE_PROCESS_PRIVILEGE 13
1882 #define SE_INC_BASE_PRIORITY_PRIVILEGE 14
1883 #define SE_CREATE_PAGEFILE_PRIVILEGE 15
1884 #define SE_CREATE_PERMANENT_PRIVILEGE 16
1885 #define SE_BACKUP_PRIVILEGE 17
1886 #define SE_RESTORE_PRIVILEGE 18
1887 #define SE_SHUTDOWN_PRIVILEGE 19
1888 #define SE_DEBUG_PRIVILEGE 20
1889 #define SE_AUDIT_PRIVILEGE 21
1890 #define SE_SYSTEM_ENVIRONMENT_PRIVILEGE 22
1891 #define SE_CHANGE_NOTIFY_PRIVILEGE 23
1892 #define SE_REMOTE_SHUTDOWN_PRIVILEGE 24
1893 #define SE_UNDOCK_PRIVILEGE 25
1894 #define SE_SYNC_AGENT_PRIVILEGE 26
1895 #define SE_ENABLE_DELEGATION_PRIVILEGE 27
1896 #define SE_MANAGE_VOLUME_PRIVILEGE 28
1897 #define SE_IMPERSONATE_PRIVILEGE 29
1898 #define SE_CREATE_GLOBAL_PRIVILEGE 30
1899 #define SE_MAX_WELL_KNOWN_PRIVILEGE SE_CREATE_GLOBAL_PRIVILEGE
1900 
1901 /* NtGlobalFlag bits */
1902 #define FLG_STOP_ON_EXCEPTION 0x00000001
1903 #define FLG_SHOW_LDR_SNAPS 0x00000002
1904 #define FLG_DEBUG_INITIAL_COMMAND 0x00000004
1905 #define FLG_STOP_ON_HUNG_GUI 0x00000008
1906 #define FLG_HEAP_ENABLE_TAIL_CHECK 0x00000010
1907 #define FLG_HEAP_ENABLE_FREE_CHECK 0x00000020
1908 #define FLG_HEAP_VALIDATE_PARAMETERS 0x00000040
1909 #define FLG_HEAP_VALIDATE_ALL 0x00000080
1910 #define FLG_APPLICATION_VERIFIER 0x00000100
1911 #define FLG_POOL_ENABLE_TAGGING 0x00000400
1912 #define FLG_HEAP_ENABLE_TAGGING 0x00000800
1913 #define FLG_USER_STACK_TRACE_DB 0x00001000
1914 #define FLG_KERNEL_STACK_TRACE_DB 0x00002000
1915 #define FLG_MAINTAIN_OBJECT_TYPELIST 0x00004000
1916 #define FLG_HEAP_ENABLE_TAG_BY_DLL 0x00008000
1917 #define FLG_DISABLE_STACK_EXTENSION 0x00010000
1918 #define FLG_ENABLE_CSRDEBUG 0x00020000
1919 #define FLG_ENABLE_KDEBUG_SYMBOL_LOAD 0x00040000
1920 #define FLG_DISABLE_PAGE_KERNEL_STACKS 0x00080000
1921 #define FLG_ENABLE_SYSTEM_CRIT_BREAKS 0x00100000
1922 #define FLG_HEAP_DISABLE_COALESCING 0x00200000
1923 #define FLG_ENABLE_CLOSE_EXCEPTIONS 0x00400000
1924 #define FLG_ENABLE_EXCEPTION_LOGGING 0x00800000
1925 #define FLG_ENABLE_HANDLE_TYPE_TAGGING 0x01000000
1926 #define FLG_HEAP_PAGE_ALLOCS 0x02000000
1927 #define FLG_DEBUG_INITIAL_COMMAND_EX 0x04000000
1928 #define FLG_DISABLE_DBGPRINT 0x08000000
1929 #define FLG_CRITSEC_EVENT_CREATION 0x10000000
1930 #define FLG_LDR_TOP_DOWN 0x20000000
1931 #define FLG_ENABLE_HANDLE_EXCEPTIONS 0x40000000
1932 #define FLG_DISABLE_PROTDLLS 0x80000000
1933 
1934 /* Rtl*Registry* functions structs and defines */
1935 #define RTL_REGISTRY_ABSOLUTE 0
1936 #define RTL_REGISTRY_SERVICES 1
1937 #define RTL_REGISTRY_CONTROL 2
1938 #define RTL_REGISTRY_WINDOWS_NT 3
1939 #define RTL_REGISTRY_DEVICEMAP 4
1940 #define RTL_REGISTRY_USER 5
1941 
1942 #define RTL_REGISTRY_HANDLE 0x40000000
1943 #define RTL_REGISTRY_OPTIONAL 0x80000000
1944 
1945 #define RTL_QUERY_REGISTRY_SUBKEY 0x00000001
1946 #define RTL_QUERY_REGISTRY_TOPKEY 0x00000002
1947 #define RTL_QUERY_REGISTRY_REQUIRED 0x00000004
1948 #define RTL_QUERY_REGISTRY_NOVALUE 0x00000008
1949 #define RTL_QUERY_REGISTRY_NOEXPAND 0x00000010
1950 #define RTL_QUERY_REGISTRY_DIRECT 0x00000020
1951 #define RTL_QUERY_REGISTRY_DELETE 0x00000040
1952 
1954  ULONG ValueType,
1955  PVOID ValueData,
1956  ULONG ValueLength,
1957  PVOID Context,
1958  PVOID EntryContext);
1959 
1960 typedef struct _RTL_QUERY_REGISTRY_TABLE
1961 {
1963  ULONG Flags;
1964  PWSTR Name;
1965  PVOID EntryContext;
1966  ULONG DefaultType;
1967  PVOID DefaultData;
1968  ULONG DefaultLength;
1970 
1972 {
1973  PUNICODE_STRING ValueName;
1974  ULONG DataLength;
1975  ULONG DataOffset;
1976  ULONG Type;
1978 
1980 
1982 
1986 
1987 typedef struct _EVENT_BASIC_INFORMATION {
1989  LONG EventState;
1991 
1995 
1996 typedef struct _SEMAPHORE_BASIC_INFORMATION {
2000 
2002 {
2006 
2007 typedef struct _SECTION_BASIC_INFORMATION {
2008  PVOID BaseAddress;
2009  ULONG Attributes;
2012 
2013 typedef struct _SECTION_IMAGE_INFORMATION {
2014  PVOID TransferAddress;
2015  ULONG ZeroBits;
2018  ULONG SubSystemType;
2021  ULONG GpValue;
2024  USHORT Machine;
2026  UCHAR ImageFlags;
2027  ULONG LoaderFlags;
2028  ULONG ImageFileSize;
2029  ULONG CheckSum;
2031 
2032 typedef struct _LPC_SECTION_WRITE {
2033  ULONG Length;
2034  HANDLE SectionHandle;
2035  ULONG SectionOffset;
2036  ULONG ViewSize;
2037  PVOID ViewBase;
2038  PVOID TargetViewBase;
2040 
2041 typedef struct _LPC_SECTION_READ {
2042  ULONG Length;
2043  ULONG ViewSize;
2044  PVOID ViewBase;
2046 
2047 typedef struct _LPC_MESSAGE {
2048  USHORT DataSize;
2053  ULONG_PTR MessageId;
2054  ULONG_PTR SectionSize;
2057 
2058 typedef struct _RTL_USER_PROCESS_INFORMATION
2059 {
2060  ULONG Length;
2061  HANDLE Process;
2062  HANDLE Thread;
2066 
2067 typedef enum _SHUTDOWN_ACTION {
2072 
2073 typedef enum _KPROFILE_SOURCE {
2100 
2105 
2106 typedef struct _INITIAL_TEB {
2107  PVOID StackBase;
2108  PVOID StackLimit;
2113 
2117 
2121 
2124  ULONG_PTR CompletionKey;
2126 
2127 #define IO_COMPLETION_QUERY_STATE 0x0001
2128 #define IO_COMPLETION_MODIFY_STATE 0x0002
2129 #define IO_COMPLETION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
2130 
2140 
2141 typedef enum _HARDERROR_RESPONSE {
2152 
2153 typedef enum _SYSDBG_COMMAND {
2175 
2176 
2177 /*************************************************************************
2178  * Loader structures
2179  *
2180  * Those are not part of standard Winternl.h
2181  */
2182 typedef struct _LDR_MODULE
2183 {
2188  void* EntryPoint;
2192  ULONG Flags;
2203  ULONG_PTR OriginalBase;
2205 
2206  /* Not part of Win7 but used by Wine */
2209 
2210 /* those defines are (some of the) regular LDR_MODULE.Flags values */
2211 #define LDR_IMAGE_IS_DLL 0x00000004
2212 #define LDR_LOAD_IN_PROGRESS 0x00001000
2213 #define LDR_UNLOAD_IN_PROGRESS 0x00002000
2214 #define LDR_NO_DLL_CALLS 0x00040000
2215 #define LDR_PROCESS_ATTACHED 0x00080000
2216 #define LDR_MODULE_REBASED 0x00200000
2217 
2218 /* these ones is Wine specific */
2219 #define LDR_DONT_RESOLVE_REFS 0x40000000
2220 #define LDR_WINE_INTERNAL 0x80000000
2221 
2222 /* flag for LdrAddRefDll */
2223 #define LDR_ADDREF_DLL_PIN 0x00000001
2224 
2225 /* FIXME: to be checked */
2226 #define MAXIMUM_FILENAME_LENGTH 256
2227 
2228 typedef struct _SYSTEM_MODULE
2229 {
2230  PVOID Reserved1; /* 00/00 */
2231  PVOID Reserved2; /* 04/08 */
2232  PVOID ImageBaseAddress; /* 08/10 */
2233  ULONG ImageSize; /* 0c/18 */
2234  ULONG Flags; /* 10/1c */
2235  WORD Id; /* 14/20 */
2236  WORD Rank; /* 16/22 */
2237  WORD Unknown; /* 18/24 */
2238  WORD NameOffset; /* 1a/26 */
2241 
2242 typedef struct _SYSTEM_MODULE_INFORMATION
2243 {
2245  SYSTEM_MODULE Modules[1]; /* FIXME: should be Modules[0] */
2247 
2248 #define THREAD_CREATE_FLAGS_CREATE_SUSPENDED 0x00000001
2249 #define THREAD_CREATE_FLAGS_SKIP_THREAD_ATTACH 0x00000002
2250 #define THREAD_CREATE_FLAGS_HIDE_FROM_DEBUGGER 0x00000004
2251 #define THREAD_CREATE_FLAGS_HAS_SECURITY_DESCRIPTOR 0x00000010
2252 #define THREAD_CREATE_FLAGS_ACCESS_CHECK_IN_TARGET 0x00000020
2253 #define THREAD_CREATE_FLAGS_INITIAL_THREAD 0x00000080
2254 
2255 /***********************************************************************
2256  * Function declarations
2257  */
2258 
2259 #if defined(__i386__) && defined(__GNUC__)
2260 static inline void WINAPI DbgBreakPoint(void) { __asm__ __volatile__("int3"); }
2261 static inline void WINAPI DbgUserBreakPoint(void) { __asm__ __volatile__("int3"); }
2262 #else /* __i386__ && __GNUC__ */
2263 NTSYSAPI void WINAPI DbgBreakPoint(void);
2264 NTSYSAPI void WINAPI DbgUserBreakPoint(void);
2265 #endif /* __i386__ && __GNUC__ */
2266 #ifndef __REACTOS__
2267 NTSYSAPI NTSTATUS WINAPIV DbgPrint(LPCSTR fmt, ...);
2268 #endif /* __REACTOS__ */
2269 NTSYSAPI NTSTATUS WINAPIV DbgPrintEx(ULONG iComponentId, ULONG Level, LPCSTR fmt, ...);
2271 NTSYSAPI NTSTATUS WINAPI LdrAddRefDll(ULONG,HMODULE);
2275 NTSYSAPI NTSTATUS WINAPI LdrFindEntryForAddress(const void*, PLDR_MODULE*);
2276 NTSYSAPI NTSTATUS WINAPI LdrGetDllHandle(LPCWSTR, ULONG, const UNICODE_STRING*, HMODULE*);
2277 NTSYSAPI NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE, const ANSI_STRING*, ULONG, void**);
2278 NTSYSAPI void WINAPI LdrInitializeThunk(void*,ULONG_PTR,ULONG_PTR,ULONG_PTR);
2279 NTSYSAPI NTSTATUS WINAPI LdrLoadDll(LPCWSTR, DWORD, const UNICODE_STRING*, HMODULE*);
2280 NTSYSAPI NTSTATUS WINAPI LdrLockLoaderLock(ULONG,ULONG*,ULONG_PTR*);
2282 NTSYSAPI NTSTATUS WINAPI LdrQueryImageFileExecutionOptions(const UNICODE_STRING*,LPCWSTR,ULONG,void*,ULONG,ULONG*);
2285 NTSYSAPI void WINAPI LdrShutdownThread(void);
2287 NTSYSAPI NTSTATUS WINAPI LdrUnlockLoaderLock(ULONG,ULONG_PTR);
2288 NTSYSAPI NTSTATUS WINAPI NtAcceptConnectPort(PHANDLE,ULONG,PLPC_MESSAGE,BOOLEAN,PLPC_SECTION_WRITE,PLPC_SECTION_READ);
2290 NTSYSAPI NTSTATUS WINAPI NtAccessCheckAndAuditAlarm(PUNICODE_STRING,HANDLE,PUNICODE_STRING,PUNICODE_STRING,PSECURITY_DESCRIPTOR,ACCESS_MASK,PGENERIC_MAPPING,BOOLEAN,PACCESS_MASK,PBOOLEAN,PBOOLEAN);
2291 NTSYSAPI NTSTATUS WINAPI NtAddAtom(const WCHAR*,ULONG,RTL_ATOM*);
2294 NTSYSAPI NTSTATUS WINAPI NtAlertResumeThread(HANDLE,PULONG);
2295 NTSYSAPI NTSTATUS WINAPI NtAlertThread(HANDLE ThreadHandle);
2298 NTSYSAPI NTSTATUS WINAPI NtAllocateVirtualMemory(HANDLE,PVOID*,ULONG,SIZE_T*,ULONG,ULONG);
2299 NTSYSAPI NTSTATUS WINAPI NtAreMappedFilesTheSame(PVOID,PVOID);
2300 NTSYSAPI NTSTATUS WINAPI NtAssignProcessToJobObject(HANDLE,HANDLE);
2301 NTSYSAPI NTSTATUS WINAPI NtCallbackReturn(PVOID,ULONG,NTSTATUS);
2302 NTSYSAPI NTSTATUS WINAPI NtCancelIoFile(HANDLE,PIO_STATUS_BLOCK);
2303 NTSYSAPI NTSTATUS WINAPI NtCancelIoFileEx(HANDLE,PIO_STATUS_BLOCK,PIO_STATUS_BLOCK);
2304 NTSYSAPI NTSTATUS WINAPI NtCancelTimer(HANDLE, BOOLEAN*);
2305 NTSYSAPI NTSTATUS WINAPI NtClearEvent(HANDLE);
2306 NTSYSAPI NTSTATUS WINAPI NtClose(HANDLE);
2307 NTSYSAPI NTSTATUS WINAPI NtCloseObjectAuditAlarm(PUNICODE_STRING,HANDLE,BOOLEAN);
2308 NTSYSAPI NTSTATUS WINAPI NtCompleteConnectPort(HANDLE);
2309 NTSYSAPI NTSTATUS WINAPI NtConnectPort(PHANDLE,PUNICODE_STRING,PSECURITY_QUALITY_OF_SERVICE,PLPC_SECTION_WRITE,PLPC_SECTION_READ,PULONG,PVOID,PULONG);
2311 NTSYSAPI NTSTATUS WINAPI NtCreateDirectoryObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
2313 NTSYSAPI NTSTATUS WINAPI NtCreateEventPair(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
2314 NTSYSAPI NTSTATUS WINAPI NtCreateFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,PLARGE_INTEGER,ULONG,ULONG,ULONG,ULONG,PVOID,ULONG);
2315 NTSYSAPI NTSTATUS WINAPI NtCreateIoCompletion(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,ULONG);
2318 NTSYSAPI NTSTATUS WINAPI NtCreateKeyTransacted(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,HANDLE,ULONG*);
2319 NTSYSAPI NTSTATUS WINAPI NtCreateKeyedEvent(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG);
2320 NTSYSAPI NTSTATUS WINAPI NtCreateMailslotFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG,ULONG,PLARGE_INTEGER);
2322 NTSYSAPI NTSTATUS WINAPI NtCreateNamedPipeFile(PHANDLE,ULONG,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,PLARGE_INTEGER);
2324 NTSYSAPI NTSTATUS WINAPI NtCreatePort(PHANDLE,POBJECT_ATTRIBUTES,ULONG,ULONG,PULONG);
2325 NTSYSAPI NTSTATUS WINAPI NtCreateProcess(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,HANDLE,BOOLEAN,HANDLE,HANDLE,HANDLE);
2326 NTSYSAPI NTSTATUS WINAPI NtCreateProfile(PHANDLE,HANDLE,PVOID,ULONG,ULONG,PVOID,ULONG,KPROFILE_SOURCE,KAFFINITY);
2327 NTSYSAPI NTSTATUS WINAPI NtCreateSection(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const LARGE_INTEGER*,ULONG,ULONG,HANDLE);
2329 NTSYSAPI NTSTATUS WINAPI NtCreateSymbolicLinkObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PUNICODE_STRING);
2330 NTSYSAPI NTSTATUS WINAPI NtCreateThread(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,HANDLE,PCLIENT_ID,PCONTEXT,PINITIAL_TEB,BOOLEAN);
2334 NTSYSAPI NTSTATUS WINAPI NtDeleteAtom(RTL_ATOM);
2335 NTSYSAPI NTSTATUS WINAPI NtDeleteFile(POBJECT_ATTRIBUTES);
2336 NTSYSAPI NTSTATUS WINAPI NtDeleteKey(HANDLE);
2337 NTSYSAPI NTSTATUS WINAPI NtDeleteValueKey(HANDLE,const UNICODE_STRING *);
2338 NTSYSAPI NTSTATUS WINAPI NtDeviceIoControlFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,PVOID,ULONG,PVOID,ULONG);
2339 NTSYSAPI NTSTATUS WINAPI NtDisplayString(PUNICODE_STRING);
2340 NTSYSAPI NTSTATUS WINAPI NtDuplicateObject(HANDLE,HANDLE,HANDLE,PHANDLE,ACCESS_MASK,ULONG,ULONG);
2342 NTSYSAPI NTSTATUS WINAPI NtEnumerateKey(HANDLE,ULONG,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *);
2343 NTSYSAPI NTSTATUS WINAPI NtEnumerateValueKey(HANDLE,ULONG,KEY_VALUE_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2345 NTSYSAPI NTSTATUS WINAPI NtFindAtom(const WCHAR*,ULONG,RTL_ATOM*);
2348 NTSYSAPI NTSTATUS WINAPI NtFlushKey(HANDLE);
2349 NTSYSAPI NTSTATUS WINAPI NtFlushVirtualMemory(HANDLE,LPCVOID*,SIZE_T*,ULONG);
2351 NTSYSAPI NTSTATUS WINAPI NtFreeVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
2352 NTSYSAPI NTSTATUS WINAPI NtFsControlFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,PVOID,ULONG,PVOID,ULONG);
2353 NTSYSAPI NTSTATUS WINAPI NtGetContextThread(HANDLE,CONTEXT*);
2355 NTSYSAPI NTSTATUS WINAPI NtGetPlugPlayEvent(ULONG,ULONG,PVOID,ULONG);
2357 NTSYSAPI NTSTATUS WINAPI NtGetWriteWatch(HANDLE,ULONG,PVOID,SIZE_T,PVOID*,ULONG_PTR*,ULONG*);
2359 NTSYSAPI NTSTATUS WINAPI NtImpersonateClientOfPort(HANDLE,PPORT_MESSAGE);
2363 NTSYSAPI NTSTATUS WINAPI NtIsProcessInJob(HANDLE,HANDLE);
2364 NTSYSAPI NTSTATUS WINAPI NtListenPort(HANDLE,PLPC_MESSAGE);
2365 NTSYSAPI NTSTATUS WINAPI NtLoadDriver(const UNICODE_STRING *);
2367 NTSYSAPI NTSTATUS WINAPI NtLockFile(HANDLE,HANDLE,PIO_APC_ROUTINE,void*,PIO_STATUS_BLOCK,PLARGE_INTEGER,PLARGE_INTEGER,ULONG*,BOOLEAN,BOOLEAN);
2368 NTSYSAPI NTSTATUS WINAPI NtLockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
2369 NTSYSAPI NTSTATUS WINAPI NtMakeTemporaryObject(HANDLE);
2370 NTSYSAPI NTSTATUS WINAPI NtMapViewOfSection(HANDLE,HANDLE,PVOID*,ULONG,SIZE_T,const LARGE_INTEGER*,SIZE_T*,SECTION_INHERIT,ULONG,ULONG);
2371 NTSYSAPI NTSTATUS WINAPI NtNotifyChangeDirectoryFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,ULONG,BOOLEAN);
2372 NTSYSAPI NTSTATUS WINAPI NtNotifyChangeKey(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,BOOLEAN,PVOID,ULONG,BOOLEAN);
2373 NTSYSAPI NTSTATUS WINAPI NtNotifyChangeMultipleKeys(HANDLE,ULONG,OBJECT_ATTRIBUTES*,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,BOOLEAN,PVOID,ULONG,BOOLEAN);
2377 NTSYSAPI NTSTATUS WINAPI NtOpenFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG);
2386 NTSYSAPI NTSTATUS WINAPI NtOpenObjectAuditAlarm(PUNICODE_STRING,PHANDLE,PUNICODE_STRING,PUNICODE_STRING,PSECURITY_DESCRIPTOR,HANDLE,ACCESS_MASK,ACCESS_MASK,PPRIVILEGE_SET,BOOLEAN,BOOLEAN,PBOOLEAN);
2388 NTSYSAPI NTSTATUS WINAPI NtOpenProcessToken(HANDLE,DWORD,HANDLE *);
2389 NTSYSAPI NTSTATUS WINAPI NtOpenProcessTokenEx(HANDLE,DWORD,DWORD,HANDLE *);
2390 NTSYSAPI NTSTATUS WINAPI NtOpenSection(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
2393 NTSYSAPI NTSTATUS WINAPI NtOpenThread(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const CLIENT_ID*);
2394 NTSYSAPI NTSTATUS WINAPI NtOpenThreadToken(HANDLE,DWORD,BOOLEAN,HANDLE *);
2395 NTSYSAPI NTSTATUS WINAPI NtOpenThreadTokenEx(HANDLE,DWORD,BOOLEAN,DWORD,HANDLE *);
2396 NTSYSAPI NTSTATUS WINAPI NtOpenTimer(HANDLE*, ACCESS_MASK, const OBJECT_ATTRIBUTES*);
2397 NTSYSAPI NTSTATUS WINAPI NtPowerInformation(POWER_INFORMATION_LEVEL,PVOID,ULONG,PVOID,ULONG);
2399 NTSYSAPI NTSTATUS WINAPI NtPrivilegeObjectAuditAlarm(PUNICODE_STRING,HANDLE,HANDLE,ULONG,PPRIVILEGE_SET,BOOLEAN);
2400 NTSYSAPI NTSTATUS WINAPI NtPrivilegedServiceAuditAlarm(PUNICODE_STRING,PUNICODE_STRING,HANDLE,PPRIVILEGE_SET,BOOLEAN);
2401 NTSYSAPI NTSTATUS WINAPI NtProtectVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG,ULONG*);
2402 NTSYSAPI NTSTATUS WINAPI NtPulseEvent(HANDLE,PULONG);
2403 NTSYSAPI NTSTATUS WINAPI NtQueueApcThread(HANDLE,PNTAPCFUNC,ULONG_PTR,ULONG_PTR,ULONG_PTR);
2407 NTSYSAPI NTSTATUS WINAPI NtQueryDirectoryFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,FILE_INFORMATION_CLASS,BOOLEAN,PUNICODE_STRING,BOOLEAN);
2408 NTSYSAPI NTSTATUS WINAPI NtQueryDirectoryObject(HANDLE,PDIRECTORY_BASIC_INFORMATION,ULONG,BOOLEAN,BOOLEAN,PULONG,PULONG);
2409 NTSYSAPI NTSTATUS WINAPI NtQueryEaFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,BOOLEAN,PVOID,ULONG,PULONG,BOOLEAN);
2410 NTSYSAPI NTSTATUS WINAPI NtQueryEvent(HANDLE,EVENT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2412 NTSYSAPI NTSTATUS WINAPI NtQueryInformationAtom(RTL_ATOM,ATOM_INFORMATION_CLASS,PVOID,ULONG,ULONG*);
2413 NTSYSAPI NTSTATUS WINAPI NtQueryInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,LONG,FILE_INFORMATION_CLASS);
2416 NTSYSAPI NTSTATUS WINAPI NtQueryInformationProcess(HANDLE,PROCESSINFOCLASS,PVOID,ULONG,PULONG);
2417 NTSYSAPI NTSTATUS WINAPI NtQueryInformationThread(HANDLE,THREADINFOCLASS,PVOID,ULONG,PULONG);
2422 NTSYSAPI NTSTATUS WINAPI NtQueryKey(HANDLE,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *);
2423 NTSYSAPI NTSTATUS WINAPI NtQueryMultipleValueKey(HANDLE,PKEY_MULTIPLE_VALUE_INFORMATION,ULONG,PVOID,ULONG,PULONG);
2424 NTSYSAPI NTSTATUS WINAPI NtQueryMutant(HANDLE,MUTANT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2425 NTSYSAPI NTSTATUS WINAPI NtQueryObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG, PULONG);
2426 NTSYSAPI NTSTATUS WINAPI NtQueryOpenSubKeys(POBJECT_ATTRIBUTES,PULONG);
2429 NTSYSAPI NTSTATUS WINAPI NtQuerySection(HANDLE,SECTION_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2431 NTSYSAPI NTSTATUS WINAPI NtQuerySymbolicLinkObject(HANDLE,PUNICODE_STRING,PULONG);
2432 NTSYSAPI NTSTATUS WINAPI NtQuerySystemEnvironmentValue(PUNICODE_STRING,PWCHAR,ULONG,PULONG);
2434 NTSYSAPI NTSTATUS WINAPI NtQuerySystemInformationEx(SYSTEM_INFORMATION_CLASS,void*,ULONG,void*,ULONG,ULONG*);
2436 NTSYSAPI NTSTATUS WINAPI NtQueryTimer(HANDLE,TIMER_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2438 NTSYSAPI NTSTATUS WINAPI NtQueryValueKey(HANDLE,const UNICODE_STRING *,KEY_VALUE_INFORMATION_CLASS,void *,DWORD,DWORD *);
2439 NTSYSAPI NTSTATUS WINAPI NtQueryLicenseValue(const UNICODE_STRING *,ULONG *,PVOID,ULONG,ULONG *);
2441 NTSYSAPI NTSTATUS WINAPI NtQueryVolumeInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS);
2443 NTSYSAPI NTSTATUS WINAPI NtRaiseHardError(NTSTATUS,ULONG,PUNICODE_STRING,PVOID*,HARDERROR_RESPONSE_OPTION,PHARDERROR_RESPONSE);
2444 NTSYSAPI NTSTATUS WINAPI NtReadFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,PLARGE_INTEGER,PULONG);
2445 NTSYSAPI NTSTATUS WINAPI NtReadFileScatter(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,FILE_SEGMENT_ELEMENT*,ULONG,PLARGE_INTEGER,PULONG);
2446 NTSYSAPI NTSTATUS WINAPI NtReadRequestData(HANDLE,PLPC_MESSAGE,ULONG,PVOID,ULONG,PULONG);
2447 NTSYSAPI NTSTATUS WINAPI NtReadVirtualMemory(HANDLE,const void*,void*,SIZE_T,SIZE_T*);
2449 NTSYSAPI NTSTATUS WINAPI NtReleaseKeyedEvent(HANDLE,const void*,BOOLEAN,const LARGE_INTEGER*);
2450 NTSYSAPI NTSTATUS WINAPI NtReleaseMutant(HANDLE,PLONG);
2451 NTSYSAPI NTSTATUS WINAPI NtReleaseSemaphore(HANDLE,ULONG,PULONG);
2452 NTSYSAPI NTSTATUS WINAPI NtRemoveIoCompletion(HANDLE,PULONG_PTR,PULONG_PTR,PIO_STATUS_BLOCK,PLARGE_INTEGER);
2453 NTSYSAPI NTSTATUS WINAPI NtRenameKey(HANDLE,UNICODE_STRING*);
2454 NTSYSAPI NTSTATUS WINAPI NtReplaceKey(POBJECT_ATTRIBUTES,HANDLE,POBJECT_ATTRIBUTES);
2455 NTSYSAPI NTSTATUS WINAPI NtReplyPort(HANDLE,PLPC_MESSAGE);
2456 NTSYSAPI NTSTATUS WINAPI NtReplyWaitReceivePort(HANDLE,PULONG,PLPC_MESSAGE,PLPC_MESSAGE);
2457 NTSYSAPI NTSTATUS WINAPI NtReplyWaitReceivePortEx(HANDLE,PVOID*,PPORT_MESSAGE,PPORT_MESSAGE,PLARGE_INTEGER);
2458 NTSYSAPI NTSTATUS WINAPI NtReplyWaitReplyPort(HANDLE,PLPC_MESSAGE);
2459 NTSYSAPI NTSTATUS WINAPI NtRequestPort(HANDLE,PLPC_MESSAGE);
2460 NTSYSAPI NTSTATUS WINAPI NtRequestWaitReplyPort(HANDLE,PLPC_MESSAGE,PLPC_MESSAGE);
2461 NTSYSAPI NTSTATUS WINAPI NtResetEvent(HANDLE,PULONG);
2462 NTSYSAPI NTSTATUS WINAPI NtResetWriteWatch(HANDLE,PVOID,SIZE_T);
2463 NTSYSAPI NTSTATUS WINAPI NtRestoreKey(HANDLE,HANDLE,ULONG);
2464 NTSYSAPI NTSTATUS WINAPI NtResumeThread(HANDLE,PULONG);
2465 NTSYSAPI NTSTATUS WINAPI NtSaveKey(HANDLE,HANDLE);
2466 NTSYSAPI NTSTATUS WINAPI NtSecureConnectPort(PHANDLE,PUNICODE_STRING,PSECURITY_QUALITY_OF_SERVICE,PLPC_SECTION_WRITE,PSID,PLPC_SECTION_READ,PULONG,PVOID,PULONG);
2467 NTSYSAPI NTSTATUS WINAPI NtSetContextThread(HANDLE,const CONTEXT*);
2468 NTSYSAPI NTSTATUS WINAPI NtSetDefaultHardErrorPort(HANDLE);
2471 NTSYSAPI NTSTATUS WINAPI NtSetEaFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG);
2472 NTSYSAPI NTSTATUS WINAPI NtSetEvent(HANDLE,PULONG);
2473 NTSYSAPI NTSTATUS WINAPI NtSetHighEventPair(HANDLE);
2474 NTSYSAPI NTSTATUS WINAPI NtSetHighWaitLowEventPair(HANDLE);
2476 NTSYSAPI NTSTATUS WINAPI NtSetInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FILE_INFORMATION_CLASS);
2477 NTSYSAPI NTSTATUS WINAPI NtSetInformationJobObject(HANDLE,JOBOBJECTINFOCLASS,PVOID,ULONG);
2478 NTSYSAPI NTSTATUS WINAPI NtSetInformationKey(HANDLE,const int,PVOID,ULONG);
2479 NTSYSAPI NTSTATUS WINAPI NtSetInformationObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG);
2480 NTSYSAPI NTSTATUS WINAPI NtSetInformationProcess(HANDLE,PROCESS_INFORMATION_CLASS,PVOID,ULONG);
2482 NTSYSAPI NTSTATUS WINAPI NtSetInformationToken(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,ULONG);
2484 NTSYSAPI NTSTATUS WINAPI NtSetIoCompletion(HANDLE,ULONG_PTR,ULONG_PTR,NTSTATUS,SIZE_T);
2485 NTSYSAPI NTSTATUS WINAPI NtSetLdtEntries(ULONG,ULONG,ULONG,ULONG,ULONG,ULONG);
2486 NTSYSAPI NTSTATUS WINAPI NtSetLowEventPair(HANDLE);
2487 NTSYSAPI NTSTATUS WINAPI NtSetLowWaitHighEventPair(HANDLE);
2490 NTSYSAPI NTSTATUS WINAPI NtSetSystemEnvironmentValue(PUNICODE_STRING,PUNICODE_STRING);
2494 NTSYSAPI NTSTATUS WINAPI NtSetTimer(HANDLE, const LARGE_INTEGER*, PTIMER_APC_ROUTINE, PVOID, BOOLEAN, ULONG, BOOLEAN*);
2496 NTSYSAPI NTSTATUS WINAPI NtSetValueKey(HANDLE,const UNICODE_STRING *,ULONG,ULONG,const void *,ULONG);
2497 NTSYSAPI NTSTATUS WINAPI NtSetVolumeInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS);
2498 NTSYSAPI NTSTATUS WINAPI NtSignalAndWaitForSingleObject(HANDLE,HANDLE,BOOLEAN,const LARGE_INTEGER*);
2500 NTSYSAPI NTSTATUS WINAPI NtStartProfile(HANDLE);
2501 NTSYSAPI NTSTATUS WINAPI NtStopProfile(HANDLE);
2502 NTSYSAPI NTSTATUS WINAPI NtSuspendThread(HANDLE,PULONG);
2503 NTSYSAPI NTSTATUS WINAPI NtSystemDebugControl(SYSDBG_COMMAND,PVOID,ULONG,PVOID,ULONG,PULONG);
2504 NTSYSAPI NTSTATUS WINAPI NtTerminateJobObject(HANDLE,NTSTATUS);
2505 NTSYSAPI NTSTATUS WINAPI NtTerminateProcess(HANDLE,LONG);
2506 NTSYSAPI NTSTATUS WINAPI NtTerminateThread(HANDLE,LONG);
2507 NTSYSAPI NTSTATUS WINAPI NtTestAlert(VOID);
2508 NTSYSAPI NTSTATUS WINAPI NtUnloadDriver(const UNICODE_STRING *);
2509 NTSYSAPI NTSTATUS WINAPI NtUnloadKey(POBJECT_ATTRIBUTES);
2510 NTSYSAPI NTSTATUS WINAPI NtUnloadKeyEx(POBJECT_ATTRIBUTES,HANDLE);
2511 NTSYSAPI NTSTATUS WINAPI NtUnlockFile(HANDLE,PIO_STATUS_BLOCK,PLARGE_INTEGER,PLARGE_INTEGER,PULONG);
2512 NTSYSAPI NTSTATUS WINAPI NtUnlockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
2513 NTSYSAPI NTSTATUS WINAPI NtUnmapViewOfSection(HANDLE,PVOID);
2514 NTSYSAPI NTSTATUS WINAPI NtVdmControl(ULONG,PVOID);
2515 NTSYSAPI NTSTATUS WINAPI NtWaitForKeyedEvent(HANDLE,const void*,BOOLEAN,const LARGE_INTEGER*);
2517 NTSYSAPI NTSTATUS WINAPI NtWaitForMultipleObjects(ULONG,const HANDLE*,BOOLEAN,BOOLEAN,const LARGE_INTEGER*);
2518 NTSYSAPI NTSTATUS WINAPI NtWaitHighEventPair(HANDLE);
2519 NTSYSAPI NTSTATUS WINAPI NtWaitLowEventPair(HANDLE);
2520 NTSYSAPI NTSTATUS WINAPI NtWriteFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,const void*,ULONG,PLARGE_INTEGER,PULONG);
2521 NTSYSAPI NTSTATUS WINAPI NtWriteFileGather(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,FILE_SEGMENT_ELEMENT*,ULONG,PLARGE_INTEGER,PULONG);
2522 NTSYSAPI NTSTATUS WINAPI NtWriteRequestData(HANDLE,PLPC_MESSAGE,ULONG,PVOID,ULONG,PULONG);
2523 NTSYSAPI NTSTATUS WINAPI NtWriteVirtualMemory(HANDLE,void*,const void*,SIZE_T,SIZE_T*);
2524 NTSYSAPI NTSTATUS WINAPI NtYieldExecution(void);
2525 
2526 NTSYSAPI void WINAPI RtlAcquirePebLock(void);
2531 NTSYSAPI NTSTATUS WINAPI RtlActivateActivationContext(DWORD,HANDLE,ULONG_PTR*);
2532 NTSYSAPI NTSTATUS WINAPI RtlAddAce(PACL,DWORD,DWORD,PACE_HEADER,DWORD);
2533 NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedAce(PACL,DWORD,DWORD,PSID);
2534 NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
2535 NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedObjectAce(PACL,DWORD,DWORD,DWORD,GUID*,GUID*,PSID);
2536 NTSYSAPI NTSTATUS WINAPI RtlAddAccessDeniedAce(PACL,DWORD,DWORD,PSID);
2537 NTSYSAPI NTSTATUS WINAPI RtlAddAccessDeniedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
2538 NTSYSAPI NTSTATUS WINAPI RtlAddAccessDeniedObjectAce(PACL,DWORD,DWORD,DWORD,GUID*,GUID*,PSID);
2539 NTSYSAPI NTSTATUS WINAPI RtlAddAtomToAtomTable(RTL_ATOM_TABLE,const WCHAR*,RTL_ATOM*);
2540 NTSYSAPI NTSTATUS WINAPI RtlAddAuditAccessAce(PACL,DWORD,DWORD,PSID,BOOL,BOOL);
2541 NTSYSAPI NTSTATUS WINAPI RtlAddAuditAccessAceEx(PACL,DWORD,DWORD,DWORD,PSID,BOOL,BOOL);
2542 NTSYSAPI NTSTATUS WINAPI RtlAddAuditAccessObjectAce(PACL,DWORD,DWORD,DWORD,GUID*,GUID*,PSID,BOOL,BOOL);
2543 NTSYSAPI NTSTATUS WINAPI RtlAddMandatoryAce(PACL,DWORD,DWORD,DWORD,DWORD,PSID);
2547 NTSYSAPI NTSTATUS WINAPI RtlAllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY,BYTE,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,PSID *);
2549 NTSYSAPI PVOID WINAPI RtlAllocateHeap(HANDLE,ULONG,SIZE_T) __WINE_ALLOC_SIZE(3);
2552 NTSYSAPI NTSTATUS WINAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING,PCANSI_STRING,BOOLEAN);
2553 NTSYSAPI NTSTATUS WINAPI RtlAppendAsciizToString(STRING *,LPCSTR);
2554 NTSYSAPI NTSTATUS WINAPI RtlAppendStringToString(STRING *,const STRING *);
2556 NTSYSAPI NTSTATUS WINAPI RtlAppendUnicodeToString(UNICODE_STRING *,LPCWSTR);
2558 NTSYSAPI BOOLEAN WINAPI RtlAreAnyAccessesGranted(ACCESS_MASK,ACCESS_MASK);
2559 NTSYSAPI BOOLEAN WINAPI RtlAreBitsSet(PCRTL_BITMAP,ULONG,ULONG);
2560 NTSYSAPI BOOLEAN WINAPI RtlAreBitsClear(PCRTL_BITMAP,ULONG,ULONG);
2561 NTSYSAPI NTSTATUS WINAPI RtlCharToInteger(PCSZ,ULONG,PULONG);
2562 NTSYSAPI NTSTATUS WINAPI RtlCheckRegistryKey(ULONG, PWSTR);
2563 NTSYSAPI void WINAPI RtlClearAllBits(PRTL_BITMAP);
2564 NTSYSAPI void WINAPI RtlClearBits(PRTL_BITMAP,ULONG,ULONG);
2565 NTSYSAPI NTSTATUS WINAPI RtlCreateActivationContext(HANDLE*,const void*);
2566 NTSYSAPI PDEBUG_BUFFER WINAPI RtlCreateQueryDebugBuffer(ULONG,BOOLEAN);
2567 NTSYSAPI ULONG WINAPI RtlCompactHeap(HANDLE,ULONG);
2568 NTSYSAPI LONG WINAPI RtlCompareString(const STRING*,const STRING*,BOOLEAN);
2569 NTSYSAPI LONG WINAPI RtlCompareUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
2571 NTSYSAPI NTSTATUS WINAPI RtlCompressBuffer(USHORT,PUCHAR,ULONG,PUCHAR,ULONG,ULONG,PULONG,PVOID);
2573 NTSYSAPI NTSTATUS WINAPI RtlConvertSidToUnicodeString(PUNICODE_STRING,PSID,BOOLEAN);
2576 NTSYSAPI BOOLEAN WINAPI RtlCopySid(DWORD,PSID,PSID);
2577 NTSYSAPI NTSTATUS WINAPI RtlCopySecurityDescriptor(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR);
2578 NTSYSAPI void WINAPI RtlCopyString(STRING*,const STRING*);
2579 NTSYSAPI void WINAPI RtlCopyUnicodeString(UNICODE_STRING*,const UNICODE_STRING*);
2580 NTSYSAPI NTSTATUS WINAPI RtlCreateAcl(PACL,DWORD,DWORD);
2581 NTSYSAPI NTSTATUS WINAPI RtlCreateAtomTable(ULONG,RTL_ATOM_TABLE*);
2582 NTSYSAPI NTSTATUS WINAPI RtlCreateEnvironment(BOOLEAN, PWSTR*);
2583 NTSYSAPI HANDLE WINAPI RtlCreateHeap(ULONG,PVOID,SIZE_T,SIZE_T,PVOID,PRTL_HEAP_DEFINITION);
2584 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*);
2585 NTSYSAPI NTSTATUS WINAPI RtlCreateSecurityDescriptor(PSECURITY_DESCRIPTOR,DWORD);
2587 NTSYSAPI NTSTATUS WINAPI RtlCreateTimer(PHANDLE, HANDLE, RTL_WAITORTIMERCALLBACKFUNC, PVOID, DWORD, DWORD, ULONG);
2588 NTSYSAPI BOOLEAN WINAPI RtlCreateUnicodeString(PUNICODE_STRING,LPCWSTR);
2589 NTSYSAPI BOOLEAN WINAPI RtlCreateUnicodeStringFromAsciiz(PUNICODE_STRING,LPCSTR);
2590 NTSYSAPI NTSTATUS WINAPI RtlCreateUserProcess(UNICODE_STRING*,ULONG,RTL_USER_PROCESS_PARAMETERS*,SECURITY_DESCRIPTOR*,SECURITY_DESCRIPTOR*,HANDLE,BOOLEAN,HANDLE,HANDLE,RTL_USER_PROCESS_INFORMATION*);
2591 NTSYSAPI NTSTATUS WINAPI RtlCreateUserThread(HANDLE,const SECURITY_DESCRIPTOR*,BOOLEAN,PVOID,SIZE_T,SIZE_T,PRTL_THREAD_START_ROUTINE,void*,HANDLE*,CLIENT_ID*);
2592 NTSYSAPI void WINAPI RtlDeactivateActivationContext(DWORD,ULONG_PTR);
2593 NTSYSAPI PVOID WINAPI RtlDecodePointer(PVOID);
2594 NTSYSAPI NTSTATUS WINAPI RtlDecompressBuffer(USHORT,PUCHAR,ULONG,PUCHAR,ULONG,PULONG);
2595 NTSYSAPI NTSTATUS WINAPI RtlDeleteAce(PACL,DWORD);
2596 NTSYSAPI NTSTATUS WINAPI RtlDeleteAtomFromAtomTable(RTL_ATOM_TABLE,RTL_ATOM);
2598 NTSYSAPI NTSTATUS WINAPI RtlDeleteRegistryValue(ULONG, PCWSTR, PCWSTR);
2599 NTSYSAPI void WINAPI RtlDeleteResource(LPRTL_RWLOCK);
2600 NTSYSAPI NTSTATUS WINAPI RtlDeleteSecurityObject(PSECURITY_DESCRIPTOR*);
2601 NTSYSAPI NTSTATUS WINAPI RtlDeleteTimer(HANDLE, HANDLE, HANDLE);
2602 NTSYSAPI NTSTATUS WINAPI RtlDeleteTimerQueueEx(HANDLE, HANDLE);
2603 NTSYSAPI PRTL_USER_PROCESS_PARAMETERS WINAPI RtlDeNormalizeProcessParams(RTL_USER_PROCESS_PARAMETERS*);
2604 NTSYSAPI NTSTATUS WINAPI RtlDeregisterWait(HANDLE);
2605 NTSYSAPI NTSTATUS WINAPI RtlDeregisterWaitEx(HANDLE,HANDLE);
2606 NTSYSAPI NTSTATUS WINAPI RtlDestroyAtomTable(RTL_ATOM_TABLE);
2607 NTSYSAPI NTSTATUS WINAPI RtlDestroyEnvironment(PWSTR);
2609 NTSYSAPI HANDLE WINAPI RtlDestroyHeap(HANDLE);
2610 NTSYSAPI void WINAPI RtlDestroyProcessParameters(RTL_USER_PROCESS_PARAMETERS*);
2611 NTSYSAPI NTSTATUS WINAPI RtlDestroyQueryDebugBuffer(PDEBUG_BUFFER);
2614 NTSYSAPI BOOLEAN WINAPI RtlDoesFileExists_U(LPCWSTR);
2615 NTSYSAPI BOOLEAN WINAPI RtlDosPathNameToNtPathName_U(PCWSTR,PUNICODE_STRING,PWSTR*,CURDIR*);
2616 NTSYSAPI ULONG WINAPI RtlDosSearchPath_U(LPCWSTR, LPCWSTR, LPCWSTR, ULONG, LPWSTR, LPWSTR*);
2618 NTSYSAPI NTSTATUS WINAPI RtlDowncaseUnicodeString(UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
2619 NTSYSAPI void WINAPI RtlDumpResource(LPRTL_RWLOCK);
2620 NTSYSAPI NTSTATUS WINAPI RtlDuplicateUnicodeString(int,const UNICODE_STRING*,UNICODE_STRING*);
2621 NTSYSAPI NTSTATUS WINAPI RtlEmptyAtomTable(RTL_ATOM_TABLE,BOOLEAN);
2622 NTSYSAPI PVOID WINAPI RtlEncodePointer(PVOID);
2623 NTSYSAPI NTSTATUS WINAPI RtlEnterCriticalSection(RTL_CRITICAL_SECTION *);
2624 NTSYSAPI void WINAPI RtlEraseUnicodeString(UNICODE_STRING*);
2625 NTSYSAPI NTSTATUS WINAPI RtlEqualComputerName(const UNICODE_STRING*,const UNICODE_STRING*);
2626 NTSYSAPI NTSTATUS WINAPI RtlEqualDomainName(const UNICODE_STRING*,const UNICODE_STRING*);
2627 NTSYSAPI BOOLEAN WINAPI RtlEqualLuid(const LUID*,const LUID*);
2629 NTSYSAPI BOOL WINAPI RtlEqualSid(PSID,PSID);
2630 NTSYSAPI BOOLEAN WINAPI RtlEqualString(const STRING*,const STRING*,BOOLEAN);
2631 NTSYSAPI BOOLEAN WINAPI RtlEqualUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
2634 NTSYSAPI NTSTATUS WINAPI RtlExpandEnvironmentStrings_U(PCWSTR, const UNICODE_STRING*, UNICODE_STRING*, ULONG*);
2635 NTSYSAPI NTSTATUS WINAPI RtlFindActivationContextSectionString(ULONG,const GUID*,ULONG,const UNICODE_STRING*,PVOID);
2636 NTSYSAPI NTSTATUS WINAPI RtlFindActivationContextSectionGuid(ULONG,const GUID*,ULONG,const GUID*,PVOID);
2637 NTSYSAPI NTSTATUS WINAPI RtlFindCharInUnicodeString(int,const UNICODE_STRING*,const UNICODE_STRING*,USHORT*);
2638 NTSYSAPI ULONG WINAPI RtlFindClearBits(PCRTL_BITMAP,ULONG,ULONG);
2639 NTSYSAPI ULONG WINAPI RtlFindClearBitsAndSet(PRTL_BITMAP,ULONG,ULONG);
2640 NTSYSAPI ULONG WINAPI RtlFindClearRuns(PCRTL_BITMAP,PRTL_BITMAP_RUN,ULONG,BOOLEAN);
2641 NTSYSAPI ULONG WINAPI RtlFindLastBackwardRunSet(PCRTL_BITMAP,ULONG,PULONG);
2642 NTSYSAPI ULONG WINAPI RtlFindLastBackwardRunClear(PCRTL_BITMAP,ULONG,PULONG);
2644 NTSYSAPI ULONG WINAPI RtlFindLongestRunSet(PCRTL_BITMAP,PULONG);
2645 NTSYSAPI ULONG WINAPI RtlFindLongestRunClear(PCRTL_BITMAP,PULONG);
2646 NTSYSAPI NTSTATUS WINAPI RtlFindMessage(HMODULE,ULONG,ULONG,ULONG,const MESSAGE_RESOURCE_ENTRY**);
2648 NTSYSAPI ULONG WINAPI RtlFindNextForwardRunSet(PCRTL_BITMAP,ULONG,PULONG);
2649 NTSYSAPI ULONG WINAPI RtlFindNextForwardRunClear(PCRTL_BITMAP,ULONG,PULONG);
2650 NTSYSAPI ULONG WINAPI RtlFindSetBits(PCRTL_BITMAP,ULONG,ULONG);
2651 NTSYSAPI ULONG WINAPI RtlFindSetBitsAndClear(PRTL_BITMAP,ULONG,ULONG);
2652 NTSYSAPI ULONG WINAPI RtlFindSetRuns(PCRTL_BITMAP,PRTL_BITMAP_RUN,ULONG,BOOLEAN);
2653 NTSYSAPI BOOLEAN WINAPI RtlFirstFreeAce(PACL,PACE_HEADER *);
2654 NTSYSAPI NTSTATUS WINAPI RtlFormatCurrentUserKeyPath(PUNICODE_STRING);
2655 NTSYSAPI NTSTATUS WINAPI RtlFormatMessage(LPWSTR,UCHAR,BOOLEAN,BOOLEAN,BOOLEAN,__ms_va_list *,LPWSTR,ULONG);
2656 NTSYSAPI void WINAPI RtlFreeAnsiString(PANSI_STRING);
2657 NTSYSAPI BOOLEAN WINAPI RtlFreeHandle(RTL_HANDLE_TABLE *,RTL_HANDLE *);
2658 NTSYSAPI BOOLEAN WINAPI RtlFreeHeap(HANDLE,ULONG,PVOID);
2659 NTSYSAPI void WINAPI RtlFreeOemString(POEM_STRING);
2660 NTSYSAPI DWORD WINAPI RtlFreeSid(PSID);
2662 NTSYSAPI void WINAPI RtlFreeUnicodeString(PUNICODE_STRING);
2663 NTSYSAPI NTSTATUS WINAPI RtlGetAce(PACL,DWORD,LPVOID *);
2665 NTSYSAPI NTSTATUS WINAPI RtlGetCompressionWorkSpaceSize(USHORT,PULONG,PULONG);
2667 NTSYSAPI NTSTATUS WINAPI RtlGetCurrentDirectory_U(ULONG, LPWSTR);
2669 NTSYSAPI NTSTATUS WINAPI RtlGetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR,PBOOLEAN,PACL *,PBOOLEAN);
2670 NTSYSAPI ULONG WINAPI RtlGetFullPathName_U(PCWSTR,ULONG,PWSTR,PWSTR*);
2671 NTSYSAPI NTSTATUS WINAPI RtlGetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID *,PBOOLEAN);
2672 NTSYSAPI NTSTATUS WINAPI RtlGetLastNtStatus(void);
2675 NTSYSAPI ULONG WINAPI RtlGetNtGlobalFlags(void);
2676 NTSYSAPI BOOLEAN WINAPI RtlGetNtProductType(LPDWORD);
2677 NTSYSAPI NTSTATUS WINAPI RtlGetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID *,PBOOLEAN);
2678 NTSYSAPI ULONG WINAPI RtlGetProcessHeaps(ULONG,HANDLE*);
2680 NTSYSAPI NTSTATUS WINAPI RtlGetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR,PBOOLEAN,PACL *,PBOOLEAN);
2682 NTSYSAPI NTSTATUS WINAPI RtlGUIDFromString(PUNICODE_STRING,GUID*);
2684 NTSYSAPI PVOID WINAPI RtlImageDirectoryEntryToData(HMODULE,BOOL,WORD,ULONG *);
2687 NTSYSAPI PVOID WINAPI RtlImageRvaToVa(const IMAGE_NT_HEADERS *,HMODULE,DWORD,IMAGE_SECTION_HEADER **);
2689 NTSYSAPI void WINAPI RtlInitString(PSTRING,PCSZ);
2690 NTSYSAPI void WINAPI RtlInitAnsiString(PANSI_STRING,PCSZ);
2691 NTSYSAPI NTSTATUS WINAPI RtlInitAnsiStringEx(PANSI_STRING,PCSZ);
2692 NTSYSAPI void WINAPI RtlInitUnicodeString(PUNICODE_STRING,PCWSTR);
2693 NTSYSAPI NTSTATUS WINAPI RtlInitUnicodeStringEx(PUNICODE_STRING,PCWSTR);
2694 NTSYSAPI void WINAPI RtlInitializeBitMap(PRTL_BITMAP,PULONG,ULONG);
2696 NTSYSAPI NTSTATUS WINAPI RtlInitializeCriticalSection(RTL_CRITICAL_SECTION *);
2697 NTSYSAPI NTSTATUS WINAPI RtlInitializeCriticalSectionAndSpinCount(RTL_CRITICAL_SECTION *,ULONG);
2698 NTSYSAPI NTSTATUS WINAPI RtlInitializeCriticalSectionEx(RTL_CRITICAL_SECTION *,ULONG,ULONG);
2699 NTSYSAPI void WINAPI RtlInitializeHandleTable(ULONG,ULONG,RTL_HANDLE_TABLE *);
2700 NTSYSAPI void WINAPI RtlInitializeResource(LPRTL_RWLOCK);
2703 NTSYSAPI NTSTATUS WINAPI RtlInt64ToUnicodeString(ULONGLONG,ULONG,UNICODE_STRING *);
2704 NTSYSAPI NTSTATUS WINAPI RtlIntegerToChar(ULONG,ULONG,ULONG,PCHAR);
2705 NTSYSAPI NTSTATUS WINAPI RtlIntegerToUnicodeString(ULONG,ULONG,UNICODE_STRING *);
2707 NTSYSAPI BOOL WINAPI RtlIsCriticalSectionLocked(RTL_CRITICAL_SECTION *);
2708 NTSYSAPI BOOL WINAPI RtlIsCriticalSectionLockedByThread(RTL_CRITICAL_SECTION *);
2709 NTSYSAPI ULONG WINAPI RtlIsDosDeviceName_U(PCWSTR);
2710 NTSYSAPI BOOLEAN WINAPI RtlIsNameLegalDOS8Dot3(const UNICODE_STRING*,POEM_STRING,PBOOLEAN);
2711 NTSYSAPI BOOLEAN WINAPI RtlIsTextUnicode(LPCVOID,INT,INT *);
2712 NTSYSAPI BOOLEAN WINAPI RtlIsValidHandle(const RTL_HANDLE_TABLE *, const RTL_HANDLE *);
2713 NTSYSAPI BOOLEAN WINAPI RtlIsValidIndexHandle(const RTL_HANDLE_TABLE *, ULONG Index, RTL_HANDLE **);
2714 NTSYSAPI NTSTATUS WINAPI RtlLeaveCriticalSection(RTL_CRITICAL_SECTION *);
2715 NTSYSAPI DWORD WINAPI RtlLengthRequiredSid(DWORD);
2716 NTSYSAPI ULONG WINAPI RtlLengthSecurityDescriptor(PSECURITY_DESCRIPTOR);
2717 NTSYSAPI DWORD WINAPI RtlLengthSid(PSID);
2719 NTSYSAPI BOOLEAN WINAPI RtlLockHeap(HANDLE);
2720 NTSYSAPI NTSTATUS WINAPI RtlLookupAtomInAtomTable(RTL_ATOM_TABLE,const WCHAR*,RTL_ATOM*);
2721 NTSYSAPI NTSTATUS WINAPI RtlMakeSelfRelativeSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,LPDWORD);
2723 NTSYSAPI NTSTATUS WINAPI RtlMultiByteToUnicodeN(LPWSTR,DWORD,LPDWORD,LPCSTR,DWORD);
2724 NTSYSAPI NTSTATUS WINAPI RtlMultiByteToUnicodeSize(DWORD*,LPCSTR,UINT);
2725 NTSYSAPI NTSTATUS WINAPI RtlNewSecurityObject(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR*,BOOLEAN,HANDLE,PGENERIC_MAPPING);
2726 NTSYSAPI PRTL_USER_PROCESS_PARAMETERS WINAPI RtlNormalizeProcessParams(RTL_USER_PROCESS_PARAMETERS*);
2727 NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS);
2729 NTSYSAPI ULONG WINAPI RtlNumberOfSetBits(PCRTL_BITMAP);
2730 NTSYSAPI ULONG WINAPI RtlNumberOfClearBits(PCRTL_BITMAP);
2732 NTSYSAPI NTSTATUS WINAPI RtlOemStringToUnicodeString(UNICODE_STRING*,const STRING*,BOOLEAN);
2733 NTSYSAPI NTSTATUS WINAPI RtlOemToUnicodeN(LPWSTR,DWORD,LPDWORD,LPCSTR,DWORD);
2734 NTSYSAPI NTSTATUS WINAPI RtlOpenCurrentUser(ACCESS_MASK,PHANDLE);
2735 NTSYSAPI PVOID WINAPI RtlPcToFileHeader(PVOID,PVOID*);
2736 NTSYSAPI NTSTATUS WINAPI RtlPinAtomInAtomTable(RTL_ATOM_TABLE,RTL_ATOM);
2737 NTSYSAPI BOOLEAN WINAPI RtlPrefixString(const STRING*,const STRING*,BOOLEAN);
2738 NTSYSAPI BOOLEAN WINAPI RtlPrefixUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
2739 NTSYSAPI NTSTATUS WINAPI RtlQueryAtomInAtomTable(RTL_ATOM_TABLE,RTL_ATOM,ULONG*,ULONG*,WCHAR*,ULONG*);
2741 NTSYSAPI NTSTATUS WINAPI RtlQueryEnvironmentVariable_U(PWSTR,PUNICODE_STRING,PUNICODE_STRING);
2743 NTSYSAPI NTSTATUS WINAPI RtlQueryInformationAcl(PACL,LPVOID,DWORD,ACL_INFORMATION_CLASS);
2744 NTSYSAPI NTSTATUS WINAPI RtlQueryInformationActivationContext(ULONG,HANDLE,PVOID,ULONG,PVOID,SIZE_T,SIZE_T*);
2745 NTSYSAPI NTSTATUS WINAPI RtlQueryProcessDebugInformation(ULONG,ULONG,PDEBUG_BUFFER);
2746 NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID);
2748 NTSYSAPI NTSTATUS WINAPI RtlQueryUnbiasedInterruptTime(ULONGLONG*);
2751 NTSYSAPI void WINAPI RtlRaiseStatus(NTSTATUS);
2752 NTSYSAPI ULONG WINAPI RtlRandom(PULONG);
2753 NTSYSAPI PVOID WINAPI RtlReAllocateHeap(HANDLE,ULONG,PVOID,SIZE_T);
2754 NTSYSAPI NTSTATUS WINAPI RtlRegisterWait(PHANDLE,HANDLE,RTL_WAITORTIMERCALLBACKFUNC,PVOID,ULONG,ULONG);
2756 NTSYSAPI void WINAPI RtlReleasePebLock(void);
2757 NTSYSAPI void WINAPI RtlReleaseResource(LPRTL_RWLOCK);
2758 NTSYSAPI void WINAPI RtlReleaseSRWLockExclusive(RTL_SRWLOCK*);
2759 NTSYSAPI void WINAPI RtlReleaseSRWLockShared(RTL_SRWLOCK*);
2762 NTSYSAPI void WINAPI RtlSecondsSince1970ToTime(DWORD,LARGE_INTEGER *);
2763 NTSYSAPI void WINAPI RtlSecondsSince1980ToTime(DWORD,LARGE_INTEGER *);
2764 NTSYSAPI NTSTATUS WINAPI RtlSelfRelativeToAbsoluteSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PDWORD,PACL,PDWORD,PACL,PDWORD,PSID,PDWORD,PSID,PDWORD);
2765 NTSYSAPI void WINAPI RtlSetAllBits(PRTL_BITMAP);
2766 NTSYSAPI void WINAPI RtlSetBits(PRTL_BITMAP,ULONG,ULONG);
2767 NTSYSAPI ULONG WINAPI RtlSetCriticalSectionSpinCount(RTL_CRITICAL_SECTION*,ULONG);
2768 NTSYSAPI NTSTATUS WINAPI RtlSetControlSecurityDescriptor(PSECURITY_DESCRIPTOR,SECURITY_DESCRIPTOR_CONTROL,SECURITY_DESCRIPTOR_CONTROL);
2769 NTSYSAPI NTSTATUS WINAPI RtlSetCurrentDirectory_U(const UNICODE_STRING*);
2770 NTSYSAPI void WINAPI RtlSetCurrentEnvironment(PWSTR, PWSTR*);
2771 NTSYSAPI NTSTATUS WINAPI RtlSetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR,BOOLEAN,PACL,BOOLEAN);
2772 NTSYSAPI NTSTATUS WINAPI RtlSetEnvironmentVariable(PWSTR*,PUNICODE_STRING,PUNICODE_STRING);
2773 NTSYSAPI NTSTATUS WINAPI RtlSetHeapInformation(HANDLE,HEAP_INFORMATION_CLASS,PVOID,SIZE_T);
2774 NTSYSAPI NTSTATUS WINAPI RtlSetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID,BOOLEAN);
2775 NTSYSAPI NTSTATUS WINAPI RtlSetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID,BOOLEAN);
2779 NTSYSAPI NTSTATUS WINAPI RtlSetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR,BOOLEAN,PACL,BOOLEAN);
2780 NTSYSAPI NTSTATUS WINAPI RtlSetThreadErrorMode(DWORD,LPDWORD);
2781 NTSYSAPI NTSTATUS WINAPI RtlSetTimeZoneInformation(const RTL_TIME_ZONE_INFORMATION*);
2782 NTSYSAPI SIZE_T WINAPI RtlSizeHeap(HANDLE,ULONG,const void*);
2783 NTSYSAPI NTSTATUS WINAPI RtlSleepConditionVariableCS(RTL_CONDITION_VARIABLE*,RTL_CRITICAL_SECTION*,const LARGE_INTEGER*);
2784 NTSYSAPI NTSTATUS WINAPI RtlSleepConditionVariableSRW(RTL_CONDITION_VARIABLE*,RTL_SRWLOCK*,const LARGE_INTEGER*,ULONG);
2785 NTSYSAPI NTSTATUS WINAPI RtlStringFromGUID(REFGUID,PUNICODE_STRING);
2786