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