VirtualBox

source: vbox/trunk/src/VBox/Devices/Graphics/shaderlib/wine/include/winternl.h@ 53206

Last change on this file since 53206 was 53206, checked in by vboxsync, 10 years ago

Devices/vmsvga: header fixes

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 118.0 KB
Line 
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/*
22 * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
23 * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
24 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
25 * a choice of LGPL license versions is made available with the language indicating
26 * that LGPLv2 or any later version may be used, or where a choice of which version
27 * of the LGPL is applied is otherwise unspecified.
28 */
29
30#ifndef __WINE_WINTERNL_H
31#define __WINE_WINTERNL_H
32
33#include <windef.h>
34
35#ifdef __cplusplus
36extern "C" {
37#endif /* defined(__cplusplus) */
38
39
40/**********************************************************************
41 * Fundamental types and data structures
42 */
43
44#ifndef WINE_NTSTATUS_DECLARED
45#define WINE_NTSTATUS_DECLARED
46typedef LONG NTSTATUS;
47#endif
48
49typedef const char *PCSZ;
50
51typedef short CSHORT;
52typedef CSHORT *PCSHORT;
53
54#ifndef __STRING_DEFINED__
55#define __STRING_DEFINED__
56typedef struct _STRING {
57 USHORT Length;
58 USHORT MaximumLength;
59 PCHAR Buffer;
60} STRING, *PSTRING;
61#endif
62
63typedef STRING ANSI_STRING;
64typedef PSTRING PANSI_STRING;
65typedef const STRING *PCANSI_STRING;
66
67typedef STRING OEM_STRING;
68typedef PSTRING POEM_STRING;
69typedef const STRING *PCOEM_STRING;
70
71#ifndef __UNICODE_STRING_DEFINED__
72#define __UNICODE_STRING_DEFINED__
73typedef struct _UNICODE_STRING {
74 USHORT Length; /* bytes */
75 USHORT MaximumLength; /* bytes */
76 PWSTR Buffer;
77} UNICODE_STRING, *PUNICODE_STRING;
78#endif
79
80typedef const UNICODE_STRING *PCUNICODE_STRING;
81
82#ifndef _FILETIME_
83#define _FILETIME_
84/* 64 bit number of 100 nanoseconds intervals since January 1, 1601 */
85typedef struct _FILETIME
86{
87#ifdef WORDS_BIGENDIAN
88 DWORD dwHighDateTime;
89 DWORD dwLowDateTime;
90#else
91 DWORD dwLowDateTime;
92 DWORD dwHighDateTime;
93#endif
94} FILETIME, *PFILETIME, *LPFILETIME;
95#endif /* _FILETIME_ */
96
97/*
98 * RTL_SYSTEM_TIME and RTL_TIME_ZONE_INFORMATION are the same as
99 * the SYSTEMTIME and TIME_ZONE_INFORMATION structures defined
100 * in winbase.h, however we need to define them separately so
101 * winternl.h doesn't depend on winbase.h. They are used by
102 * RtlQueryTimeZoneInformation and RtlSetTimeZoneInformation.
103 * The names are guessed; if anybody knows the real names, let me know.
104 */
105typedef struct _RTL_SYSTEM_TIME {
106 WORD wYear;
107 WORD wMonth;
108 WORD wDayOfWeek;
109 WORD wDay;
110 WORD wHour;
111 WORD wMinute;
112 WORD wSecond;
113 WORD wMilliseconds;
114} RTL_SYSTEM_TIME, *PRTL_SYSTEM_TIME;
115
116typedef struct _RTL_TIME_ZONE_INFORMATION {
117 LONG Bias;
118 WCHAR StandardName[32];
119 RTL_SYSTEM_TIME StandardDate;
120 LONG StandardBias;
121 WCHAR DaylightName[32];
122 RTL_SYSTEM_TIME DaylightDate;
123 LONG DaylightBias;
124} RTL_TIME_ZONE_INFORMATION, *PRTL_TIME_ZONE_INFORMATION;
125
126typedef struct _CLIENT_ID
127{
128 HANDLE UniqueProcess;
129 HANDLE UniqueThread;
130} CLIENT_ID, *PCLIENT_ID;
131
132typedef struct _CURDIR
133{
134 UNICODE_STRING DosPath;
135 PVOID Handle;
136} CURDIR, *PCURDIR;
137
138typedef struct RTL_DRIVE_LETTER_CURDIR
139{
140 USHORT Flags;
141 USHORT Length;
142 ULONG TimeStamp;
143 UNICODE_STRING DosPath;
144} RTL_DRIVE_LETTER_CURDIR, *PRTL_DRIVE_LETTER_CURDIR;
145
146typedef struct tagRTL_BITMAP {
147 ULONG SizeOfBitMap; /* Number of bits in the bitmap */
148 PULONG Buffer; /* Bitmap data, assumed sized to a DWORD boundary */
149} RTL_BITMAP, *PRTL_BITMAP;
150
151typedef const RTL_BITMAP *PCRTL_BITMAP;
152
153typedef struct tagRTL_BITMAP_RUN {
154 ULONG StartingIndex; /* Bit position at which run starts */
155 ULONG NumberOfBits; /* Size of the run in bits */
156} RTL_BITMAP_RUN, *PRTL_BITMAP_RUN;
157
158typedef const RTL_BITMAP_RUN *PCRTL_BITMAP_RUN;
159
160typedef struct _RTL_USER_PROCESS_PARAMETERS
161{
162 ULONG AllocationSize;
163 ULONG Size;
164 ULONG Flags;
165 ULONG DebugFlags;
166 HANDLE ConsoleHandle;
167 ULONG ConsoleFlags;
168 HANDLE hStdInput;
169 HANDLE hStdOutput;
170 HANDLE hStdError;
171 CURDIR CurrentDirectory;
172 UNICODE_STRING DllPath;
173 UNICODE_STRING ImagePathName;
174 UNICODE_STRING CommandLine;
175 PWSTR Environment;
176 ULONG dwX;
177 ULONG dwY;
178 ULONG dwXSize;
179 ULONG dwYSize;
180 ULONG dwXCountChars;
181 ULONG dwYCountChars;
182 ULONG dwFillAttribute;
183 ULONG dwFlags;
184 ULONG wShowWindow;
185 UNICODE_STRING WindowTitle;
186 UNICODE_STRING Desktop;
187 UNICODE_STRING ShellInfo;
188 UNICODE_STRING RuntimeInfo;
189 RTL_DRIVE_LETTER_CURDIR DLCurrentDirectory[0x20];
190} RTL_USER_PROCESS_PARAMETERS, *PRTL_USER_PROCESS_PARAMETERS;
191
192/* value for Flags field (FIXME: not the correct name) */
193#define PROCESS_PARAMS_FLAG_NORMALIZED 1
194
195typedef struct _PEB_LDR_DATA
196{
197 ULONG Length;
198 BOOLEAN Initialized;
199 PVOID SsHandle;
200 LIST_ENTRY InLoadOrderModuleList;
201 LIST_ENTRY InMemoryOrderModuleList;
202 LIST_ENTRY InInitializationOrderModuleList;
203} PEB_LDR_DATA, *PPEB_LDR_DATA;
204
205typedef struct _GDI_TEB_BATCH
206{
207 ULONG Offset;
208 HANDLE HDC;
209 ULONG Buffer[0x136];
210} GDI_TEB_BATCH;
211
212typedef struct _RTL_ACTIVATION_CONTEXT_STACK_FRAME
213{
214 struct _RTL_ACTIVATION_CONTEXT_STACK_FRAME *Previous;
215 struct _ACTIVATION_CONTEXT *ActivationContext;
216 ULONG Flags;
217} RTL_ACTIVATION_CONTEXT_STACK_FRAME, *PRTL_ACTIVATION_CONTEXT_STACK_FRAME;
218
219typedef struct _ACTIVATION_CONTEXT_STACK
220{
221 ULONG Flags;
222 ULONG NextCookieSequenceNumber;
223 RTL_ACTIVATION_CONTEXT_STACK_FRAME *ActiveFrame;
224 LIST_ENTRY FrameListCache;
225} ACTIVATION_CONTEXT_STACK, *PACTIVATION_CONTEXT_STACK;
226
227/***********************************************************************
228 * PEB data structure
229 */
230typedef struct _PEB
231{ /* win32/win64 */
232 BOOLEAN InheritedAddressSpace; /* 000/000 */
233 BOOLEAN ReadImageFileExecOptions; /* 001/001 */
234 BOOLEAN BeingDebugged; /* 002/002 */
235 BOOLEAN SpareBool; /* 003/003 */
236 HANDLE Mutant; /* 004/008 */
237 HMODULE ImageBaseAddress; /* 008/010 */
238 PPEB_LDR_DATA LdrData; /* 00c/018 */
239 RTL_USER_PROCESS_PARAMETERS *ProcessParameters; /* 010/020 */
240 PVOID SubSystemData; /* 014/028 */
241 HANDLE ProcessHeap; /* 018/030 */
242 PRTL_CRITICAL_SECTION FastPebLock; /* 01c/038 */
243 PVOID /*PPEBLOCKROUTINE*/ FastPebLockRoutine; /* 020/040 */
244 PVOID /*PPEBLOCKROUTINE*/ FastPebUnlockRoutine; /* 024/048 */
245 ULONG EnvironmentUpdateCount; /* 028/050 */
246 PVOID KernelCallbackTable; /* 02c/058 */
247 ULONG Reserved[2]; /* 030/060 */
248 PVOID /*PPEB_FREE_BLOCK*/ FreeList; /* 038/068 */
249 ULONG TlsExpansionCounter; /* 03c/070 */
250 PRTL_BITMAP TlsBitmap; /* 040/078 */
251 ULONG TlsBitmapBits[2]; /* 044/080 */
252 PVOID ReadOnlySharedMemoryBase; /* 04c/088 */
253 PVOID ReadOnlySharedMemoryHeap; /* 050/090 */
254 PVOID *ReadOnlyStaticServerData; /* 054/098 */
255 PVOID AnsiCodePageData; /* 058/0a0 */
256 PVOID OemCodePageData; /* 05c/0a8 */
257 PVOID UnicodeCaseTableData; /* 060/0b0 */
258 ULONG NumberOfProcessors; /* 064/0b8 */
259 ULONG NtGlobalFlag; /* 068/0bc */
260 LARGE_INTEGER CriticalSectionTimeout; /* 070/0c0 */
261 SIZE_T HeapSegmentReserve; /* 078/0c8 */
262 SIZE_T HeapSegmentCommit; /* 07c/0d0 */
263 SIZE_T HeapDeCommitTotalFreeThreshold; /* 080/0d8 */
264 SIZE_T HeapDeCommitFreeBlockThreshold; /* 084/0e0 */
265 ULONG NumberOfHeaps; /* 088/0e8 */
266 ULONG MaximumNumberOfHeaps; /* 08c/0ec */
267 PVOID *ProcessHeaps; /* 090/0f0 */
268 PVOID GdiSharedHandleTable; /* 094/0f8 */
269 PVOID ProcessStarterHelper; /* 098/100 */
270 PVOID GdiDCAttributeList; /* 09c/108 */
271 PVOID LoaderLock; /* 0a0/110 */
272 ULONG OSMajorVersion; /* 0a4/118 */
273 ULONG OSMinorVersion; /* 0a8/11c */
274 ULONG OSBuildNumber; /* 0ac/120 */
275 ULONG OSPlatformId; /* 0b0/124 */
276 ULONG ImageSubSystem; /* 0b4/128 */
277 ULONG ImageSubSystemMajorVersion; /* 0b8/12c */
278 ULONG ImageSubSystemMinorVersion; /* 0bc/130 */
279 ULONG ImageProcessAffinityMask; /* 0c0/134 */
280 HANDLE GdiHandleBuffer[28]; /* 0c4/138 */
281 ULONG unknown[6]; /* 134/218 */
282 PVOID PostProcessInitRoutine; /* 14c/230 */
283 PRTL_BITMAP TlsExpansionBitmap; /* 150/238 */
284 ULONG TlsExpansionBitmapBits[32]; /* 154/240 */
285 ULONG SessionId; /* 1d4/2c0 */
286 ULARGE_INTEGER AppCompatFlags; /* 1d8/2c8 */
287 ULARGE_INTEGER AppCompatFlagsUser; /* 1e0/2d0 */
288 PVOID ShimData; /* 1e8/2d8 */
289 PVOID AppCompatInfo; /* 1ec/2e0 */
290 UNICODE_STRING CSDVersion; /* 1f0/2e8 */
291 PVOID ActivationContextData; /* 1f8/2f8 */
292 PVOID ProcessAssemblyStorageMap; /* 1fc/300 */
293 PVOID SystemDefaultActivationData; /* 200/308 */
294 PVOID SystemAssemblyStorageMap; /* 204/310 */
295 SIZE_T MinimumStackCommit; /* 208/318 */
296 PVOID *FlsCallback; /* 20c/320 */
297 LIST_ENTRY FlsListHead; /* 210/328 */
298 PRTL_BITMAP FlsBitmap; /* 218/338 */
299 ULONG FlsBitmapBits[4]; /* 21c/340 */
300} PEB, *PPEB;
301
302
303/***********************************************************************
304 * TEB data structure
305 */
306typedef struct _TEB
307{ /* win32/win64 */
308 NT_TIB Tib; /* 000/0000 */
309 PVOID EnvironmentPointer; /* 01c/0038 */
310 CLIENT_ID ClientId; /* 020/0040 */
311 PVOID ActiveRpcHandle; /* 028/0050 */
312 PVOID ThreadLocalStoragePointer; /* 02c/0058 */
313 PPEB Peb; /* 030/0060 */
314 ULONG LastErrorValue; /* 034/0068 */
315 ULONG CountOfOwnedCriticalSections; /* 038/006c */
316 PVOID CsrClientThread; /* 03c/0070 */
317 PVOID Win32ThreadInfo; /* 040/0078 */
318 ULONG Win32ClientInfo[31]; /* 044/0080 used for user32 private data in Wine */
319 PVOID WOW32Reserved; /* 0c0/0100 */
320 ULONG CurrentLocale; /* 0c4/0108 */
321 ULONG FpSoftwareStatusRegister; /* 0c8/010c */
322 PVOID SystemReserved1[54]; /* 0cc/0110 used for kernel32 private data in Wine */
323 LONG ExceptionCode; /* 1a4/02c0 */
324 ACTIVATION_CONTEXT_STACK ActivationContextStack; /* 1a8/02c8 */
325 BYTE SpareBytes1[24]; /* 1bc/02e8 used for ntdll private data in Wine */
326 PVOID SystemReserved2[10]; /* 1d4/0300 used for ntdll private data in Wine */
327 GDI_TEB_BATCH GdiTebBatch; /* 1fc/0350 used for vm86 private data in Wine */
328 HANDLE gdiRgn; /* 6dc/0838 */
329 HANDLE gdiPen; /* 6e0/0840 */
330 HANDLE gdiBrush; /* 6e4/0848 */
331 CLIENT_ID RealClientId; /* 6e8/0850 */
332 HANDLE GdiCachedProcessHandle; /* 6f0/0860 */
333 ULONG GdiClientPID; /* 6f4/0868 */
334 ULONG GdiClientTID; /* 6f8/086c */
335 PVOID GdiThreadLocaleInfo; /* 6fc/0870 */
336 ULONG UserReserved[5]; /* 700/0878 */
337 PVOID glDispachTable[280]; /* 714/0890 */
338 PVOID glReserved1[26]; /* b74/1150 */
339 PVOID glReserved2; /* bdc/1220 */
340 PVOID glSectionInfo; /* be0/1228 */
341 PVOID glSection; /* be4/1230 */
342 PVOID glTable; /* be8/1238 */
343 PVOID glCurrentRC; /* bec/1240 */
344 PVOID glContext; /* bf0/1248 */
345 ULONG LastStatusValue; /* bf4/1250 */
346 UNICODE_STRING StaticUnicodeString; /* bf8/1258 used by advapi32 */
347 WCHAR StaticUnicodeBuffer[261]; /* c00/1268 used by advapi32 */
348 PVOID DeallocationStack; /* e0c/1478 */
349 PVOID TlsSlots[64]; /* e10/1480 */
350 LIST_ENTRY TlsLinks; /* f10/1680 */
351 PVOID Vdm; /* f18/1690 */
352 PVOID ReservedForNtRpc; /* f1c/1698 */
353 PVOID DbgSsReserved[2]; /* f20/16a0 */
354 ULONG HardErrorDisabled; /* f28/16b0 */
355 PVOID Instrumentation[16]; /* f2c/16b8 */
356 PVOID WinSockData; /* f6c/1738 */
357 ULONG GdiBatchCount; /* f70/1740 */
358 ULONG Spare2; /* f74/1744 */
359 PVOID Spare3; /* f78/1748 */
360 PVOID Spare4; /* f7c/1750 */
361 PVOID ReservedForOle; /* f80/1758 */
362 ULONG WaitingOnLoaderLock; /* f84/1760 */
363 PVOID Reserved5[3]; /* f88/1768 */
364 PVOID *TlsExpansionSlots; /* f94/1780 */
365 ULONG ImpersonationLocale; /* f98/1788 */
366 ULONG IsImpersonating; /* f9c/178c */
367 PVOID NlsCache; /* fa0/1790 */
368 PVOID ShimData; /* fa4/1798 */
369 ULONG HeapVirtualAffinity; /* fa8/17a0 */
370 PVOID CurrentTransactionHandle; /* fac/17a8 */
371 PVOID ActiveFrame; /* fb0/17b0 */
372#ifdef _WIN64
373 PVOID unknown[2]; /* 17b8 */
374#endif
375 PVOID *FlsSlots; /* fb4/17c8 */
376} TEB, *PTEB;
377
378/***********************************************************************
379 * Enums
380 */
381
382typedef enum _FILE_INFORMATION_CLASS {
383 FileDirectoryInformation = 1,
384 FileFullDirectoryInformation,
385 FileBothDirectoryInformation,
386 FileBasicInformation,
387 FileStandardInformation,
388 FileInternalInformation,
389 FileEaInformation,
390 FileAccessInformation,
391 FileNameInformation,
392 FileRenameInformation,
393 FileLinkInformation,
394 FileNamesInformation,
395 FileDispositionInformation,
396 FilePositionInformation,
397 FileFullEaInformation,
398 FileModeInformation,
399 FileAlignmentInformation,
400 FileAllInformation,
401 FileAllocationInformation,
402 FileEndOfFileInformation,
403 FileAlternateNameInformation,
404 FileStreamInformation,
405 FilePipeInformation,
406 FilePipeLocalInformation,
407 FilePipeRemoteInformation,
408 FileMailslotQueryInformation,
409 FileMailslotSetInformation,
410 FileCompressionInformation,
411 FileObjectIdInformation,
412 FileCompletionInformation,
413 FileMoveClusterInformation,
414 FileQuotaInformation,
415 FileReparsePointInformation,
416 FileNetworkOpenInformation,
417 FileAttributeTagInformation,
418 FileTrackingInformation,
419 FileIdBothDirectoryInformation,
420 FileIdFullDirectoryInformation,
421 FileValidDataLengthInformation,
422 FileShortNameInformation = 40,
423 /* 41, 42, 43 undocumented */
424 FileSfioReserveInformation = 44,
425 FileSfioVolumeInformation = 45,
426 FileHardLinkInformation = 46,
427 /* 47 undocumented */
428 FileNormalizedNameInformation = 48,
429 /* 49 undocumented */
430 FileIdGlobalTxDirectoryInformation = 50,
431 /* 51, 52, 53 undocumented */
432 FileStandardLinkInformation = 54,
433 FileMaximumInformation
434} FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS;
435
436typedef struct _FILE_DIRECTORY_INFORMATION {
437 ULONG NextEntryOffset;
438 ULONG FileIndex;
439 LARGE_INTEGER CreationTime;
440 LARGE_INTEGER LastAccessTime;
441 LARGE_INTEGER LastWriteTime;
442 LARGE_INTEGER ChangeTime;
443 LARGE_INTEGER EndOfFile;
444 LARGE_INTEGER AllocationSize;
445 ULONG FileAttributes;
446 ULONG FileNameLength;
447 WCHAR FileName[ANYSIZE_ARRAY];
448} FILE_DIRECTORY_INFORMATION, *PFILE_DIRECTORY_INFORMATION;
449
450typedef struct _FILE_FULL_DIRECTORY_INFORMATION {
451 ULONG NextEntryOffset;
452 ULONG FileIndex;
453 LARGE_INTEGER CreationTime;
454 LARGE_INTEGER LastAccessTime;
455 LARGE_INTEGER LastWriteTime;
456 LARGE_INTEGER ChangeTime;
457 LARGE_INTEGER EndOfFile;
458 LARGE_INTEGER AllocationSize;
459 ULONG FileAttributes;
460 ULONG FileNameLength;
461 ULONG EaSize;
462 WCHAR FileName[ANYSIZE_ARRAY];
463} FILE_FULL_DIRECTORY_INFORMATION, *PFILE_FULL_DIRECTORY_INFORMATION,
464 FILE_FULL_DIR_INFORMATION, *PFILE_FULL_DIR_INFORMATION;
465
466typedef struct _FILE_ID_FULL_DIRECTORY_INFORMATION {
467 ULONG NextEntryOffset;
468 ULONG FileIndex;
469 LARGE_INTEGER CreationTime;
470 LARGE_INTEGER LastAccessTime;
471 LARGE_INTEGER LastWriteTime;
472 LARGE_INTEGER ChangeTime;
473 LARGE_INTEGER EndOfFile;
474 LARGE_INTEGER AllocationSize;
475 ULONG FileAttributes;
476 ULONG FileNameLength;
477 ULONG EaSize;
478 LARGE_INTEGER FileId;
479 WCHAR FileName[ANYSIZE_ARRAY];
480} FILE_ID_FULL_DIRECTORY_INFORMATION, *PFILE_ID_FULL_DIRECTORY_INFORMATION;
481
482typedef struct _FILE_BOTH_DIRECTORY_INFORMATION {
483 ULONG NextEntryOffset;
484 ULONG FileIndex;
485 LARGE_INTEGER CreationTime;
486 LARGE_INTEGER LastAccessTime;
487 LARGE_INTEGER LastWriteTime;
488 LARGE_INTEGER ChangeTime;
489 LARGE_INTEGER EndOfFile;
490 LARGE_INTEGER AllocationSize;
491 ULONG FileAttributes;
492 ULONG FileNameLength;
493 ULONG EaSize;
494 CHAR ShortNameLength;
495 WCHAR ShortName[12];
496 WCHAR FileName[ANYSIZE_ARRAY];
497} FILE_BOTH_DIRECTORY_INFORMATION, *PFILE_BOTH_DIRECTORY_INFORMATION,
498 FILE_BOTH_DIR_INFORMATION, *PFILE_BOTH_DIR_INFORMATION;
499
500typedef struct _FILE_ID_BOTH_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 ULONG EaSize;
512 CHAR ShortNameLength;
513 WCHAR ShortName[12];
514 LARGE_INTEGER FileId;
515 WCHAR FileName[ANYSIZE_ARRAY];
516} FILE_ID_BOTH_DIRECTORY_INFORMATION, *PFILE_ID_BOTH_DIRECTORY_INFORMATION;
517
518typedef struct _FILE_BASIC_INFORMATION {
519 LARGE_INTEGER CreationTime;
520 LARGE_INTEGER LastAccessTime;
521 LARGE_INTEGER LastWriteTime;
522 LARGE_INTEGER ChangeTime;
523 ULONG FileAttributes;
524} FILE_BASIC_INFORMATION, *PFILE_BASIC_INFORMATION;
525
526typedef struct _FILE_STANDARD_INFORMATION {
527 LARGE_INTEGER AllocationSize;
528 LARGE_INTEGER EndOfFile;
529 ULONG NumberOfLinks;
530 BOOLEAN DeletePending;
531 BOOLEAN Directory;
532} FILE_STANDARD_INFORMATION, *PFILE_STANDARD_INFORMATION;
533
534typedef struct _FILE_INTERNAL_INFORMATION {
535 LARGE_INTEGER IndexNumber;
536} FILE_INTERNAL_INFORMATION, *PFILE_INTERNAL_INFORMATION;
537
538typedef struct _FILE_EA_INFORMATION {
539 ULONG EaSize;
540} FILE_EA_INFORMATION, *PFILE_EA_INFORMATION;
541
542typedef struct _FILE_ACCESS_INFORMATION {
543 ACCESS_MASK AccessFlags;
544} FILE_ACCESS_INFORMATION, *PFILE_ACCESS_INFORMATION;
545
546typedef struct _FILE_NAME_INFORMATION {
547 ULONG FileNameLength;
548 WCHAR FileName[1];
549} FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION;
550
551typedef struct _FILE_RENAME_INFORMATION {
552 BOOLEAN Replace;
553 HANDLE RootDir;
554 ULONG FileNameLength;
555 WCHAR FileName[1];
556} FILE_RENAME_INFORMATION, *PFILE_RENAME_INFORMATION;
557
558typedef struct _FILE_NAMES_INFORMATION {
559 ULONG NextEntryOffset;
560 ULONG FileIndex;
561 ULONG FileNameLength;
562 WCHAR FileName[1];
563} FILE_NAMES_INFORMATION, *PFILE_NAMES_INFORMATION;
564
565typedef struct _FILE_DISPOSITION_INFORMATION {
566 BOOLEAN DoDeleteFile;
567} FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION;
568
569typedef struct _FILE_POSITION_INFORMATION {
570 LARGE_INTEGER CurrentByteOffset;
571} FILE_POSITION_INFORMATION, *PFILE_POSITION_INFORMATION;
572
573typedef struct _FILE_ALIGNMENT_INFORMATION {
574 ULONG AlignmentRequirement;
575} FILE_ALIGNMENT_INFORMATION, *PFILE_ALIGNMENT_INFORMATION;
576
577typedef struct _FILE_ALLOCATION_INFORMATION {
578 LARGE_INTEGER AllocationSize;
579} FILE_ALLOCATION_INFORMATION, *PFILE_ALLOCATION_INFORMATION;
580
581typedef struct _FILE_END_OF_FILE_INFORMATION {
582 LARGE_INTEGER EndOfFile;
583} FILE_END_OF_FILE_INFORMATION, *PFILE_END_OF_FILE_INFORMATION;
584
585typedef struct _FILE_NETWORK_OPEN_INFORMATION {
586 LARGE_INTEGER CreationTime;
587 LARGE_INTEGER LastAccessTime;
588 LARGE_INTEGER LastWriteTime;
589 LARGE_INTEGER ChangeTime;
590 LARGE_INTEGER AllocationSize;
591 LARGE_INTEGER EndOfFile;
592 ULONG FileAttributes;
593} FILE_NETWORK_OPEN_INFORMATION, *PFILE_NETWORK_OPEN_INFORMATION;
594
595typedef struct _FILE_FULL_EA_INFORMATION {
596 ULONG NextEntryOffset;
597 UCHAR Flags;
598 UCHAR EaNameLength;
599 USHORT EaValueLength;
600 CHAR EaName[1];
601} FILE_FULL_EA_INFORMATION, *PFILE_FULL_EA_INFORMATION;
602
603typedef struct _FILE_MODE_INFORMATION {
604 ULONG Mode;
605} FILE_MODE_INFORMATION, *PFILE_MODE_INFORMATION;
606
607typedef struct _FILE_STREAM_INFORMATION
608{
609 ULONG NextEntryOffset;
610 ULONG StreamNameLength;
611 LARGE_INTEGER StreamSize;
612 LARGE_INTEGER StreamAllocationSize;
613 WCHAR StreamName[1];
614} FILE_STREAM_INFORMATION, *PFILE_STREAM_INFORMATION;
615
616typedef struct _FILE_ATTRIBUTE_TAG_INFORMATION
617{
618 ULONG FileAttributes;
619 ULONG ReparseTag;
620} FILE_ATTRIBUTE_TAG_INFORMATION, *PFILE_ATTRIBUTE_TAG_INFORMATION;
621
622typedef struct _FILE_MAILSLOT_QUERY_INFORMATION {
623 ULONG MaximumMessageSize;
624 ULONG MailslotQuota;
625 ULONG NextMessageSize;
626 ULONG MessagesAvailable;
627 LARGE_INTEGER ReadTimeout;
628} FILE_MAILSLOT_QUERY_INFORMATION, *PFILE_MAILSLOT_QUERY_INFORMATION;
629
630typedef struct _FILE_MAILSLOT_SET_INFORMATION {
631 LARGE_INTEGER ReadTimeout;
632} FILE_MAILSLOT_SET_INFORMATION, *PFILE_MAILSLOT_SET_INFORMATION;
633
634typedef struct _FILE_PIPE_LOCAL_INFORMATION {
635 ULONG NamedPipeType;
636 ULONG NamedPipeConfiguration;
637 ULONG MaximumInstances;
638 ULONG CurrentInstances;
639 ULONG InboundQuota;
640 ULONG ReadDataAvailable;
641 ULONG OutboundQuota;
642 ULONG WriteQuotaAvailable;
643 ULONG NamedPipeState;
644 ULONG NamedPipeEnd;
645} FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION;
646
647typedef struct _FILE_ALL_INFORMATION {
648 FILE_BASIC_INFORMATION BasicInformation;
649 FILE_STANDARD_INFORMATION StandardInformation;
650 FILE_INTERNAL_INFORMATION InternalInformation;
651 FILE_EA_INFORMATION EaInformation;
652 FILE_ACCESS_INFORMATION AccessInformation;
653 FILE_POSITION_INFORMATION PositionInformation;
654 FILE_MODE_INFORMATION ModeInformation;
655 FILE_ALIGNMENT_INFORMATION AlignmentInformation;
656 FILE_NAME_INFORMATION NameInformation;
657} FILE_ALL_INFORMATION, *PFILE_ALL_INFORMATION;
658
659typedef enum _FSINFOCLASS {
660 FileFsVolumeInformation = 1,
661 FileFsLabelInformation,
662 FileFsSizeInformation,
663 FileFsDeviceInformation,
664 FileFsAttributeInformation,
665 FileFsControlInformation,
666 FileFsFullSizeInformation,
667 FileFsObjectIdInformation,
668 FileFsMaximumInformation
669} FS_INFORMATION_CLASS, *PFS_INFORMATION_CLASS;
670
671typedef enum _KEY_INFORMATION_CLASS {
672 KeyBasicInformation,
673 KeyNodeInformation,
674 KeyFullInformation,
675 KeyNameInformation
676} KEY_INFORMATION_CLASS;
677
678typedef enum _KEY_VALUE_INFORMATION_CLASS {
679 KeyValueBasicInformation,
680 KeyValueFullInformation,
681 KeyValuePartialInformation,
682 KeyValueFullInformationAlign64,
683 KeyValuePartialInformationAlign64
684} KEY_VALUE_INFORMATION_CLASS;
685
686typedef enum _OBJECT_INFORMATION_CLASS {
687 ObjectBasicInformation,
688 ObjectNameInformation,
689 ObjectTypeInformation,
690 ObjectAllInformation,
691 ObjectDataInformation
692} OBJECT_INFORMATION_CLASS, *POBJECT_INFORMATION_CLASS;
693
694typedef enum _PROCESSINFOCLASS {
695 ProcessBasicInformation = 0,
696 ProcessQuotaLimits = 1,
697 ProcessIoCounters = 2,
698 ProcessVmCounters = 3,
699 ProcessTimes = 4,
700 ProcessBasePriority = 5,
701 ProcessRaisePriority = 6,
702 ProcessDebugPort = 7,
703 ProcessExceptionPort = 8,
704 ProcessAccessToken = 9,
705 ProcessLdtInformation = 10,
706 ProcessLdtSize = 11,
707 ProcessDefaultHardErrorMode = 12,
708 ProcessIoPortHandlers = 13,
709 ProcessPooledUsageAndLimits = 14,
710 ProcessWorkingSetWatch = 15,
711 ProcessUserModeIOPL = 16,
712 ProcessEnableAlignmentFaultFixup = 17,
713 ProcessPriorityClass = 18,
714 ProcessWx86Information = 19,
715 ProcessHandleCount = 20,
716 ProcessAffinityMask = 21,
717 ProcessPriorityBoost = 22,
718 ProcessDeviceMap = 23,
719 ProcessSessionInformation = 24,
720 ProcessForegroundInformation = 25,
721 ProcessWow64Information = 26,
722 ProcessImageFileName = 27,
723 ProcessLUIDDeviceMapsEnabled = 28,
724 ProcessBreakOnTermination = 29,
725 ProcessDebugObjectHandle = 30,
726 ProcessDebugFlags = 31,
727 ProcessHandleTracing = 32,
728 ProcessExecuteFlags = 34,
729 MaxProcessInfoClass
730} PROCESSINFOCLASS, PROCESS_INFORMATION_CLASS;
731
732#define MEM_EXECUTE_OPTION_DISABLE 0x01
733#define MEM_EXECUTE_OPTION_ENABLE 0x02
734#define MEM_EXECUTE_OPTION_PERMANENT 0x08
735
736typedef enum _SECTION_INHERIT {
737 ViewShare = 1,
738 ViewUnmap = 2
739} SECTION_INHERIT;
740
741typedef enum _SYSTEM_INFORMATION_CLASS {
742 SystemBasicInformation = 0,
743 SystemCpuInformation = 1,
744 SystemPerformanceInformation = 2,
745 SystemTimeOfDayInformation = 3, /* was SystemTimeInformation */
746 Unknown4,
747 SystemProcessInformation = 5,
748 Unknown6,
749 Unknown7,
750 SystemProcessorPerformanceInformation = 8,
751 Unknown9,
752 Unknown10,
753 SystemModuleInformation = 11,
754 Unknown12,
755 Unknown13,
756 Unknown14,
757 Unknown15,
758 SystemHandleInformation = 16,
759 Unknown17,
760 SystemPageFileInformation = 18,
761 Unknown19,
762 Unknown20,
763 SystemCacheInformation = 21,
764 Unknown22,
765 SystemInterruptInformation = 23,
766 SystemDpcBehaviourInformation = 24,
767 SystemFullMemoryInformation = 25,
768 SystemNotImplemented6 = 25,
769 SystemLoadImage = 26,
770 SystemUnloadImage = 27,
771 SystemTimeAdjustmentInformation = 28,
772 SystemTimeAdjustment = 28,
773 SystemSummaryMemoryInformation = 29,
774 SystemNotImplemented7 = 29,
775 SystemNextEventIdInformation = 30,
776 SystemNotImplemented8 = 30,
777 SystemEventIdsInformation = 31,
778 SystemCrashDumpInformation = 32,
779 SystemExceptionInformation = 33,
780 SystemCrashDumpStateInformation = 34,
781 SystemKernelDebuggerInformation = 35,
782 SystemContextSwitchInformation = 36,
783 SystemRegistryQuotaInformation = 37,
784 SystemCurrentTimeZoneInformation = 44,
785 SystemTimeZoneInformation = 44,
786 SystemLookasideInformation = 45,
787 SystemSetTimeSlipEvent = 46,
788 SystemCreateSession = 47,
789 SystemDeleteSession = 48,
790 SystemInvalidInfoClass4 = 49,
791 SystemRangeStartInformation = 50,
792 SystemVerifierInformation = 51,
793 SystemAddVerifier = 52,
794 SystemSessionProcessesInformation = 53,
795 Unknown54,
796 Unknown55,
797 Unknown56,
798 Unknown57,
799 Unknown58,
800 Unknown59,
801 Unknown60,
802 Unknown61,
803 Unknown62,
804 Unknown63,
805 Unknown64,
806 Unknown65,
807 Unknown66,
808 Unknown67,
809 Unknown68,
810 Unknown69,
811 Unknown70,
812 Unknown71,
813 Unknown72,
814 SystemLogicalProcessorInformation = 73,
815 SystemInformationClassMax
816} SYSTEM_INFORMATION_CLASS, *PSYSTEM_INFORMATION_CLASS;
817
818typedef enum _TIMER_TYPE {
819 NotificationTimer,
820 SynchronizationTimer
821} TIMER_TYPE;
822
823typedef enum _THREADINFOCLASS {
824 ThreadBasicInformation,
825 ThreadTimes,
826 ThreadPriority,
827 ThreadBasePriority,
828 ThreadAffinityMask,
829 ThreadImpersonationToken,
830 ThreadDescriptorTableEntry,
831 ThreadEnableAlignmentFaultFixup,
832 ThreadEventPair_Reusable,
833 ThreadQuerySetWin32StartAddress,
834 ThreadZeroTlsCell,
835 ThreadPerformanceCount,
836 ThreadAmILastThread,
837 ThreadIdealProcessor,
838 ThreadPriorityBoost,
839 ThreadSetTlsArrayAddress,
840 ThreadIsIoPending,
841 ThreadHideFromDebugger,
842 MaxThreadInfoClass
843} THREADINFOCLASS;
844
845typedef struct _THREAD_BASIC_INFORMATION
846{
847 NTSTATUS ExitStatus;
848 PVOID TebBaseAddress;
849 CLIENT_ID ClientId;
850 ULONG_PTR AffinityMask;
851 LONG Priority;
852 LONG BasePriority;
853} THREAD_BASIC_INFORMATION, *PTHREAD_BASIC_INFORMATION;
854
855typedef struct _THREAD_DESCRIPTOR_INFORMATION
856{
857 DWORD Selector;
858 LDT_ENTRY Entry;
859} THREAD_DESCRIPTOR_INFORMATION, *PTHREAD_DESCRIPTOR_INFORMATION;
860
861typedef struct _KERNEL_USER_TIMES {
862 LARGE_INTEGER CreateTime;
863 LARGE_INTEGER ExitTime;
864 LARGE_INTEGER KernelTime;
865 LARGE_INTEGER UserTime;
866} KERNEL_USER_TIMES, *PKERNEL_USER_TIMES;
867
868typedef enum _WINSTATIONINFOCLASS {
869 WinStationInformation = 8
870} WINSTATIONINFOCLASS;
871
872typedef enum _MEMORY_INFORMATION_CLASS {
873 MemoryBasicInformation,
874 MemoryWorkingSetList,
875 MemorySectionName,
876 MemoryBasicVlmInformation
877} MEMORY_INFORMATION_CLASS;
878
879typedef struct _MEMORY_SECTION_NAME
880{
881 UNICODE_STRING SectionFileName;
882} MEMORY_SECTION_NAME, *PMEMORY_SECTION_NAME;
883
884typedef enum _MUTANT_INFORMATION_CLASS
885{
886 MutantBasicInformation
887} MUTANT_INFORMATION_CLASS, *PMUTANT_INFORMATION_CLASS;
888
889typedef struct _MUTANT_BASIC_INFORMATION {
890 LONG CurrentCount;
891 BOOLEAN OwnedByCaller;
892 BOOLEAN AbandonedState;
893} MUTANT_BASIC_INFORMATION, *PMUTANT_BASIC_INFORMATION;
894
895typedef enum _TIMER_INFORMATION_CLASS
896{
897 TimerBasicInformation = 0
898} TIMER_INFORMATION_CLASS;
899
900typedef struct _TIMER_BASIC_INFORMATION
901{
902 LARGE_INTEGER RemainingTime;
903 BOOLEAN TimerState;
904} TIMER_BASIC_INFORMATION, *PTIMER_BASIC_INFORMATION;
905
906
907/* return type of RtlDetermineDosPathNameType_U (FIXME: not the correct names) */
908typedef enum
909{
910 INVALID_PATH = 0,
911 UNC_PATH, /* "//foo" */
912 ABSOLUTE_DRIVE_PATH, /* "c:/foo" */
913 RELATIVE_DRIVE_PATH, /* "c:foo" */
914 ABSOLUTE_PATH, /* "/foo" */
915 RELATIVE_PATH, /* "foo" */
916 DEVICE_PATH, /* "//./foo" */
917 UNC_DOT_PATH /* "//." */
918} DOS_PATHNAME_TYPE;
919
920
921/***********************************************************************
922 * Types and data structures
923 */
924
925/* This is used by NtQuerySystemInformation */
926typedef struct _SYSTEM_THREAD_INFORMATION
927{ /* win32/win64 */
928 LARGE_INTEGER KernelTime; /* 00/00 */
929 LARGE_INTEGER UserTime; /* 08/08 */
930 LARGE_INTEGER CreateTime; /* 10/10 */
931 DWORD dwTickCount; /* 18/18 */
932 LPVOID StartAddress; /* 1c/20 */
933 CLIENT_ID ClientId; /* 20/28 */
934 DWORD dwCurrentPriority; /* 28/38 */
935 DWORD dwBasePriority; /* 2c/3c */
936 DWORD dwContextSwitches; /* 30/40 */
937 DWORD dwThreadState; /* 34/44 */
938 DWORD dwWaitReason; /* 38/48 */
939 DWORD dwUnknown; /* 3c/4c */
940} SYSTEM_THREAD_INFORMATION, *PSYSTEM_THREAD_INFORMATION;
941
942typedef struct _IO_STATUS_BLOCK {
943 union {
944 NTSTATUS Status;
945 PVOID Pointer;
946 } DUMMYUNIONNAME;
947
948 ULONG_PTR Information;
949} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
950
951typedef void (WINAPI * PIO_APC_ROUTINE)(PVOID,PIO_STATUS_BLOCK,ULONG);
952
953typedef struct _KEY_BASIC_INFORMATION {
954 LARGE_INTEGER LastWriteTime;
955 ULONG TitleIndex;
956 ULONG NameLength;
957 WCHAR Name[1];
958} KEY_BASIC_INFORMATION, *PKEY_BASIC_INFORMATION;
959
960typedef struct _KEY_NODE_INFORMATION
961{
962 LARGE_INTEGER LastWriteTime;
963 ULONG TitleIndex;
964 ULONG ClassOffset;
965 ULONG ClassLength;
966 ULONG NameLength;
967 WCHAR Name[1];
968 /* Class[1]; */
969} KEY_NODE_INFORMATION, *PKEY_NODE_INFORMATION;
970
971typedef struct _KEY_FULL_INFORMATION
972{
973 LARGE_INTEGER LastWriteTime;
974 ULONG TitleIndex;
975 ULONG ClassOffset;
976 ULONG ClassLength;
977 ULONG SubKeys;
978 ULONG MaxNameLen;
979 ULONG MaxClassLen;
980 ULONG Values;
981 ULONG MaxValueNameLen;
982 ULONG MaxValueDataLen;
983 WCHAR Class[1];
984} KEY_FULL_INFORMATION, *PKEY_FULL_INFORMATION;
985
986typedef struct _KEY_NAME_INFORMATION {
987 ULONG NameLength;
988 WCHAR Name[1];
989} KEY_NAME_INFORMATION, *PKEY_NAME_INFORMATION;
990
991typedef struct _KEY_VALUE_ENTRY
992{
993 PUNICODE_STRING ValueName;
994 ULONG DataLength;
995 ULONG DataOffset;
996 ULONG Type;
997} KEY_VALUE_ENTRY, *PKEY_VALUE_ENTRY;
998
999typedef struct _KEY_VALUE_BASIC_INFORMATION {
1000 ULONG TitleIndex;
1001 ULONG Type;
1002 ULONG NameLength;
1003 WCHAR Name[1];
1004} KEY_VALUE_BASIC_INFORMATION, *PKEY_VALUE_BASIC_INFORMATION;
1005
1006typedef struct _KEY_VALUE_FULL_INFORMATION {
1007 ULONG TitleIndex;
1008 ULONG Type;
1009 ULONG DataOffset;
1010 ULONG DataLength;
1011 ULONG NameLength;
1012 WCHAR Name[1];
1013} KEY_VALUE_FULL_INFORMATION, *PKEY_VALUE_FULL_INFORMATION;
1014
1015typedef struct _KEY_VALUE_PARTIAL_INFORMATION {
1016 ULONG TitleIndex;
1017 ULONG Type;
1018 ULONG DataLength;
1019 UCHAR Data[1];
1020} KEY_VALUE_PARTIAL_INFORMATION, *PKEY_VALUE_PARTIAL_INFORMATION;
1021
1022#ifndef __OBJECT_ATTRIBUTES_DEFINED__
1023#define __OBJECT_ATTRIBUTES_DEFINED__
1024typedef struct _OBJECT_ATTRIBUTES {
1025 ULONG Length;
1026 HANDLE RootDirectory;
1027 PUNICODE_STRING ObjectName;
1028 ULONG Attributes;
1029 PVOID SecurityDescriptor; /* type SECURITY_DESCRIPTOR */
1030 PVOID SecurityQualityOfService; /* type SECURITY_QUALITY_OF_SERVICE */
1031} OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
1032#endif
1033
1034typedef struct _OBJECT_DATA_INFORMATION {
1035 BOOLEAN InheritHandle;
1036 BOOLEAN ProtectFromClose;
1037} OBJECT_DATA_INFORMATION, *POBJECT_DATA_INFORMATION;
1038
1039typedef struct _OBJECT_BASIC_INFORMATION {
1040 ULONG Attributes;
1041 ACCESS_MASK GrantedAccess;
1042 ULONG HandleCount;
1043 ULONG PointerCount;
1044 ULONG PagedPoolUsage;
1045 ULONG NonPagedPoolUsage;
1046 ULONG Reserved[3];
1047 ULONG NameInformationLength;
1048 ULONG TypeInformationLength;
1049 ULONG SecurityDescriptorLength;
1050 LARGE_INTEGER CreateTime;
1051} OBJECT_BASIC_INFORMATION, *POBJECT_BASIC_INFORMATION;
1052
1053typedef struct _OBJECT_NAME_INFORMATION {
1054 UNICODE_STRING Name;
1055} OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;
1056
1057typedef struct __OBJECT_TYPE_INFORMATION {
1058 UNICODE_STRING TypeName;
1059 ULONG Reserved [22];
1060} OBJECT_TYPE_INFORMATION, *POBJECT_TYPE_INFORMATION;
1061
1062typedef struct _PROCESS_BASIC_INFORMATION {
1063#ifdef __WINESRC__
1064 DWORD_PTR ExitStatus;
1065 PPEB PebBaseAddress;
1066 DWORD_PTR AffinityMask;
1067 DWORD_PTR BasePriority;
1068 ULONG_PTR UniqueProcessId;
1069 ULONG_PTR InheritedFromUniqueProcessId;
1070#else
1071 PVOID Reserved1;
1072 PPEB PebBaseAddress;
1073 PVOID Reserved2[2];
1074 ULONG_PTR UniqueProcessId;
1075 PVOID Reserved3;
1076#endif
1077} PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION;
1078
1079#define PROCESS_PRIOCLASS_IDLE 1
1080#define PROCESS_PRIOCLASS_NORMAL 2
1081#define PROCESS_PRIOCLASS_HIGH 3
1082#define PROCESS_PRIOCLASS_REALTIME 4
1083#define PROCESS_PRIOCLASS_BELOW_NORMAL 5
1084#define PROCESS_PRIOCLASS_ABOVE_NORMAL 6
1085
1086typedef struct _PROCESS_PRIORITY_CLASS {
1087 BOOLEAN Foreground;
1088 UCHAR PriorityClass;
1089} PROCESS_PRIORITY_CLASS, *PPROCESS_PRIORITY_CLASS;
1090
1091typedef struct _RTL_HEAP_DEFINITION {
1092 ULONG Length; /* = sizeof(RTL_HEAP_DEFINITION) */
1093
1094 ULONG Unknown[11];
1095} RTL_HEAP_DEFINITION, *PRTL_HEAP_DEFINITION;
1096
1097typedef struct _RTL_RWLOCK {
1098 RTL_CRITICAL_SECTION rtlCS;
1099
1100 HANDLE hSharedReleaseSemaphore;
1101 UINT uSharedWaiters;
1102
1103 HANDLE hExclusiveReleaseSemaphore;
1104 UINT uExclusiveWaiters;
1105
1106 INT iNumberActive;
1107 HANDLE hOwningThreadId;
1108 DWORD dwTimeoutBoost;
1109 PVOID pDebugInfo;
1110} RTL_RWLOCK, *LPRTL_RWLOCK;
1111
1112/* System Information Class 0x00 */
1113
1114typedef struct _SYSTEM_BASIC_INFORMATION {
1115#ifdef __WINESRC__
1116 DWORD unknown;
1117 ULONG KeMaximumIncrement;
1118 ULONG PageSize;
1119 ULONG MmNumberOfPhysicalPages;
1120 ULONG MmLowestPhysicalPage;
1121 ULONG MmHighestPhysicalPage;
1122 ULONG_PTR AllocationGranularity;
1123 PVOID LowestUserAddress;
1124 PVOID HighestUserAddress;
1125 ULONG_PTR ActiveProcessorsAffinityMask;
1126 BYTE NumberOfProcessors;
1127#else
1128 BYTE Reserved1[24];
1129 PVOID Reserved2[4];
1130 CCHAR NumberOfProcessors;
1131#endif
1132} SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
1133
1134/* System Information Class 0x01 */
1135
1136typedef struct _SYSTEM_CPU_INFORMATION {
1137 WORD Architecture;
1138 WORD Level;
1139 WORD Revision; /* combination of CPU model and stepping */
1140 WORD Reserved; /* always zero */
1141 DWORD FeatureSet; /* see bit flags below */
1142} SYSTEM_CPU_INFORMATION, *PSYSTEM_CPU_INFORMATION;
1143
1144/* definitions of bits in the Feature set for the x86 processors */
1145#define CPU_FEATURE_VME 0x00000005 /* Virtual 86 Mode Extensions */
1146#define CPU_FEATURE_TSC 0x00000002 /* Time Stamp Counter available */
1147#define CPU_FEATURE_CMOV 0x00000008 /* Conditional Move instruction*/
1148#define CPU_FEATURE_PGE 0x00000014 /* Page table Entry Global bit */
1149#define CPU_FEATURE_PSE 0x00000024 /* Page Size Extension */
1150#define CPU_FEATURE_MTRR 0x00000040 /* Memory Type Range Registers */
1151#define CPU_FEATURE_CX8 0x00000080 /* Compare and eXchange 8 byte instr. */
1152#define CPU_FEATURE_MMX 0x00000100 /* Multi Media eXtensions */
1153#define CPU_FEATURE_X86 0x00000200 /* seems to be always ON, on the '86 */
1154#define CPU_FEATURE_PAT 0x00000400 /* Page Attribute Table */
1155#define CPU_FEATURE_FXSR 0x00000800 /* FXSAVE and FXSTORE instructions */
1156#define CPU_FEATURE_SEP 0x00001000 /* SYSENTER and SYSEXIT instructions */
1157#define CPU_FEATURE_SSE 0x00002000 /* SSE extensions (ext. MMX) */
1158#define CPU_FEATURE_3DNOW 0x00004000 /* 3DNOW instructions available */
1159#define CPU_FEATURE_SSE2 0x00010000 /* SSE2 extensions (XMMI64) */
1160#define CPU_FEATURE_DS 0x00020000 /* Debug Store */
1161#define CPU_FEATURE_HTT 0x00040000 /* Hyper Threading Technology */
1162
1163/* System Information Class 0x02 */
1164
1165/* Documented in "Windows NT/2000 Native API Reference" by Gary Nebbett. */
1166typedef struct _SYSTEM_PERFORMANCE_INFORMATION {
1167 LARGE_INTEGER IdleTime;
1168 LARGE_INTEGER ReadTransferCount;
1169 LARGE_INTEGER WriteTransferCount;
1170 LARGE_INTEGER OtherTransferCount;
1171 ULONG ReadOperationCount;
1172 ULONG WriteOperationCount;
1173 ULONG OtherOperationCount;
1174 ULONG AvailablePages;
1175 ULONG TotalCommittedPages;
1176 ULONG TotalCommitLimit;
1177 ULONG PeakCommitment;
1178 ULONG PageFaults;
1179 ULONG WriteCopyFaults;
1180 ULONG TransitionFaults;
1181 ULONG Reserved1;
1182 ULONG DemandZeroFaults;
1183 ULONG PagesRead;
1184 ULONG PageReadIos;
1185 ULONG Reserved2[2];
1186 ULONG PagefilePagesWritten;
1187 ULONG PagefilePageWriteIos;
1188 ULONG MappedFilePagesWritten;
1189 ULONG MappedFilePageWriteIos;
1190 ULONG PagedPoolUsage;
1191 ULONG NonPagedPoolUsage;
1192 ULONG PagedPoolAllocs;
1193 ULONG PagedPoolFrees;
1194 ULONG NonPagedPoolAllocs;
1195 ULONG NonPagedPoolFrees;
1196 ULONG TotalFreeSystemPtes;
1197 ULONG SystemCodePage;
1198 ULONG TotalSystemDriverPages;
1199 ULONG TotalSystemCodePages;
1200 ULONG SmallNonPagedLookasideListAllocateHits;
1201 ULONG SmallPagedLookasideListAllocateHits;
1202 ULONG Reserved3;
1203 ULONG MmSystemCachePage;
1204 ULONG PagedPoolPage;
1205 ULONG SystemDriverPage;
1206 ULONG FastReadNoWait;
1207 ULONG FastReadWait;
1208 ULONG FastReadResourceMiss;
1209 ULONG FastReadNotPossible;
1210 ULONG FastMdlReadNoWait;
1211 ULONG FastMdlReadWait;
1212 ULONG FastMdlReadResourceMiss;
1213 ULONG FastMdlReadNotPossible;
1214 ULONG MapDataNoWait;
1215 ULONG MapDataWait;
1216 ULONG MapDataNoWaitMiss;
1217 ULONG MapDataWaitMiss;
1218 ULONG PinMappedDataCount;
1219 ULONG PinReadNoWait;
1220 ULONG PinReadWait;
1221 ULONG PinReadNoWaitMiss;
1222 ULONG PinReadWaitMiss;
1223 ULONG CopyReadNoWait;
1224 ULONG CopyReadWait;
1225 ULONG CopyReadNoWaitMiss;
1226 ULONG CopyReadWaitMiss;
1227 ULONG MdlReadNoWait;
1228 ULONG MdlReadWait;
1229 ULONG MdlReadNoWaitMiss;
1230 ULONG MdlReadWaitMiss;
1231 ULONG ReadAheadIos;
1232 ULONG LazyWriteIos;
1233 ULONG LazyWritePages;
1234 ULONG DataFlushes;
1235 ULONG DataPages;
1236 ULONG ContextSwitches;
1237 ULONG FirstLevelTbFills;
1238 ULONG SecondLevelTbFills;
1239 ULONG SystemCalls;
1240} SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION;
1241
1242/* System Information Class 0x03 */
1243
1244typedef struct _SYSTEM_TIMEOFDAY_INFORMATION {
1245#ifdef __WINESRC__
1246 LARGE_INTEGER liKeBootTime;
1247 LARGE_INTEGER liKeSystemTime;
1248 LARGE_INTEGER liExpTimeZoneBias;
1249 ULONG uCurrentTimeZoneId;
1250 DWORD dwUnknown1[5];
1251#else
1252 BYTE Reserved1[48];
1253#endif
1254} SYSTEM_TIMEOFDAY_INFORMATION, *PSYSTEM_TIMEOFDAY_INFORMATION; /* was SYSTEM_TIME_INFORMATION */
1255
1256/* System Information Class 0x08 */
1257
1258typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION {
1259 LARGE_INTEGER IdleTime;
1260 LARGE_INTEGER KernelTime;
1261 LARGE_INTEGER UserTime;
1262 LARGE_INTEGER Reserved1[2];
1263 ULONG Reserved2;
1264} SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION, *PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION;
1265
1266/* System Information Class 0x0b */
1267
1268typedef struct _SYSTEM_DRIVER_INFORMATION {
1269 PVOID pvAddress;
1270 DWORD dwUnknown1;
1271 DWORD dwUnknown2;
1272 DWORD dwEntryIndex;
1273 DWORD dwUnknown3;
1274 char szName[MAX_PATH + 1];
1275} SYSTEM_DRIVER_INFORMATION, *PSYSTEM_DRIVER_INFORMATION;
1276
1277/* System Information Class 0x10 */
1278
1279typedef struct _SYSTEM_HANDLE_ENTRY {
1280 ULONG OwnerPid;
1281 BYTE ObjectType;
1282 BYTE HandleFlags;
1283 USHORT HandleValue;
1284 PVOID ObjectPointer;
1285 ULONG AccessMask;
1286} SYSTEM_HANDLE_ENTRY, *PSYSTEM_HANDLE_ENTRY;
1287
1288typedef struct _SYSTEM_HANDLE_INFORMATION {
1289 ULONG Count;
1290 SYSTEM_HANDLE_ENTRY Handle[1];
1291} SYSTEM_HANDLE_INFORMATION, *PSYSTEM_HANDLE_INFORMATION;
1292
1293/* System Information Class 0x15 */
1294
1295typedef struct _SYSTEM_CACHE_INFORMATION {
1296 ULONG CurrentSize;
1297 ULONG PeakSize;
1298 ULONG PageFaultCount;
1299 ULONG MinimumWorkingSet;
1300 ULONG MaximumWorkingSet;
1301 ULONG unused[4];
1302#ifdef _WIN64
1303 ULONG unknown64[7];
1304#endif
1305} SYSTEM_CACHE_INFORMATION, *PSYSTEM_CACHE_INFORMATION;
1306
1307/* System Information Class 0x17 */
1308
1309typedef struct _SYSTEM_INTERRUPT_INFORMATION {
1310 BYTE Reserved1[24];
1311} SYSTEM_INTERRUPT_INFORMATION, *PSYSTEM_INTERRUPT_INFORMATION;
1312
1313typedef struct _SYSTEM_CONFIGURATION_INFO {
1314 union {
1315 ULONG OemId;
1316 struct {
1317 WORD ProcessorArchitecture;
1318 WORD Reserved;
1319 } tag1;
1320 } tag2;
1321 ULONG PageSize;
1322 PVOID MinimumApplicationAddress;
1323 PVOID MaximumApplicationAddress;
1324 ULONG ActiveProcessorMask;
1325 ULONG NumberOfProcessors;
1326 ULONG ProcessorType;
1327 ULONG AllocationGranularity;
1328 WORD ProcessorLevel;
1329 WORD ProcessorRevision;
1330} SYSTEM_CONFIGURATION_INFO, *PSYSTEM_CONFIGURATION_INFO;
1331
1332typedef struct _SYSTEM_EXCEPTION_INFORMATION {
1333 BYTE Reserved1[16];
1334} SYSTEM_EXCEPTION_INFORMATION, *PSYSTEM_EXCEPTION_INFORMATION;
1335
1336typedef struct _SYSTEM_LOOKASIDE_INFORMATION {
1337 BYTE Reserved1[32];
1338} SYSTEM_LOOKASIDE_INFORMATION, *PSYSTEM_LOOKASIDE_INFORMATION;
1339
1340typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION {
1341 BOOLEAN DebuggerEnabled;
1342 BOOLEAN DebuggerNotPresent;
1343} SYSTEM_KERNEL_DEBUGGER_INFORMATION, *PSYSTEM_KERNEL_DEBUGGER_INFORMATION;
1344
1345/* System Information Class 0x05 */
1346
1347typedef struct _VM_COUNTERS_ {
1348 SIZE_T PeakVirtualSize;
1349 SIZE_T VirtualSize;
1350 ULONG PageFaultCount;
1351 SIZE_T PeakWorkingSetSize;
1352 SIZE_T WorkingSetSize;
1353 SIZE_T QuotaPeakPagedPoolUsage;
1354 SIZE_T QuotaPagedPoolUsage;
1355 SIZE_T QuotaPeakNonPagedPoolUsage;
1356 SIZE_T QuotaNonPagedPoolUsage;
1357 SIZE_T PagefileUsage;
1358 SIZE_T PeakPagefileUsage;
1359 SIZE_T PrivatePageCount;
1360} VM_COUNTERS, *PVM_COUNTERS;
1361
1362typedef struct _SYSTEM_PROCESS_INFORMATION {
1363#ifdef __WINESRC__ /* win32/win64 */
1364 ULONG NextEntryOffset; /* 00/00 */
1365 DWORD dwThreadCount; /* 04/04 */
1366 DWORD dwUnknown1[6]; /* 08/08 */
1367 LARGE_INTEGER CreationTime; /* 20/20 */
1368 LARGE_INTEGER UserTime; /* 28/28 */
1369 LARGE_INTEGER KernelTime; /* 30/30 */
1370 UNICODE_STRING ProcessName; /* 38/38 */
1371 DWORD dwBasePriority; /* 40/48 */
1372 HANDLE UniqueProcessId; /* 44/50 */
1373 HANDLE ParentProcessId; /* 48/58 */
1374 ULONG HandleCount; /* 4c/60 */
1375 ULONG SessionId; /* 50/64 */
1376 DWORD dwUnknown4; /* 54/68 */
1377 VM_COUNTERS vmCounters; /* 58/70 */
1378 IO_COUNTERS ioCounters; /* 88/d0 */
1379 SYSTEM_THREAD_INFORMATION ti[1]; /* b8/100 */
1380#else
1381 ULONG NextEntryOffset; /* 00/00 */
1382 BYTE Reserved1[52]; /* 04/04 */
1383 PVOID Reserved2[3]; /* 38/38 */
1384 HANDLE UniqueProcessId; /* 44/50 */
1385 PVOID Reserved3; /* 48/58 */
1386 ULONG HandleCount; /* 4c/60 */
1387 BYTE Reserved4[4]; /* 50/64 */
1388 PVOID Reserved5[11]; /* 54/68 */
1389 SIZE_T PeakPagefileUsage; /* 80/c0 */
1390 SIZE_T PrivatePageCount; /* 84/c8 */
1391 LARGE_INTEGER Reserved6[6]; /* 88/d0 */
1392#endif
1393} SYSTEM_PROCESS_INFORMATION, *PSYSTEM_PROCESS_INFORMATION;
1394
1395typedef struct _SYSTEM_REGISTRY_QUOTA_INFORMATION {
1396 ULONG RegistryQuotaAllowed;
1397 ULONG RegistryQuotaUsed;
1398 PVOID Reserved1;
1399} SYSTEM_REGISTRY_QUOTA_INFORMATION, *PSYSTEM_REGISTRY_QUOTA_INFORMATION;
1400
1401typedef struct _SYSTEM_TIME_ADJUSTMENT {
1402 ULONG TimeAdjustment;
1403 BOOLEAN TimeAdjustmentDisabled;
1404} SYSTEM_TIME_ADJUSTMENT, *PSYSTEM_TIME_ADJUSTMENT;
1405
1406typedef struct _TIME_FIELDS
1407{ CSHORT Year;
1408 CSHORT Month;
1409 CSHORT Day;
1410 CSHORT Hour;
1411 CSHORT Minute;
1412 CSHORT Second;
1413 CSHORT Milliseconds;
1414 CSHORT Weekday;
1415} TIME_FIELDS, *PTIME_FIELDS;
1416
1417typedef struct _WINSTATIONINFORMATIONW {
1418 BYTE Reserved2[70];
1419 ULONG LogonId;
1420 BYTE Reserved3[1140];
1421} WINSTATIONINFORMATIONW, *PWINSTATIONINFORMATIONW;
1422
1423typedef BOOLEAN (WINAPI * PWINSTATIONQUERYINFORMATIONW)(HANDLE,ULONG,WINSTATIONINFOCLASS,PVOID,ULONG,PULONG);
1424
1425typedef struct _LDR_RESOURCE_INFO
1426{
1427 ULONG_PTR Type;
1428 ULONG_PTR Name;
1429 ULONG Language;
1430} LDR_RESOURCE_INFO, *PLDR_RESOURCE_INFO;
1431
1432
1433/* debug buffer definitions */
1434
1435typedef struct _DEBUG_BUFFER {
1436 HANDLE SectionHandle;
1437 PVOID SectionBase;
1438 PVOID RemoteSectionBase;
1439 ULONG SectionBaseDelta;
1440 HANDLE EventPairHandle;
1441 ULONG Unknown[2];
1442 HANDLE RemoteThreadHandle;
1443 ULONG InfoClassMask;
1444 ULONG SizeOfInfo;
1445 ULONG AllocatedSize;
1446 ULONG SectionSize;
1447 PVOID ModuleInformation;
1448 PVOID BackTraceInformation;
1449 PVOID HeapInformation;
1450 PVOID LockInformation;
1451 PVOID Reserved[8];
1452} DEBUG_BUFFER, *PDEBUG_BUFFER;
1453
1454#define PDI_MODULES 0x01
1455#define PDI_BACKTRACE 0x02
1456#define PDI_HEAPS 0x04
1457#define PDI_HEAP_TAGS 0x08
1458#define PDI_HEAP_BLOCKS 0x10
1459#define PDI_LOCKS 0x20
1460
1461typedef struct _DEBUG_MODULE_INFORMATION {
1462 ULONG Reserved[2];
1463 ULONG Base;
1464 ULONG Size;
1465 ULONG Flags;
1466 USHORT Index;
1467 USHORT Unknown;
1468 USHORT LoadCount;
1469 USHORT ModuleNameOffset;
1470 CHAR ImageName[256];
1471} DEBUG_MODULE_INFORMATION, *PDEBUG_MODULE_INFORMATION;
1472
1473typedef struct _DEBUG_HEAP_INFORMATION {
1474 ULONG Base;
1475 ULONG Flags;
1476 USHORT Granularity;
1477 USHORT Unknown;
1478 ULONG Allocated;
1479 ULONG Committed;
1480 ULONG TagCount;
1481 ULONG BlockCount;
1482 ULONG Reserved[7];
1483 PVOID Tags;
1484 PVOID Blocks;
1485} DEBUG_HEAP_INFORMATION, *PDEBUG_HEAP_INFORMATION;
1486
1487typedef struct _DEBUG_LOCK_INFORMATION {
1488 PVOID Address;
1489 USHORT Type;
1490 USHORT CreatorBackTraceIndex;
1491 ULONG OwnerThreadId;
1492 ULONG ActiveCount;
1493 ULONG ContentionCount;
1494 ULONG EntryCount;
1495 ULONG RecursionCount;
1496 ULONG NumberOfSharedWaiters;
1497 ULONG NumberOfExclusiveWaiters;
1498} DEBUG_LOCK_INFORMATION, *PDEBUG_LOCK_INFORMATION;
1499
1500typedef struct _PORT_MESSAGE_HEADER {
1501 USHORT DataSize;
1502 USHORT MessageSize;
1503 USHORT MessageType;
1504 USHORT VirtualRangesOffset;
1505 CLIENT_ID ClientId;
1506 ULONG MessageId;
1507 ULONG SectionSize;
1508} PORT_MESSAGE_HEADER, *PPORT_MESSAGE_HEADER, PORT_MESSAGE, *PPORT_MESSAGE;
1509
1510typedef unsigned short RTL_ATOM, *PRTL_ATOM;
1511
1512/* Wine doesn't implement atom table as NT does:
1513 * - in NT, atom tables are user space tables, which ntdll directly accesses
1514 * - on Wine, (even local) atom tables are wineserver objects, hence a HANDLE
1515 */
1516typedef struct atom_table *RTL_ATOM_TABLE, **PRTL_ATOM_TABLE;
1517
1518typedef enum _ATOM_INFORMATION_CLASS {
1519 AtomBasicInformation = 0,
1520 AtomTableInformation = 1,
1521} ATOM_INFORMATION_CLASS;
1522
1523typedef struct _ATOM_BASIC_INFORMATION {
1524 USHORT ReferenceCount;
1525 USHORT Pinned;
1526 USHORT NameLength;
1527 WCHAR Name[1];
1528} ATOM_BASIC_INFORMATION, *PATOM_BASIC_INFORMATION;
1529
1530/* FIXME: names probably not correct */
1531typedef struct _RTL_HANDLE
1532{
1533 struct _RTL_HANDLE * Next;
1534} RTL_HANDLE;
1535
1536/* FIXME: names probably not correct */
1537typedef struct _RTL_HANDLE_TABLE
1538{
1539 ULONG MaxHandleCount; /* 0x00 */
1540 ULONG HandleSize; /* 0x04 */
1541 ULONG Unused[2]; /* 0x08-0x0c */
1542 PVOID NextFree; /* 0x10 */
1543 PVOID FirstHandle; /* 0x14 */
1544 PVOID ReservedMemory; /* 0x18 */
1545 PVOID MaxHandle; /* 0x1c */
1546} RTL_HANDLE_TABLE;
1547
1548/***********************************************************************
1549 * Defines
1550 */
1551
1552/* flags for NtCreateFile and NtOpenFile */
1553#define FILE_DIRECTORY_FILE 0x00000001
1554#define FILE_WRITE_THROUGH 0x00000002
1555#define FILE_SEQUENTIAL_ONLY 0x00000004
1556#define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008
1557#define FILE_SYNCHRONOUS_IO_ALERT 0x00000010
1558#define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020
1559#define FILE_NON_DIRECTORY_FILE 0x00000040
1560#define FILE_CREATE_TREE_CONNECTION 0x00000080
1561#define FILE_COMPLETE_IF_OPLOCKED 0x00000100
1562#define FILE_NO_EA_KNOWLEDGE 0x00000200
1563#define FILE_OPEN_FOR_RECOVERY 0x00000400
1564#define FILE_RANDOM_ACCESS 0x00000800
1565#define FILE_DELETE_ON_CLOSE 0x00001000
1566#define FILE_OPEN_BY_FILE_ID 0x00002000
1567#define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000
1568#define FILE_NO_COMPRESSION 0x00008000
1569#define FILE_RESERVE_OPFILTER 0x00100000
1570#define FILE_TRANSACTED_MODE 0x00200000
1571#define FILE_OPEN_OFFLINE_FILE 0x00400000
1572#define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000
1573
1574#define FILE_ATTRIBUTE_VALID_FLAGS 0x00007fb7
1575#define FILE_ATTRIBUTE_VALID_SET_FLAGS 0x000031a7
1576
1577/* status for NtCreateFile or NtOpenFile */
1578#define FILE_SUPERSEDED 0
1579#define FILE_OPENED 1
1580#define FILE_CREATED 2
1581#define FILE_OVERWRITTEN 3
1582#define FILE_EXISTS 4
1583#define FILE_DOES_NOT_EXIST 5
1584
1585/* disposition for NtCreateFile */
1586#define FILE_SUPERSEDE 0
1587#define FILE_OPEN 1
1588#define FILE_CREATE 2
1589#define FILE_OPEN_IF 3
1590#define FILE_OVERWRITE 4
1591#define FILE_OVERWRITE_IF 5
1592#define FILE_MAXIMUM_DISPOSITION 5
1593
1594/* Characteristics of a File System */
1595#define FILE_REMOVABLE_MEDIA 0x00000001
1596#define FILE_READ_ONLY_DEVICE 0x00000002
1597#define FILE_FLOPPY_DISKETTE 0x00000004
1598#define FILE_WRITE_ONE_MEDIA 0x00000008
1599#define FILE_REMOTE_DEVICE 0x00000010
1600#define FILE_DEVICE_IS_MOUNTED 0x00000020
1601#define FILE_VIRTUAL_VOLUME 0x00000040
1602#define FILE_AUTOGENERATED_DEVICE_NAME 0x00000080
1603#define FILE_DEVICE_SECURE_OPEN 0x00000100
1604
1605/* options for NtCreateNamedPipeFile */
1606#define FILE_PIPE_INBOUND 0x00000000
1607#define FILE_PIPE_OUTBOUND 0x00000001
1608#define FILE_PIPE_FULL_DUPLEX 0x00000002
1609
1610/* options for pipe's type */
1611#define FILE_PIPE_TYPE_MESSAGE 0x00000001
1612#define FILE_PIPE_TYPE_BYTE 0x00000000
1613/* and client / server end */
1614#define FILE_PIPE_SERVER_END 0x00000001
1615#define FILE_PIPE_CLIENT_END 0x00000000
1616
1617#define INTERNAL_TS_ACTIVE_CONSOLE_ID ( *((volatile ULONG*)(0x7ffe02d8)) )
1618
1619#define LOGONID_CURRENT ((ULONG)-1)
1620
1621#define OBJ_INHERIT 0x00000002
1622#define OBJ_PERMANENT 0x00000010
1623#define OBJ_EXCLUSIVE 0x00000020
1624#define OBJ_CASE_INSENSITIVE 0x00000040
1625#define OBJ_OPENIF 0x00000080
1626#define OBJ_OPENLINK 0x00000100
1627#define OBJ_KERNEL_HANDLE 0x00000200
1628#define OBJ_VALID_ATTRIBUTES 0x000003F2
1629
1630#define SERVERNAME_CURRENT ((HANDLE)NULL)
1631
1632typedef void (CALLBACK *PNTAPCFUNC)(ULONG_PTR,ULONG_PTR,ULONG_PTR); /* FIXME: not the right name */
1633typedef void (CALLBACK *PRTL_THREAD_START_ROUTINE)(LPVOID); /* FIXME: not the right name */
1634typedef DWORD (CALLBACK *PRTL_WORK_ITEM_ROUTINE)(LPVOID); /* FIXME: not the right name */
1635typedef void (NTAPI *RTL_WAITORTIMERCALLBACKFUNC)(PVOID,BOOLEAN); /* FIXME: not the right name */
1636
1637
1638/* DbgPrintEx default levels */
1639#define DPFLTR_ERROR_LEVEL 0
1640#define DPFLTR_WARNING_LEVEL 1
1641#define DPFLTR_TRACE_LEVEL 2
1642#define DPFLTR_INFO_LEVEL 3
1643#define DPFLTR_MASK 0x8000000
1644
1645/* Well-known LUID values */
1646#define SE_MIN_WELL_KNOWN_PRIVILEGE 2
1647#define SE_CREATE_TOKEN_PRIVILEGE 2
1648#define SE_ASSIGNPRIMARYTOKEN_PRIVILEGE 3
1649#define SE_LOCK_MEMORY_PRIVILEGE 4
1650#define SE_INCREASE_QUOTA_PRIVILEGE 5
1651#define SE_UNSOLICITED_INPUT_PRIVILEGE 6 /* obsolete */
1652#define SE_MACHINE_ACCOUNT_PRIVILEGE 6
1653#define SE_TCB_PRIVILEGE 7
1654#define SE_SECURITY_PRIVILEGE 8
1655#define SE_TAKE_OWNERSHIP_PRIVILEGE 9
1656#define SE_LOAD_DRIVER_PRIVILEGE 10
1657#define SE_SYSTEM_PROFILE_PRIVILEGE 11
1658#define SE_SYSTEMTIME_PRIVILEGE 12
1659#define SE_PROF_SINGLE_PROCESS_PRIVILEGE 13
1660#define SE_INC_BASE_PRIORITY_PRIVILEGE 14
1661#define SE_CREATE_PAGEFILE_PRIVILEGE 15
1662#define SE_CREATE_PERMANENT_PRIVILEGE 16
1663#define SE_BACKUP_PRIVILEGE 17
1664#define SE_RESTORE_PRIVILEGE 18
1665#define SE_SHUTDOWN_PRIVILEGE 19
1666#define SE_DEBUG_PRIVILEGE 20
1667#define SE_AUDIT_PRIVILEGE 21
1668#define SE_SYSTEM_ENVIRONMENT_PRIVILEGE 22
1669#define SE_CHANGE_NOTIFY_PRIVILEGE 23
1670#define SE_REMOTE_SHUTDOWN_PRIVILEGE 24
1671#define SE_UNDOCK_PRIVILEGE 25
1672#define SE_SYNC_AGENT_PRIVILEGE 26
1673#define SE_ENABLE_DELEGATION_PRIVILEGE 27
1674#define SE_MANAGE_VOLUME_PRIVILEGE 28
1675#define SE_IMPERSONATE_PRIVILEGE 29
1676#define SE_CREATE_GLOBAL_PRIVILEGE 30
1677#define SE_MAX_WELL_KNOWN_PRIVILEGE SE_CREATE_GLOBAL_PRIVILEGE
1678
1679/* NtGlobalFlag bits */
1680#define FLG_STOP_ON_EXCEPTION 0x00000001
1681#define FLG_SHOW_LDR_SNAPS 0x00000002
1682#define FLG_DEBUG_INITIAL_COMMAND 0x00000004
1683#define FLG_STOP_ON_HUNG_GUI 0x00000008
1684#define FLG_HEAP_ENABLE_TAIL_CHECK 0x00000010
1685#define FLG_HEAP_ENABLE_FREE_CHECK 0x00000020
1686#define FLG_HEAP_VALIDATE_PARAMETERS 0x00000040
1687#define FLG_HEAP_VALIDATE_ALL 0x00000080
1688#define FLG_APPLICATION_VERIFIER 0x00000100
1689#define FLG_POOL_ENABLE_TAGGING 0x00000400
1690#define FLG_HEAP_ENABLE_TAGGING 0x00000800
1691#define FLG_USER_STACK_TRACE_DB 0x00001000
1692#define FLG_KERNEL_STACK_TRACE_DB 0x00002000
1693#define FLG_MAINTAIN_OBJECT_TYPELIST 0x00004000
1694#define FLG_HEAP_ENABLE_TAG_BY_DLL 0x00008000
1695#define FLG_DISABLE_STACK_EXTENSION 0x00010000
1696#define FLG_ENABLE_CSRDEBUG 0x00020000
1697#define FLG_ENABLE_KDEBUG_SYMBOL_LOAD 0x00040000
1698#define FLG_DISABLE_PAGE_KERNEL_STACKS 0x00080000
1699#define FLG_ENABLE_SYSTEM_CRIT_BREAKS 0x00100000
1700#define FLG_HEAP_DISABLE_COALESCING 0x00200000
1701#define FLG_ENABLE_CLOSE_EXCEPTIONS 0x00400000
1702#define FLG_ENABLE_EXCEPTION_LOGGING 0x00800000
1703#define FLG_ENABLE_HANDLE_TYPE_TAGGING 0x01000000
1704#define FLG_HEAP_PAGE_ALLOCS 0x02000000
1705#define FLG_DEBUG_INITIAL_COMMAND_EX 0x04000000
1706#define FLG_DISABLE_DBGPRINT 0x08000000
1707#define FLG_CRITSEC_EVENT_CREATION 0x10000000
1708#define FLG_LDR_TOP_DOWN 0x20000000
1709#define FLG_ENABLE_HANDLE_EXCEPTIONS 0x40000000
1710#define FLG_DISABLE_PROTDLLS 0x80000000
1711
1712/* Rtl*Registry* functions structs and defines */
1713#define RTL_REGISTRY_ABSOLUTE 0
1714#define RTL_REGISTRY_SERVICES 1
1715#define RTL_REGISTRY_CONTROL 2
1716#define RTL_REGISTRY_WINDOWS_NT 3
1717#define RTL_REGISTRY_DEVICEMAP 4
1718#define RTL_REGISTRY_USER 5
1719
1720#define RTL_REGISTRY_HANDLE 0x40000000
1721#define RTL_REGISTRY_OPTIONAL 0x80000000
1722
1723#define RTL_QUERY_REGISTRY_SUBKEY 0x00000001
1724#define RTL_QUERY_REGISTRY_TOPKEY 0x00000002
1725#define RTL_QUERY_REGISTRY_REQUIRED 0x00000004
1726#define RTL_QUERY_REGISTRY_NOVALUE 0x00000008
1727#define RTL_QUERY_REGISTRY_NOEXPAND 0x00000010
1728#define RTL_QUERY_REGISTRY_DIRECT 0x00000020
1729#define RTL_QUERY_REGISTRY_DELETE 0x00000040
1730
1731typedef NTSTATUS (WINAPI *PRTL_QUERY_REGISTRY_ROUTINE)( PCWSTR ValueName,
1732 ULONG ValueType,
1733 PVOID ValueData,
1734 ULONG ValueLength,
1735 PVOID Context,
1736 PVOID EntryContext);
1737
1738typedef struct _RTL_QUERY_REGISTRY_TABLE
1739{
1740 PRTL_QUERY_REGISTRY_ROUTINE QueryRoutine;
1741 ULONG Flags;
1742 PWSTR Name;
1743 PVOID EntryContext;
1744 ULONG DefaultType;
1745 PVOID DefaultData;
1746 ULONG DefaultLength;
1747} RTL_QUERY_REGISTRY_TABLE, *PRTL_QUERY_REGISTRY_TABLE;
1748
1749typedef struct _KEY_MULTIPLE_VALUE_INFORMATION
1750{
1751 PUNICODE_STRING ValueName;
1752 ULONG DataLength;
1753 ULONG DataOffset;
1754 ULONG Type;
1755} KEY_MULTIPLE_VALUE_INFORMATION, *PKEY_MULTIPLE_VALUE_INFORMATION;
1756
1757typedef VOID (CALLBACK *PRTL_OVERLAPPED_COMPLETION_ROUTINE)(DWORD,DWORD,LPVOID);
1758
1759typedef VOID (CALLBACK *PTIMER_APC_ROUTINE) ( PVOID, ULONG, LONG );
1760
1761typedef enum _EVENT_TYPE {
1762 NotificationEvent,
1763 SynchronizationEvent
1764} EVENT_TYPE, *PEVENT_TYPE;
1765
1766typedef enum _EVENT_INFORMATION_CLASS {
1767 EventBasicInformation
1768} EVENT_INFORMATION_CLASS, *PEVENT_INFORMATION_CLASS;
1769
1770typedef struct _EVENT_BASIC_INFORMATION {
1771 EVENT_TYPE EventType;
1772 LONG EventState;
1773} EVENT_BASIC_INFORMATION, *PEVENT_BASIC_INFORMATION;
1774
1775typedef enum _SEMAPHORE_INFORMATION_CLASS {
1776 SemaphoreBasicInformation
1777} SEMAPHORE_INFORMATION_CLASS, *PSEMAPHORE_INFORMATION_CLASS;
1778
1779typedef struct _SEMAPHORE_BASIC_INFORMATION {
1780 ULONG CurrentCount;
1781 ULONG MaximumCount;
1782} SEMAPHORE_BASIC_INFORMATION, *PSEMAPHORE_BASIC_INFORMATION;
1783
1784typedef enum _SECTION_INFORMATION_CLASS
1785{
1786 SectionBasicInformation,
1787 SectionImageInformation,
1788} SECTION_INFORMATION_CLASS;
1789
1790typedef struct _SECTION_BASIC_INFORMATION {
1791 ULONG BaseAddress;
1792 ULONG Attributes;
1793 LARGE_INTEGER Size;
1794} SECTION_BASIC_INFORMATION, *PSECTION_BASIC_INFORMATION;
1795
1796typedef struct _SECTION_IMAGE_INFORMATION {
1797 PVOID EntryPoint;
1798 ULONG StackZeroBits;
1799 ULONG StackReserved;
1800 ULONG StackCommit;
1801 ULONG ImageSubsystem;
1802 WORD SubsystemVersionLow;
1803 WORD SubsystemVersionHigh;
1804 ULONG Unknown1;
1805 ULONG ImageCharacteristics;
1806 ULONG ImageMachineType;
1807 ULONG Unknown2[3];
1808} SECTION_IMAGE_INFORMATION, *PSECTION_IMAGE_INFORMATION;
1809
1810typedef struct _LPC_SECTION_WRITE {
1811 ULONG Length;
1812 HANDLE SectionHandle;
1813 ULONG SectionOffset;
1814 ULONG ViewSize;
1815 PVOID ViewBase;
1816 PVOID TargetViewBase;
1817} LPC_SECTION_WRITE, *PLPC_SECTION_WRITE;
1818
1819typedef struct _LPC_SECTION_READ {
1820 ULONG Length;
1821 ULONG ViewSize;
1822 PVOID ViewBase;
1823} LPC_SECTION_READ, *PLPC_SECTION_READ;
1824
1825typedef struct _LPC_MESSAGE {
1826 USHORT DataSize;
1827 USHORT MessageSize;
1828 USHORT MessageType;
1829 USHORT VirtualRangesOffset;
1830 CLIENT_ID ClientId;
1831 ULONG_PTR MessageId;
1832 ULONG_PTR SectionSize;
1833 UCHAR Data[ANYSIZE_ARRAY];
1834} LPC_MESSAGE, *PLPC_MESSAGE;
1835
1836typedef enum _SHUTDOWN_ACTION {
1837 ShutdownNoReboot,
1838 ShutdownReboot,
1839 ShutdownPowerOff
1840} SHUTDOWN_ACTION, *PSHUTDOWN_ACTION;
1841
1842typedef enum _KPROFILE_SOURCE {
1843 ProfileTime,
1844 ProfileAlignmentFixup,
1845 ProfileTotalIssues,
1846 ProfilePipelineDry,
1847 ProfileLoadInstructions,
1848 ProfilePipelineFrozen,
1849 ProfileBranchInstructions,
1850 ProfileTotalNonissues,
1851 ProfileDcacheMisses,
1852 ProfileIcacheMisses,
1853 ProfileCacheMisses,
1854 ProfileBranchMispredictions,
1855 ProfileStoreInstructions,
1856 ProfileFpInstructions,
1857 ProfileIntegerInstructions,
1858 Profile2Issue,
1859 Profile3Issue,
1860 Profile4Issue,
1861 ProfileSpecialInstructions,
1862 ProfileTotalCycles,
1863 ProfileIcacheIssues,
1864 ProfileDcacheAccesses,
1865 ProfileMemoryBarrierCycles,
1866 ProfileLoadLinkedIssues,
1867 ProfileMaximum
1868} KPROFILE_SOURCE, *PKPROFILE_SOURCE;
1869
1870typedef struct _DIRECTORY_BASIC_INFORMATION {
1871 UNICODE_STRING ObjectName;
1872 UNICODE_STRING ObjectTypeName;
1873} DIRECTORY_BASIC_INFORMATION, *PDIRECTORY_BASIC_INFORMATION;
1874
1875typedef struct _INITIAL_TEB {
1876 PVOID StackBase;
1877 PVOID StackLimit;
1878 PVOID StackCommit;
1879 PVOID StackCommitMax;
1880 PVOID StackReserved;
1881} INITIAL_TEB, *PINITIAL_TEB;
1882
1883typedef enum _PORT_INFORMATION_CLASS {
1884 PortNoInformation
1885} PORT_INFORMATION_CLASS, *PPORT_INFORMATION_CLASS;
1886
1887typedef enum _IO_COMPLETION_INFORMATION_CLASS {
1888 IoCompletionBasicInformation
1889} IO_COMPLETION_INFORMATION_CLASS, *PIO_COMPLETION_INFORMATION_CLASS;
1890
1891typedef struct _FILE_COMPLETION_INFORMATION {
1892 HANDLE CompletionPort;
1893 ULONG_PTR CompletionKey;
1894} FILE_COMPLETION_INFORMATION, *PFILE_COMPLETION_INFORMATION;
1895
1896#define IO_COMPLETION_QUERY_STATE 0x0001
1897#define IO_COMPLETION_MODIFY_STATE 0x0002
1898#define IO_COMPLETION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
1899
1900typedef enum _HARDERROR_RESPONSE_OPTION {
1901 OptionAbortRetryIgnore,
1902 OptionOk,
1903 OptionOkCancel,
1904 OptionRetryCancel,
1905 OptionYesNo,
1906 OptionYesNoCancel,
1907 OptionShutdownSystem
1908} HARDERROR_RESPONSE_OPTION, *PHARDERROR_RESPONSE_OPTION;
1909
1910typedef enum _HARDERROR_RESPONSE {
1911 ResponseReturnToCaller,
1912 ResponseNotHandled,
1913 ResponseAbort,
1914 ResponseCancel,
1915 ResponseIgnore,
1916 ResponseNo,
1917 ResponseOk,
1918 ResponseRetry,
1919 ResponseYes
1920} HARDERROR_RESPONSE, *PHARDERROR_RESPONSE;
1921
1922typedef enum _SYSDBG_COMMAND {
1923 SysDbgQueryModuleInformation,
1924 SysDbgQueryTraceInformation,
1925 SysDbgSetTracepoint,
1926 SysDbgSetSpecialCall,
1927 SysDbgClearSpecialCalls,
1928 SysDbgQuerySpecialCalls,
1929 SysDbgBreakPoint,
1930 SysDbgQueryVersion,
1931 SysDbgReadVirtual,
1932 SysDbgWriteVirtual,
1933 SysDbgReadPhysical,
1934 SysDbgWritePhysical,
1935 SysDbgReadControlSpace,
1936 SysDbgWriteControlSpace,
1937 SysDbgReadIoSpace,
1938 SysDbgWriteIoSpace,
1939 SysDbgReadMsr,
1940 SysDbgWriteMsr,
1941 SysDbgReadBusData,
1942 SysDbgWriteBusData
1943} SYSDBG_COMMAND, *PSYSDBG_COMMAND;
1944
1945
1946/*************************************************************************
1947 * Loader structures
1948 *
1949 * Those are not part of standard Winternl.h
1950 */
1951typedef struct _LDR_MODULE
1952{
1953 LIST_ENTRY InLoadOrderModuleList;
1954 LIST_ENTRY InMemoryOrderModuleList;
1955 LIST_ENTRY InInitializationOrderModuleList;
1956 void* BaseAddress;
1957 void* EntryPoint;
1958 ULONG SizeOfImage;
1959 UNICODE_STRING FullDllName;
1960 UNICODE_STRING BaseDllName;
1961 ULONG Flags;
1962 SHORT LoadCount;
1963 SHORT TlsIndex;
1964 HANDLE SectionHandle;
1965 ULONG CheckSum;
1966 ULONG TimeDateStamp;
1967 HANDLE ActivationContext;
1968} LDR_MODULE, *PLDR_MODULE;
1969
1970/* those defines are (some of the) regular LDR_MODULE.Flags values */
1971#define LDR_IMAGE_IS_DLL 0x00000004
1972#define LDR_LOAD_IN_PROGRESS 0x00001000
1973#define LDR_UNLOAD_IN_PROGRESS 0x00002000
1974#define LDR_NO_DLL_CALLS 0x00040000
1975#define LDR_PROCESS_ATTACHED 0x00080000
1976#define LDR_MODULE_REBASED 0x00200000
1977
1978/* these ones is Wine specific */
1979#define LDR_DONT_RESOLVE_REFS 0x40000000
1980#define LDR_WINE_INTERNAL 0x80000000
1981
1982/* FIXME: to be checked */
1983#define MAXIMUM_FILENAME_LENGTH 256
1984
1985typedef struct _SYSTEM_MODULE
1986{
1987 PVOID Reserved1; /* 00/00 */
1988 PVOID Reserved2; /* 04/08 */
1989 PVOID ImageBaseAddress; /* 08/10 */
1990 ULONG ImageSize; /* 0c/18 */
1991 ULONG Flags; /* 10/1c */
1992 WORD Id; /* 14/20 */
1993 WORD Rank; /* 16/22 */
1994 WORD Unknown; /* 18/24 */
1995 WORD NameOffset; /* 1a/26 */
1996 BYTE Name[MAXIMUM_FILENAME_LENGTH]; /* 1c/28 */
1997} SYSTEM_MODULE, *PSYSTEM_MODULE;
1998
1999typedef struct _SYSTEM_MODULE_INFORMATION
2000{
2001 ULONG ModulesCount;
2002 SYSTEM_MODULE Modules[1]; /* FIXME: should be Modules[0] */
2003} SYSTEM_MODULE_INFORMATION, *PSYSTEM_MODULE_INFORMATION;
2004
2005/***********************************************************************
2006 * Function declarations
2007 */
2008
2009#if defined(__i386__) && defined(__GNUC__)
2010static inline void WINAPI DbgBreakPoint(void) { __asm__ __volatile__("int3"); }
2011static inline void WINAPI DbgUserBreakPoint(void) { __asm__ __volatile__("int3"); }
2012#else /* __i386__ && __GNUC__ */
2013NTSYSAPI void WINAPI DbgBreakPoint(void);
2014NTSYSAPI void WINAPI DbgUserBreakPoint(void);
2015#endif /* __i386__ && __GNUC__ */
2016NTSYSAPI NTSTATUS WINAPIV DbgPrint(LPCSTR fmt, ...);
2017NTSYSAPI NTSTATUS WINAPIV DbgPrintEx(ULONG iComponentId, ULONG Level, LPCSTR fmt, ...);
2018NTSYSAPI NTSTATUS WINAPI LdrAccessResource(HMODULE,const IMAGE_RESOURCE_DATA_ENTRY*,void**,PULONG);
2019NTSYSAPI NTSTATUS WINAPI LdrAddRefDll(ULONG,HMODULE);
2020NTSYSAPI NTSTATUS WINAPI LdrFindResourceDirectory_U(HMODULE,const LDR_RESOURCE_INFO*,ULONG,const IMAGE_RESOURCE_DIRECTORY**);
2021NTSYSAPI NTSTATUS WINAPI LdrFindResource_U(HMODULE,const LDR_RESOURCE_INFO*,ULONG,const IMAGE_RESOURCE_DATA_ENTRY**);
2022NTSYSAPI NTSTATUS WINAPI LdrDisableThreadCalloutsForDll(HMODULE);
2023NTSYSAPI NTSTATUS WINAPI LdrFindEntryForAddress(const void*, PLDR_MODULE*);
2024NTSYSAPI NTSTATUS WINAPI LdrGetDllHandle(LPCWSTR, ULONG, const UNICODE_STRING*, HMODULE*);
2025NTSYSAPI NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE, const ANSI_STRING*, ULONG, void**);
2026NTSYSAPI void WINAPI LdrInitializeThunk(void*,ULONG_PTR,ULONG_PTR,ULONG_PTR);
2027NTSYSAPI NTSTATUS WINAPI LdrLoadDll(LPCWSTR, DWORD, const UNICODE_STRING*, HMODULE*);
2028NTSYSAPI NTSTATUS WINAPI LdrLockLoaderLock(ULONG,ULONG*,ULONG*);
2029IMAGE_BASE_RELOCATION * WINAPI LdrProcessRelocationBlock(void*,UINT,USHORT*,INT_PTR);
2030NTSYSAPI NTSTATUS WINAPI LdrQueryImageFileExecutionOptions(const UNICODE_STRING*,LPCWSTR,ULONG,void*,ULONG,ULONG*);
2031NTSYSAPI NTSTATUS WINAPI LdrQueryProcessModuleInformation(SYSTEM_MODULE_INFORMATION*, ULONG, ULONG*);
2032NTSYSAPI void WINAPI LdrShutdownProcess(void);
2033NTSYSAPI void WINAPI LdrShutdownThread(void);
2034NTSYSAPI NTSTATUS WINAPI LdrUnloadDll(HMODULE);
2035NTSYSAPI NTSTATUS WINAPI LdrUnlockLoaderLock(ULONG,ULONG);
2036NTSYSAPI NTSTATUS WINAPI NtAcceptConnectPort(PHANDLE,ULONG,PLPC_MESSAGE,BOOLEAN,PLPC_SECTION_WRITE,PLPC_SECTION_READ);
2037NTSYSAPI NTSTATUS WINAPI NtAccessCheck(PSECURITY_DESCRIPTOR,HANDLE,ACCESS_MASK,PGENERIC_MAPPING,PPRIVILEGE_SET,PULONG,PULONG,NTSTATUS*);
2038NTSYSAPI NTSTATUS WINAPI NtAccessCheckAndAuditAlarm(PUNICODE_STRING,HANDLE,PUNICODE_STRING,PUNICODE_STRING,PSECURITY_DESCRIPTOR,ACCESS_MASK,PGENERIC_MAPPING,BOOLEAN,PACCESS_MASK,PBOOLEAN,PBOOLEAN);
2039NTSYSAPI NTSTATUS WINAPI NtAddAtom(const WCHAR*,ULONG,RTL_ATOM*);
2040NTSYSAPI NTSTATUS WINAPI NtAdjustGroupsToken(HANDLE,BOOLEAN,PTOKEN_GROUPS,ULONG,PTOKEN_GROUPS,PULONG);
2041NTSYSAPI NTSTATUS WINAPI NtAdjustPrivilegesToken(HANDLE,BOOLEAN,PTOKEN_PRIVILEGES,DWORD,PTOKEN_PRIVILEGES,PDWORD);
2042NTSYSAPI NTSTATUS WINAPI NtAlertResumeThread(HANDLE,PULONG);
2043NTSYSAPI NTSTATUS WINAPI NtAlertThread(HANDLE ThreadHandle);
2044NTSYSAPI NTSTATUS WINAPI NtAllocateLocallyUniqueId(PLUID lpLuid);
2045NTSYSAPI NTSTATUS WINAPI NtAllocateUuids(PULARGE_INTEGER,PULONG,PULONG);
2046NTSYSAPI NTSTATUS WINAPI NtAllocateVirtualMemory(HANDLE,PVOID*,ULONG,SIZE_T*,ULONG,ULONG);
2047NTSYSAPI NTSTATUS WINAPI NtAreMappedFilesTheSame(PVOID,PVOID);
2048NTSYSAPI NTSTATUS WINAPI NtAssignProcessToJobObject(HANDLE,HANDLE);
2049NTSYSAPI NTSTATUS WINAPI NtCallbackReturn(PVOID,ULONG,NTSTATUS);
2050NTSYSAPI NTSTATUS WINAPI NtCancelIoFile(HANDLE,PIO_STATUS_BLOCK);
2051NTSYSAPI NTSTATUS WINAPI NtCancelIoFileEx(HANDLE,PIO_STATUS_BLOCK,PIO_STATUS_BLOCK);
2052NTSYSAPI NTSTATUS WINAPI NtCancelTimer(HANDLE, BOOLEAN*);
2053NTSYSAPI NTSTATUS WINAPI NtClearEvent(HANDLE);
2054NTSYSAPI NTSTATUS WINAPI NtClose(HANDLE);
2055NTSYSAPI NTSTATUS WINAPI NtCloseObjectAuditAlarm(PUNICODE_STRING,HANDLE,BOOLEAN);
2056NTSYSAPI NTSTATUS WINAPI NtCompleteConnectPort(HANDLE);
2057NTSYSAPI NTSTATUS WINAPI NtConnectPort(PHANDLE,PUNICODE_STRING,PSECURITY_QUALITY_OF_SERVICE,PLPC_SECTION_WRITE,PLPC_SECTION_READ,PULONG,PVOID,PULONG);
2058NTSYSAPI NTSTATUS WINAPI NtContinue(PCONTEXT,BOOLEAN);
2059NTSYSAPI NTSTATUS WINAPI NtCreateDirectoryObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
2060NTSYSAPI NTSTATUS WINAPI NtCreateEvent(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *,EVENT_TYPE,BOOLEAN);
2061NTSYSAPI NTSTATUS WINAPI NtCreateEventPair(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
2062NTSYSAPI NTSTATUS WINAPI NtCreateFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,PLARGE_INTEGER,ULONG,ULONG,ULONG,ULONG,PVOID,ULONG);
2063NTSYSAPI NTSTATUS WINAPI NtCreateIoCompletion(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,ULONG);
2064NTSYSAPI NTSTATUS WINAPI NtCreateJobObject(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
2065NTSYSAPI NTSTATUS WINAPI NtCreateKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,PULONG);
2066NTSYSAPI NTSTATUS WINAPI NtCreateKeyedEvent(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG);
2067NTSYSAPI NTSTATUS WINAPI NtCreateMailslotFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG,ULONG,PLARGE_INTEGER);
2068NTSYSAPI NTSTATUS WINAPI NtCreateMutant(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,BOOLEAN);
2069NTSYSAPI NTSTATUS WINAPI NtCreateNamedPipeFile(PHANDLE,ULONG,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,PLARGE_INTEGER);
2070NTSYSAPI NTSTATUS WINAPI NtCreatePagingFile(PUNICODE_STRING,PLARGE_INTEGER,PLARGE_INTEGER,PLARGE_INTEGER);
2071NTSYSAPI NTSTATUS WINAPI NtCreatePort(PHANDLE,POBJECT_ATTRIBUTES,ULONG,ULONG,PULONG);
2072NTSYSAPI NTSTATUS WINAPI NtCreateProcess(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,HANDLE,BOOLEAN,HANDLE,HANDLE,HANDLE);
2073NTSYSAPI NTSTATUS WINAPI NtCreateProfile(PHANDLE,HANDLE,PVOID,ULONG,ULONG,PVOID,ULONG,KPROFILE_SOURCE,KAFFINITY);
2074NTSYSAPI NTSTATUS WINAPI NtCreateSection(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const LARGE_INTEGER*,ULONG,ULONG,HANDLE);
2075NTSYSAPI NTSTATUS WINAPI NtCreateSemaphore(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,LONG,LONG);
2076NTSYSAPI NTSTATUS WINAPI NtCreateSymbolicLinkObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PUNICODE_STRING);
2077NTSYSAPI NTSTATUS WINAPI NtCreateThread(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,HANDLE,PCLIENT_ID,PCONTEXT,PINITIAL_TEB,BOOLEAN);
2078NTSYSAPI NTSTATUS WINAPI NtCreateTimer(HANDLE*, ACCESS_MASK, const OBJECT_ATTRIBUTES*, TIMER_TYPE);
2079NTSYSAPI 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);
2080NTSYSAPI NTSTATUS WINAPI NtDelayExecution(BOOLEAN,const LARGE_INTEGER*);
2081NTSYSAPI NTSTATUS WINAPI NtDeleteAtom(RTL_ATOM);
2082NTSYSAPI NTSTATUS WINAPI NtDeleteFile(POBJECT_ATTRIBUTES);
2083NTSYSAPI NTSTATUS WINAPI NtDeleteKey(HANDLE);
2084NTSYSAPI NTSTATUS WINAPI NtDeleteValueKey(HANDLE,const UNICODE_STRING *);
2085NTSYSAPI NTSTATUS WINAPI NtDeviceIoControlFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,PVOID,ULONG,PVOID,ULONG);
2086NTSYSAPI NTSTATUS WINAPI NtDisplayString(PUNICODE_STRING);
2087NTSYSAPI NTSTATUS WINAPI NtDuplicateObject(HANDLE,HANDLE,HANDLE,PHANDLE,ACCESS_MASK,ULONG,ULONG);
2088NTSYSAPI NTSTATUS WINAPI NtDuplicateToken(HANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,SECURITY_IMPERSONATION_LEVEL,TOKEN_TYPE,PHANDLE);
2089NTSYSAPI NTSTATUS WINAPI NtEnumerateKey(HANDLE,ULONG,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *);
2090NTSYSAPI NTSTATUS WINAPI NtEnumerateValueKey(HANDLE,ULONG,KEY_VALUE_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2091NTSYSAPI NTSTATUS WINAPI NtExtendSection(HANDLE,PLARGE_INTEGER);
2092NTSYSAPI NTSTATUS WINAPI NtFindAtom(const WCHAR*,ULONG,RTL_ATOM*);
2093NTSYSAPI NTSTATUS WINAPI NtFlushBuffersFile(HANDLE,IO_STATUS_BLOCK*);
2094NTSYSAPI NTSTATUS WINAPI NtFlushInstructionCache(HANDLE,LPCVOID,SIZE_T);
2095NTSYSAPI NTSTATUS WINAPI NtFlushKey(HANDLE);
2096NTSYSAPI NTSTATUS WINAPI NtFlushVirtualMemory(HANDLE,LPCVOID*,SIZE_T*,ULONG);
2097NTSYSAPI NTSTATUS WINAPI NtFlushWriteBuffer(VOID);
2098NTSYSAPI NTSTATUS WINAPI NtFreeVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
2099NTSYSAPI NTSTATUS WINAPI NtFsControlFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,PVOID,ULONG,PVOID,ULONG);
2100NTSYSAPI NTSTATUS WINAPI NtGetContextThread(HANDLE,CONTEXT*);
2101NTSYSAPI NTSTATUS WINAPI NtGetPlugPlayEvent(ULONG,ULONG,PVOID,ULONG);
2102NTSYSAPI ULONG WINAPI NtGetTickCount(VOID);
2103NTSYSAPI NTSTATUS WINAPI NtGetWriteWatch(HANDLE,ULONG,PVOID,SIZE_T,PVOID*,ULONG_PTR*,ULONG*);
2104NTSYSAPI NTSTATUS WINAPI NtImpersonateAnonymousToken(HANDLE);
2105NTSYSAPI NTSTATUS WINAPI NtImpersonateClientOfPort(HANDLE,PPORT_MESSAGE);
2106NTSYSAPI NTSTATUS WINAPI NtImpersonateThread(HANDLE,HANDLE,PSECURITY_QUALITY_OF_SERVICE);
2107NTSYSAPI NTSTATUS WINAPI NtInitializeRegistry(BOOLEAN);
2108NTSYSAPI NTSTATUS WINAPI NtInitiatePowerAction(POWER_ACTION,SYSTEM_POWER_STATE,ULONG,BOOLEAN);
2109NTSYSAPI NTSTATUS WINAPI NtIsProcessInJob(HANDLE,HANDLE);
2110NTSYSAPI NTSTATUS WINAPI NtListenPort(HANDLE,PLPC_MESSAGE);
2111NTSYSAPI NTSTATUS WINAPI NtLoadDriver(const UNICODE_STRING *);
2112NTSYSAPI NTSTATUS WINAPI NtLoadKey(const OBJECT_ATTRIBUTES *,OBJECT_ATTRIBUTES *);
2113NTSYSAPI NTSTATUS WINAPI NtLockFile(HANDLE,HANDLE,PIO_APC_ROUTINE,void*,PIO_STATUS_BLOCK,PLARGE_INTEGER,PLARGE_INTEGER,ULONG*,BOOLEAN,BOOLEAN);
2114NTSYSAPI NTSTATUS WINAPI NtLockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
2115NTSYSAPI NTSTATUS WINAPI NtMakeTemporaryObject(HANDLE);
2116NTSYSAPI NTSTATUS WINAPI NtMapViewOfSection(HANDLE,HANDLE,PVOID*,ULONG,SIZE_T,const LARGE_INTEGER*,SIZE_T*,SECTION_INHERIT,ULONG,ULONG);
2117NTSYSAPI NTSTATUS WINAPI NtNotifyChangeDirectoryFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,ULONG,BOOLEAN);
2118NTSYSAPI NTSTATUS WINAPI NtNotifyChangeKey(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,BOOLEAN,PVOID,ULONG,BOOLEAN);
2119NTSYSAPI NTSTATUS WINAPI NtOpenDirectoryObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
2120NTSYSAPI NTSTATUS WINAPI NtOpenEvent(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *);
2121NTSYSAPI NTSTATUS WINAPI NtOpenEventPair(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
2122NTSYSAPI NTSTATUS WINAPI NtOpenFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG);
2123NTSYSAPI NTSTATUS WINAPI NtOpenIoCompletion(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
2124NTSYSAPI NTSTATUS WINAPI NtOpenJobObject(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
2125NTSYSAPI NTSTATUS WINAPI NtOpenKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *);
2126NTSYSAPI NTSTATUS WINAPI NtOpenKeyedEvent(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
2127NTSYSAPI NTSTATUS WINAPI NtOpenMutant(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
2128NTSYSAPI NTSTATUS WINAPI NtOpenObjectAuditAlarm(PUNICODE_STRING,PHANDLE,PUNICODE_STRING,PUNICODE_STRING,PSECURITY_DESCRIPTOR,HANDLE,ACCESS_MASK,ACCESS_MASK,PPRIVILEGE_SET,BOOLEAN,BOOLEAN,PBOOLEAN);
2129NTSYSAPI NTSTATUS WINAPI NtOpenProcess(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const CLIENT_ID*);
2130NTSYSAPI NTSTATUS WINAPI NtOpenProcessToken(HANDLE,DWORD,HANDLE *);
2131NTSYSAPI NTSTATUS WINAPI NtOpenProcessTokenEx(HANDLE,DWORD,DWORD,HANDLE *);
2132NTSYSAPI NTSTATUS WINAPI NtOpenSection(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
2133NTSYSAPI NTSTATUS WINAPI NtOpenSemaphore(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
2134NTSYSAPI NTSTATUS WINAPI NtOpenSymbolicLinkObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
2135NTSYSAPI NTSTATUS WINAPI NtOpenThread(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const CLIENT_ID*);
2136NTSYSAPI NTSTATUS WINAPI NtOpenThreadToken(HANDLE,DWORD,BOOLEAN,HANDLE *);
2137NTSYSAPI NTSTATUS WINAPI NtOpenThreadTokenEx(HANDLE,DWORD,BOOLEAN,DWORD,HANDLE *);
2138NTSYSAPI NTSTATUS WINAPI NtOpenTimer(HANDLE*, ACCESS_MASK, const OBJECT_ATTRIBUTES*);
2139NTSYSAPI NTSTATUS WINAPI NtPowerInformation(POWER_INFORMATION_LEVEL,PVOID,ULONG,PVOID,ULONG);
2140NTSYSAPI NTSTATUS WINAPI NtPrivilegeCheck(HANDLE,PPRIVILEGE_SET,PBOOLEAN);
2141NTSYSAPI NTSTATUS WINAPI NtPrivilegeObjectAuditAlarm(PUNICODE_STRING,HANDLE,HANDLE,ULONG,PPRIVILEGE_SET,BOOLEAN);
2142NTSYSAPI NTSTATUS WINAPI NtPrivilegedServiceAuditAlarm(PUNICODE_STRING,PUNICODE_STRING,HANDLE,PPRIVILEGE_SET,BOOLEAN);
2143NTSYSAPI NTSTATUS WINAPI NtProtectVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG,ULONG*);
2144NTSYSAPI NTSTATUS WINAPI NtPulseEvent(HANDLE,PULONG);
2145NTSYSAPI NTSTATUS WINAPI NtQueueApcThread(HANDLE,PNTAPCFUNC,ULONG_PTR,ULONG_PTR,ULONG_PTR);
2146NTSYSAPI NTSTATUS WINAPI NtQueryAttributesFile(const OBJECT_ATTRIBUTES*,FILE_BASIC_INFORMATION*);
2147NTSYSAPI NTSTATUS WINAPI NtQueryDefaultLocale(BOOLEAN,LCID*);
2148NTSYSAPI NTSTATUS WINAPI NtQueryDefaultUILanguage(LANGID*);
2149NTSYSAPI NTSTATUS WINAPI NtQueryDirectoryFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,FILE_INFORMATION_CLASS,BOOLEAN,PUNICODE_STRING,BOOLEAN);
2150NTSYSAPI NTSTATUS WINAPI NtQueryDirectoryObject(HANDLE,PDIRECTORY_BASIC_INFORMATION,ULONG,BOOLEAN,BOOLEAN,PULONG,PULONG);
2151NTSYSAPI NTSTATUS WINAPI NtQueryEaFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,BOOLEAN,PVOID,ULONG,PULONG,BOOLEAN);
2152NTSYSAPI NTSTATUS WINAPI NtQueryEvent(HANDLE,EVENT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2153NTSYSAPI NTSTATUS WINAPI NtQueryFullAttributesFile(const OBJECT_ATTRIBUTES*,FILE_NETWORK_OPEN_INFORMATION*);
2154NTSYSAPI NTSTATUS WINAPI NtQueryInformationAtom(RTL_ATOM,ATOM_INFORMATION_CLASS,PVOID,ULONG,ULONG*);
2155NTSYSAPI NTSTATUS WINAPI NtQueryInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,LONG,FILE_INFORMATION_CLASS);
2156NTSYSAPI NTSTATUS WINAPI NtQueryInformationJobObject(HANDLE,JOBOBJECTINFOCLASS,PVOID,ULONG,PULONG);
2157NTSYSAPI NTSTATUS WINAPI NtQueryInformationPort(HANDLE,PORT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2158NTSYSAPI NTSTATUS WINAPI NtQueryInformationProcess(HANDLE,PROCESSINFOCLASS,PVOID,ULONG,PULONG);
2159NTSYSAPI NTSTATUS WINAPI NtQueryInformationThread(HANDLE,THREADINFOCLASS,PVOID,ULONG,PULONG);
2160NTSYSAPI NTSTATUS WINAPI NtQueryInformationToken(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2161NTSYSAPI NTSTATUS WINAPI NtQueryInstallUILanguage(LANGID*);
2162NTSYSAPI NTSTATUS WINAPI NtQueryIntervalProfile(KPROFILE_SOURCE,PULONG);
2163NTSYSAPI NTSTATUS WINAPI NtQueryIoCompletion(HANDLE,IO_COMPLETION_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2164NTSYSAPI NTSTATUS WINAPI NtQueryKey(HANDLE,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *);
2165NTSYSAPI NTSTATUS WINAPI NtQueryMultipleValueKey(HANDLE,PKEY_MULTIPLE_VALUE_INFORMATION,ULONG,PVOID,ULONG,PULONG);
2166NTSYSAPI NTSTATUS WINAPI NtQueryMutant(HANDLE,MUTANT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2167NTSYSAPI NTSTATUS WINAPI NtQueryObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG, PULONG);
2168NTSYSAPI NTSTATUS WINAPI NtQueryOpenSubKeys(POBJECT_ATTRIBUTES,PULONG);
2169NTSYSAPI NTSTATUS WINAPI NtQueryPerformanceCounter(PLARGE_INTEGER, PLARGE_INTEGER);
2170NTSYSAPI NTSTATUS WINAPI NtQuerySecurityObject(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,ULONG,PULONG);
2171NTSYSAPI NTSTATUS WINAPI NtQuerySection(HANDLE,SECTION_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2172NTSYSAPI NTSTATUS WINAPI NtQuerySemaphore(HANDLE,SEMAPHORE_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2173NTSYSAPI NTSTATUS WINAPI NtQuerySymbolicLinkObject(HANDLE,PUNICODE_STRING,PULONG);
2174NTSYSAPI NTSTATUS WINAPI NtQuerySystemEnvironmentValue(PUNICODE_STRING,PWCHAR,ULONG,PULONG);
2175NTSYSAPI NTSTATUS WINAPI NtQuerySystemInformation(SYSTEM_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2176NTSYSAPI NTSTATUS WINAPI NtQuerySystemTime(PLARGE_INTEGER);
2177NTSYSAPI NTSTATUS WINAPI NtQueryTimer(HANDLE,TIMER_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2178NTSYSAPI NTSTATUS WINAPI NtQueryTimerResolution(PULONG,PULONG,PULONG);
2179NTSYSAPI NTSTATUS WINAPI NtQueryValueKey(HANDLE,const UNICODE_STRING *,KEY_VALUE_INFORMATION_CLASS,void *,DWORD,DWORD *);
2180NTSYSAPI NTSTATUS WINAPI NtQueryVirtualMemory(HANDLE,LPCVOID,MEMORY_INFORMATION_CLASS,PVOID,SIZE_T,SIZE_T*);
2181NTSYSAPI NTSTATUS WINAPI NtQueryVolumeInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS);
2182NTSYSAPI NTSTATUS WINAPI NtRaiseException(PEXCEPTION_RECORD,PCONTEXT,BOOL);
2183NTSYSAPI NTSTATUS WINAPI NtRaiseHardError(NTSTATUS,ULONG,PUNICODE_STRING,PVOID*,HARDERROR_RESPONSE_OPTION,PHARDERROR_RESPONSE);
2184NTSYSAPI NTSTATUS WINAPI NtReadFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,PLARGE_INTEGER,PULONG);
2185NTSYSAPI NTSTATUS WINAPI NtReadFileScatter(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,FILE_SEGMENT_ELEMENT*,ULONG,PLARGE_INTEGER,PULONG);
2186NTSYSAPI NTSTATUS WINAPI NtReadRequestData(HANDLE,PLPC_MESSAGE,ULONG,PVOID,ULONG,PULONG);
2187NTSYSAPI NTSTATUS WINAPI NtReadVirtualMemory(HANDLE,const void*,void*,SIZE_T,SIZE_T*);
2188NTSYSAPI NTSTATUS WINAPI NtRegisterThreadTerminatePort(HANDLE);
2189NTSYSAPI NTSTATUS WINAPI NtReleaseKeyedEvent(HANDLE,const void*,BOOLEAN,const LARGE_INTEGER*);
2190NTSYSAPI NTSTATUS WINAPI NtReleaseMutant(HANDLE,PLONG);
2191NTSYSAPI NTSTATUS WINAPI NtReleaseSemaphore(HANDLE,ULONG,PULONG);
2192NTSYSAPI NTSTATUS WINAPI NtRemoveIoCompletion(HANDLE,PULONG_PTR,PULONG_PTR,PIO_STATUS_BLOCK,PLARGE_INTEGER);
2193NTSYSAPI NTSTATUS WINAPI NtReplaceKey(POBJECT_ATTRIBUTES,HANDLE,POBJECT_ATTRIBUTES);
2194NTSYSAPI NTSTATUS WINAPI NtReplyPort(HANDLE,PLPC_MESSAGE);
2195NTSYSAPI NTSTATUS WINAPI NtReplyWaitReceivePort(HANDLE,PULONG,PLPC_MESSAGE,PLPC_MESSAGE);
2196NTSYSAPI NTSTATUS WINAPI NtReplyWaitReceivePortEx(HANDLE,PVOID*,PPORT_MESSAGE,PPORT_MESSAGE,PLARGE_INTEGER);
2197NTSYSAPI NTSTATUS WINAPI NtReplyWaitReplyPort(HANDLE,PLPC_MESSAGE);
2198NTSYSAPI NTSTATUS WINAPI NtRequestPort(HANDLE,PLPC_MESSAGE);
2199NTSYSAPI NTSTATUS WINAPI NtRequestWaitReplyPort(HANDLE,PLPC_MESSAGE,PLPC_MESSAGE);
2200NTSYSAPI NTSTATUS WINAPI NtResetEvent(HANDLE,PULONG);
2201NTSYSAPI NTSTATUS WINAPI NtResetWriteWatch(HANDLE,PVOID,SIZE_T);
2202NTSYSAPI NTSTATUS WINAPI NtRestoreKey(HANDLE,HANDLE,ULONG);
2203NTSYSAPI NTSTATUS WINAPI NtResumeThread(HANDLE,PULONG);
2204NTSYSAPI NTSTATUS WINAPI NtSaveKey(HANDLE,HANDLE);
2205NTSYSAPI NTSTATUS WINAPI NtSecureConnectPort(PHANDLE,PUNICODE_STRING,PSECURITY_QUALITY_OF_SERVICE,PLPC_SECTION_WRITE,PSID,PLPC_SECTION_READ,PULONG,PVOID,PULONG);
2206NTSYSAPI NTSTATUS WINAPI NtSetContextThread(HANDLE,const CONTEXT*);
2207NTSYSAPI NTSTATUS WINAPI NtSetDefaultHardErrorPort(HANDLE);
2208NTSYSAPI NTSTATUS WINAPI NtSetDefaultLocale(BOOLEAN,LCID);
2209NTSYSAPI NTSTATUS WINAPI NtSetDefaultUILanguage(LANGID);
2210NTSYSAPI NTSTATUS WINAPI NtSetEaFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG);
2211NTSYSAPI NTSTATUS WINAPI NtSetEvent(HANDLE,PULONG);
2212NTSYSAPI NTSTATUS WINAPI NtSetHighEventPair(HANDLE);
2213NTSYSAPI NTSTATUS WINAPI NtSetHighWaitLowEventPair(HANDLE);
2214NTSYSAPI NTSTATUS WINAPI NtSetHighWaitLowThread(VOID);
2215NTSYSAPI NTSTATUS WINAPI NtSetInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FILE_INFORMATION_CLASS);
2216NTSYSAPI NTSTATUS WINAPI NtSetInformationJobObject(HANDLE,JOBOBJECTINFOCLASS,PVOID,ULONG);
2217NTSYSAPI NTSTATUS WINAPI NtSetInformationKey(HANDLE,const int,PVOID,ULONG);
2218NTSYSAPI NTSTATUS WINAPI NtSetInformationObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG);
2219NTSYSAPI NTSTATUS WINAPI NtSetInformationProcess(HANDLE,PROCESS_INFORMATION_CLASS,PVOID,ULONG);
2220NTSYSAPI NTSTATUS WINAPI NtSetInformationThread(HANDLE,THREADINFOCLASS,LPCVOID,ULONG);
2221NTSYSAPI NTSTATUS WINAPI NtSetInformationToken(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,ULONG);
2222NTSYSAPI NTSTATUS WINAPI NtSetIntervalProfile(ULONG,KPROFILE_SOURCE);
2223NTSYSAPI NTSTATUS WINAPI NtSetIoCompletion(HANDLE,ULONG_PTR,ULONG_PTR,NTSTATUS,SIZE_T);
2224NTSYSAPI NTSTATUS WINAPI NtSetLdtEntries(ULONG,LDT_ENTRY,ULONG,LDT_ENTRY);
2225NTSYSAPI NTSTATUS WINAPI NtSetLowEventPair(HANDLE);
2226NTSYSAPI NTSTATUS WINAPI NtSetLowWaitHighEventPair(HANDLE);
2227NTSYSAPI NTSTATUS WINAPI NtSetLowWaitHighThread(VOID);
2228NTSYSAPI NTSTATUS WINAPI NtSetSecurityObject(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
2229NTSYSAPI NTSTATUS WINAPI NtSetSystemEnvironmentValue(PUNICODE_STRING,PUNICODE_STRING);
2230NTSYSAPI NTSTATUS WINAPI NtSetSystemInformation(SYSTEM_INFORMATION_CLASS,PVOID,ULONG);
2231NTSYSAPI NTSTATUS WINAPI NtSetSystemPowerState(POWER_ACTION,SYSTEM_POWER_STATE,ULONG);
2232NTSYSAPI NTSTATUS WINAPI NtSetSystemTime(const LARGE_INTEGER*,LARGE_INTEGER*);
2233NTSYSAPI NTSTATUS WINAPI NtSetTimer(HANDLE, const LARGE_INTEGER*, PTIMER_APC_ROUTINE, PVOID, BOOLEAN, ULONG, BOOLEAN*);
2234NTSYSAPI NTSTATUS WINAPI NtSetTimerResolution(ULONG,BOOLEAN,PULONG);
2235NTSYSAPI NTSTATUS WINAPI NtSetValueKey(HANDLE,const UNICODE_STRING *,ULONG,ULONG,const void *,ULONG);
2236NTSYSAPI NTSTATUS WINAPI NtSetVolumeInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS);
2237NTSYSAPI NTSTATUS WINAPI NtSignalAndWaitForSingleObject(HANDLE,HANDLE,BOOLEAN,const LARGE_INTEGER*);
2238NTSYSAPI NTSTATUS WINAPI NtShutdownSystem(SHUTDOWN_ACTION);
2239NTSYSAPI NTSTATUS WINAPI NtStartProfile(HANDLE);
2240NTSYSAPI NTSTATUS WINAPI NtStopProfile(HANDLE);
2241NTSYSAPI NTSTATUS WINAPI NtSuspendThread(HANDLE,PULONG);
2242NTSYSAPI NTSTATUS WINAPI NtSystemDebugControl(SYSDBG_COMMAND,PVOID,ULONG,PVOID,ULONG,PULONG);
2243NTSYSAPI NTSTATUS WINAPI NtTerminateJobObject(HANDLE,NTSTATUS);
2244NTSYSAPI NTSTATUS WINAPI NtTerminateProcess(HANDLE,LONG);
2245NTSYSAPI NTSTATUS WINAPI NtTerminateThread(HANDLE,LONG);
2246NTSYSAPI NTSTATUS WINAPI NtTestAlert(VOID);
2247NTSYSAPI NTSTATUS WINAPI NtUnloadDriver(const UNICODE_STRING *);
2248NTSYSAPI NTSTATUS WINAPI NtUnloadKey(POBJECT_ATTRIBUTES);
2249NTSYSAPI NTSTATUS WINAPI NtUnloadKeyEx(POBJECT_ATTRIBUTES,HANDLE);
2250NTSYSAPI NTSTATUS WINAPI NtUnlockFile(HANDLE,PIO_STATUS_BLOCK,PLARGE_INTEGER,PLARGE_INTEGER,PULONG);
2251NTSYSAPI NTSTATUS WINAPI NtUnlockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
2252NTSYSAPI NTSTATUS WINAPI NtUnmapViewOfSection(HANDLE,PVOID);
2253NTSYSAPI NTSTATUS WINAPI NtVdmControl(ULONG,PVOID);
2254NTSYSAPI NTSTATUS WINAPI NtWaitForKeyedEvent(HANDLE,const void*,BOOLEAN,const LARGE_INTEGER*);
2255NTSYSAPI NTSTATUS WINAPI NtWaitForSingleObject(HANDLE,BOOLEAN,const LARGE_INTEGER*);
2256NTSYSAPI NTSTATUS WINAPI NtWaitForMultipleObjects(ULONG,const HANDLE*,BOOLEAN,BOOLEAN,const LARGE_INTEGER*);
2257NTSYSAPI NTSTATUS WINAPI NtWaitHighEventPair(HANDLE);
2258NTSYSAPI NTSTATUS WINAPI NtWaitLowEventPair(HANDLE);
2259NTSYSAPI NTSTATUS WINAPI NtWriteFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,const void*,ULONG,PLARGE_INTEGER,PULONG);
2260NTSYSAPI NTSTATUS WINAPI NtWriteFileGather(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,FILE_SEGMENT_ELEMENT*,ULONG,PLARGE_INTEGER,PULONG);
2261NTSYSAPI NTSTATUS WINAPI NtWriteRequestData(HANDLE,PLPC_MESSAGE,ULONG,PVOID,ULONG,PULONG);
2262NTSYSAPI NTSTATUS WINAPI NtWriteVirtualMemory(HANDLE,void*,const void*,SIZE_T,SIZE_T*);
2263NTSYSAPI NTSTATUS WINAPI NtYieldExecution(void);
2264
2265NTSYSAPI void WINAPI RtlAcquirePebLock(void);
2266NTSYSAPI BYTE WINAPI RtlAcquireResourceExclusive(LPRTL_RWLOCK,BYTE);
2267NTSYSAPI BYTE WINAPI RtlAcquireResourceShared(LPRTL_RWLOCK,BYTE);
2268NTSYSAPI void WINAPI RtlAcquireSRWLockExclusive(RTL_SRWLOCK*);
2269NTSYSAPI void WINAPI RtlAcquireSRWLockShared(RTL_SRWLOCK*);
2270NTSYSAPI NTSTATUS WINAPI RtlActivateActivationContext(DWORD,HANDLE,ULONG_PTR*);
2271NTSYSAPI NTSTATUS WINAPI RtlAddAce(PACL,DWORD,DWORD,PACE_HEADER,DWORD);
2272NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedAce(PACL,DWORD,DWORD,PSID);
2273NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
2274NTSYSAPI NTSTATUS WINAPI RtlAddAccessDeniedAce(PACL,DWORD,DWORD,PSID);
2275NTSYSAPI NTSTATUS WINAPI RtlAddAccessDeniedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
2276NTSYSAPI NTSTATUS WINAPI RtlAddAtomToAtomTable(RTL_ATOM_TABLE,const WCHAR*,RTL_ATOM*);
2277NTSYSAPI NTSTATUS WINAPI RtlAddAuditAccessAce(PACL,DWORD,DWORD,PSID,BOOL,BOOL);
2278NTSYSAPI NTSTATUS WINAPI RtlAddAuditAccessAceEx(PACL,DWORD,DWORD,DWORD,PSID,BOOL,BOOL);
2279NTSYSAPI void WINAPI RtlAddRefActivationContext(HANDLE);
2280NTSYSAPI PVOID WINAPI RtlAddVectoredExceptionHandler(ULONG,PVECTORED_EXCEPTION_HANDLER);
2281NTSYSAPI NTSTATUS WINAPI RtlAdjustPrivilege(ULONG,BOOLEAN,BOOLEAN,PBOOLEAN);
2282NTSYSAPI NTSTATUS WINAPI RtlAllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY,BYTE,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,PSID *);
2283NTSYSAPI RTL_HANDLE * WINAPI RtlAllocateHandle(RTL_HANDLE_TABLE *,ULONG *);
2284NTSYSAPI PVOID WINAPI RtlAllocateHeap(HANDLE,ULONG,SIZE_T) __WINE_ALLOC_SIZE(3);
2285NTSYSAPI WCHAR WINAPI RtlAnsiCharToUnicodeChar(LPSTR *);
2286NTSYSAPI DWORD WINAPI RtlAnsiStringToUnicodeSize(const STRING *);
2287NTSYSAPI NTSTATUS WINAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING,PCANSI_STRING,BOOLEAN);
2288NTSYSAPI NTSTATUS WINAPI RtlAppendAsciizToString(STRING *,LPCSTR);
2289NTSYSAPI NTSTATUS WINAPI RtlAppendStringToString(STRING *,const STRING *);
2290NTSYSAPI NTSTATUS WINAPI RtlAppendUnicodeStringToString(UNICODE_STRING *,const UNICODE_STRING *);
2291NTSYSAPI NTSTATUS WINAPI RtlAppendUnicodeToString(UNICODE_STRING *,LPCWSTR);
2292NTSYSAPI BOOLEAN WINAPI RtlAreAllAccessesGranted(ACCESS_MASK,ACCESS_MASK);
2293NTSYSAPI BOOLEAN WINAPI RtlAreAnyAccessesGranted(ACCESS_MASK,ACCESS_MASK);
2294NTSYSAPI BOOLEAN WINAPI RtlAreBitsSet(PCRTL_BITMAP,ULONG,ULONG);
2295NTSYSAPI BOOLEAN WINAPI RtlAreBitsClear(PCRTL_BITMAP,ULONG,ULONG);
2296NTSYSAPI NTSTATUS WINAPI RtlCharToInteger(PCSZ,ULONG,PULONG);
2297NTSYSAPI NTSTATUS WINAPI RtlCheckRegistryKey(ULONG, PWSTR);
2298NTSYSAPI void WINAPI RtlClearAllBits(PRTL_BITMAP);
2299NTSYSAPI void WINAPI RtlClearBits(PRTL_BITMAP,ULONG,ULONG);
2300NTSYSAPI NTSTATUS WINAPI RtlCreateActivationContext(HANDLE*,const void*);
2301NTSYSAPI PDEBUG_BUFFER WINAPI RtlCreateQueryDebugBuffer(ULONG,BOOLEAN);
2302NTSYSAPI ULONG WINAPI RtlCompactHeap(HANDLE,ULONG);
2303NTSYSAPI LONG WINAPI RtlCompareString(const STRING*,const STRING*,BOOLEAN);
2304NTSYSAPI LONG WINAPI RtlCompareUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
2305NTSYSAPI NTSTATUS WINAPI RtlCompressBuffer(USHORT,PUCHAR,ULONG,PUCHAR,ULONG,ULONG,PULONG,PVOID);
2306NTSYSAPI DWORD WINAPI RtlComputeCrc32(DWORD,const BYTE*,INT);
2307NTSYSAPI NTSTATUS WINAPI RtlConvertSidToUnicodeString(PUNICODE_STRING,PSID,BOOLEAN);
2308NTSYSAPI void WINAPI RtlCopyLuid(PLUID,const LUID*);
2309NTSYSAPI void WINAPI RtlCopyLuidAndAttributesArray(ULONG,const LUID_AND_ATTRIBUTES*,PLUID_AND_ATTRIBUTES);
2310NTSYSAPI BOOLEAN WINAPI RtlCopySid(DWORD,PSID,PSID);
2311NTSYSAPI NTSTATUS WINAPI RtlCopySecurityDescriptor(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR);
2312NTSYSAPI void WINAPI RtlCopyString(STRING*,const STRING*);
2313NTSYSAPI void WINAPI RtlCopyUnicodeString(UNICODE_STRING*,const UNICODE_STRING*);
2314NTSYSAPI NTSTATUS WINAPI RtlCreateAcl(PACL,DWORD,DWORD);
2315NTSYSAPI NTSTATUS WINAPI RtlCreateAtomTable(ULONG,RTL_ATOM_TABLE*);
2316NTSYSAPI NTSTATUS WINAPI RtlCreateEnvironment(BOOLEAN, PWSTR*);
2317NTSYSAPI HANDLE WINAPI RtlCreateHeap(ULONG,PVOID,SIZE_T,SIZE_T,PVOID,PRTL_HEAP_DEFINITION);
2318NTSYSAPI 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*);
2319NTSYSAPI NTSTATUS WINAPI RtlCreateSecurityDescriptor(PSECURITY_DESCRIPTOR,DWORD);
2320NTSYSAPI NTSTATUS WINAPI RtlCreateTimerQueue(PHANDLE);
2321NTSYSAPI NTSTATUS WINAPI RtlCreateTimer(PHANDLE, HANDLE, RTL_WAITORTIMERCALLBACKFUNC, PVOID, DWORD, DWORD, ULONG);
2322NTSYSAPI BOOLEAN WINAPI RtlCreateUnicodeString(PUNICODE_STRING,LPCWSTR);
2323NTSYSAPI BOOLEAN WINAPI RtlCreateUnicodeStringFromAsciiz(PUNICODE_STRING,LPCSTR);
2324NTSYSAPI NTSTATUS WINAPI RtlCreateUserThread(HANDLE,const SECURITY_DESCRIPTOR*,BOOLEAN,PVOID,SIZE_T,SIZE_T,PRTL_THREAD_START_ROUTINE,void*,HANDLE*,CLIENT_ID*);
2325NTSYSAPI void WINAPI RtlDeactivateActivationContext(DWORD,ULONG_PTR);
2326NTSYSAPI PVOID WINAPI RtlDecodePointer(PVOID);
2327NTSYSAPI NTSTATUS WINAPI RtlDecompressBuffer(USHORT,PUCHAR,ULONG,PUCHAR,ULONG,PULONG);
2328NTSYSAPI NTSTATUS WINAPI RtlDeleteAce(PACL,DWORD);
2329NTSYSAPI NTSTATUS WINAPI RtlDeleteAtomFromAtomTable(RTL_ATOM_TABLE,RTL_ATOM);
2330NTSYSAPI NTSTATUS WINAPI RtlDeleteCriticalSection(RTL_CRITICAL_SECTION *);
2331NTSYSAPI NTSTATUS WINAPI RtlDeleteRegistryValue(ULONG, PCWSTR, PCWSTR);
2332NTSYSAPI void WINAPI RtlDeleteResource(LPRTL_RWLOCK);
2333NTSYSAPI NTSTATUS WINAPI RtlDeleteSecurityObject(PSECURITY_DESCRIPTOR*);
2334NTSYSAPI NTSTATUS WINAPI RtlDeleteTimer(HANDLE, HANDLE, HANDLE);
2335NTSYSAPI NTSTATUS WINAPI RtlDeleteTimerQueueEx(HANDLE, HANDLE);
2336NTSYSAPI PRTL_USER_PROCESS_PARAMETERS WINAPI RtlDeNormalizeProcessParams(RTL_USER_PROCESS_PARAMETERS*);
2337NTSYSAPI NTSTATUS WINAPI RtlDeregisterWait(HANDLE);
2338NTSYSAPI NTSTATUS WINAPI RtlDeregisterWaitEx(HANDLE,HANDLE);
2339NTSYSAPI NTSTATUS WINAPI RtlDestroyAtomTable(RTL_ATOM_TABLE);
2340NTSYSAPI NTSTATUS WINAPI RtlDestroyEnvironment(PWSTR);
2341NTSYSAPI NTSTATUS WINAPI RtlDestroyHandleTable(RTL_HANDLE_TABLE *);
2342NTSYSAPI HANDLE WINAPI RtlDestroyHeap(HANDLE);
2343NTSYSAPI void WINAPI RtlDestroyProcessParameters(RTL_USER_PROCESS_PARAMETERS*);
2344NTSYSAPI NTSTATUS WINAPI RtlDestroyQueryDebugBuffer(PDEBUG_BUFFER);
2345NTSYSAPI DOS_PATHNAME_TYPE WINAPI RtlDetermineDosPathNameType_U(PCWSTR);
2346NTSYSAPI BOOLEAN WINAPI RtlDllShutdownInProgress(void);
2347NTSYSAPI BOOLEAN WINAPI RtlDoesFileExists_U(LPCWSTR);
2348NTSYSAPI BOOLEAN WINAPI RtlDosPathNameToNtPathName_U(PCWSTR,PUNICODE_STRING,PWSTR*,CURDIR*);
2349NTSYSAPI ULONG WINAPI RtlDosSearchPath_U(LPCWSTR, LPCWSTR, LPCWSTR, ULONG, LPWSTR, LPWSTR*);
2350NTSYSAPI WCHAR WINAPI RtlDowncaseUnicodeChar(WCHAR);
2351NTSYSAPI NTSTATUS WINAPI RtlDowncaseUnicodeString(UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
2352NTSYSAPI void WINAPI RtlDumpResource(LPRTL_RWLOCK);
2353NTSYSAPI NTSTATUS WINAPI RtlDuplicateUnicodeString(int,const UNICODE_STRING*,UNICODE_STRING*);
2354NTSYSAPI NTSTATUS WINAPI RtlEmptyAtomTable(RTL_ATOM_TABLE,BOOLEAN);
2355NTSYSAPI PVOID WINAPI RtlEncodePointer(PVOID);
2356NTSYSAPI NTSTATUS WINAPI RtlEnterCriticalSection(RTL_CRITICAL_SECTION *);
2357NTSYSAPI void WINAPI RtlEraseUnicodeString(UNICODE_STRING*);
2358NTSYSAPI NTSTATUS WINAPI RtlEqualComputerName(const UNICODE_STRING*,const UNICODE_STRING*);
2359NTSYSAPI NTSTATUS WINAPI RtlEqualDomainName(const UNICODE_STRING*,const UNICODE_STRING*);
2360NTSYSAPI BOOLEAN WINAPI RtlEqualLuid(const LUID*,const LUID*);
2361NTSYSAPI BOOL WINAPI RtlEqualPrefixSid(PSID,PSID);
2362NTSYSAPI BOOL WINAPI RtlEqualSid(PSID,PSID);
2363NTSYSAPI BOOLEAN WINAPI RtlEqualString(const STRING*,const STRING*,BOOLEAN);
2364NTSYSAPI BOOLEAN WINAPI RtlEqualUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
2365NTSYSAPI void DECLSPEC_NORETURN WINAPI RtlExitUserProcess(ULONG);
2366NTSYSAPI void DECLSPEC_NORETURN WINAPI RtlExitUserThread(ULONG);
2367NTSYSAPI NTSTATUS WINAPI RtlExpandEnvironmentStrings_U(PCWSTR, const UNICODE_STRING*, UNICODE_STRING*, ULONG*);
2368NTSYSAPI NTSTATUS WINAPI RtlFindActivationContextSectionString(ULONG,const GUID*,ULONG,const UNICODE_STRING*,PVOID);
2369NTSYSAPI NTSTATUS WINAPI RtlFindActivationContextSectionGuid(ULONG,const GUID*,ULONG,const GUID*,PVOID);
2370NTSYSAPI NTSTATUS WINAPI RtlFindCharInUnicodeString(int,const UNICODE_STRING*,const UNICODE_STRING*,USHORT*);
2371NTSYSAPI ULONG WINAPI RtlFindClearBits(PCRTL_BITMAP,ULONG,ULONG);
2372NTSYSAPI ULONG WINAPI RtlFindClearBitsAndSet(PRTL_BITMAP,ULONG,ULONG);
2373NTSYSAPI ULONG WINAPI RtlFindClearRuns(PCRTL_BITMAP,PRTL_BITMAP_RUN,ULONG,BOOLEAN);
2374NTSYSAPI ULONG WINAPI RtlFindLastBackwardRunSet(PCRTL_BITMAP,ULONG,PULONG);
2375NTSYSAPI ULONG WINAPI RtlFindLastBackwardRunClear(PCRTL_BITMAP,ULONG,PULONG);
2376NTSYSAPI CCHAR WINAPI RtlFindLeastSignificantBit(ULONGLONG);
2377NTSYSAPI ULONG WINAPI RtlFindLongestRunSet(PCRTL_BITMAP,PULONG);
2378NTSYSAPI ULONG WINAPI RtlFindLongestRunClear(PCRTL_BITMAP,PULONG);
2379NTSYSAPI NTSTATUS WINAPI RtlFindMessage(HMODULE,ULONG,ULONG,ULONG,const MESSAGE_RESOURCE_ENTRY**);
2380NTSYSAPI CCHAR WINAPI RtlFindMostSignificantBit(ULONGLONG);
2381NTSYSAPI ULONG WINAPI RtlFindNextForwardRunSet(PCRTL_BITMAP,ULONG,PULONG);
2382NTSYSAPI ULONG WINAPI RtlFindNextForwardRunClear(PCRTL_BITMAP,ULONG,PULONG);
2383NTSYSAPI ULONG WINAPI RtlFindSetBits(PCRTL_BITMAP,ULONG,ULONG);
2384NTSYSAPI ULONG WINAPI RtlFindSetBitsAndClear(PRTL_BITMAP,ULONG,ULONG);
2385NTSYSAPI ULONG WINAPI RtlFindSetRuns(PCRTL_BITMAP,PRTL_BITMAP_RUN,ULONG,BOOLEAN);
2386NTSYSAPI BOOLEAN WINAPI RtlFirstFreeAce(PACL,PACE_HEADER *);
2387NTSYSAPI NTSTATUS WINAPI RtlFormatCurrentUserKeyPath(PUNICODE_STRING);
2388NTSYSAPI NTSTATUS WINAPI RtlFormatMessage(LPWSTR,UCHAR,BOOLEAN,BOOLEAN,BOOLEAN,__ms_va_list *,LPWSTR,ULONG);
2389NTSYSAPI void WINAPI RtlFreeAnsiString(PANSI_STRING);
2390NTSYSAPI BOOLEAN WINAPI RtlFreeHandle(RTL_HANDLE_TABLE *,RTL_HANDLE *);
2391NTSYSAPI BOOLEAN WINAPI RtlFreeHeap(HANDLE,ULONG,PVOID);
2392NTSYSAPI void WINAPI RtlFreeOemString(POEM_STRING);
2393NTSYSAPI DWORD WINAPI RtlFreeSid(PSID);
2394NTSYSAPI void WINAPI RtlFreeThreadActivationContextStack(void);
2395NTSYSAPI void WINAPI RtlFreeUnicodeString(PUNICODE_STRING);
2396NTSYSAPI NTSTATUS WINAPI RtlGetAce(PACL,DWORD,LPVOID *);
2397NTSYSAPI NTSTATUS WINAPI RtlGetActiveActivationContext(HANDLE*);
2398NTSYSAPI NTSTATUS WINAPI RtlGetCompressionWorkSpaceSize(USHORT,PULONG,PULONG);
2399NTSYSAPI NTSTATUS WINAPI RtlGetControlSecurityDescriptor(PSECURITY_DESCRIPTOR, PSECURITY_DESCRIPTOR_CONTROL,LPDWORD);
2400NTSYSAPI NTSTATUS WINAPI RtlGetCurrentDirectory_U(ULONG, LPWSTR);
2401NTSYSAPI PEB * WINAPI RtlGetCurrentPeb(void);
2402NTSYSAPI NTSTATUS WINAPI RtlGetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR,PBOOLEAN,PACL *,PBOOLEAN);
2403NTSYSAPI ULONG WINAPI RtlGetFullPathName_U(PCWSTR,ULONG,PWSTR,PWSTR*);
2404NTSYSAPI NTSTATUS WINAPI RtlGetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID *,PBOOLEAN);
2405NTSYSAPI NTSTATUS WINAPI RtlGetLastNtStatus(void);
2406NTSYSAPI DWORD WINAPI RtlGetLastWin32Error(void);
2407NTSYSAPI DWORD WINAPI RtlGetLongestNtPathLength(void);
2408NTSYSAPI ULONG WINAPI RtlGetNtGlobalFlags(void);
2409NTSYSAPI BOOLEAN WINAPI RtlGetNtProductType(LPDWORD);
2410NTSYSAPI NTSTATUS WINAPI RtlGetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID *,PBOOLEAN);
2411NTSYSAPI ULONG WINAPI RtlGetProcessHeaps(ULONG,HANDLE*);
2412NTSYSAPI DWORD WINAPI RtlGetThreadErrorMode(void);
2413NTSYSAPI NTSTATUS WINAPI RtlGetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR,PBOOLEAN,PACL *,PBOOLEAN);
2414NTSYSAPI NTSTATUS WINAPI RtlGetVersion(RTL_OSVERSIONINFOEXW*);
2415NTSYSAPI NTSTATUS WINAPI RtlGUIDFromString(PUNICODE_STRING,GUID*);
2416NTSYSAPI PSID_IDENTIFIER_AUTHORITY WINAPI RtlIdentifierAuthoritySid(PSID);
2417NTSYSAPI PVOID WINAPI RtlImageDirectoryEntryToData(HMODULE,BOOL,WORD,ULONG *);
2418NTSYSAPI PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE);
2419NTSYSAPI PIMAGE_SECTION_HEADER WINAPI RtlImageRvaToSection(const IMAGE_NT_HEADERS *,HMODULE,DWORD);
2420NTSYSAPI PVOID WINAPI RtlImageRvaToVa(const IMAGE_NT_HEADERS *,HMODULE,DWORD,IMAGE_SECTION_HEADER **);
2421NTSYSAPI NTSTATUS WINAPI RtlImpersonateSelf(SECURITY_IMPERSONATION_LEVEL);
2422NTSYSAPI void WINAPI RtlInitString(PSTRING,PCSZ);
2423NTSYSAPI void WINAPI RtlInitAnsiString(PANSI_STRING,PCSZ);
2424NTSYSAPI NTSTATUS WINAPI RtlInitAnsiStringEx(PANSI_STRING,PCSZ);
2425NTSYSAPI void WINAPI RtlInitUnicodeString(PUNICODE_STRING,PCWSTR);
2426NTSYSAPI NTSTATUS WINAPI RtlInitUnicodeStringEx(PUNICODE_STRING,PCWSTR);
2427NTSYSAPI NTSTATUS WINAPI RtlInitializeCriticalSection(RTL_CRITICAL_SECTION *);
2428NTSYSAPI NTSTATUS WINAPI RtlInitializeCriticalSectionAndSpinCount(RTL_CRITICAL_SECTION *,ULONG);
2429NTSYSAPI NTSTATUS WINAPI RtlInitializeCriticalSectionEx(RTL_CRITICAL_SECTION *,ULONG,ULONG);
2430NTSYSAPI void WINAPI RtlInitializeBitMap(PRTL_BITMAP,PULONG,ULONG);
2431NTSYSAPI void WINAPI RtlInitializeHandleTable(ULONG,ULONG,RTL_HANDLE_TABLE *);
2432NTSYSAPI void WINAPI RtlInitializeResource(LPRTL_RWLOCK);
2433NTSYSAPI void WINAPI RtlInitializeSRWLock(RTL_SRWLOCK*);
2434NTSYSAPI BOOL WINAPI RtlInitializeSid(PSID,PSID_IDENTIFIER_AUTHORITY,BYTE);
2435NTSYSAPI NTSTATUS WINAPI RtlInt64ToUnicodeString(ULONGLONG,ULONG,UNICODE_STRING *);
2436NTSYSAPI NTSTATUS WINAPI RtlIntegerToChar(ULONG,ULONG,ULONG,PCHAR);
2437NTSYSAPI NTSTATUS WINAPI RtlIntegerToUnicodeString(ULONG,ULONG,UNICODE_STRING *);
2438NTSYSAPI BOOLEAN WINAPI RtlIsActivationContextActive(HANDLE);
2439NTSYSAPI ULONG WINAPI RtlIsDosDeviceName_U(PCWSTR);
2440NTSYSAPI BOOLEAN WINAPI RtlIsNameLegalDOS8Dot3(const UNICODE_STRING*,POEM_STRING,PBOOLEAN);
2441NTSYSAPI BOOLEAN WINAPI RtlIsTextUnicode(LPCVOID,INT,INT *);
2442NTSYSAPI BOOLEAN WINAPI RtlIsValidHandle(const RTL_HANDLE_TABLE *, const RTL_HANDLE *);
2443NTSYSAPI BOOLEAN WINAPI RtlIsValidIndexHandle(const RTL_HANDLE_TABLE *, ULONG Index, RTL_HANDLE **);
2444NTSYSAPI NTSTATUS WINAPI RtlLeaveCriticalSection(RTL_CRITICAL_SECTION *);
2445NTSYSAPI DWORD WINAPI RtlLengthRequiredSid(DWORD);
2446NTSYSAPI ULONG WINAPI RtlLengthSecurityDescriptor(PSECURITY_DESCRIPTOR);
2447NTSYSAPI DWORD WINAPI RtlLengthSid(PSID);
2448NTSYSAPI NTSTATUS WINAPI RtlLocalTimeToSystemTime(const LARGE_INTEGER*,PLARGE_INTEGER);
2449NTSYSAPI BOOLEAN WINAPI RtlLockHeap(HANDLE);
2450NTSYSAPI NTSTATUS WINAPI RtlLookupAtomInAtomTable(RTL_ATOM_TABLE,const WCHAR*,RTL_ATOM*);
2451NTSYSAPI NTSTATUS WINAPI RtlMakeSelfRelativeSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,LPDWORD);
2452NTSYSAPI void WINAPI RtlMapGenericMask(PACCESS_MASK,const GENERIC_MAPPING*);
2453NTSYSAPI NTSTATUS WINAPI RtlMultiByteToUnicodeN(LPWSTR,DWORD,LPDWORD,LPCSTR,DWORD);
2454NTSYSAPI NTSTATUS WINAPI RtlMultiByteToUnicodeSize(DWORD*,LPCSTR,UINT);
2455NTSYSAPI NTSTATUS WINAPI RtlNewSecurityObject(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR*,BOOLEAN,HANDLE,PGENERIC_MAPPING);
2456NTSYSAPI PRTL_USER_PROCESS_PARAMETERS WINAPI RtlNormalizeProcessParams(RTL_USER_PROCESS_PARAMETERS*);
2457NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS);
2458NTSYSAPI ULONG WINAPI RtlNtStatusToDosErrorNoTeb(NTSTATUS);
2459NTSYSAPI ULONG WINAPI RtlNumberOfSetBits(PCRTL_BITMAP);
2460NTSYSAPI ULONG WINAPI RtlNumberOfClearBits(PCRTL_BITMAP);
2461NTSYSAPI UINT WINAPI RtlOemStringToUnicodeSize(const STRING*);
2462NTSYSAPI NTSTATUS WINAPI RtlOemStringToUnicodeString(UNICODE_STRING*,const STRING*,BOOLEAN);
2463NTSYSAPI NTSTATUS WINAPI RtlOemToUnicodeN(LPWSTR,DWORD,LPDWORD,LPCSTR,DWORD);
2464NTSYSAPI NTSTATUS WINAPI RtlOpenCurrentUser(ACCESS_MASK,PHANDLE);
2465NTSYSAPI PVOID WINAPI RtlPcToFileHeader(PVOID,PVOID*);
2466NTSYSAPI NTSTATUS WINAPI RtlPinAtomInAtomTable(RTL_ATOM_TABLE,RTL_ATOM);
2467NTSYSAPI BOOLEAN WINAPI RtlPrefixString(const STRING*,const STRING*,BOOLEAN);
2468NTSYSAPI BOOLEAN WINAPI RtlPrefixUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
2469NTSYSAPI NTSTATUS WINAPI RtlQueryAtomInAtomTable(RTL_ATOM_TABLE,RTL_ATOM,ULONG*,ULONG*,WCHAR*,ULONG*);
2470NTSYSAPI NTSTATUS WINAPI RtlQueryEnvironmentVariable_U(PWSTR,PUNICODE_STRING,PUNICODE_STRING);
2471NTSYSAPI NTSTATUS WINAPI RtlQueryHeapInformation(HANDLE,HEAP_INFORMATION_CLASS,PVOID,SIZE_T,PSIZE_T);
2472NTSYSAPI NTSTATUS WINAPI RtlQueryInformationAcl(PACL,LPVOID,DWORD,ACL_INFORMATION_CLASS);
2473NTSYSAPI NTSTATUS WINAPI RtlQueryInformationActivationContext(ULONG,HANDLE,PVOID,ULONG,PVOID,SIZE_T,SIZE_T*);
2474NTSYSAPI NTSTATUS WINAPI RtlQueryProcessDebugInformation(ULONG,ULONG,PDEBUG_BUFFER);
2475NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID);
2476NTSYSAPI NTSTATUS WINAPI RtlQueryTimeZoneInformation(RTL_TIME_ZONE_INFORMATION*);
2477NTSYSAPI NTSTATUS WINAPI RtlQueueWorkItem(PRTL_WORK_ITEM_ROUTINE,PVOID,ULONG);
2478NTSYSAPI void WINAPI RtlRaiseException(PEXCEPTION_RECORD);
2479NTSYSAPI void WINAPI RtlRaiseStatus(NTSTATUS);
2480NTSYSAPI ULONG WINAPI RtlRandom(PULONG);
2481NTSYSAPI PVOID WINAPI RtlReAllocateHeap(HANDLE,ULONG,PVOID,SIZE_T);
2482NTSYSAPI NTSTATUS WINAPI RtlRegisterWait(PHANDLE,HANDLE,RTL_WAITORTIMERCALLBACKFUNC,PVOID,ULONG,ULONG);
2483NTSYSAPI void WINAPI RtlReleaseActivationContext(HANDLE);
2484NTSYSAPI void WINAPI RtlReleasePebLock(void);
2485NTSYSAPI void WINAPI RtlReleaseResource(LPRTL_RWLOCK);
2486NTSYSAPI void WINAPI RtlReleaseSRWLockExclusive(RTL_SRWLOCK*);
2487NTSYSAPI void WINAPI RtlReleaseSRWLockShared(RTL_SRWLOCK*);
2488NTSYSAPI ULONG WINAPI RtlRemoveVectoredExceptionHandler(PVOID);
2489NTSYSAPI void WINAPI RtlRestoreLastWin32Error(DWORD);
2490NTSYSAPI void WINAPI RtlSecondsSince1970ToTime(DWORD,LARGE_INTEGER *);
2491NTSYSAPI void WINAPI RtlSecondsSince1980ToTime(DWORD,LARGE_INTEGER *);
2492NTSYSAPI NTSTATUS WINAPI RtlSelfRelativeToAbsoluteSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PDWORD,PACL,PDWORD,PACL,PDWORD,PSID,PDWORD,PSID,PDWORD);
2493NTSYSAPI void WINAPI RtlSetAllBits(PRTL_BITMAP);
2494NTSYSAPI void WINAPI RtlSetBits(PRTL_BITMAP,ULONG,ULONG);
2495NTSYSAPI ULONG WINAPI RtlSetCriticalSectionSpinCount(RTL_CRITICAL_SECTION*,ULONG);
2496NTSYSAPI NTSTATUS WINAPI RtlSetControlSecurityDescriptor(PSECURITY_DESCRIPTOR,SECURITY_DESCRIPTOR_CONTROL,SECURITY_DESCRIPTOR_CONTROL);
2497NTSYSAPI NTSTATUS WINAPI RtlSetCurrentDirectory_U(const UNICODE_STRING*);
2498NTSYSAPI void WINAPI RtlSetCurrentEnvironment(PWSTR, PWSTR*);
2499NTSYSAPI NTSTATUS WINAPI RtlSetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR,BOOLEAN,PACL,BOOLEAN);
2500NTSYSAPI NTSTATUS WINAPI RtlSetEnvironmentVariable(PWSTR*,PUNICODE_STRING,PUNICODE_STRING);
2501NTSYSAPI NTSTATUS WINAPI RtlSetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID,BOOLEAN);
2502NTSYSAPI NTSTATUS WINAPI RtlSetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID,BOOLEAN);
2503NTSYSAPI NTSTATUS WINAPI RtlSetIoCompletionCallback(HANDLE,PRTL_OVERLAPPED_COMPLETION_ROUTINE,ULONG);
2504NTSYSAPI void WINAPI RtlSetLastWin32Error(DWORD);
2505NTSYSAPI void WINAPI RtlSetLastWin32ErrorAndNtStatusFromNtStatus(NTSTATUS);
2506NTSYSAPI NTSTATUS WINAPI RtlSetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR,BOOLEAN,PACL,BOOLEAN);
2507NTSYSAPI NTSTATUS WINAPI RtlSetThreadErrorMode(DWORD,LPDWORD);
2508NTSYSAPI NTSTATUS WINAPI RtlSetTimeZoneInformation(const RTL_TIME_ZONE_INFORMATION*);
2509NTSYSAPI SIZE_T WINAPI RtlSizeHeap(HANDLE,ULONG,const void*);
2510NTSYSAPI NTSTATUS WINAPI RtlStringFromGUID(REFGUID,PUNICODE_STRING);
2511NTSYSAPI LPDWORD WINAPI RtlSubAuthoritySid(PSID,DWORD);
2512NTSYSAPI LPBYTE WINAPI RtlSubAuthorityCountSid(PSID);
2513NTSYSAPI NTSTATUS WINAPI RtlSystemTimeToLocalTime(const LARGE_INTEGER*,PLARGE_INTEGER);
2514NTSYSAPI void WINAPI RtlTimeToTimeFields(const LARGE_INTEGER*,PTIME_FIELDS);
2515NTSYSAPI BOOLEAN WINAPI RtlTimeFieldsToTime(PTIME_FIELDS,PLARGE_INTEGER);
2516NTSYSAPI void WINAPI RtlTimeToElapsedTimeFields(const LARGE_INTEGER *,PTIME_FIELDS);
2517NTSYSAPI BOOLEAN WINAPI RtlTimeToSecondsSince1970(const LARGE_INTEGER *,LPDWORD);
2518NTSYSAPI BOOLEAN WINAPI RtlTimeToSecondsSince1980(const LARGE_INTEGER *,LPDWORD);
2519NTSYSAPI BOOL WINAPI RtlTryEnterCriticalSection(RTL_CRITICAL_SECTION *);
2520NTSYSAPI ULONGLONG __cdecl RtlUlonglongByteSwap(ULONGLONG);
2521NTSYSAPI DWORD WINAPI RtlUnicodeStringToAnsiSize(const UNICODE_STRING*);
2522NTSYSAPI NTSTATUS WINAPI RtlUnicodeStringToAnsiString(PANSI_STRING,PCUNICODE_STRING,BOOLEAN);
2523NTSYSAPI NTSTATUS WINAPI RtlUnicodeStringToInteger(const UNICODE_STRING *,ULONG,ULONG *);
2524NTSYSAPI DWORD WINAPI RtlUnicodeStringToOemSize(const UNICODE_STRING*);
2525NTSYSAPI NTSTATUS WINAPI RtlUnicodeStringToOemString(POEM_STRING,PCUNICODE_STRING,BOOLEAN);
2526NTSYSAPI NTSTATUS WINAPI RtlUnicodeToMultiByteN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
2527NTSYSAPI NTSTATUS WINAPI RtlUnicodeToMultiByteSize(PULONG,PCWSTR,ULONG);
2528NTSYSAPI NTSTATUS WINAPI RtlUnicodeToOemN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
2529NTSYSAPI ULONG WINAPI RtlUniform(PULONG);
2530NTSYSAPI BOOLEAN WINAPI RtlUnlockHeap(HANDLE);
2531NTSYSAPI void WINAPI RtlUnwind(PVOID,PVOID,PEXCEPTION_RECORD,PVOID);
2532#ifdef __x86_64__
2533NTSYSAPI void WINAPI RtlUnwindEx(PVOID,PVOID,PEXCEPTION_RECORD,PVOID,PCONTEXT,PUNWIND_HISTORY_TABLE);
2534#elif defined(__ia64__)
2535NTSYSAPI void WINAPI RtlUnwind2(FRAME_POINTERS,PVOID,PEXCEPTION_RECORD,PVOID,PCONTEXT);
2536NTSYSAPI void WINAPI RtlUnwindEx(FRAME_POINTERS,PVOID,PEXCEPTION_RECORD,PVOID,PCONTEXT,PUNWIND_HISTORY_TABLE);
2537#endif
2538NTSYSAPI WCHAR WINAPI RtlUpcaseUnicodeChar(WCHAR);
2539NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeString(UNICODE_STRING*,const UNICODE_STRING *,BOOLEAN);
2540NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeStringToAnsiString(STRING*,const UNICODE_STRING*,BOOLEAN);
2541NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeStringToCountedOemString(STRING*,const UNICODE_STRING*,BOOLEAN);
2542NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeStringToOemString(STRING*,const UNICODE_STRING*,BOOLEAN);
2543NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeToMultiByteN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
2544NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeToOemN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
2545NTSYSAPI NTSTATUS WINAPI RtlUpdateTimer(HANDLE, HANDLE, DWORD, DWORD);
2546NTSYSAPI CHAR WINAPI RtlUpperChar(CHAR);
2547NTSYSAPI void WINAPI RtlUpperString(STRING *,const STRING *);
2548NTSYSAPI NTSTATUS WINAPI RtlValidSecurityDescriptor(PSECURITY_DESCRIPTOR);
2549NTSYSAPI BOOLEAN WINAPI RtlValidAcl(PACL);
2550NTSYSAPI BOOLEAN WINAPI RtlValidSid(PSID);
2551NTSYSAPI BOOLEAN WINAPI RtlValidateHeap(HANDLE,ULONG,LPCVOID);
2552NTSYSAPI NTSTATUS WINAPI RtlVerifyVersionInfo(const RTL_OSVERSIONINFOEXW*,DWORD,DWORDLONG);
2553NTSYSAPI NTSTATUS WINAPI RtlWalkHeap(HANDLE,PVOID);
2554NTSYSAPI NTSTATUS WINAPI RtlWow64EnableFsRedirection(BOOLEAN);
2555NTSYSAPI NTSTATUS WINAPI RtlWow64EnableFsRedirectionEx(ULONG,ULONG*);
2556NTSYSAPI NTSTATUS WINAPI RtlWriteRegistryValue(ULONG,PCWSTR,PCWSTR,ULONG,PVOID,ULONG);
2557NTSYSAPI NTSTATUS WINAPI RtlZombifyActivationContext(HANDLE);
2558NTSYSAPI NTSTATUS WINAPI RtlpNtCreateKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,PULONG);
2559NTSYSAPI NTSTATUS WINAPI RtlpNtEnumerateSubKey(HANDLE,UNICODE_STRING *, ULONG);
2560NTSYSAPI NTSTATUS WINAPI RtlpWaitForCriticalSection(RTL_CRITICAL_SECTION *);
2561NTSYSAPI NTSTATUS WINAPI RtlpUnWaitCriticalSection(RTL_CRITICAL_SECTION *);
2562NTSYSAPI NTSTATUS WINAPI vDbgPrintEx(ULONG,ULONG,LPCSTR,__ms_va_list);
2563NTSYSAPI NTSTATUS WINAPI vDbgPrintExWithPrefix(LPCSTR,ULONG,ULONG,LPCSTR,__ms_va_list);
2564
2565/* 32-bit only functions */
2566
2567#ifndef _WIN64
2568NTSYSAPI LONGLONG WINAPI RtlConvertLongToLargeInteger(LONG);
2569NTSYSAPI ULONGLONG WINAPI RtlConvertUlongToLargeInteger(ULONG);
2570NTSYSAPI LONGLONG WINAPI RtlEnlargedIntegerMultiply(INT,INT);
2571NTSYSAPI ULONGLONG WINAPI RtlEnlargedUnsignedMultiply(UINT,UINT);
2572NTSYSAPI UINT WINAPI RtlEnlargedUnsignedDivide(ULONGLONG,UINT,UINT *);
2573NTSYSAPI LONGLONG WINAPI RtlExtendedMagicDivide(LONGLONG,LONGLONG,INT);
2574NTSYSAPI LONGLONG WINAPI RtlExtendedIntegerMultiply(LONGLONG,INT);
2575NTSYSAPI LONGLONG WINAPI RtlExtendedLargeIntegerDivide(LONGLONG,INT,INT *);
2576NTSYSAPI LONGLONG WINAPI RtlLargeIntegerAdd(LONGLONG,LONGLONG);
2577NTSYSAPI LONGLONG WINAPI RtlLargeIntegerArithmeticShift(LONGLONG,INT);
2578NTSYSAPI ULONGLONG WINAPI RtlLargeIntegerDivide( ULONGLONG,ULONGLONG,ULONGLONG *);
2579NTSYSAPI LONGLONG WINAPI RtlLargeIntegerNegate(LONGLONG);
2580NTSYSAPI LONGLONG WINAPI RtlLargeIntegerShiftLeft(LONGLONG,INT);
2581NTSYSAPI LONGLONG WINAPI RtlLargeIntegerShiftRight(LONGLONG,INT);
2582NTSYSAPI LONGLONG WINAPI RtlLargeIntegerSubtract(LONGLONG,LONGLONG);
2583NTSYSAPI NTSTATUS WINAPI RtlLargeIntegerToChar(const ULONGLONG *,ULONG,ULONG,PCHAR);
2584#endif
2585
2586/* Wine internal functions */
2587
2588NTSYSAPI NTSTATUS CDECL wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRING *unix_name_ret,
2589 UINT disposition, BOOLEAN check_case );
2590NTSYSAPI NTSTATUS CDECL wine_unix_to_nt_file_name( const ANSI_STRING *name, UNICODE_STRING *nt );
2591
2592
2593/***********************************************************************
2594 * Inline functions
2595 */
2596
2597#define InitializeObjectAttributes(p,n,a,r,s) \
2598 do { \
2599 (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
2600 (p)->RootDirectory = r; \
2601 (p)->Attributes = a; \
2602 (p)->ObjectName = n; \
2603 (p)->SecurityDescriptor = s; \
2604 (p)->SecurityQualityOfService = NULL; \
2605 } while (0)
2606
2607#define NtCurrentProcess() ((HANDLE)-1)
2608
2609#define RtlFillMemory(Destination,Length,Fill) memset((Destination),(Fill),(Length))
2610#define RtlMoveMemory(Destination,Source,Length) memmove((Destination),(Source),(Length))
2611#define RtlStoreUlong(p,v) do { ULONG _v = (v); memcpy((p), &_v, sizeof(_v)); } while (0)
2612#define RtlStoreUlonglong(p,v) do { ULONGLONG _v = (v); memcpy((p), &_v, sizeof(_v)); } while (0)
2613#define RtlRetrieveUlong(p,s) memcpy((p), (s), sizeof(ULONG))
2614#define RtlRetrieveUlonglong(p,s) memcpy((p), (s), sizeof(ULONGLONG))
2615#define RtlZeroMemory(Destination,Length) memset((Destination),0,(Length))
2616
2617static inline BOOLEAN RtlCheckBit(PCRTL_BITMAP lpBits, ULONG ulBit)
2618{
2619 if (lpBits && ulBit < lpBits->SizeOfBitMap &&
2620 lpBits->Buffer[ulBit >> 5] & (1 << (ulBit & 31)))
2621 return TRUE;
2622 return FALSE;
2623}
2624
2625/* These are implemented as __fastcall, so we can't let Winelib apps link with them */
2626static inline USHORT RtlUshortByteSwap(USHORT s)
2627{
2628 return (s >> 8) | (s << 8);
2629}
2630static inline ULONG RtlUlongByteSwap(ULONG i)
2631{
2632#if defined(__i386__) && defined(__GNUC__)
2633 ULONG ret;
2634 __asm__("bswap %0" : "=r" (ret) : "0" (i) );
2635 return ret;
2636#else
2637 return ((ULONG)RtlUshortByteSwap((USHORT)i) << 16) | RtlUshortByteSwap((USHORT)(i >> 16));
2638#endif
2639}
2640
2641/* list manipulation macros */
2642#define InitializeListHead(le) (void)((le)->Flink = (le)->Blink = (le))
2643#define InsertHeadList(le,e) do { PLIST_ENTRY f = (le)->Flink; (e)->Flink = f; (e)->Blink = (le); f->Blink = (e); (le)->Flink = (e); } while (0)
2644#define InsertTailList(le,e) do { PLIST_ENTRY b = (le)->Blink; (e)->Flink = (le); (e)->Blink = b; b->Flink = (e); (le)->Blink = (e); } while (0)
2645#define IsListEmpty(le) ((le)->Flink == (le))
2646#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)
2647static inline PLIST_ENTRY RemoveHeadList(PLIST_ENTRY le)
2648{
2649 PLIST_ENTRY f, b, e;
2650
2651 e = le->Flink;
2652 f = le->Flink->Flink;
2653 b = le->Flink->Blink;
2654 f->Blink = b;
2655 b->Flink = f;
2656
2657 if (e != le) e->Flink = e->Blink = NULL;
2658 return e;
2659}
2660static inline PLIST_ENTRY RemoveTailList(PLIST_ENTRY le)
2661{
2662 PLIST_ENTRY f, b, e;
2663
2664 e = le->Blink;
2665 f = le->Blink->Flink;
2666 b = le->Blink->Blink;
2667 f->Blink = b;
2668 b->Flink = f;
2669
2670 if (e != le) e->Flink = e->Blink = NULL;
2671 return e;
2672}
2673
2674
2675#ifdef __WINESRC__
2676
2677/* FIXME: private structure for vm86 mode, stored in teb->GdiTebBatch */
2678typedef struct
2679{
2680 DWORD dpmi_vif;
2681 DWORD vm86_pending;
2682} WINE_VM86_TEB_INFO;
2683
2684static inline WINE_VM86_TEB_INFO *get_vm86_teb_info(void)
2685{
2686 return (WINE_VM86_TEB_INFO *)&NtCurrentTeb()->GdiTebBatch;
2687}
2688
2689/* The thread information for 16-bit threads */
2690/* NtCurrentTeb()->SubSystemTib points to this */
2691typedef struct
2692{
2693 void *unknown; /* 00 unknown */
2694 UNICODE_STRING *exe_name; /* 04 exe module name */
2695
2696 /* the following fields do not exist under Windows */
2697 UNICODE_STRING exe_str; /* exe name string pointed to by exe_name */
2698 CURDIR curdir; /* current directory */
2699 WCHAR curdir_buffer[MAX_PATH];
2700} WIN16_SUBSYSTEM_TIB;
2701
2702#endif /* __WINESRC__ */
2703
2704#ifdef __cplusplus
2705} /* extern "C" */
2706#endif /* defined(__cplusplus) */
2707
2708#endif /* __WINE_WINTERNL_H */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette