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