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