999f544edb2bdbfc896f1c0ef77ced00cdcd8daa
[reactos.git] / sdk / include / reactos / wine / winternl.h
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 {
35 NotificationTimer,
36 SynchronizationTimer
37 } TIMER_TYPE;
38 typedef enum _EVENT_TYPE {
39 NotificationEvent,
40 SynchronizationEvent
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;
66 USHORT MaximumLength;
67 PCHAR Buffer;
68 } STRING, *PSTRING;
69 #endif
70
71 typedef STRING ANSI_STRING;
72 typedef PSTRING PANSI_STRING;
73 typedef const STRING *PCANSI_STRING;
74
75 typedef STRING OEM_STRING;
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;
85 } UNICODE_STRING, *PUNICODE_STRING;
86 #endif
87
88 typedef const UNICODE_STRING *PCUNICODE_STRING;
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
96 DWORD dwHighDateTime;
97 DWORD dwLowDateTime;
98 #else
99 DWORD dwLowDateTime;
100 DWORD dwHighDateTime;
101 #endif
102 } FILETIME, *PFILETIME, *LPFILETIME;
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 {
114 WORD wYear;
115 WORD wMonth;
116 WORD wDayOfWeek;
117 WORD wDay;
118 WORD wHour;
119 WORD wMinute;
120 WORD wSecond;
121 WORD wMilliseconds;
122 } RTL_SYSTEM_TIME, *PRTL_SYSTEM_TIME;
123
124 typedef struct _RTL_TIME_ZONE_INFORMATION {
125 LONG Bias;
126 WCHAR StandardName[32];
127 RTL_SYSTEM_TIME StandardDate;
128 LONG StandardBias;
129 WCHAR DaylightName[32];
130 RTL_SYSTEM_TIME DaylightDate;
131 LONG DaylightBias;
132 } RTL_TIME_ZONE_INFORMATION, *PRTL_TIME_ZONE_INFORMATION;
133
134 typedef struct _RTL_TIME_DYNAMIC_ZONE_INFORMATION
135 {
136 LONG Bias;
137 WCHAR StandardName[32];
138 RTL_SYSTEM_TIME StandardDate;
139 LONG StandardBias;
140 WCHAR DaylightName[32];
141 RTL_SYSTEM_TIME DaylightDate;
142 LONG DaylightBias;
143 WCHAR TimeZoneKeyName[128];
144 BOOLEAN DynamicDaylightTimeDisabled;
145 } RTL_DYNAMIC_TIME_ZONE_INFORMATION, *PRTL_DYNAMIC_TIME_ZONE_INFORMATION;
146
147 typedef struct _CLIENT_ID
148 {
149 HANDLE UniqueProcess;
150 HANDLE UniqueThread;
151 } CLIENT_ID, *PCLIENT_ID;
152
153 typedef struct _CURDIR
154 {
155 UNICODE_STRING DosPath;
156 PVOID Handle;
157 } CURDIR, *PCURDIR;
158
159 typedef struct RTL_DRIVE_LETTER_CURDIR
160 {
161 USHORT Flags;
162 USHORT Length;
163 ULONG TimeStamp;
164 UNICODE_STRING DosPath;
165 } RTL_DRIVE_LETTER_CURDIR, *PRTL_DRIVE_LETTER_CURDIR;
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 */
170 } RTL_BITMAP, *PRTL_BITMAP;
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 */
177 } RTL_BITMAP_RUN, *PRTL_BITMAP_RUN;
178
179 typedef const RTL_BITMAP_RUN *PCRTL_BITMAP_RUN;
180
181 typedef struct _RTL_USER_PROCESS_PARAMETERS
182 {
183 ULONG AllocationSize;
184 ULONG Size;
185 ULONG Flags;
186 ULONG DebugFlags;
187 HANDLE ConsoleHandle;
188 ULONG ConsoleFlags;
189 HANDLE hStdInput;
190 HANDLE hStdOutput;
191 HANDLE hStdError;
192 CURDIR CurrentDirectory;
193 UNICODE_STRING DllPath;
194 UNICODE_STRING ImagePathName;
195 UNICODE_STRING CommandLine;
196 PWSTR Environment;
197 ULONG dwX;
198 ULONG dwY;
199 ULONG dwXSize;
200 ULONG dwYSize;
201 ULONG dwXCountChars;
202 ULONG dwYCountChars;
203 ULONG dwFillAttribute;
204 ULONG dwFlags;
205 ULONG wShowWindow;
206 UNICODE_STRING WindowTitle;
207 UNICODE_STRING Desktop;
208 UNICODE_STRING ShellInfo;
209 UNICODE_STRING RuntimeInfo;
210 RTL_DRIVE_LETTER_CURDIR DLCurrentDirectory[0x20];
211 } RTL_USER_PROCESS_PARAMETERS, *PRTL_USER_PROCESS_PARAMETERS;
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;
219 BOOLEAN Initialized;
220 PVOID SsHandle;
221 LIST_ENTRY InLoadOrderModuleList;
222 LIST_ENTRY InMemoryOrderModuleList;
223 LIST_ENTRY InInitializationOrderModuleList;
224 PVOID EntryInProgress;
225 } PEB_LDR_DATA, *PPEB_LDR_DATA;
226
227 typedef struct _GDI_TEB_BATCH
228 {
229 ULONG Offset;
230 HANDLE HDC;
231 ULONG Buffer[0x136];
232 } GDI_TEB_BATCH;
233
234 typedef struct _RTL_ACTIVATION_CONTEXT_STACK_FRAME
235 {
236 struct _RTL_ACTIVATION_CONTEXT_STACK_FRAME *Previous;
237 struct _ACTIVATION_CONTEXT *ActivationContext;
238 ULONG Flags;
239 } RTL_ACTIVATION_CONTEXT_STACK_FRAME, *PRTL_ACTIVATION_CONTEXT_STACK_FRAME;
240
241 typedef struct _ACTIVATION_CONTEXT_STACK
242 {
243 ULONG Flags;
244 ULONG NextCookieSequenceNumber;
245 RTL_ACTIVATION_CONTEXT_STACK_FRAME *ActiveFrame;
246 LIST_ENTRY FrameListCache;
247 } ACTIVATION_CONTEXT_STACK, *PACTIVATION_CONTEXT_STACK;
248
249 typedef struct _TEB_ACTIVE_FRAME_CONTEXT
250 {
251 ULONG Flags;
252 const char *FrameName;
253 } TEB_ACTIVE_FRAME_CONTEXT, *PTEB_ACTIVE_FRAME_CONTEXT;
254
255 typedef struct _TEB_ACTIVE_FRAME_CONTEXT_EX
256 {
257 TEB_ACTIVE_FRAME_CONTEXT BasicContext;
258 const char *SourceLocation;
259 } TEB_ACTIVE_FRAME_CONTEXT_EX, *PTEB_ACTIVE_FRAME_CONTEXT_EX;
260
261 typedef struct _TEB_ACTIVE_FRAME
262 {
263 ULONG Flags;
264 struct _TEB_ACTIVE_FRAME *Previous;
265 TEB_ACTIVE_FRAME_CONTEXT *Context;
266 } TEB_ACTIVE_FRAME, *PTEB_ACTIVE_FRAME;
267
268 typedef struct _TEB_ACTIVE_FRAME_EX
269 {
270 TEB_ACTIVE_FRAME BasicFrame;
271 void *ExtensionIdentifier;
272 } TEB_ACTIVE_FRAME_EX, *PTEB_ACTIVE_FRAME_EX;
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 */
289 RTL_USER_PROCESS_PARAMETERS *ProcessParameters; /* 010/020 */
290 PVOID SubSystemData; /* 014/028 */
291 HANDLE ProcessHeap; /* 018/030 */
292 PRTL_CRITICAL_SECTION FastPebLock; /* 01c/038 */
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 */
310 LARGE_INTEGER CriticalSectionTimeout; /* 070/0c0 */
311 SIZE_T HeapSegmentReserve; /* 078/0c8 */
312 SIZE_T HeapSegmentCommit; /* 07c/0d0 */
313 SIZE_T HeapDeCommitTotalFreeThreshold; /* 080/0d8 */
314 SIZE_T HeapDeCommitFreeBlockThreshold; /* 084/0e0 */
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 */
327 ULONG ImageSubSystemMajorVersion; /* 0b8/12c */
328 ULONG ImageSubSystemMinorVersion; /* 0bc/130 */
329 ULONG ImageProcessAffinityMask; /* 0c0/134 */
330 HANDLE GdiHandleBuffer[28]; /* 0c4/138 */
331 ULONG unknown[6]; /* 134/218 */
332 PVOID PostProcessInitRoutine; /* 14c/230 */
333 PRTL_BITMAP TlsExpansionBitmap; /* 150/238 */
334 ULONG TlsExpansionBitmapBits[32]; /* 154/240 */
335 ULONG SessionId; /* 1d4/2c0 */
336 ULARGE_INTEGER AppCompatFlags; /* 1d8/2c8 */
337 ULARGE_INTEGER AppCompatFlagsUser; /* 1e0/2d0 */
338 PVOID ShimData; /* 1e8/2d8 */
339 PVOID AppCompatInfo; /* 1ec/2e0 */
340 UNICODE_STRING CSDVersion; /* 1f0/2e8 */
341 PVOID ActivationContextData; /* 1f8/2f8 */
342 PVOID ProcessAssemblyStorageMap; /* 1fc/300 */
343 PVOID SystemDefaultActivationData; /* 200/308 */
344 PVOID SystemAssemblyStorageMap; /* 204/310 */
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 */
374 ACTIVATION_CONTEXT_STACK ActivationContextStack; /* 1a8/02c8 */
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 */
424 PVOID CurrentTransactionHandle; /* fac/17b8 */
425 TEB_ACTIVE_FRAME *ActiveFrame; /* fb0/17c0 */
426 PVOID *FlsSlots; /* fb4/17c8 */
427 } TEB, *PTEB;
428
429 /***********************************************************************
430 * Enums
431 */
432
433 typedef enum _FILE_INFORMATION_CLASS {
434 FileDirectoryInformation = 1,
435 FileFullDirectoryInformation,
436 FileBothDirectoryInformation,
437 FileBasicInformation,
438 FileStandardInformation,
439 FileInternalInformation,
440 FileEaInformation,
441 FileAccessInformation,
442 FileNameInformation,
443 FileRenameInformation,
444 FileLinkInformation,
445 FileNamesInformation,
446 FileDispositionInformation,
447 FilePositionInformation,
448 FileFullEaInformation,
449 FileModeInformation,
450 FileAlignmentInformation,
451 FileAllInformation,
452 FileAllocationInformation,
453 FileEndOfFileInformation,
454 FileAlternateNameInformation,
455 FileStreamInformation,
456 FilePipeInformation,
457 FilePipeLocalInformation,
458 FilePipeRemoteInformation,
459 FileMailslotQueryInformation,
460 FileMailslotSetInformation,
461 FileCompressionInformation,
462 FileObjectIdInformation,
463 FileCompletionInformation,
464 FileMoveClusterInformation,
465 FileQuotaInformation,
466 FileReparsePointInformation,
467 FileNetworkOpenInformation,
468 FileAttributeTagInformation,
469 FileTrackingInformation,
470 FileIdBothDirectoryInformation,
471 FileIdFullDirectoryInformation,
472 FileValidDataLengthInformation,
473 FileShortNameInformation,
474 FileIoCompletionNotificationInformation,
475 FileIoStatusBlockRangeInformation,
476 FileIoPriorityHintInformation,
477 FileSfioReserveInformation,
478 FileSfioVolumeInformation,
479 FileHardLinkInformation,
480 FileProcessIdsUsingFileInformation,
481 FileNormalizedNameInformation,
482 FileNetworkPhysicalNameInformation,
483 FileIdGlobalTxDirectoryInformation,
484 FileIsRemoteDeviceInformation,
485 FileAttributeCacheInformation,
486 FileNumaNodeInformation,
487 FileStandardLinkInformation,
488 FileRemoteProtocolInformation,
489 FileRenameInformationBypassAccessCheck,
490 FileLinkInformationBypassAccessCheck,
491 FileVolumeNameInformation,
492 FileIdInformation,
493 FileIdExtdDirectoryInformation,
494 FileReplaceCompletionInformation,
495 FileHardLinkFullIdInformation,
496 FileIdExtdBothDirectoryInformation,
497 FileMaximumInformation
498 } FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS;
499
500 typedef struct _FILE_DIRECTORY_INFORMATION {
501 ULONG NextEntryOffset;
502 ULONG FileIndex;
503 LARGE_INTEGER CreationTime;
504 LARGE_INTEGER LastAccessTime;
505 LARGE_INTEGER LastWriteTime;
506 LARGE_INTEGER ChangeTime;
507 LARGE_INTEGER EndOfFile;
508 LARGE_INTEGER AllocationSize;
509 ULONG FileAttributes;
510 ULONG FileNameLength;
511 WCHAR FileName[ANYSIZE_ARRAY];
512 } FILE_DIRECTORY_INFORMATION, *PFILE_DIRECTORY_INFORMATION;
513
514 typedef struct _FILE_FULL_DIRECTORY_INFORMATION {
515 ULONG NextEntryOffset;
516 ULONG FileIndex;
517 LARGE_INTEGER CreationTime;
518 LARGE_INTEGER LastAccessTime;
519 LARGE_INTEGER LastWriteTime;
520 LARGE_INTEGER ChangeTime;
521 LARGE_INTEGER EndOfFile;
522 LARGE_INTEGER AllocationSize;
523 ULONG FileAttributes;
524 ULONG FileNameLength;
525 ULONG EaSize;
526 WCHAR FileName[ANYSIZE_ARRAY];
527 } FILE_FULL_DIRECTORY_INFORMATION, *PFILE_FULL_DIRECTORY_INFORMATION,
528 FILE_FULL_DIR_INFORMATION, *PFILE_FULL_DIR_INFORMATION;
529
530 typedef struct _FILE_ID_FULL_DIRECTORY_INFORMATION {
531 ULONG NextEntryOffset;
532 ULONG FileIndex;
533 LARGE_INTEGER CreationTime;
534 LARGE_INTEGER LastAccessTime;
535 LARGE_INTEGER LastWriteTime;
536 LARGE_INTEGER ChangeTime;
537 LARGE_INTEGER EndOfFile;
538 LARGE_INTEGER AllocationSize;
539 ULONG FileAttributes;
540 ULONG FileNameLength;
541 ULONG EaSize;
542 LARGE_INTEGER FileId;
543 WCHAR FileName[ANYSIZE_ARRAY];
544 } FILE_ID_FULL_DIRECTORY_INFORMATION, *PFILE_ID_FULL_DIRECTORY_INFORMATION;
545
546 typedef struct _FILE_BOTH_DIRECTORY_INFORMATION {
547 ULONG NextEntryOffset;
548 ULONG FileIndex;
549 LARGE_INTEGER CreationTime;
550 LARGE_INTEGER LastAccessTime;
551 LARGE_INTEGER LastWriteTime;
552 LARGE_INTEGER ChangeTime;
553 LARGE_INTEGER EndOfFile;
554 LARGE_INTEGER AllocationSize;
555 ULONG FileAttributes;
556 ULONG FileNameLength;
557 ULONG EaSize;
558 CHAR ShortNameLength;
559 WCHAR ShortName[12];
560 WCHAR FileName[ANYSIZE_ARRAY];
561 } FILE_BOTH_DIRECTORY_INFORMATION, *PFILE_BOTH_DIRECTORY_INFORMATION,
562 FILE_BOTH_DIR_INFORMATION, *PFILE_BOTH_DIR_INFORMATION;
563
564 typedef struct _FILE_ID_BOTH_DIRECTORY_INFORMATION {
565 ULONG NextEntryOffset;
566 ULONG FileIndex;
567 LARGE_INTEGER CreationTime;
568 LARGE_INTEGER LastAccessTime;
569 LARGE_INTEGER LastWriteTime;
570 LARGE_INTEGER ChangeTime;
571 LARGE_INTEGER EndOfFile;
572 LARGE_INTEGER AllocationSize;
573 ULONG FileAttributes;
574 ULONG FileNameLength;
575 ULONG EaSize;
576 CHAR ShortNameLength;
577 WCHAR ShortName[12];
578 LARGE_INTEGER FileId;
579 WCHAR FileName[ANYSIZE_ARRAY];
580 } FILE_ID_BOTH_DIRECTORY_INFORMATION, *PFILE_ID_BOTH_DIRECTORY_INFORMATION;
581
582 typedef struct _FILE_ID_GLOBAL_TX_DIR_INFORMATION {
583 ULONG NextEntryOffset;
584 ULONG FileIndex;
585 LARGE_INTEGER CreationTime;
586 LARGE_INTEGER LastAccessTime;
587 LARGE_INTEGER LastWriteTime;
588 LARGE_INTEGER ChangeTime;
589 LARGE_INTEGER EndOfFile;
590 LARGE_INTEGER AllocationSize;
591 ULONG FileAttributes;
592 ULONG FileNameLength;
593 LARGE_INTEGER FileId;
594 GUID LockingTransactionId;
595 ULONG TxInfoFlags;
596 WCHAR FileName[ANYSIZE_ARRAY];
597 } FILE_ID_GLOBAL_TX_DIR_INFORMATION, *PFILE_ID_GLOBAL_TX_DIR_INFORMATION;
598
599 typedef struct _FILE_BASIC_INFORMATION {
600 LARGE_INTEGER CreationTime;
601 LARGE_INTEGER LastAccessTime;
602 LARGE_INTEGER LastWriteTime;
603 LARGE_INTEGER ChangeTime;
604 ULONG FileAttributes;
605 } FILE_BASIC_INFORMATION, *PFILE_BASIC_INFORMATION;
606
607 typedef struct _FILE_STANDARD_INFORMATION {
608 LARGE_INTEGER AllocationSize;
609 LARGE_INTEGER EndOfFile;
610 ULONG NumberOfLinks;
611 BOOLEAN DeletePending;
612 BOOLEAN Directory;
613 } FILE_STANDARD_INFORMATION, *PFILE_STANDARD_INFORMATION;
614
615 typedef struct _FILE_INTERNAL_INFORMATION {
616 LARGE_INTEGER IndexNumber;
617 } FILE_INTERNAL_INFORMATION, *PFILE_INTERNAL_INFORMATION;
618
619 typedef struct _FILE_ID_128 {
620 UCHAR Identifier[16];
621 } FILE_ID_128, *PFILE_ID_128;
622
623 typedef struct _FILE_ID_INFORMATION {
624 ULONGLONG VolumeSerialNumber;
625 FILE_ID_128 FileId;
626 } FILE_ID_INFORMATION, *PFILE_ID_INFORMATION;
627
628 typedef struct _FILE_EA_INFORMATION {
629 ULONG EaSize;
630 } FILE_EA_INFORMATION, *PFILE_EA_INFORMATION;
631
632 typedef struct _FILE_ACCESS_INFORMATION {
633 ACCESS_MASK AccessFlags;
634 } FILE_ACCESS_INFORMATION, *PFILE_ACCESS_INFORMATION;
635
636 typedef struct _FILE_NAME_INFORMATION {
637 ULONG FileNameLength;
638 WCHAR FileName[1];
639 } FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION;
640
641 typedef struct _FILE_RENAME_INFORMATION {
642 BOOLEAN Replace;
643 HANDLE RootDir;
644 ULONG FileNameLength;
645 WCHAR FileName[1];
646 } FILE_RENAME_INFORMATION, *PFILE_RENAME_INFORMATION;
647
648 typedef struct _FILE_LINK_INFORMATION {
649 BOOLEAN ReplaceIfExists;
650 HANDLE RootDirectory;
651 ULONG FileNameLength;
652 WCHAR FileName[1];
653 } FILE_LINK_INFORMATION, *PFILE_LINK_INFORMATION;
654
655 typedef struct _FILE_NAMES_INFORMATION {
656 ULONG NextEntryOffset;
657 ULONG FileIndex;
658 ULONG FileNameLength;
659 WCHAR FileName[1];
660 } FILE_NAMES_INFORMATION, *PFILE_NAMES_INFORMATION;
661
662 typedef struct _FILE_DISPOSITION_INFORMATION {
663 BOOLEAN DoDeleteFile;
664 } FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION;
665
666 typedef struct _FILE_POSITION_INFORMATION {
667 LARGE_INTEGER CurrentByteOffset;
668 } FILE_POSITION_INFORMATION, *PFILE_POSITION_INFORMATION;
669
670 typedef struct _FILE_ALIGNMENT_INFORMATION {
671 ULONG AlignmentRequirement;
672 } FILE_ALIGNMENT_INFORMATION, *PFILE_ALIGNMENT_INFORMATION;
673
674 typedef struct _FILE_ALLOCATION_INFORMATION {
675 LARGE_INTEGER AllocationSize;
676 } FILE_ALLOCATION_INFORMATION, *PFILE_ALLOCATION_INFORMATION;
677
678 typedef struct _FILE_END_OF_FILE_INFORMATION {
679 LARGE_INTEGER EndOfFile;
680 } FILE_END_OF_FILE_INFORMATION, *PFILE_END_OF_FILE_INFORMATION;
681
682 typedef struct _FILE_NETWORK_OPEN_INFORMATION {
683 LARGE_INTEGER CreationTime;
684 LARGE_INTEGER LastAccessTime;
685 LARGE_INTEGER LastWriteTime;
686 LARGE_INTEGER ChangeTime;
687 LARGE_INTEGER AllocationSize;
688 LARGE_INTEGER EndOfFile;
689 ULONG FileAttributes;
690 } FILE_NETWORK_OPEN_INFORMATION, *PFILE_NETWORK_OPEN_INFORMATION;
691
692 typedef struct _FILE_FULL_EA_INFORMATION {
693 ULONG NextEntryOffset;
694 UCHAR Flags;
695 UCHAR EaNameLength;
696 USHORT EaValueLength;
697 CHAR EaName[1];
698 } FILE_FULL_EA_INFORMATION, *PFILE_FULL_EA_INFORMATION;
699
700 typedef struct _FILE_MODE_INFORMATION {
701 ULONG Mode;
702 } FILE_MODE_INFORMATION, *PFILE_MODE_INFORMATION;
703
704 typedef struct _FILE_STREAM_INFORMATION
705 {
706 ULONG NextEntryOffset;
707 ULONG StreamNameLength;
708 LARGE_INTEGER StreamSize;
709 LARGE_INTEGER StreamAllocationSize;
710 WCHAR StreamName[1];
711 } FILE_STREAM_INFORMATION, *PFILE_STREAM_INFORMATION;
712
713 typedef struct _FILE_ATTRIBUTE_TAG_INFORMATION
714 {
715 ULONG FileAttributes;
716 ULONG ReparseTag;
717 } FILE_ATTRIBUTE_TAG_INFORMATION, *PFILE_ATTRIBUTE_TAG_INFORMATION;
718
719 typedef struct _FILE_MAILSLOT_QUERY_INFORMATION {
720 ULONG MaximumMessageSize;
721 ULONG MailslotQuota;
722 ULONG NextMessageSize;
723 ULONG MessagesAvailable;
724 LARGE_INTEGER ReadTimeout;
725 } FILE_MAILSLOT_QUERY_INFORMATION, *PFILE_MAILSLOT_QUERY_INFORMATION;
726
727 typedef struct _FILE_MAILSLOT_SET_INFORMATION {
728 LARGE_INTEGER ReadTimeout;
729 } FILE_MAILSLOT_SET_INFORMATION, *PFILE_MAILSLOT_SET_INFORMATION;
730
731 typedef struct _FILE_PIPE_INFORMATION {
732 ULONG ReadMode;
733 ULONG CompletionMode;
734 } FILE_PIPE_INFORMATION, *PFILE_PIPE_INFORMATION;
735
736 typedef struct _FILE_PIPE_LOCAL_INFORMATION {
737 ULONG NamedPipeType;
738 ULONG NamedPipeConfiguration;
739 ULONG MaximumInstances;
740 ULONG CurrentInstances;
741 ULONG InboundQuota;
742 ULONG ReadDataAvailable;
743 ULONG OutboundQuota;
744 ULONG WriteQuotaAvailable;
745 ULONG NamedPipeState;
746 ULONG NamedPipeEnd;
747 } FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION;
748
749 typedef struct _FILE_OBJECTID_INFORMATION {
750 LONGLONG FileReference;
751 UCHAR ObjectId[16];
752 union {
753 struct {
754 UCHAR BirthVolumeId[16];
755 UCHAR BirthObjectId[16];
756 UCHAR DomainId[16];
757 } DUMMYSTRUCTNAME;
758 UCHAR ExtendedInfo[48];
759 } DUMMYUNIONNAME;
760 } FILE_OBJECTID_INFORMATION, *PFILE_OBJECTID_INFORMATION;
761
762 typedef struct _FILE_QUOTA_INFORMATION {
763 ULONG NextEntryOffset;
764 ULONG SidLength;
765 LARGE_INTEGER ChangeTime;
766 LARGE_INTEGER QuotaUsed;
767 LARGE_INTEGER QuotaThreshold;
768 LARGE_INTEGER QuotaLimit;
769 SID Sid;
770 } FILE_QUOTA_INFORMATION, *PFILE_QUOTA_INFORMATION;
771
772 typedef struct _FILE_REPARSE_POINT_INFORMATION {
773 LONGLONG FileReference;
774 ULONG Tag;
775 } FILE_REPARSE_POINT_INFORMATION, *PFILE_REPARSE_POINT_INFORMATION;
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 {
783 FILE_BASIC_INFORMATION BasicInformation;
784 FILE_STANDARD_INFORMATION StandardInformation;
785 FILE_INTERNAL_INFORMATION InternalInformation;
786 FILE_EA_INFORMATION EaInformation;
787 FILE_ACCESS_INFORMATION AccessInformation;
788 FILE_POSITION_INFORMATION PositionInformation;
789 FILE_MODE_INFORMATION ModeInformation;
790 FILE_ALIGNMENT_INFORMATION AlignmentInformation;
791 FILE_NAME_INFORMATION NameInformation;
792 } FILE_ALL_INFORMATION, *PFILE_ALL_INFORMATION;
793
794 typedef struct _FILE_IO_COMPLETION_NOTIFICATION_INFORMATION {
795 ULONG Flags;
796 } FILE_IO_COMPLETION_NOTIFICATION_INFORMATION, *PFILE_IO_COMPLETION_NOTIFICATION_INFORMATION;
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 {
803 FileFsVolumeInformation = 1,
804 FileFsLabelInformation,
805 FileFsSizeInformation,
806 FileFsDeviceInformation,
807 FileFsAttributeInformation,
808 FileFsControlInformation,
809 FileFsFullSizeInformation,
810 FileFsObjectIdInformation,
811 FileFsMaximumInformation
812 } FS_INFORMATION_CLASS, *PFS_INFORMATION_CLASS;
813
814 typedef enum _KEY_INFORMATION_CLASS {
815 KeyBasicInformation,
816 KeyNodeInformation,
817 KeyFullInformation,
818 KeyNameInformation,
819 KeyCachedInformation,
820 KeyFlagsInformation,
821 KeyVirtualizationInformation,
822 KeyHandleTagsInformation,
823 MaxKeyInfoClass
824 } KEY_INFORMATION_CLASS;
825
826 typedef enum _KEY_VALUE_INFORMATION_CLASS {
827 KeyValueBasicInformation,
828 KeyValueFullInformation,
829 KeyValuePartialInformation,
830 KeyValueFullInformationAlign64,
831 KeyValuePartialInformationAlign64
832 } KEY_VALUE_INFORMATION_CLASS;
833
834 typedef enum _OBJECT_INFORMATION_CLASS {
835 ObjectBasicInformation,
836 ObjectNameInformation,
837 ObjectTypeInformation,
838 ObjectTypesInformation,
839 ObjectDataInformation
840 } OBJECT_INFORMATION_CLASS, *POBJECT_INFORMATION_CLASS;
841
842 typedef enum _PROCESSINFOCLASS {
843 ProcessBasicInformation = 0,
844 ProcessQuotaLimits = 1,
845 ProcessIoCounters = 2,
846 ProcessVmCounters = 3,
847 ProcessTimes = 4,
848 ProcessBasePriority = 5,
849 ProcessRaisePriority = 6,
850 ProcessDebugPort = 7,
851 ProcessExceptionPort = 8,
852 ProcessAccessToken = 9,
853 ProcessLdtInformation = 10,
854 ProcessLdtSize = 11,
855 ProcessDefaultHardErrorMode = 12,
856 ProcessIoPortHandlers = 13,
857 ProcessPooledUsageAndLimits = 14,
858 ProcessWorkingSetWatch = 15,
859 ProcessUserModeIOPL = 16,
860 ProcessEnableAlignmentFaultFixup = 17,
861 ProcessPriorityClass = 18,
862 ProcessWx86Information = 19,
863 ProcessHandleCount = 20,
864 ProcessAffinityMask = 21,
865 ProcessPriorityBoost = 22,
866 ProcessDeviceMap = 23,
867 ProcessSessionInformation = 24,
868 ProcessForegroundInformation = 25,
869 ProcessWow64Information = 26,
870 ProcessImageFileName = 27,
871 ProcessLUIDDeviceMapsEnabled = 28,
872 ProcessBreakOnTermination = 29,
873 ProcessDebugObjectHandle = 30,
874 ProcessDebugFlags = 31,
875 ProcessHandleTracing = 32,
876 ProcessExecuteFlags = 34,
877 ProcessTlsInformation = 35,
878 ProcessCookie = 36,
879 ProcessImageInformation = 37,
880 ProcessCycleTime = 38,
881 ProcessPagePriority = 39,
882 ProcessInstrumentationCallback = 40,
883 ProcessThreadStackAllocation = 41,
884 ProcessWorkingSetWatchEx = 42,
885 ProcessImageFileNameWin32 = 43,
886 ProcessImageFileMapping = 44,
887 ProcessAffinityUpdateMode = 45,
888 ProcessMemoryAllocationMode = 46,
889 ProcessGroupInformation = 47,
890 ProcessTokenVirtualizationEnabled = 48,
891 ProcessConsoleHostProcess = 49,
892 ProcessWindowInformation = 50,
893 MaxProcessInfoClass
894 } PROCESSINFOCLASS, PROCESS_INFORMATION_CLASS;
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 {
902 ViewShare = 1,
903 ViewUnmap = 2
904 } SECTION_INHERIT;
905
906 typedef enum _SYSTEM_INFORMATION_CLASS {
907 SystemBasicInformation = 0,
908 SystemCpuInformation = 1,
909 SystemPerformanceInformation = 2,
910 SystemTimeOfDayInformation = 3, /* was SystemTimeInformation */
911 Unknown4,
912 SystemProcessInformation = 5,
913 Unknown6,
914 Unknown7,
915 SystemProcessorPerformanceInformation = 8,
916 Unknown9,
917 Unknown10,
918 SystemModuleInformation = 11,
919 Unknown12,
920 Unknown13,
921 Unknown14,
922 Unknown15,
923 SystemHandleInformation = 16,
924 Unknown17,
925 SystemPageFileInformation = 18,
926 Unknown19,
927 Unknown20,
928 SystemCacheInformation = 21,
929 Unknown22,
930 SystemInterruptInformation = 23,
931 SystemDpcBehaviourInformation = 24,
932 SystemFullMemoryInformation = 25,
933 SystemNotImplemented6 = 25,
934 SystemLoadImage = 26,
935 SystemUnloadImage = 27,
936 SystemTimeAdjustmentInformation = 28,
937 SystemTimeAdjustment = 28,
938 SystemSummaryMemoryInformation = 29,
939 SystemNotImplemented7 = 29,
940 SystemNextEventIdInformation = 30,
941 SystemNotImplemented8 = 30,
942 SystemEventIdsInformation = 31,
943 SystemCrashDumpInformation = 32,
944 SystemExceptionInformation = 33,
945 SystemCrashDumpStateInformation = 34,
946 SystemKernelDebuggerInformation = 35,
947 SystemContextSwitchInformation = 36,
948 SystemRegistryQuotaInformation = 37,
949 SystemCurrentTimeZoneInformation = 44,
950 SystemTimeZoneInformation = 44,
951 SystemLookasideInformation = 45,
952 SystemSetTimeSlipEvent = 46,
953 SystemCreateSession = 47,
954 SystemDeleteSession = 48,
955 SystemInvalidInfoClass4 = 49,
956 SystemRangeStartInformation = 50,
957 SystemVerifierInformation = 51,
958 SystemAddVerifier = 52,
959 SystemSessionProcessesInformation = 53,
960 SystemLoadGdiDriverInSystemSpace = 54,
961 SystemNumaProcessorMap = 55,
962 SystemPrefetcherInformation = 56,
963 SystemExtendedProcessInformation = 57,
964 SystemRecommendedSharedDataAlignment = 58,
965 SystemComPlusPackage = 59,
966 SystemNumaAvailableMemory = 60,
967 SystemProcessorPowerInformation = 61,
968 SystemEmulationBasicInformation = 62,
969 SystemEmulationProcessorInformation = 63,
970 SystemExtendedHandleInformation = 64,
971 SystemLostDelayedWriteInformation = 65,
972 SystemBigPoolInformation = 66,
973 SystemSessionPoolTagInformation = 67,
974 SystemSessionMappedViewInformation = 68,
975 SystemHotpatchInformation = 69,
976 SystemObjectSecurityMode = 70,
977 SystemWatchdogTimerHandler = 71,
978 SystemWatchdogTimerInformation = 72,
979 SystemLogicalProcessorInformation = 73,
980 SystemWow64SharedInformation = 74,
981 SystemRegisterFirmwareTableInformationHandler = 75,
982 SystemFirmwareTableInformation = 76,
983 SystemModuleInformationEx = 77,
984 SystemVerifierTriageInformation = 78,
985 SystemSuperfetchInformation = 79,
986 SystemMemoryListInformation = 80,
987 SystemFileCacheInformationEx = 81,
988 SystemLogicalProcessorInformationEx = 107,
989 SystemInformationClassMax
990 } SYSTEM_INFORMATION_CLASS, *PSYSTEM_INFORMATION_CLASS;
991
992 typedef enum _THREADINFOCLASS {
993 ThreadBasicInformation,
994 ThreadTimes,
995 ThreadPriority,
996 ThreadBasePriority,
997 ThreadAffinityMask,
998 ThreadImpersonationToken,
999 ThreadDescriptorTableEntry,
1000 ThreadEnableAlignmentFaultFixup,
1001 ThreadEventPair_Reusable,
1002 ThreadQuerySetWin32StartAddress,
1003 ThreadZeroTlsCell,
1004 ThreadPerformanceCount,
1005 ThreadAmILastThread,
1006 ThreadIdealProcessor,
1007 ThreadPriorityBoost,
1008 ThreadSetTlsArrayAddress,
1009 ThreadIsIoPending,
1010 ThreadHideFromDebugger,
1011 ThreadBreakOnTermination,
1012 ThreadSwitchLegacyState,
1013 ThreadIsTerminated,
1014 ThreadLastSystemCall,
1015 ThreadIoPriority,
1016 ThreadCycleTime,
1017 ThreadPagePriority,
1018 ThreadActualBasePriority,
1019 ThreadTebInformation,
1020 ThreadCSwitchMon,
1021 ThreadCSwitchPmu,
1022 ThreadWow64Context,
1023 ThreadGroupInformation,
1024 ThreadUmsInformation,
1025 ThreadCounterProfiling,
1026 ThreadIdealProcessorEx,
1027 MaxThreadInfoClass
1028 } THREADINFOCLASS;
1029
1030 typedef struct _THREAD_BASIC_INFORMATION
1031 {
1032 NTSTATUS ExitStatus;
1033 PVOID TebBaseAddress;
1034 CLIENT_ID ClientId;
1035 ULONG_PTR AffinityMask;
1036 LONG Priority;
1037 LONG BasePriority;
1038 } THREAD_BASIC_INFORMATION, *PTHREAD_BASIC_INFORMATION;
1039
1040 typedef struct _THREAD_DESCRIPTOR_INFORMATION
1041 {
1042 DWORD Selector;
1043 LDT_ENTRY Entry;
1044 } THREAD_DESCRIPTOR_INFORMATION, *PTHREAD_DESCRIPTOR_INFORMATION;
1045
1046 typedef struct _KERNEL_USER_TIMES {
1047 LARGE_INTEGER CreateTime;
1048 LARGE_INTEGER ExitTime;
1049 LARGE_INTEGER KernelTime;
1050 LARGE_INTEGER UserTime;
1051 } KERNEL_USER_TIMES, *PKERNEL_USER_TIMES;
1052
1053 typedef enum _WINSTATIONINFOCLASS {
1054 WinStationInformation = 8
1055 } WINSTATIONINFOCLASS;
1056
1057 typedef enum _MEMORY_INFORMATION_CLASS {
1058 MemoryBasicInformation,
1059 MemoryWorkingSetList,
1060 MemorySectionName,
1061 MemoryBasicVlmInformation
1062 } MEMORY_INFORMATION_CLASS;
1063
1064 typedef struct _MEMORY_SECTION_NAME
1065 {
1066 UNICODE_STRING SectionFileName;
1067 } MEMORY_SECTION_NAME, *PMEMORY_SECTION_NAME;
1068
1069 typedef enum _MUTANT_INFORMATION_CLASS
1070 {
1071 MutantBasicInformation
1072 } MUTANT_INFORMATION_CLASS, *PMUTANT_INFORMATION_CLASS;
1073
1074 typedef struct _MUTANT_BASIC_INFORMATION {
1075 LONG CurrentCount;
1076 BOOLEAN OwnedByCaller;
1077 BOOLEAN AbandonedState;
1078 } MUTANT_BASIC_INFORMATION, *PMUTANT_BASIC_INFORMATION;
1079
1080 typedef enum _TIMER_INFORMATION_CLASS
1081 {
1082 TimerBasicInformation = 0
1083 } TIMER_INFORMATION_CLASS;
1084
1085 typedef struct _TIMER_BASIC_INFORMATION
1086 {
1087 LARGE_INTEGER RemainingTime;
1088 BOOLEAN TimerState;
1089 } TIMER_BASIC_INFORMATION, *PTIMER_BASIC_INFORMATION;
1090
1091
1092 /* return type of RtlDetermineDosPathNameType_U (FIXME: not the correct names) */
1093 typedef enum
1094 {
1095 INVALID_PATH = 0,
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 /* "//." */
1103 } DOS_PATHNAME_TYPE;
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 */
1119 DWORD dwCurrentPriority; /* 28/38 */
1120 DWORD dwBasePriority; /* 2c/3c */
1121 DWORD dwContextSwitches; /* 30/40 */
1122 DWORD dwThreadState; /* 34/44 */
1123 DWORD dwWaitReason; /* 38/48 */
1124 DWORD dwUnknown; /* 3c/4c */
1125 } SYSTEM_THREAD_INFORMATION, *PSYSTEM_THREAD_INFORMATION;
1126
1127 typedef struct _IO_STATUS_BLOCK {
1128 union {
1129 NTSTATUS Status;
1130 PVOID Pointer;
1131 } DUMMYUNIONNAME;
1132
1133 ULONG_PTR Information;
1134 } IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
1135
1136 typedef void (WINAPI * PIO_APC_ROUTINE)(PVOID,PIO_STATUS_BLOCK,ULONG);
1137
1138 typedef struct _KEY_BASIC_INFORMATION {
1139 LARGE_INTEGER LastWriteTime;
1140 ULONG TitleIndex;
1141 ULONG NameLength;
1142 WCHAR Name[1];
1143 } KEY_BASIC_INFORMATION, *PKEY_BASIC_INFORMATION;
1144
1145 typedef struct _KEY_NODE_INFORMATION
1146 {
1147 LARGE_INTEGER LastWriteTime;
1148 ULONG TitleIndex;
1149 ULONG ClassOffset;
1150 ULONG ClassLength;
1151 ULONG NameLength;
1152 WCHAR Name[1];
1153 /* Class[1]; */
1154 } KEY_NODE_INFORMATION, *PKEY_NODE_INFORMATION;
1155
1156 typedef struct _KEY_FULL_INFORMATION
1157 {
1158 LARGE_INTEGER LastWriteTime;
1159 ULONG TitleIndex;
1160 ULONG ClassOffset;
1161 ULONG ClassLength;
1162 ULONG SubKeys;
1163 ULONG MaxNameLen;
1164 ULONG MaxClassLen;
1165 ULONG Values;
1166 ULONG MaxValueNameLen;
1167 ULONG MaxValueDataLen;
1168 WCHAR Class[1];
1169 } KEY_FULL_INFORMATION, *PKEY_FULL_INFORMATION;
1170
1171 typedef struct _KEY_NAME_INFORMATION {
1172 ULONG NameLength;
1173 WCHAR Name[1];
1174 } KEY_NAME_INFORMATION, *PKEY_NAME_INFORMATION;
1175
1176 typedef struct _KEY_CACHED_INFORMATION
1177 {
1178 LARGE_INTEGER LastWriteTime;
1179 ULONG TitleIndex;
1180 ULONG SubKeys;
1181 ULONG MaxNameLen;
1182 ULONG Values;
1183 ULONG MaxValueNameLen;
1184 ULONG MaxValueDataLen;
1185 ULONG NameLength;
1186 } KEY_CACHED_INFORMATION, *PKEY_CACHED_INFORMATION;
1187
1188 typedef struct _KEY_VALUE_ENTRY
1189 {
1190 PUNICODE_STRING ValueName;
1191 ULONG DataLength;
1192 ULONG DataOffset;
1193 ULONG Type;
1194 } KEY_VALUE_ENTRY, *PKEY_VALUE_ENTRY;
1195
1196 typedef struct _KEY_VALUE_BASIC_INFORMATION {
1197 ULONG TitleIndex;
1198 ULONG Type;
1199 ULONG NameLength;
1200 WCHAR Name[1];
1201 } KEY_VALUE_BASIC_INFORMATION, *PKEY_VALUE_BASIC_INFORMATION;
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];
1210 } KEY_VALUE_FULL_INFORMATION, *PKEY_VALUE_FULL_INFORMATION;
1211
1212 typedef struct _KEY_VALUE_PARTIAL_INFORMATION {
1213 ULONG TitleIndex;
1214 ULONG Type;
1215 ULONG DataLength;
1216 UCHAR Data[1];
1217 } KEY_VALUE_PARTIAL_INFORMATION, *PKEY_VALUE_PARTIAL_INFORMATION;
1218
1219 #ifndef __OBJECT_ATTRIBUTES_DEFINED__
1220 #define __OBJECT_ATTRIBUTES_DEFINED__
1221 typedef struct _OBJECT_ATTRIBUTES {
1222 ULONG Length;
1223 HANDLE RootDirectory;
1224 PUNICODE_STRING ObjectName;
1225 ULONG Attributes;
1226 PVOID SecurityDescriptor; /* type SECURITY_DESCRIPTOR */
1227 PVOID SecurityQualityOfService; /* type SECURITY_QUALITY_OF_SERVICE */
1228 } OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
1229 #endif
1230
1231 typedef struct _OBJECT_DATA_INFORMATION {
1232 BOOLEAN InheritHandle;
1233 BOOLEAN ProtectFromClose;
1234 } OBJECT_DATA_INFORMATION, *POBJECT_DATA_INFORMATION;
1235
1236 typedef struct _OBJECT_BASIC_INFORMATION {
1237 ULONG Attributes;
1238 ACCESS_MASK GrantedAccess;
1239 ULONG HandleCount;
1240 ULONG PointerCount;
1241 ULONG PagedPoolUsage;
1242 ULONG NonPagedPoolUsage;
1243 ULONG Reserved[3];
1244 ULONG NameInformationLength;
1245 ULONG TypeInformationLength;
1246 ULONG SecurityDescriptorLength;
1247 LARGE_INTEGER CreateTime;
1248 } OBJECT_BASIC_INFORMATION, *POBJECT_BASIC_INFORMATION;
1249
1250 typedef struct _OBJECT_NAME_INFORMATION {
1251 UNICODE_STRING Name;
1252 } OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;
1253
1254 typedef struct __OBJECT_TYPE_INFORMATION {
1255 UNICODE_STRING TypeName;
1256 ULONG TotalNumberOfObjects;
1257 ULONG TotalNumberOfHandles;
1258 ULONG TotalPagedPoolUsage;
1259 ULONG TotalNonPagedPoolUsage;
1260 ULONG TotalNamePoolUsage;
1261 ULONG TotalHandleTableUsage;
1262 ULONG HighWaterNumberOfObjects;
1263 ULONG HighWaterNumberOfHandles;
1264 ULONG HighWaterPagedPoolUsage;
1265 ULONG HighWaterNonPagedPoolUsage;
1266 ULONG HighWaterNamePoolUsage;
1267 ULONG HighWaterHandleTableUsage;
1268 ULONG InvalidAttributes;
1269 GENERIC_MAPPING GenericMapping;
1270 ULONG ValidAccessMask;
1271 BOOLEAN SecurityRequired;
1272 BOOLEAN MaintainHandleCount;
1273 UCHAR TypeIndex;
1274 CHAR Reserved;
1275 ULONG PoolType;
1276 ULONG DefaultPagedPoolCharge;
1277 ULONG DefaultNonPagedPoolCharge;
1278 } OBJECT_TYPE_INFORMATION, *POBJECT_TYPE_INFORMATION;
1279
1280 typedef struct _OBJECT_TYPES_INFORMATION
1281 {
1282 ULONG NumberOfTypes;
1283 } OBJECT_TYPES_INFORMATION, *POBJECT_TYPES_INFORMATION;
1284
1285 typedef struct _PROCESS_BASIC_INFORMATION {
1286 #ifdef __WINESRC__
1287 DWORD_PTR ExitStatus;
1288 PPEB PebBaseAddress;
1289 DWORD_PTR AffinityMask;
1290 DWORD_PTR BasePriority;
1291 ULONG_PTR UniqueProcessId;
1292 ULONG_PTR InheritedFromUniqueProcessId;
1293 #else
1294 PVOID Reserved1;
1295 PPEB PebBaseAddress;
1296 PVOID Reserved2[2];
1297 ULONG_PTR UniqueProcessId;
1298 PVOID Reserved3;
1299 #endif
1300 } PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION;
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 {
1310 BOOLEAN Foreground;
1311 UCHAR PriorityClass;
1312 } PROCESS_PRIORITY_CLASS, *PPROCESS_PRIORITY_CLASS;
1313
1314 typedef struct _RTL_HEAP_DEFINITION {
1315 ULONG Length; /* = sizeof(RTL_HEAP_DEFINITION) */
1316
1317 ULONG Unknown[11];
1318 } RTL_HEAP_DEFINITION, *PRTL_HEAP_DEFINITION;
1319
1320 typedef struct _RTL_RWLOCK {
1321 RTL_CRITICAL_SECTION rtlCS;
1322
1323 HANDLE hSharedReleaseSemaphore;
1324 UINT uSharedWaiters;
1325
1326 HANDLE hExclusiveReleaseSemaphore;
1327 UINT uExclusiveWaiters;
1328
1329 INT iNumberActive;
1330 HANDLE hOwningThreadId;
1331 DWORD dwTimeoutBoost;
1332 PVOID pDebugInfo;
1333 } RTL_RWLOCK, *LPRTL_RWLOCK;
1334
1335 /* System Information Class 0x00 */
1336
1337 typedef struct _SYSTEM_BASIC_INFORMATION {
1338 #ifdef __WINESRC__
1339 DWORD unknown;
1340 ULONG KeMaximumIncrement;
1341 ULONG PageSize;
1342 ULONG MmNumberOfPhysicalPages;
1343 ULONG MmLowestPhysicalPage;
1344 ULONG MmHighestPhysicalPage;
1345 ULONG_PTR AllocationGranularity;
1346 PVOID LowestUserAddress;
1347 PVOID HighestUserAddress;
1348 ULONG_PTR ActiveProcessorsAffinityMask;
1349 BYTE NumberOfProcessors;
1350 #else
1351 BYTE Reserved1[24];
1352 PVOID Reserved2[4];
1353 CCHAR NumberOfProcessors;
1354 #endif
1355 } SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
1356
1357 /* System Information Class 0x01 */
1358
1359 typedef struct _SYSTEM_CPU_INFORMATION {
1360 WORD Architecture;
1361 WORD Level;
1362 WORD Revision; /* combination of CPU model and stepping */
1363 WORD Reserved; /* always zero */
1364 DWORD FeatureSet; /* see bit flags below */
1365 } SYSTEM_CPU_INFORMATION, *PSYSTEM_CPU_INFORMATION;
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 {
1390 LARGE_INTEGER IdleTime;
1391 LARGE_INTEGER ReadTransferCount;
1392 LARGE_INTEGER WriteTransferCount;
1393 LARGE_INTEGER OtherTransferCount;
1394 ULONG ReadOperationCount;
1395 ULONG WriteOperationCount;
1396 ULONG OtherOperationCount;
1397 ULONG AvailablePages;
1398 ULONG TotalCommittedPages;
1399 ULONG TotalCommitLimit;
1400 ULONG PeakCommitment;
1401 ULONG PageFaults;
1402 ULONG WriteCopyFaults;
1403 ULONG TransitionFaults;
1404 ULONG Reserved1;
1405 ULONG DemandZeroFaults;
1406 ULONG PagesRead;
1407 ULONG PageReadIos;
1408 ULONG Reserved2[2];
1409 ULONG PagefilePagesWritten;
1410 ULONG PagefilePageWriteIos;
1411 ULONG MappedFilePagesWritten;
1412 ULONG MappedFilePageWriteIos;
1413 ULONG PagedPoolUsage;
1414 ULONG NonPagedPoolUsage;
1415 ULONG PagedPoolAllocs;
1416 ULONG PagedPoolFrees;
1417 ULONG NonPagedPoolAllocs;
1418 ULONG NonPagedPoolFrees;
1419 ULONG TotalFreeSystemPtes;
1420 ULONG SystemCodePage;
1421 ULONG TotalSystemDriverPages;
1422 ULONG TotalSystemCodePages;
1423 ULONG SmallNonPagedLookasideListAllocateHits;
1424 ULONG SmallPagedLookasideListAllocateHits;
1425 ULONG Reserved3;
1426 ULONG MmSystemCachePage;
1427 ULONG PagedPoolPage;
1428 ULONG SystemDriverPage;
1429 ULONG FastReadNoWait;
1430 ULONG FastReadWait;
1431 ULONG FastReadResourceMiss;
1432 ULONG FastReadNotPossible;
1433 ULONG FastMdlReadNoWait;
1434 ULONG FastMdlReadWait;
1435 ULONG FastMdlReadResourceMiss;
1436 ULONG FastMdlReadNotPossible;
1437 ULONG MapDataNoWait;
1438 ULONG MapDataWait;
1439 ULONG MapDataNoWaitMiss;
1440 ULONG MapDataWaitMiss;
1441 ULONG PinMappedDataCount;
1442 ULONG PinReadNoWait;
1443 ULONG PinReadWait;
1444 ULONG PinReadNoWaitMiss;
1445 ULONG PinReadWaitMiss;
1446 ULONG CopyReadNoWait;
1447 ULONG CopyReadWait;
1448 ULONG CopyReadNoWaitMiss;
1449 ULONG CopyReadWaitMiss;
1450 ULONG MdlReadNoWait;
1451 ULONG MdlReadWait;
1452 ULONG MdlReadNoWaitMiss;
1453 ULONG MdlReadWaitMiss;
1454 ULONG ReadAheadIos;
1455 ULONG LazyWriteIos;
1456 ULONG LazyWritePages;
1457 ULONG DataFlushes;
1458 ULONG DataPages;
1459 ULONG ContextSwitches;
1460 ULONG FirstLevelTbFills;
1461 ULONG SecondLevelTbFills;
1462 ULONG SystemCalls;
1463 } SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_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
1481 typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION {
1482 LARGE_INTEGER IdleTime;
1483 LARGE_INTEGER KernelTime;
1484 LARGE_INTEGER UserTime;
1485 LARGE_INTEGER Reserved1[2];
1486 ULONG Reserved2;
1487 } SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION, *PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION;
1488
1489 /* System Information Class 0x0b */
1490
1491 typedef struct _SYSTEM_DRIVER_INFORMATION {
1492 PVOID pvAddress;
1493 DWORD dwUnknown1;
1494 DWORD dwUnknown2;
1495 DWORD dwEntryIndex;
1496 DWORD dwUnknown3;
1497 char szName[MAX_PATH + 1];
1498 } SYSTEM_DRIVER_INFORMATION, *PSYSTEM_DRIVER_INFORMATION;
1499
1500 /* System Information Class 0x10 */
1501
1502 typedef struct _SYSTEM_HANDLE_ENTRY {
1503 ULONG OwnerPid;
1504 BYTE ObjectType;
1505 BYTE HandleFlags;
1506 USHORT HandleValue;
1507 PVOID ObjectPointer;
1508 ULONG AccessMask;
1509 } SYSTEM_HANDLE_ENTRY, *PSYSTEM_HANDLE_ENTRY;
1510
1511 typedef struct _SYSTEM_HANDLE_INFORMATION {
1512 ULONG Count;
1513 SYSTEM_HANDLE_ENTRY Handle[1];
1514 } SYSTEM_HANDLE_INFORMATION, *PSYSTEM_HANDLE_INFORMATION;
1515
1516 /* System Information Class 0x40 */
1517
1518 typedef struct _SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX
1519 {
1520 PVOID Object;
1521 ULONG_PTR UniqueProcessId;
1522 ULONG_PTR HandleValue;
1523 ULONG GrantedAccess;
1524 USHORT CreatorBackTraceIndex;
1525 USHORT ObjectTypeIndex;
1526 ULONG HandleAttributes;
1527 ULONG Reserved;
1528 } SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX, *PSYSTEM_HANDLE_TABLE_ENTRY_INFO_EX;
1529
1530 typedef struct _SYSTEM_HANDLE_INFORMATION_EX
1531 {
1532 ULONG_PTR Count;
1533 ULONG_PTR Reserved;
1534 SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX Handle[1];
1535 } SYSTEM_HANDLE_INFORMATION_EX, *PSYSTEM_HANDLE_INFORMATION_EX;
1536
1537 /* System Information Class 0x15 */
1538
1539 typedef struct _SYSTEM_CACHE_INFORMATION {
1540 ULONG CurrentSize;
1541 ULONG PeakSize;
1542 ULONG PageFaultCount;
1543 ULONG MinimumWorkingSet;
1544 ULONG MaximumWorkingSet;
1545 ULONG unused[4];
1546 #ifdef _WIN64
1547 ULONG unknown64[7];
1548 #endif
1549 } SYSTEM_CACHE_INFORMATION, *PSYSTEM_CACHE_INFORMATION;
1550
1551 /* System Information Class 0x17 */
1552
1553 typedef struct _SYSTEM_INTERRUPT_INFORMATION {
1554 BYTE Reserved1[24];
1555 } SYSTEM_INTERRUPT_INFORMATION, *PSYSTEM_INTERRUPT_INFORMATION;
1556
1557 typedef struct _SYSTEM_CONFIGURATION_INFO {
1558 union {
1559 ULONG OemId;
1560 struct {
1561 WORD ProcessorArchitecture;
1562 WORD Reserved;
1563 } tag1;
1564 } tag2;
1565 ULONG PageSize;
1566 PVOID MinimumApplicationAddress;
1567 PVOID MaximumApplicationAddress;
1568 ULONG ActiveProcessorMask;
1569 ULONG NumberOfProcessors;
1570 ULONG ProcessorType;
1571 ULONG AllocationGranularity;
1572 WORD ProcessorLevel;
1573 WORD ProcessorRevision;
1574 } SYSTEM_CONFIGURATION_INFO, *PSYSTEM_CONFIGURATION_INFO;
1575
1576 typedef struct _SYSTEM_EXCEPTION_INFORMATION {
1577 BYTE Reserved1[16];
1578 } SYSTEM_EXCEPTION_INFORMATION, *PSYSTEM_EXCEPTION_INFORMATION;
1579
1580 typedef struct _SYSTEM_LOOKASIDE_INFORMATION {
1581 BYTE Reserved1[32];
1582 } SYSTEM_LOOKASIDE_INFORMATION, *PSYSTEM_LOOKASIDE_INFORMATION;
1583
1584 typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION {
1585 BOOLEAN DebuggerEnabled;
1586 BOOLEAN DebuggerNotPresent;
1587 } SYSTEM_KERNEL_DEBUGGER_INFORMATION, *PSYSTEM_KERNEL_DEBUGGER_INFORMATION;
1588
1589 /* System Information Class 0x05 */
1590
1591 typedef struct _VM_COUNTERS_ {
1592 SIZE_T PeakVirtualSize;
1593 SIZE_T VirtualSize;
1594 ULONG PageFaultCount;
1595 SIZE_T PeakWorkingSetSize;
1596 SIZE_T WorkingSetSize;
1597 SIZE_T QuotaPeakPagedPoolUsage;
1598 SIZE_T QuotaPagedPoolUsage;
1599 SIZE_T QuotaPeakNonPagedPoolUsage;
1600 SIZE_T QuotaNonPagedPoolUsage;
1601 SIZE_T PagefileUsage;
1602 SIZE_T PeakPagefileUsage;
1603 SIZE_T PrivatePageCount;
1604 } VM_COUNTERS, *PVM_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
1637 } SYSTEM_PROCESS_INFORMATION, *PSYSTEM_PROCESS_INFORMATION;
1638
1639 typedef struct _SYSTEM_REGISTRY_QUOTA_INFORMATION {
1640 ULONG RegistryQuotaAllowed;
1641 ULONG RegistryQuotaUsed;
1642 PVOID Reserved1;
1643 } SYSTEM_REGISTRY_QUOTA_INFORMATION, *PSYSTEM_REGISTRY_QUOTA_INFORMATION;
1644
1645 typedef struct _SYSTEM_TIME_ADJUSTMENT {
1646 ULONG TimeAdjustment;
1647 BOOLEAN TimeAdjustmentDisabled;
1648 } SYSTEM_TIME_ADJUSTMENT, *PSYSTEM_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;
1659 } TIME_FIELDS, *PTIME_FIELDS;
1660
1661 typedef struct _WINSTATIONINFORMATIONW {
1662 BYTE Reserved2[70];
1663 ULONG LogonId;
1664 BYTE Reserved3[1140];
1665 } WINSTATIONINFORMATIONW, *PWINSTATIONINFORMATIONW;
1666
1667 typedef BOOLEAN (WINAPI * PWINSTATIONQUERYINFORMATIONW)(HANDLE,ULONG,WINSTATIONINFOCLASS,PVOID,ULONG,PULONG);
1668
1669 typedef struct _LDR_RESOURCE_INFO
1670 {
1671 ULONG_PTR Type;
1672 ULONG_PTR Name;
1673 ULONG Language;
1674 } LDR_RESOURCE_INFO, *PLDR_RESOURCE_INFO;
1675
1676
1677 /* debug buffer definitions */
1678
1679 typedef struct _DEBUG_BUFFER {
1680 HANDLE SectionHandle;
1681 PVOID SectionBase;
1682 PVOID RemoteSectionBase;
1683 ULONG SectionBaseDelta;
1684 HANDLE EventPairHandle;
1685 ULONG Unknown[2];
1686 HANDLE RemoteThreadHandle;
1687 ULONG InfoClassMask;
1688 ULONG SizeOfInfo;
1689 ULONG AllocatedSize;
1690 ULONG SectionSize;
1691 PVOID ModuleInformation;
1692 PVOID BackTraceInformation;
1693 PVOID HeapInformation;
1694 PVOID LockInformation;
1695 PVOID Reserved[8];
1696 } DEBUG_BUFFER, *PDEBUG_BUFFER;
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
1705 typedef struct _DEBUG_MODULE_INFORMATION {
1706 ULONG Reserved[2];
1707 ULONG Base;
1708 ULONG Size;
1709 ULONG Flags;
1710 USHORT Index;
1711 USHORT Unknown;
1712 USHORT LoadCount;
1713 USHORT ModuleNameOffset;
1714 CHAR ImageName[256];
1715 } DEBUG_MODULE_INFORMATION, *PDEBUG_MODULE_INFORMATION;
1716
1717 typedef struct _DEBUG_HEAP_INFORMATION {
1718 ULONG Base;
1719 ULONG Flags;
1720 USHORT Granularity;
1721 USHORT Unknown;
1722 ULONG Allocated;
1723 ULONG Committed;
1724 ULONG TagCount;
1725 ULONG BlockCount;
1726 ULONG Reserved[7];
1727 PVOID Tags;
1728 PVOID Blocks;
1729 } DEBUG_HEAP_INFORMATION, *PDEBUG_HEAP_INFORMATION;
1730
1731 typedef struct _DEBUG_LOCK_INFORMATION {
1732 PVOID Address;
1733 USHORT Type;
1734 USHORT CreatorBackTraceIndex;
1735 ULONG OwnerThreadId;
1736 ULONG ActiveCount;
1737 ULONG ContentionCount;
1738 ULONG EntryCount;
1739 ULONG RecursionCount;
1740 ULONG NumberOfSharedWaiters;
1741 ULONG NumberOfExclusiveWaiters;
1742 } DEBUG_LOCK_INFORMATION, *PDEBUG_LOCK_INFORMATION;
1743
1744 typedef struct _PORT_MESSAGE_HEADER {
1745 USHORT DataSize;
1746 USHORT MessageSize;
1747 USHORT MessageType;
1748 USHORT VirtualRangesOffset;
1749 CLIENT_ID ClientId;
1750 ULONG MessageId;
1751 ULONG SectionSize;
1752 } PORT_MESSAGE_HEADER, *PPORT_MESSAGE_HEADER, PORT_MESSAGE, *PPORT_MESSAGE;
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
1762 typedef enum _ATOM_INFORMATION_CLASS {
1763 AtomBasicInformation = 0,
1764 AtomTableInformation = 1,
1765 } ATOM_INFORMATION_CLASS;
1766
1767 typedef struct _ATOM_BASIC_INFORMATION {
1768 USHORT ReferenceCount;
1769 USHORT Pinned;
1770 USHORT NameLength;
1771 WCHAR Name[1];
1772 } ATOM_BASIC_INFORMATION, *PATOM_BASIC_INFORMATION;
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 */
1790 } RTL_HANDLE_TABLE;
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
1988 typedef NTSTATUS (WINAPI *PRTL_QUERY_REGISTRY_ROUTINE)( PCWSTR ValueName,
1989 ULONG ValueType,
1990 PVOID ValueData,
1991 ULONG ValueLength,
1992 PVOID Context,
1993 PVOID EntryContext);
1994
1995 typedef struct _RTL_QUERY_REGISTRY_TABLE
1996 {
1997 PRTL_QUERY_REGISTRY_ROUTINE QueryRoutine;
1998 ULONG Flags;
1999 PWSTR Name;
2000 PVOID EntryContext;
2001 ULONG DefaultType;
2002 PVOID DefaultData;
2003 ULONG DefaultLength;
2004 } RTL_QUERY_REGISTRY_TABLE, *PRTL_QUERY_REGISTRY_TABLE;
2005
2006 typedef struct _KEY_MULTIPLE_VALUE_INFORMATION
2007 {
2008 PUNICODE_STRING ValueName;
2009 ULONG DataLength;
2010 ULONG DataOffset;
2011 ULONG Type;
2012 } KEY_MULTIPLE_VALUE_INFORMATION, *PKEY_MULTIPLE_VALUE_INFORMATION;
2013
2014 typedef VOID (CALLBACK *PRTL_OVERLAPPED_COMPLETION_ROUTINE)(DWORD,DWORD,LPVOID);
2015
2016 typedef VOID (CALLBACK *PTIMER_APC_ROUTINE) ( PVOID, ULONG, LONG );
2017
2018 typedef enum _EVENT_INFORMATION_CLASS {
2019 EventBasicInformation
2020 } EVENT_INFORMATION_CLASS, *PEVENT_INFORMATION_CLASS;
2021
2022 typedef struct _EVENT_BASIC_INFORMATION {
2023 EVENT_TYPE EventType;
2024 LONG EventState;
2025 } EVENT_BASIC_INFORMATION, *PEVENT_BASIC_INFORMATION;
2026
2027 typedef enum _SEMAPHORE_INFORMATION_CLASS {
2028 SemaphoreBasicInformation
2029 } SEMAPHORE_INFORMATION_CLASS, *PSEMAPHORE_INFORMATION_CLASS;
2030
2031 typedef struct _SEMAPHORE_BASIC_INFORMATION {
2032 ULONG CurrentCount;
2033 ULONG MaximumCount;
2034 } SEMAPHORE_BASIC_INFORMATION, *PSEMAPHORE_BASIC_INFORMATION;
2035
2036 typedef enum _SECTION_INFORMATION_CLASS
2037 {
2038 SectionBasicInformation,
2039 SectionImageInformation,
2040 } SECTION_INFORMATION_CLASS;
2041
2042 typedef struct _SECTION_BASIC_INFORMATION {
2043 PVOID BaseAddress;
2044 ULONG Attributes;
2045 LARGE_INTEGER Size;
2046 } SECTION_BASIC_INFORMATION, *PSECTION_BASIC_INFORMATION;
2047
2048 typedef struct _SECTION_IMAGE_INFORMATION {
2049 PVOID TransferAddress;
2050 ULONG ZeroBits;
2051 SIZE_T MaximumStackSize;
2052 SIZE_T CommittedStackSize;
2053 ULONG SubSystemType;
2054 WORD SubsystemVersionLow;
2055 WORD SubsystemVersionHigh;
2056 ULONG GpValue;
2057 USHORT ImageCharacteristics;
2058 USHORT DllCharacteristics;
2059 USHORT Machine;
2060 BOOLEAN ImageContainsCode;
2061 union
2062 {
2063 UCHAR ImageFlags;
2064 struct
2065 {
2066 UCHAR ComPlusNativeReady : 1;
2067 UCHAR ComPlusILOnly : 1;
2068 UCHAR ImageDynamicallyRelocated : 1;
2069 UCHAR ImageMappedFlat : 1;
2070 UCHAR BaseBelow4gb : 1;
2071 UCHAR Reserved : 3;
2072 } DUMMYSTRUCTNAME;
2073 } DUMMYUNIONNAME;
2074 ULONG LoaderFlags;
2075 ULONG ImageFileSize;
2076 ULONG CheckSum;
2077 } SECTION_IMAGE_INFORMATION, *PSECTION_IMAGE_INFORMATION;
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;
2086 } LPC_SECTION_WRITE, *PLPC_SECTION_WRITE;
2087
2088 typedef struct _LPC_SECTION_READ {
2089 ULONG Length;
2090 ULONG ViewSize;
2091 PVOID ViewBase;
2092 } LPC_SECTION_READ, *PLPC_SECTION_READ;
2093
2094 typedef struct _LPC_MESSAGE {
2095 USHORT DataSize;
2096 USHORT MessageSize;
2097 USHORT MessageType;
2098 USHORT VirtualRangesOffset;
2099 CLIENT_ID ClientId;
2100 ULONG_PTR MessageId;
2101 ULONG_PTR SectionSize;
2102 UCHAR Data[ANYSIZE_ARRAY];
2103 } LPC_MESSAGE, *PLPC_MESSAGE;
2104
2105 typedef struct _RTL_USER_PROCESS_INFORMATION
2106 {
2107 ULONG Length;
2108 HANDLE Process;
2109 HANDLE Thread;
2110 CLIENT_ID ClientId;
2111 SECTION_IMAGE_INFORMATION ImageInformation;
2112 } RTL_USER_PROCESS_INFORMATION, *PRTL_USER_PROCESS_INFORMATION;
2113
2114 typedef enum _SHUTDOWN_ACTION {
2115 ShutdownNoReboot,
2116 ShutdownReboot,
2117 ShutdownPowerOff
2118 } SHUTDOWN_ACTION, *PSHUTDOWN_ACTION;
2119
2120 typedef enum _KPROFILE_SOURCE {
2121 ProfileTime,
2122 ProfileAlignmentFixup,
2123 ProfileTotalIssues,
2124 ProfilePipelineDry,
2125 ProfileLoadInstructions,
2126 ProfilePipelineFrozen,
2127 ProfileBranchInstructions,
2128 ProfileTotalNonissues,
2129 ProfileDcacheMisses,
2130 ProfileIcacheMisses,
2131 ProfileCacheMisses,
2132 ProfileBranchMispredictions,
2133 ProfileStoreInstructions,
2134 ProfileFpInstructions,
2135 ProfileIntegerInstructions,
2136 Profile2Issue,
2137 Profile3Issue,
2138 Profile4Issue,
2139 ProfileSpecialInstructions,
2140 ProfileTotalCycles,
2141 ProfileIcacheIssues,
2142 ProfileDcacheAccesses,
2143 ProfileMemoryBarrierCycles,
2144 ProfileLoadLinkedIssues,
2145 ProfileMaximum
2146 } KPROFILE_SOURCE, *PKPROFILE_SOURCE;
2147
2148 typedef struct _DIRECTORY_BASIC_INFORMATION {
2149 UNICODE_STRING ObjectName;
2150 UNICODE_STRING ObjectTypeName;
2151 } DIRECTORY_BASIC_INFORMATION, *PDIRECTORY_BASIC_INFORMATION;
2152
2153 typedef struct _INITIAL_TEB {
2154 PVOID StackBase;
2155 PVOID StackLimit;
2156 PVOID StackCommit;
2157 PVOID StackCommitMax;
2158 PVOID StackReserved;
2159 } INITIAL_TEB, *PINITIAL_TEB;
2160
2161 typedef enum _PORT_INFORMATION_CLASS {
2162 PortNoInformation
2163 } PORT_INFORMATION_CLASS, *PPORT_INFORMATION_CLASS;
2164
2165 typedef enum _IO_COMPLETION_INFORMATION_CLASS {
2166 IoCompletionBasicInformation
2167 } IO_COMPLETION_INFORMATION_CLASS, *PIO_COMPLETION_INFORMATION_CLASS;
2168
2169 typedef struct _FILE_COMPLETION_INFORMATION {
2170 HANDLE CompletionPort;
2171 ULONG_PTR CompletionKey;
2172 } FILE_COMPLETION_INFORMATION, *PFILE_COMPLETION_INFORMATION;
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
2178 typedef enum _HARDERROR_RESPONSE_OPTION {
2179 OptionAbortRetryIgnore,
2180 OptionOk,
2181 OptionOkCancel,
2182 OptionRetryCancel,
2183 OptionYesNo,
2184 OptionYesNoCancel,
2185 OptionShutdownSystem
2186 } HARDERROR_RESPONSE_OPTION, *PHARDERROR_RESPONSE_OPTION;
2187
2188 typedef enum _HARDERROR_RESPONSE {
2189 ResponseReturnToCaller,
2190 ResponseNotHandled,
2191 ResponseAbort,
2192 ResponseCancel,
2193 ResponseIgnore,
2194 ResponseNo,
2195 ResponseOk,
2196 ResponseRetry,
2197 ResponseYes
2198 } HARDERROR_RESPONSE, *PHARDERROR_RESPONSE;
2199
2200 typedef enum _SYSDBG_COMMAND {
2201 SysDbgQueryModuleInformation,
2202 SysDbgQueryTraceInformation,
2203 SysDbgSetTracepoint,
2204 SysDbgSetSpecialCall,
2205 SysDbgClearSpecialCalls,
2206 SysDbgQuerySpecialCalls,
2207 SysDbgBreakPoint,
2208 SysDbgQueryVersion,
2209 SysDbgReadVirtual,
2210 SysDbgWriteVirtual,
2211 SysDbgReadPhysical,
2212 SysDbgWritePhysical,
2213 SysDbgReadControlSpace,
2214 SysDbgWriteControlSpace,
2215 SysDbgReadIoSpace,
2216 SysDbgWriteIoSpace,
2217 SysDbgReadMsr,
2218 SysDbgWriteMsr,
2219 SysDbgReadBusData,
2220 SysDbgWriteBusData
2221 } SYSDBG_COMMAND, *PSYSDBG_COMMAND;
2222
2223
2224 /*************************************************************************
2225 * Loader structures
2226 *
2227 * Those are not part of standard Winternl.h
2228 */
2229 typedef struct _LDR_MODULE
2230 {
2231 LIST_ENTRY InLoadOrderModuleList;
2232 LIST_ENTRY InMemoryOrderModuleList;
2233 LIST_ENTRY InInitializationOrderModuleList;
2234 void* BaseAddress;
2235 void* EntryPoint;
2236 ULONG SizeOfImage;
2237 UNICODE_STRING FullDllName;
2238 UNICODE_STRING BaseDllName;
2239 ULONG Flags;
2240 SHORT LoadCount;
2241 SHORT TlsIndex;
2242 LIST_ENTRY HashLinks;
2243 ULONG TimeDateStamp;
2244 HANDLE ActivationContext;
2245 PVOID PatchInformation;
2246 LIST_ENTRY ForwarderLinks;
2247 LIST_ENTRY ServiceTagLinks;
2248 LIST_ENTRY StaticLinks;
2249 PVOID ContextInformation;
2250 ULONG_PTR OriginalBase;
2251 LARGE_INTEGER LoadTime;
2252
2253 /* Not part of Win7 but used by Wine */
2254 HANDLE SectionHandle;
2255 } LDR_MODULE, *PLDR_MODULE;
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;
2264 } LDR_DLL_LOADED_NOTIFICATION_DATA, *PLDR_DLL_LOADED_NOTIFICATION_DATA;
2265
2266 typedef struct _LDR_DLL_UNLOADED_NOTIFICATION_DATA
2267 {
2268 ULONG Flags;
2269 PCUNICODE_STRING FullDllName;
2270 PCUNICODE_STRING BaseDllName;
2271 PVOID DllBase;
2272 ULONG SizeOfImage;
2273 } LDR_DLL_UNLOADED_NOTIFICATION_DATA, *PLDR_DLL_UNLOADED_NOTIFICATION_DATA;
2274
2275 typedef union _LDR_DLL_NOTIFICATION_DATA
2276 {
2277 LDR_DLL_LOADED_NOTIFICATION_DATA Loaded;
2278 LDR_DLL_UNLOADED_NOTIFICATION_DATA Unloaded;
2279 } LDR_DLL_NOTIFICATION_DATA, *PLDR_DLL_NOTIFICATION_DATA;
2280
2281 typedef void (CALLBACK *PLDR_DLL_NOTIFICATION_FUNCTION)(ULONG, LDR_DLL_NOTIFICATION_DATA*, void*);
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 */
2315 BYTE Name[MAXIMUM_FILENAME_LENGTH]; /* 1c/28 */
2316 } SYSTEM_MODULE, *PSYSTEM_MODULE;
2317
2318 typedef struct _SYSTEM_MODULE_INFORMATION
2319 {
2320 ULONG ModulesCount;
2321 SYSTEM_MODULE Modules[1]; /* FIXME: should be Modules[0] */
2322 } SYSTEM_MODULE_INFORMATION, *PSYSTEM_MODULE_INFORMATION;
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, ...);
2346 NTSYSAPI NTSTATUS WINAPI LdrAccessResource(HMODULE,const IMAGE_RESOURCE_DATA_ENTRY*,void**,PULONG);
2347 NTSYSAPI NTSTATUS WINAPI LdrAddRefDll(ULONG,HMODULE);
2348 NTSYSAPI NTSTATUS WINAPI LdrFindResourceDirectory_U(HMODULE,const LDR_RESOURCE_INFO*,ULONG,const IMAGE_RESOURCE_DIRECTORY**);
2349 NTSYSAPI NTSTATUS WINAPI LdrFindResource_U(HMODULE,const LDR_RESOURCE_INFO*,ULONG,const IMAGE_RESOURCE_DATA_ENTRY**);
2350 NTSYSAPI NTSTATUS WINAPI LdrDisableThreadCalloutsForDll(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*);
2357 IMAGE_BASE_RELOCATION * WINAPI LdrProcessRelocationBlock(void*,UINT,USHORT*,INT_PTR);
2358 NTSYSAPI NTSTATUS WINAPI LdrQueryImageFileExecutionOptions(const UNICODE_STRING*,LPCWSTR,ULONG,void*,ULONG,ULONG*);
2359 NTSYSAPI NTSTATUS WINAPI LdrQueryProcessModuleInformation(SYSTEM_MODULE_INFORMATION*, ULONG, ULONG*);
2360 NTSYSAPI void WINAPI LdrShutdownProcess(void);
2361 NTSYSAPI void WINAPI LdrShutdownThread(void);
2362 NTSYSAPI NTSTATUS WINAPI LdrUnloadDll(HMODULE);
2363 NTSYSAPI NTSTATUS WINAPI LdrUnlockLoaderLock(ULONG,ULONG_PTR);
2364 NTSYSAPI NTSTATUS WINAPI NtAcceptConnectPort(PHANDLE,ULONG,PLPC_MESSAGE,BOOLEAN,PLPC_SECTION_WRITE,PLPC_SECTION_READ);
2365 NTSYSAPI NTSTATUS WINAPI NtAccessCheck(PSECURITY_DESCRIPTOR,HANDLE,ACCESS_MASK,PGENERIC_MAPPING,PPRIVILEGE_SET,PULONG,PULONG,NTSTATUS*);
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*);
2368 NTSYSAPI NTSTATUS WINAPI NtAdjustGroupsToken(HANDLE,BOOLEAN,PTOKEN_GROUPS,ULONG,PTOKEN_GROUPS,PULONG);
2369 NTSYSAPI NTSTATUS WINAPI NtAdjustPrivilegesToken(HANDLE,BOOLEAN,PTOKEN_PRIVILEGES,DWORD,PTOKEN_PRIVILEGES,PDWORD);
2370 NTSYSAPI NTSTATUS WINAPI NtAlertResumeThread(HANDLE,PULONG);
2371 NTSYSAPI NTSTATUS WINAPI NtAlertThread(HANDLE ThreadHandle);
2372 NTSYSAPI NTSTATUS WINAPI NtAllocateLocallyUniqueId(PLUID lpLuid);
2373 NTSYSAPI NTSTATUS WINAPI NtAllocateUuids(PULARGE_INTEGER,PULONG,PULONG,PUCHAR);
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);
2386 NTSYSAPI NTSTATUS WINAPI NtContinue(PCONTEXT,BOOLEAN);
2387 NTSYSAPI NTSTATUS WINAPI NtCreateDirectoryObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
2388 NTSYSAPI NTSTATUS WINAPI NtCreateEvent(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *,EVENT_TYPE,BOOLEAN);
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);
2392 NTSYSAPI NTSTATUS WINAPI NtCreateJobObject(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
2393 NTSYSAPI NTSTATUS WINAPI NtCreateKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,PULONG);
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);
2397 NTSYSAPI NTSTATUS WINAPI NtCreateMutant(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,BOOLEAN);
2398 NTSYSAPI NTSTATUS WINAPI NtCreateNamedPipeFile(PHANDLE,ULONG,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,PLARGE_INTEGER);
2399 NTSYSAPI NTSTATUS WINAPI NtCreatePagingFile(PUNICODE_STRING,PLARGE_INTEGER,PLARGE_INTEGER,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);
2404 NTSYSAPI NTSTATUS WINAPI NtCreateSemaphore(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,LONG,LONG);
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);
2407 NTSYSAPI NTSTATUS WINAPI NtCreateTimer(HANDLE*, ACCESS_MASK, const OBJECT_ATTRIBUTES*, TIMER_TYPE);
2408 NTSYSAPI NTSTATUS WINAPI NtCreateToken(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,TOKEN_TYPE,PLUID,PLARGE_INTEGER,PTOKEN_USER,PTOKEN_GROUPS,PTOKEN_PRIVILEGES,PTOKEN_OWNER,PTOKEN_PRIMARY_GROUP,PTOKEN_DEFAULT_DACL,PTOKEN_SOURCE);
2409 NTSYSAPI NTSTATUS WINAPI NtDelayExecution(BOOLEAN,const LARGE_INTEGER*);
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);
2417 NTSYSAPI NTSTATUS WINAPI NtDuplicateToken(HANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,SECURITY_IMPERSONATION_LEVEL,TOKEN_TYPE,PHANDLE);
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);
2420 NTSYSAPI NTSTATUS WINAPI NtExtendSection(HANDLE,PLARGE_INTEGER);
2421 NTSYSAPI NTSTATUS WINAPI NtFilterToken(HANDLE,ULONG,TOKEN_GROUPS*,TOKEN_PRIVILEGES*,TOKEN_GROUPS*,HANDLE*);
2422 NTSYSAPI NTSTATUS WINAPI NtFindAtom(const WCHAR*,ULONG,RTL_ATOM*);
2423 NTSYSAPI NTSTATUS WINAPI NtFlushBuffersFile(HANDLE,IO_STATUS_BLOCK*);
2424 NTSYSAPI NTSTATUS WINAPI NtFlushInstructionCache(HANDLE,LPCVOID,SIZE_T);
2425 NTSYSAPI NTSTATUS WINAPI NtFlushKey(HANDLE);
2426 NTSYSAPI NTSTATUS WINAPI NtFlushVirtualMemory(HANDLE,LPCVOID*,SIZE_T*,ULONG);
2427 NTSYSAPI NTSTATUS WINAPI NtFlushWriteBuffer(VOID);
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*);
2431 NTSYSAPI ULONG WINAPI NtGetCurrentProcessorNumber(void);
2432 NTSYSAPI NTSTATUS WINAPI NtGetPlugPlayEvent(ULONG,ULONG,PVOID,ULONG);
2433 NTSYSAPI ULONG WINAPI NtGetTickCount(VOID);
2434 NTSYSAPI NTSTATUS WINAPI NtGetWriteWatch(HANDLE,ULONG,PVOID,SIZE_T,PVOID*,ULONG_PTR*,ULONG*);
2435 NTSYSAPI NTSTATUS WINAPI NtImpersonateAnonymousToken(HANDLE);
2436 NTSYSAPI NTSTATUS WINAPI NtImpersonateClientOfPort(HANDLE,PPORT_MESSAGE);
2437 NTSYSAPI NTSTATUS WINAPI NtImpersonateThread(HANDLE,HANDLE,PSECURITY_QUALITY_OF_SERVICE);
2438 NTSYSAPI NTSTATUS WINAPI NtInitializeRegistry(BOOLEAN);
2439 NTSYSAPI NTSTATUS WINAPI NtInitiatePowerAction(POWER_ACTION,SYSTEM_POWER_STATE,ULONG,BOOLEAN);
2440 NTSYSAPI NTSTATUS WINAPI NtIsProcessInJob(HANDLE,HANDLE);
2441 NTSYSAPI NTSTATUS WINAPI NtListenPort(HANDLE,PLPC_MESSAGE);
2442 NTSYSAPI NTSTATUS WINAPI NtLoadDriver(const UNICODE_STRING *);
2443 NTSYSAPI NTSTATUS WINAPI NtLoadKey(const OBJECT_ATTRIBUTES *,OBJECT_ATTRIBUTES *);
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);
2451 NTSYSAPI NTSTATUS WINAPI NtOpenDirectoryObject(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
2452 NTSYSAPI NTSTATUS WINAPI NtOpenEvent(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *);
2453 NTSYSAPI NTSTATUS WINAPI NtOpenEventPair(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
2454 NTSYSAPI NTSTATUS WINAPI NtOpenFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG);
2455 NTSYSAPI NTSTATUS WINAPI NtOpenIoCompletion(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
2456 NTSYSAPI NTSTATUS WINAPI NtOpenJobObject(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
2457 NTSYSAPI NTSTATUS WINAPI NtOpenKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *);
2458 NTSYSAPI NTSTATUS WINAPI NtOpenKeyEx(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG);
2459 NTSYSAPI NTSTATUS WINAPI NtOpenKeyTransacted(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,HANDLE);
2460 NTSYSAPI NTSTATUS WINAPI NtOpenKeyTransactedEx(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,HANDLE);
2461 NTSYSAPI NTSTATUS WINAPI NtOpenKeyedEvent(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
2462 NTSYSAPI NTSTATUS WINAPI NtOpenMutant(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
2463 NTSYSAPI NTSTATUS WINAPI NtOpenObjectAuditAlarm(PUNICODE_STRING,PHANDLE,PUNICODE_STRING,PUNICODE_STRING,PSECURITY_DESCRIPTOR,HANDLE,ACCESS_MASK,ACCESS_MASK,PPRIVILEGE_SET,BOOLEAN,BOOLEAN,PBOOLEAN);
2464 NTSYSAPI NTSTATUS WINAPI NtOpenProcess(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const CLIENT_ID*);
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*);
2468 NTSYSAPI NTSTATUS WINAPI NtOpenSemaphore(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
2469 NTSYSAPI NTSTATUS WINAPI NtOpenSymbolicLinkObject(PHANDLE,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);
2475 NTSYSAPI NTSTATUS WINAPI NtPrivilegeCheck(HANDLE,PPRIVILEGE_SET,PBOOLEAN);
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);
2481 NTSYSAPI NTSTATUS WINAPI NtQueryAttributesFile(const OBJECT_ATTRIBUTES*,FILE_BASIC_INFORMATION*);
2482 NTSYSAPI NTSTATUS WINAPI NtQueryDefaultLocale(BOOLEAN,LCID*);
2483 NTSYSAPI NTSTATUS WINAPI NtQueryDefaultUILanguage(LANGID*);
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);
2488 NTSYSAPI NTSTATUS WINAPI NtQueryFullAttributesFile(const OBJECT_ATTRIBUTES*,FILE_NETWORK_OPEN_INFORMATION*);
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);
2491 NTSYSAPI NTSTATUS WINAPI NtQueryInformationJobObject(HANDLE,JOBOBJECTINFOCLASS,PVOID,ULONG,PULONG);
2492 NTSYSAPI NTSTATUS WINAPI NtQueryInformationPort(HANDLE,PORT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2493 NTSYSAPI NTSTATUS WINAPI NtQueryInformationProcess(HANDLE,PROCESSINFOCLASS,PVOID,ULONG,PULONG);
2494 NTSYSAPI NTSTATUS WINAPI NtQueryInformationThread(HANDLE,THREADINFOCLASS,PVOID,ULONG,PULONG);
2495 NTSYSAPI NTSTATUS WINAPI NtQueryInformationToken(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2496 NTSYSAPI NTSTATUS WINAPI NtQueryInstallUILanguage(LANGID*);
2497 NTSYSAPI NTSTATUS WINAPI NtQueryIntervalProfile(KPROFILE_SOURCE,PULONG);
2498 NTSYSAPI NTSTATUS WINAPI NtQueryIoCompletion(HANDLE,IO_COMPLETION_INFORMATION_CLASS,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);
2504 NTSYSAPI NTSTATUS WINAPI NtQueryPerformanceCounter(PLARGE_INTEGER, PLARGE_INTEGER);
2505 NTSYSAPI NTSTATUS WINAPI NtQuerySecurityObject(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,ULONG,PULONG);
2506 NTSYSAPI NTSTATUS WINAPI NtQuerySection(HANDLE,SECTION_INFORMATION_CLASS,PVOID,SIZE_T,SIZE_T*);
2507 NTSYSAPI NTSTATUS WINAPI NtQuerySemaphore(HANDLE,SEMAPHORE_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2508 NTSYSAPI NTSTATUS WINAPI NtQuerySymbolicLinkObject(HANDLE,PUNICODE_STRING,PULONG);
2509 NTSYSAPI NTSTATUS WINAPI NtQuerySystemEnvironmentValue(PUNICODE_STRING,PWCHAR,ULONG,PULONG);
2510 NTSYSAPI NTSTATUS WINAPI NtQuerySystemInformation(SYSTEM_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2511 NTSYSAPI NTSTATUS WINAPI NtQuerySystemInformationEx(SYSTEM_INFORMATION_CLASS,void*,ULONG,void*,ULONG,ULONG*);
2512 NTSYSAPI NTSTATUS WINAPI NtQuerySystemTime(PLARGE_INTEGER);
2513 NTSYSAPI NTSTATUS WINAPI NtQueryTimer(HANDLE,TIMER_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2514 NTSYSAPI NTSTATUS WINAPI NtQueryTimerResolution(PULONG,PULONG,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 *);
2517 NTSYSAPI NTSTATUS WINAPI NtQueryVirtualMemory(HANDLE,LPCVOID,MEMORY_INFORMATION_CLASS,PVOID,SIZE_T,SIZE_T*);
2518 NTSYSAPI NTSTATUS WINAPI NtQueryVolumeInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS);
2519 NTSYSAPI NTSTATUS WINAPI NtRaiseException(PEXCEPTION_RECORD,PCONTEXT,BOOL);
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*);
2525 NTSYSAPI NTSTATUS WINAPI NtRegisterThreadTerminatePort(HANDLE);
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);
2546 NTSYSAPI NTSTATUS WINAPI NtSetDefaultLocale(BOOLEAN,LCID);
2547 NTSYSAPI NTSTATUS WINAPI NtSetDefaultUILanguage(LANGID);
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);
2552 NTSYSAPI NTSTATUS WINAPI NtSetHighWaitLowThread(VOID);
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);
2558 NTSYSAPI NTSTATUS WINAPI NtSetInformationThread(HANDLE,THREADINFOCLASS,LPCVOID,ULONG);
2559 NTSYSAPI NTSTATUS WINAPI NtSetInformationToken(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,ULONG);
2560 NTSYSAPI NTSTATUS WINAPI NtSetIntervalProfile(ULONG,KPROFILE_SOURCE);
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);
2565 NTSYSAPI NTSTATUS WINAPI NtSetLowWaitHighThread(VOID);
2566 NTSYSAPI NTSTATUS WINAPI NtSetSecurityObject(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
2567 NTSYSAPI NTSTATUS WINAPI NtSetSystemEnvironmentValue(PUNICODE_STRING,PUNICODE_STRING);
2568 NTSYSAPI NTSTATUS WINAPI NtSetSystemInformation(SYSTEM_INFORMATION_CLASS,PVOID,ULONG);
2569 NTSYSAPI NTSTATUS WINAPI NtSetSystemPowerState(POWER_ACTION,SYSTEM_POWER_STATE,ULONG);
2570 NTSYSAPI NTSTATUS WINAPI NtSetSystemTime(const LARGE_INTEGER*,LARGE_INTEGER*);
2571 NTSYSAPI NTSTATUS WINAPI NtSetTimer(HANDLE, const LARGE_INTEGER*, PTIMER_APC_ROUTINE, PVOID, BOOLEAN, ULONG, BOOLEAN*);
2572 NTSYSAPI NTSTATUS WINAPI NtSetTimerResolution(ULONG,BOOLEAN,PULONG);
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*);
2576 NTSYSAPI NTSTATUS WINAPI NtShutdownSystem(SHUTDOWN_ACTION);
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*);
2593 NTSYSAPI NTSTATUS WINAPI NtWaitForSingleObject(HANDLE,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);
2604 NTSYSAPI BYTE WINAPI RtlAcquireResourceExclusive(LPRTL_RWLOCK,BYTE);
2605 NTSYSAPI BYTE WINAPI RtlAcquireResourceShared(LPRTL_RWLOCK,BYTE);
2606 NTSYSAPI void WINAPI RtlAcquireSRWLockExclusive(RTL_SRWLOCK*);
2607 NTSYSAPI void WINAPI RtlAcquireSRWLockShared(RTL_SRWLOCK*);
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);
2621 NTSYSAPI void WINAPI RtlAddRefActivationContext(HANDLE);
2622 NTSYSAPI PVOID WINAPI RtlAddVectoredExceptionHandler(ULONG,PVECTORED_EXCEPTION_HANDLER);
2623 NTSYSAPI NTSTATUS WINAPI RtlAdjustPrivilege(ULONG,BOOLEAN,BOOLEAN,PBOOLEAN);
2624 NTSYSAPI NTSTATUS WINAPI RtlAllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY,BYTE,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,PSID *);
2625 NTSYSAPI RTL_HANDLE * WINAPI RtlAllocateHandle(RTL_HANDLE_TABLE *,ULONG *);
2626 NTSYSAPI PVOID WINAPI RtlAllocateHeap(HANDLE,ULONG,SIZE_T) __WINE_ALLOC_SIZE(3);
2627 NTSYSAPI WCHAR WINAPI RtlAnsiCharToUnicodeChar(LPSTR *);
2628 NTSYSAPI DWORD WINAPI RtlAnsiStringToUnicodeSize(const STRING *);
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 *);
2632 NTSYSAPI NTSTATUS WINAPI RtlAppendUnicodeStringToString(UNICODE_STRING *,const UNICODE_STRING *);
2633 NTSYSAPI NTSTATUS WINAPI RtlAppendUnicodeToString(UNICODE_STRING *,LPCWSTR);
2634 NTSYSAPI BOOLEAN WINAPI RtlAreAllAccessesGranted(ACCESS_MASK,ACCESS_MASK);
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);
2647 NTSYSAPI LONG WINAPI RtlCompareUnicodeStrings(const WCHAR*,SIZE_T,const WCHAR*,SIZE_T,BOOLEAN);
2648 NTSYSAPI NTSTATUS WINAPI RtlCompressBuffer(USHORT,PUCHAR,ULONG,PUCHAR,ULONG,ULONG,PULONG,PVOID);
2649 NTSYSAPI DWORD WINAPI RtlComputeCrc32(DWORD,const BYTE*,INT);
2650 NTSYSAPI NTSTATUS WINAPI RtlConvertSidToUnicodeString(PUNICODE_STRING,PSID,BOOLEAN);
2651 NTSYSAPI void WINAPI RtlCopyLuid(PLUID,const LUID*);
2652 NTSYSAPI void WINAPI RtlCopyLuidAndAttributesArray(ULONG,const LUID_AND_ATTRIBUTES*,PLUID_AND_ATTRIBUTES);
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);
2663 NTSYSAPI NTSTATUS WINAPI RtlCreateTimerQueue(PHANDLE);
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);
2674 NTSYSAPI NTSTATUS WINAPI RtlDeleteCriticalSection(RTL_CRITICAL_SECTION *);
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);
2685 NTSYSAPI NTSTATUS WINAPI RtlDestroyHandleTable(RTL_HANDLE_TABLE *);
2686 NTSYSAPI HANDLE WINAPI RtlDestroyHeap(HANDLE);
2687 NTSYSAPI void WINAPI RtlDestroyProcessParameters(RTL_USER_PROCESS_PARAMETERS*);
2688 NTSYSAPI NTSTATUS WINAPI RtlDestroyQueryDebugBuffer(PDEBUG_BUFFER);
2689 NTSYSAPI DOS_PATHNAME_TYPE WINAPI RtlDetermineDosPathNameType_U(PCWSTR);
2690 NTSYSAPI BOOLEAN WINAPI RtlDllShutdownInProgress(void);
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*);
2695 NTSYSAPI WCHAR WINAPI RtlDowncaseUnicodeChar(WCHAR);
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*);
2706 NTSYSAPI BOOL WINAPI RtlEqualPrefixSid(PSID,PSID);
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);
2710 NTSYSAPI void DECLSPEC_NORETURN WINAPI RtlExitUserProcess(ULONG);
2711 NTSYSAPI void DECLSPEC_NORETURN WINAPI RtlExitUserThread(ULONG);
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);
2721 NTSYSAPI CCHAR WINAPI RtlFindLeastSignificantBit(ULONGLONG);
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**);
2725 NTSYSAPI CCHAR WINAPI RtlFindMostSignificantBit(ULONGLONG);
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);
2739 NTSYSAPI void WINAPI RtlFreeThreadActivationContextStack(void);
2740 NTSYSAPI void WINAPI RtlFreeUnicodeString(PUNICODE_STRING);
2741 NTSYSAPI NTSTATUS WINAPI RtlGetAce(PACL,DWORD,LPVOID *);
2742 NTSYSAPI NTSTATUS WINAPI RtlGetActiveActivationContext(HANDLE*);
2743 NTSYSAPI NTSTATUS WINAPI RtlGetCompressionWorkSpaceSize(USHORT,PULONG,PULONG);
2744 NTSYSAPI NTSTATUS WINAPI RtlGetControlSecurityDescriptor(PSECURITY_DESCRIPTOR, PSECURITY_DESCRIPTOR_CONTROL,LPDWORD);
2745 NTSYSAPI ULONG WINAPI RtlGetCurrentDirectory_U(ULONG, LPWSTR);
2746 NTSYSAPI PEB * WINAPI RtlGetCurrentPeb(void);
2747 NTSYSAPI NTSTATUS WINAPI RtlGetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR,PBOOLEAN,PACL *,PBOOLEAN);
2748 NTSYSAPI TEB_ACTIVE_FRAME * WINAPI RtlGetFrame(void);
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);
2752 NTSYSAPI DWORD WINAPI RtlGetLastWin32Error(void);
2753 NTSYSAPI DWORD WINAPI RtlGetLongestNtPathLength(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*);
2758 NTSYSAPI DWORD WINAPI RtlGetThreadErrorMode(void);
2759 NTSYSAPI NTSTATUS WINAPI RtlGetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR,PBOOLEAN,PACL *,PBOOLEAN);
2760 NTSYSAPI NTSTATUS WINAPI RtlGetVersion(RTL_OSVERSIONINFOEXW*);
2761 NTSYSAPI NTSTATUS WINAPI RtlGUIDFromString(PUNICODE_STRING,GUID*);
2762 NTSYSAPI PSID_IDENTIFIER_AUTHORITY WINAPI RtlIdentifierAuthoritySid(PSID);
2763 NTSYSAPI PVOID WINAPI RtlImageDirectoryEntryToData(HMODULE,BOOL,WORD,ULONG *);
2764 NTSYSAPI PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE);
2765 NTSYSAPI PIMAGE_SECTION_HEADER WINAPI RtlImageRvaToSection(const IMAGE_NT_HEADERS *,HMODULE,DWORD);
2766 NTSYSAPI PVOID WINAPI RtlImageRvaToVa(const IMAGE_NT_HEADERS *,HMODULE,DWORD,IMAGE_SECTION_HEADER **);
2767 NTSYSAPI NTSTATUS WINAPI RtlImpersonateSelf(SECURITY_IMPERSONATION_LEVEL);
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);
2774 NTSYSAPI void WINAPI RtlInitializeConditionVariable(RTL_CONDITION_VARIABLE *);
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);
2780 NTSYSAPI void WINAPI RtlInitializeSRWLock(RTL_SRWLOCK*);
2781 NTSYSAPI BOOL WINAPI RtlInitializeSid(PSID,PSID_IDENTIFIER_AUTHORITY,BYTE);
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 *);
2785 NTSYSAPI BOOLEAN WINAPI RtlIsActivationContextActive(HANDLE);
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);
2797 NTSYSAPI NTSTATUS WINAPI RtlLocalTimeToSystemTime(const LARGE_INTEGER*,PLARGE_INTEGER);
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);
2801 NTSYSAPI void WINAPI RtlMapGenericMask(PACCESS_MASK,const GENERIC_MAPPING*);
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);
2807 NTSYSAPI ULONG WINAPI RtlNtStatusToDosErrorNoTeb(NTSTATUS);
2808 NTSYSAPI ULONG WINAPI RtlNumberOfSetBits(PCRTL_BITMAP);
2809 NTSYSAPI ULONG WINAPI RtlNumberOfClearBits(PCRTL_BITMAP);
2810 NTSYSAPI UINT WINAPI RtlOemStringToUnicodeSize(const STRING*);
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);
2816 NTSYSAPI void WINAPI RtlPopFrame(TEB_ACTIVE_FRAME*);
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*);
2821 NTSYSAPI NTSTATUS WINAPI RtlQueryDynamicTimeZoneInformation(RTL_DYNAMIC_TIME_ZONE_INFORMATION*);
2822 NTSYSAPI NTSTATUS WINAPI RtlQueryEnvironmentVariable_U(PWSTR,PUNICODE_STRING,PUNICODE_STRING);
2823 NTSYSAPI NTSTATUS WINAPI RtlQueryHeapInformation(HANDLE,HEAP_INFORMATION_CLASS,PVOID,SIZE_T,PSIZE_T);
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 NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID);
2828 NTSYSAPI NTSTATUS WINAPI RtlQueryTimeZoneInformation(RTL_TIME_ZONE_INFORMATION*);
2829 NTSYSAPI NTSTATUS WINAPI RtlQueryUnbiasedInterruptTime(ULONGLONG*);
2830 NTSYSAPI NTSTATUS WINAPI RtlQueueWorkItem(PRTL_WORK_ITEM_ROUTINE,PVOID,ULONG);
2831 NTSYSAPI void WINAPI RtlRaiseException(PEXCEPTION_RECORD);
2832 NTSYSAPI void WINAPI RtlRaiseStatus(NTSTATUS);
2833 NTSYSAPI ULONG WINAPI RtlRandom(PULONG);
2834 NTSYSAPI PVOID WINAPI RtlReAllocateHeap(HANDLE,ULONG,PVOID,SIZE_T);
2835 NTSYSAPI NTSTATUS WINAPI RtlRegisterWait(PHANDLE,HANDLE,RTL_WAITORTIMERCALLBACKFUNC,PVOID,ULONG,ULONG);
2836 NTSYSAPI void WINAPI RtlReleaseActivationContext(HANDLE);
2837 NTSYSAPI void WINAPI RtlReleasePebLock(void);
2838 NTSYSAPI void WINAPI RtlReleaseResource(LPRTL_RWLOCK);
2839 NTSYSAPI void WINAPI RtlReleaseSRWLockExclusive(RTL_SRWLOCK*);
2840 NTSYSAPI void WINAPI RtlReleaseSRWLockShared(RTL_SRWLOCK*);
2841 NTSYSAPI ULONG WINAPI RtlRemoveVectoredExceptionHandler(PVOID);
2842 NTSYSAPI void WINAPI RtlRestoreLastWin32Error(DWORD);
2843 NTSYSAPI void WINAPI RtlSecondsSince1970ToTime(DWORD,LARGE_INTEGER *);
2844 NTSYSAPI void WINAPI RtlSecondsSince1980ToTime(DWORD,LARGE_INTEGER *);
2845 NTSYSAPI NTSTATUS WINAPI RtlSelfRelativeToAbsoluteSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PDWORD,PACL,PDWORD,PACL,PDWORD,PSID,PDWORD,PSID,PDWORD);
2846 NTSYSAPI void WINAPI RtlSetAllBits(PRTL_BITMAP);
2847 NTSYSAPI void WINAPI RtlSetBits(PRTL_BITMAP,ULONG,ULONG);
2848 NTSYSAPI ULONG WINAPI RtlSetCriticalSectionSpinCount(RTL_CRITICAL_SECTION*,ULONG);
2849 NTSYSAPI NTSTATUS WINAPI RtlSetControlSecurityDescriptor(PSECURITY_DESCRIPTOR,SECURITY_DESCRIPTOR_CONTROL,SECURITY_DESCRIPTOR_CONTROL);
2850 NTSYSAPI NTSTATUS WINAPI RtlSetCurrentDirectory_U(const UNICODE_STRING*);
2851 NTSYSAPI void WINAPI RtlSetCurrentEnvironment(PWSTR, PWSTR*);
2852 NTSYSAPI NTSTATUS WINAPI RtlSetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR,BOOLEAN,PACL,BOOLEAN);
2853 NTSYSAPI NTSTATUS WINAPI RtlSetEnvironmentVariable(PWSTR*,PUNICODE_STRING,PUNICODE_STRING);
2854 NTSYSAPI NTSTATUS WINAPI RtlSetHeapInformation(HANDLE,HEAP_INFORMATION_CLASS,PVOID,SIZE_T);
2855 NTSYSAPI NTSTATUS WINAPI RtlSetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID,BOOLEAN);
2856 NTSYSAPI NTSTATUS WINAPI RtlSetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID,BOOLEAN);
2857 NTSYSAPI NTSTATUS WINAPI RtlSetIoCompletionCallback(HANDLE,PRTL_OVERLAPPED_COMPLETION_ROUTINE,ULONG);
2858 NTSYSAPI void WINAPI RtlSetLastWin32Error(DWORD);
2859 NTSYSAPI void WINAPI RtlSetLastWin32ErrorAndNtStatusFromNtStatus(NTSTATUS);
2860 NTSYSAPI NTSTATUS WINAPI RtlSetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR,BOOLEAN,PACL,BOOLEAN);
2861 NTSYSAPI NTSTATUS WINAPI RtlSetThreadErrorMode(DWORD,LPDWORD);
2862 NTSYSAPI NTSTATUS WINAPI RtlSetTimeZoneInformation(const RTL_TIME_ZONE_INFORMATION*);
2863 NTSYSAPI SIZE_T WINAPI RtlSizeHeap(HANDLE,ULONG,const void*);
2864 NTSYSAPI NTSTATUS WINAPI RtlSleepConditionVariableCS(RTL_CONDITION_VARIABLE*,RTL_CRITICAL_SECTION*,const LARGE_INTEGER*);
2865 NTSYSAPI NTSTATUS WINAPI RtlSleepConditionVariableSRW(RTL_CONDITION_VARIABLE*,RTL_SRWLOCK*,const LARGE_INTEGER*,ULONG);
2866 NTSYSAPI NTSTATUS WINAPI RtlStringFromGUID(REFGUID,PUNICODE_STRING);
2867 NTSYSAPI LPDWORD WINAPI RtlSubAuthoritySid(PSID,DWORD);
2868 NTSYSAPI LPBYTE WINAPI RtlSubAuthorityCountSid(PSID);
2869 NTSYSAPI NTSTATUS WINAPI RtlSystemTimeToLocalTime(const LARGE_INTEGER*,PLARGE_INTEGER);
2870 NTSYSAPI void WINAPI RtlTimeToTimeFields(const LARGE_INTEGER*,PTIME_FIELDS);
2871 NTSYSAPI BOOLEAN WINAPI RtlTimeFieldsToTime(PTIME_FIELDS,PLARGE_INTEGER);
2872 NTSYSAPI void WINAPI RtlTimeToElapsedTimeFields(const LARGE_INTEGER *,PTIME_FIELDS);
2873 NTSYSAPI BOOLEAN WINAPI RtlTimeToSecondsSince1970(const LARGE_INTEGER *,LPDWORD);
2874 NTSYSAPI BOOLEAN WINAPI RtlTimeToSecondsSince1980(const LARGE_INTEGER *,LPDWORD);
2875 NTSYSAPI BOOLEAN WINAPI RtlTryAcquireSRWLockExclusive(RTL_SRWLOCK *);
2876 NTSYSAPI BOOLEAN WINAPI RtlTryAcquireSRWLockShared(RTL_SRWLOCK *);
2877 NTSYSAPI BOOL WINAPI RtlTryEnterCriticalSection(RTL_CRITICAL_SECTION *);
2878 #ifdef __REACTOS__
2879 ULONGLONG __fastcall RtlUlonglongByteSwap(ULONGLONG);
2880 #define RtlUlonglongByteSwap(_x) _byteswap_uint64((_x))
2881 #else
2882 NTSYSAPI ULONGLONG __cdecl RtlUlonglongByteSwap(ULONGLONG);
2883 #endif /* __REACTOS__ */
2884 NTSYSAPI DWORD WINAPI RtlUnicodeStringToAnsiSize(const UNICODE_STRING*);
2885 NTSYSAPI NTSTATUS WINAPI RtlUnicodeStringToAnsiString(PANSI_STRING,PCUNICODE_STRING,BOOLEAN);
2886 NTSYSAPI NTSTATUS WINAPI RtlUnicodeStringToInteger(const UNICODE_STRING *,ULONG,ULONG *);
2887 NTSYSAPI DWORD WINAPI RtlUnicodeStringToOemSize(const UNICODE_STRING*);
2888 NTSYSAPI NTSTATUS WINAPI RtlUnicodeStringToOemString(POEM_STRING,PCUNICODE_STRING,BOOLEAN);
2889 NTSYSAPI NTSTATUS WINAPI RtlUnicodeToMultiByteN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
2890 NTSYSAPI NTSTATUS WINAPI RtlUnicodeToMultiByteSize(PULONG,PCWSTR,ULONG);
2891 NTSYSAPI NTSTATUS WINAPI RtlUnicodeToOemN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
2892 NTSYSAPI ULONG WINAPI RtlUniform(PULONG);
2893 NTSYSAPI BOOLEAN WINAPI RtlUnlockHeap(HANDLE);
2894 NTSYSAPI void WINAPI RtlUnwind(PVOID,PVOID,PEXCEPTION_RECORD,PVOID);
2895 #ifdef __x86_64__
2896 NTSYSAPI void WINAPI RtlUnwindEx(PVOID,PVOID,PEXCEPTION_RECORD,PVOID,PCONTEXT,PUNWIND_HISTORY_TABLE);
2897 #elif defined(__ia64__)
2898 NTSYSAPI void WINAPI RtlUnwind2(FRAME_POINTERS,PVOID,PEXCEPTION_RECORD,PVOID,PCONTEXT);
2899 NTSYSAPI void WINAPI RtlUnwindEx(FRAME_POINTERS,PVOID,PEXCEPTION_RECORD,PVOID,PCONTEXT,PUNWIND_HISTORY_TABLE);
2900 #endif
2901 NTSYSAPI WCHAR WINAPI RtlUpcaseUnicodeChar(WCHAR);
2902 NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeString(UNICODE_STRING*,const UNICODE_STRING *,BOOLEAN);
2903 NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeStringToAnsiString(STRING*,const UNICODE_STRING*,BOOLEAN);
2904 NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeStringToCountedOemString(STRING*,const UNICODE_STRING*,BOOLEAN);
2905 NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeStringToOemString(STRING*,const UNICODE_STRING*,BOOLEAN);
2906 NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeToMultiByteN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
2907 NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeToOemN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
2908 NTSYSAPI NTSTATUS WINAPI RtlUpdateTimer(HANDLE, HANDLE, DWORD, DWORD);
2909 NTSYSAPI CHAR WINAPI RtlUpperChar(CHAR);
2910 NTSYSAPI void WINAPI RtlUpperString(STRING *,const STRING *);
2911 NTSYSAPI NTSTATUS WINAPI RtlValidSecurityDescriptor(PSECURITY_DESCRIPTOR);
2912 NTSYSAPI BOOLEAN WINAPI RtlValidRelativeSecurityDescriptor(PSECURITY_DESCRIPTOR,ULONG,SECURITY_INFORMATION);
2913 NTSYSAPI BOOLEAN WINAPI RtlValidAcl(PACL);
2914 NTSYSAPI BOOLEAN WINAPI RtlValidSid(PSID);
2915 NTSYSAPI BOOLEAN WINAPI RtlValidateHeap(HANDLE,ULONG,LPCVOID);
2916 NTSYSAPI NTSTATUS WINAPI RtlVerifyVersionInfo(const RTL_OSVERSIONINFOEXW*,DWORD,DWORDLONG);
2917 NTSYSAPI void WINAPI RtlWakeAllConditionVariable(RTL_CONDITION_VARIABLE *);
2918 NTSYSAPI void WINAPI RtlWakeConditionVariable(RTL_CONDITION_VARIABLE *);
2919 NTSYSAPI NTSTATUS WINAPI RtlWalkHeap(HANDLE,PVOID);
2920 NTSYSAPI NTSTATUS WINAPI RtlWow64EnableFsRedirection(BOOLEAN);
2921 NTSYSAPI NTSTATUS WINAPI RtlWow64EnableFsRedirectionEx(ULONG,ULONG*);
2922 NTSYSAPI NTSTATUS WINAPI RtlWriteRegistryValue(ULONG,PCWSTR,PCWSTR,ULONG,PVOID,ULONG);
2923 NTSYSAPI NTSTATUS WINAPI RtlZombifyActivationContext(HANDLE);
2924 NTSYSAPI NTSTATUS WINAPI RtlpNtCreateKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,PULONG);
2925 NTSYSAPI NTSTATUS WINAPI RtlpNtEnumerateSubKey(HANDLE,UNICODE_STRING *, ULONG);
2926 NTSYSAPI NTSTATUS WINAPI RtlpWaitForCriticalSection(RTL_CRITICAL_SECTION *);
2927 NTSYSAPI NTSTATUS WINAPI RtlpUnWaitCriticalSection(RTL_CRITICAL_SECTION *);
2928 NTSYSAPI NTSTATUS WINAPI vDbgPrintEx(ULONG,ULONG,LPCSTR,__ms_va_list);
2929 NTSYSAPI NTSTATUS WINAPI vDbgPrintExWithPrefix(LPCSTR,ULONG,ULONG,LPCSTR,__ms_va_list);
2930
2931 /* 32-bit only functions */
2932
2933 #ifndef _WIN64
2934 NTSYSAPI LONGLONG WINAPI RtlConvertLongToLargeInteger(LONG);
2935 NTSYSAPI ULONGLONG WINAPI RtlConvertUlongToLargeInteger(ULONG);
2936 NTSYSAPI LONGLONG WINAPI RtlEnlargedIntegerMultiply(INT,INT);
2937 NTSYSAPI ULONGLONG WINAPI RtlEnlargedUnsignedMultiply(UINT,UINT);
2938 NTSYSAPI UINT WINAPI RtlEnlargedUnsignedDivide(ULONGLONG,UINT,UINT *);
2939 NTSYSAPI LONGLONG WINAPI RtlExtendedMagicDivide(LONGLONG,LONGLONG,INT);
2940 NTSYSAPI LONGLONG WINAPI RtlExtendedIntegerMultiply(LONGLONG,INT);
2941 NTSYSAPI LONGLONG WINAPI RtlExtendedLargeIntegerDivide(LONGLONG,INT,INT *);
2942 NTSYSAPI LONGLONG WINAPI RtlLargeIntegerAdd(LONGLONG,LONGLONG);
2943 NTSYSAPI LONGLONG WINAPI RtlLargeIntegerArithmeticShift(LONGLONG,INT);
2944 NTSYSAPI ULONGLONG WINAPI RtlLargeIntegerDivide( ULONGLONG,ULONGLONG,ULONGLONG *);
2945 NTSYSAPI LONGLONG WINAPI RtlLargeIntegerNegate(LONGLONG);
2946 NTSYSAPI LONGLONG WINAPI RtlLargeIntegerShiftLeft(LONGLONG,INT);
2947 NTSYSAPI LONGLONG WINAPI RtlLargeIntegerShiftRight(LONGLONG,INT);
2948 NTSYSAPI LONGLONG WINAPI RtlLargeIntegerSubtract(LONGLONG,LONGLONG);
2949 NTSYSAPI NTSTATUS WINAPI RtlLargeIntegerToChar(const ULONGLONG *,ULONG,ULONG,PCHAR);
2950 #endif
2951
2952 /* Wine internal functions */
2953
2954 NTSYSAPI NTSTATUS CDECL wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRING *unix_name_ret,
2955 UINT disposition, BOOLEAN check_case );
2956 NTSYSAPI NTSTATUS CDECL wine_unix_to_nt_file_name( const ANSI_STRING *name, UNICODE_STRING *nt );
2957
2958 NTSYSAPI SIZE_T CDECL wine_uninterrupted_read_memory( const void *addr, void *buffer, SIZE_T size );
2959 NTSYSAPI SIZE_T CDECL wine_uninterrupted_write_memory( void *addr, const void *buffer, SIZE_T size );
2960
2961
2962 /***********************************************************************
2963 * Inline functions
2964 */
2965
2966 #define InitializeObjectAttributes(p,n,a,r,s) \
2967 do { \
2968 (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
2969 (p)->RootDirectory = r; \
2970 (p)->Attributes = a; \
2971 (p)->ObjectName = n; \
2972 (p)->SecurityDescriptor = s; \
2973 (p)->SecurityQualityOfService = NULL; \
2974 } while (0)
2975
2976 #define NtCurrentProcess() ((HANDLE)-1)
2977
2978 #ifndef RtlFillMemory // REACTOS
2979 #define RtlFillMemory(Destination,Length,Fill) memset((Destination),(Fill),(Length))
2980 #endif // REACTOS
2981 #ifndef RtlMoveMemory // REACTOS
2982 #define RtlMoveMemory(Destination,Source,Length) memmove((Destination),(Source),(Length))
2983 #endif // REACTOS
2984 #define RtlStoreUlong(p,v) do { ULONG _v = (v); memcpy((p), &_v, sizeof(_v)); } while (0)
2985 #define RtlStoreUlonglong(p,v) do { ULONGLONG _v = (v); memcpy((p), &_v, sizeof(_v)); } while (0)
2986 #define RtlRetrieveUlong(p,s) memcpy((p), (s), sizeof(ULONG))
2987 #define RtlRetrieveUlonglong(p,s) memcpy((p), (s), sizeof(ULONGLONG))
2988 #ifndef RtlZeroMemory // REACTOS
2989 #define RtlZeroMemory(Destination,Length) memset((Destination),0,(Length))
2990 #endif // REACTOS
2991
2992 static inline BOOLEAN RtlCheckBit(PCRTL_BITMAP lpBits, ULONG ulBit)
2993 {
2994 if (lpBits && ulBit < lpBits->SizeOfBitMap &&
2995 lpBits->Buffer[ulBit >> 5] & (1 << (ulBit & 31)))
2996 return TRUE;
2997 return FALSE;
2998 }
2999
3000 /* These are implemented as __fastcall, so we can't let Winelib apps link with them */
3001 static inline USHORT RtlUshortByteSwap(USHORT s)
3002 {
3003 return (s >> 8) | (s << 8);
3004 }
3005 static inline ULONG RtlUlongByteSwap(ULONG i)
3006 {
3007 #if defined(__i386__) && defined(__GNUC__)
3008 ULONG ret;
3009 __asm__("bswap %0" : "=r" (ret) : "0" (i) );
3010 return ret;
3011 #else
3012 return ((ULONG)RtlUshortByteSwap((USHORT)i) << 16) | RtlUshortByteSwap((USHORT)(i >> 16));
3013 #endif
3014 }
3015
3016 /* list manipulation macros */
3017 #define InitializeListHead(le) (void)((le)->Flink = (le)->Blink = (le))
3018 #define InsertHeadList(le,e) do { PLIST_ENTRY f = (le)->Flink; (e)->Flink = f; (e)->Blink = (le); f->Blink = (e); (le)->Flink = (e); } while (0)
3019 #define InsertTailList(le,e) do { PLIST_ENTRY b = (le)->Blink; (e)->Flink = (le); (e)->Blink = b; b->Flink = (e); (le)->Blink = (e); } while (0)
3020 #define IsListEmpty(le) ((le)->Flink == (le))
3021 #define RemoveEntryList(e) do { PLIST_ENTRY f = (e)->Flink, b = (e)->Blink; f->Blink = b; b->Flink = f; (e)->Flink = (e)->Blink = NULL; } while (0)
3022 static inline PLIST_ENTRY RemoveHeadList(PLIST_ENTRY le)
3023 {
3024 PLIST_ENTRY f, b, e;
3025
3026 e = le->Flink;
3027 f = le->Flink->Flink;
3028 b = le->Flink->Blink;
3029 f->Blink = b;
3030 b->Flink = f;
3031
3032 if (e != le) e->Flink = e->Blink = NULL;
3033 return e;
3034 }
3035 static inline PLIST_ENTRY RemoveTailList(PLIST_ENTRY le)
3036 {
3037 PLIST_ENTRY f, b, e;
3038
3039 e = le->Blink;
3040 f = le->Blink->Flink;
3041 b = le->Blink->Blink;
3042 f->Blink = b;
3043 b->Flink = f;
3044
3045 if (e != le) e->Flink = e->Blink = NULL;
3046 return e;
3047 }
3048
3049
3050 #ifdef __WINESRC__
3051
3052 /* FIXME: private structure for vm86 mode, stored in teb->GdiTebBatch */
3053 typedef struct
3054 {
3055 DWORD dpmi_vif;
3056 DWORD vm86_pending;
3057 } WINE_VM86_TEB_INFO;
3058
3059 static inline WINE_VM86_TEB_INFO *get_vm86_teb_info(void)
3060 {
3061 return (WINE_VM86_TEB_INFO *)&NtCurrentTeb()->GdiTebBatch;
3062 }
3063
3064 /* The thread information for 16-bit threads */
3065 /* NtCurrentTeb()->SubSystemTib points to this */
3066 typedef struct
3067 {
3068 void *unknown; /* 00 unknown */
3069 UNICODE_STRING *exe_name; /* 04 exe module name */
3070
3071 /* the following fields do not exist under Windows */
3072 UNICODE_STRING exe_str; /* exe name string pointed to by exe_name */
3073 CURDIR curdir; /* current directory */
3074 WCHAR curdir_buffer[MAX_PATH];
3075 } WIN16_SUBSYSTEM_TIB;
3076
3077 #endif /* __WINESRC__ */
3078
3079 #ifdef __cplusplus
3080 } /* extern "C" */
3081 #endif /* defined(__cplusplus) */
3082
3083 #endif /* __WINE_WINTERNL_H */