ntdll: Support the NtCreateDebugObject() flags.
[wine/zf.git] / include / winternl.h
blob32d78b1bc931466d101a001e9f5966651d422cc8
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 _RTL_RELATIVE_NAME
153 UNICODE_STRING RelativeName;
154 HANDLE ContainerDirectory;
155 void *CurDirRef;
156 } RTL_RELATIVE_NAME, *PRTL_RELATIVE_NAME;
158 typedef struct tagRTL_BITMAP {
159 ULONG SizeOfBitMap; /* Number of bits in the bitmap */
160 PULONG Buffer; /* Bitmap data, assumed sized to a DWORD boundary */
161 } RTL_BITMAP, *PRTL_BITMAP;
163 typedef const RTL_BITMAP *PCRTL_BITMAP;
165 typedef struct tagRTL_BITMAP_RUN {
166 ULONG StartingIndex; /* Bit position at which run starts */
167 ULONG NumberOfBits; /* Size of the run in bits */
168 } RTL_BITMAP_RUN, *PRTL_BITMAP_RUN;
170 typedef const RTL_BITMAP_RUN *PCRTL_BITMAP_RUN;
172 typedef struct _RTL_USER_PROCESS_PARAMETERS
174 ULONG AllocationSize;
175 ULONG Size;
176 ULONG Flags;
177 ULONG DebugFlags;
178 HANDLE ConsoleHandle;
179 ULONG ConsoleFlags;
180 HANDLE hStdInput;
181 HANDLE hStdOutput;
182 HANDLE hStdError;
183 CURDIR CurrentDirectory;
184 UNICODE_STRING DllPath;
185 UNICODE_STRING ImagePathName;
186 UNICODE_STRING CommandLine;
187 PWSTR Environment;
188 ULONG dwX;
189 ULONG dwY;
190 ULONG dwXSize;
191 ULONG dwYSize;
192 ULONG dwXCountChars;
193 ULONG dwYCountChars;
194 ULONG dwFillAttribute;
195 ULONG dwFlags;
196 ULONG wShowWindow;
197 UNICODE_STRING WindowTitle;
198 UNICODE_STRING Desktop;
199 UNICODE_STRING ShellInfo;
200 UNICODE_STRING RuntimeInfo;
201 RTL_DRIVE_LETTER_CURDIR DLCurrentDirectory[0x20];
202 ULONG EnvironmentSize;
203 ULONG EnvironmentVersion;
204 PVOID PackageDependencyData;
205 ULONG ProcessGroupId;
206 ULONG LoaderThreads;
207 } RTL_USER_PROCESS_PARAMETERS, *PRTL_USER_PROCESS_PARAMETERS;
209 /* value for Flags field (FIXME: not the correct name) */
210 #define PROCESS_PARAMS_FLAG_NORMALIZED 1
212 typedef struct _PEB_LDR_DATA
214 ULONG Length;
215 BOOLEAN Initialized;
216 PVOID SsHandle;
217 LIST_ENTRY InLoadOrderModuleList;
218 LIST_ENTRY InMemoryOrderModuleList;
219 LIST_ENTRY InInitializationOrderModuleList;
220 PVOID EntryInProgress;
221 BOOLEAN ShutdownInProgress;
222 HANDLE ShutdownThreadId;
223 } PEB_LDR_DATA, *PPEB_LDR_DATA;
225 typedef struct _GDI_TEB_BATCH
227 ULONG Offset;
228 HANDLE HDC;
229 ULONG Buffer[0x136];
230 } GDI_TEB_BATCH;
232 typedef struct _RTL_ACTIVATION_CONTEXT_STACK_FRAME
234 struct _RTL_ACTIVATION_CONTEXT_STACK_FRAME *Previous;
235 struct _ACTIVATION_CONTEXT *ActivationContext;
236 ULONG Flags;
237 } RTL_ACTIVATION_CONTEXT_STACK_FRAME, *PRTL_ACTIVATION_CONTEXT_STACK_FRAME;
239 typedef struct _ACTIVATION_CONTEXT_STACK
241 RTL_ACTIVATION_CONTEXT_STACK_FRAME *ActiveFrame;
242 LIST_ENTRY FrameListCache;
243 ULONG Flags;
244 ULONG NextCookieSequenceNumber;
245 ULONG_PTR StackId;
246 } ACTIVATION_CONTEXT_STACK, *PACTIVATION_CONTEXT_STACK;
248 typedef struct _TEB_ACTIVE_FRAME_CONTEXT
250 ULONG Flags;
251 const char *FrameName;
252 } TEB_ACTIVE_FRAME_CONTEXT, *PTEB_ACTIVE_FRAME_CONTEXT;
254 typedef struct _TEB_ACTIVE_FRAME_CONTEXT_EX
256 TEB_ACTIVE_FRAME_CONTEXT BasicContext;
257 const char *SourceLocation;
258 } TEB_ACTIVE_FRAME_CONTEXT_EX, *PTEB_ACTIVE_FRAME_CONTEXT_EX;
260 typedef struct _TEB_ACTIVE_FRAME
262 ULONG Flags;
263 struct _TEB_ACTIVE_FRAME *Previous;
264 TEB_ACTIVE_FRAME_CONTEXT *Context;
265 } TEB_ACTIVE_FRAME, *PTEB_ACTIVE_FRAME;
267 typedef struct _TEB_ACTIVE_FRAME_EX
269 TEB_ACTIVE_FRAME BasicFrame;
270 void *ExtensionIdentifier;
271 } TEB_ACTIVE_FRAME_EX, *PTEB_ACTIVE_FRAME_EX;
273 typedef struct _FLS_CALLBACK
275 void *unknown;
276 PFLS_CALLBACK_FUNCTION callback; /* ~0 if NULL callback is set, NULL if FLS index is free. */
277 } FLS_CALLBACK, *PFLS_CALLBACK;
279 typedef struct _FLS_INFO_CHUNK
281 ULONG count; /* number of allocated FLS indexes in the chunk. */
282 FLS_CALLBACK callbacks[1]; /* the size is 0x10 for chunk 0 and is twice as
283 * the previous chunk size for the rest. */
284 } FLS_INFO_CHUNK, *PFLS_INFO_CHUNK;
286 typedef struct _GLOBAL_FLS_DATA
288 FLS_INFO_CHUNK *fls_callback_chunks[8];
289 LIST_ENTRY fls_list_head;
290 ULONG fls_high_index;
291 } GLOBAL_FLS_DATA, *PGLOBAL_FLS_DATA;
293 typedef struct _TEB_FLS_DATA
295 LIST_ENTRY fls_list_entry;
296 void **fls_data_chunks[8];
297 } TEB_FLS_DATA, *PTEB_FLS_DATA;
299 #define TEB_ACTIVE_FRAME_CONTEXT_FLAG_EXTENDED 0x00000001
300 #define TEB_ACTIVE_FRAME_FLAG_EXTENDED 0x00000001
302 /***********************************************************************
303 * PEB data structure
305 typedef struct _PEB
306 { /* win32/win64 */
307 BOOLEAN InheritedAddressSpace; /* 000/000 */
308 BOOLEAN ReadImageFileExecOptions; /* 001/001 */
309 BOOLEAN BeingDebugged; /* 002/002 */
310 BOOLEAN SpareBool; /* 003/003 */
311 HANDLE Mutant; /* 004/008 */
312 HMODULE ImageBaseAddress; /* 008/010 */
313 PPEB_LDR_DATA LdrData; /* 00c/018 */
314 RTL_USER_PROCESS_PARAMETERS *ProcessParameters; /* 010/020 */
315 PVOID SubSystemData; /* 014/028 */
316 HANDLE ProcessHeap; /* 018/030 */
317 PRTL_CRITICAL_SECTION FastPebLock; /* 01c/038 */
318 PVOID /*PPEBLOCKROUTINE*/ FastPebLockRoutine; /* 020/040 */
319 PVOID /*PPEBLOCKROUTINE*/ FastPebUnlockRoutine; /* 024/048 */
320 ULONG EnvironmentUpdateCount; /* 028/050 */
321 PVOID KernelCallbackTable; /* 02c/058 */
322 ULONG Reserved; /* 030/060 */
323 ULONG AtlThunkSListPtr32; /* 034/064 */
324 PVOID /*PPEB_FREE_BLOCK*/ FreeList; /* 038/068 */
325 ULONG TlsExpansionCounter; /* 03c/070 */
326 PRTL_BITMAP TlsBitmap; /* 040/078 */
327 ULONG TlsBitmapBits[2]; /* 044/080 */
328 PVOID ReadOnlySharedMemoryBase; /* 04c/088 */
329 PVOID ReadOnlySharedMemoryHeap; /* 050/090 */
330 PVOID *ReadOnlyStaticServerData; /* 054/098 */
331 PVOID AnsiCodePageData; /* 058/0a0 */
332 PVOID OemCodePageData; /* 05c/0a8 */
333 PVOID UnicodeCaseTableData; /* 060/0b0 */
334 ULONG NumberOfProcessors; /* 064/0b8 */
335 ULONG NtGlobalFlag; /* 068/0bc */
336 LARGE_INTEGER CriticalSectionTimeout; /* 070/0c0 */
337 SIZE_T HeapSegmentReserve; /* 078/0c8 */
338 SIZE_T HeapSegmentCommit; /* 07c/0d0 */
339 SIZE_T HeapDeCommitTotalFreeThreshold; /* 080/0d8 */
340 SIZE_T HeapDeCommitFreeBlockThreshold; /* 084/0e0 */
341 ULONG NumberOfHeaps; /* 088/0e8 */
342 ULONG MaximumNumberOfHeaps; /* 08c/0ec */
343 PVOID *ProcessHeaps; /* 090/0f0 */
344 PVOID GdiSharedHandleTable; /* 094/0f8 */
345 PVOID ProcessStarterHelper; /* 098/100 */
346 PVOID GdiDCAttributeList; /* 09c/108 */
347 PVOID LoaderLock; /* 0a0/110 */
348 ULONG OSMajorVersion; /* 0a4/118 */
349 ULONG OSMinorVersion; /* 0a8/11c */
350 ULONG OSBuildNumber; /* 0ac/120 */
351 ULONG OSPlatformId; /* 0b0/124 */
352 ULONG ImageSubSystem; /* 0b4/128 */
353 ULONG ImageSubSystemMajorVersion; /* 0b8/12c */
354 ULONG ImageSubSystemMinorVersion; /* 0bc/130 */
355 ULONG ImageProcessAffinityMask; /* 0c0/134 */
356 HANDLE GdiHandleBuffer[28]; /* 0c4/138 */
357 ULONG unknown[6]; /* 134/218 */
358 PVOID PostProcessInitRoutine; /* 14c/230 */
359 PRTL_BITMAP TlsExpansionBitmap; /* 150/238 */
360 ULONG TlsExpansionBitmapBits[32]; /* 154/240 */
361 ULONG SessionId; /* 1d4/2c0 */
362 ULARGE_INTEGER AppCompatFlags; /* 1d8/2c8 */
363 ULARGE_INTEGER AppCompatFlagsUser; /* 1e0/2d0 */
364 PVOID ShimData; /* 1e8/2d8 */
365 PVOID AppCompatInfo; /* 1ec/2e0 */
366 UNICODE_STRING CSDVersion; /* 1f0/2e8 */
367 PVOID ActivationContextData; /* 1f8/2f8 */
368 PVOID ProcessAssemblyStorageMap; /* 1fc/300 */
369 PVOID SystemDefaultActivationData; /* 200/308 */
370 PVOID SystemAssemblyStorageMap; /* 204/310 */
371 SIZE_T MinimumStackCommit; /* 208/318 */
372 PVOID *FlsCallback; /* 20c/320 */
373 LIST_ENTRY FlsListHead; /* 210/328 */
374 PRTL_BITMAP FlsBitmap; /* 218/338 */
375 ULONG FlsBitmapBits[4]; /* 21c/340 */
376 ULONG FlsHighIndex; /* 22c/350 */
377 PVOID WerRegistrationData; /* 230/358 */
378 PVOID WerShipAssertPtr; /* 234/360 */
379 PVOID pUnused; /* 238/368 */
380 PVOID pImageHeaderHash; /* 23c/370 */
381 ULONG TracingFlags; /* 240/378 */
382 ULONGLONG CsrServerReadOnlySharedMemoryBase; /* 248/380 */
383 ULONG TppWorkerpListLock; /* 250/388 */
384 LIST_ENTRY TppWorkerpList; /* 254/390 */
385 PVOID WaitOnAddressHashTable [0x80]; /* 25c/3a0 */
386 PVOID TelemetryCoverageHeader; /* 45c/7a0 */
387 ULONG CloudFileFlags; /* 460/7a8 */
388 ULONG CloudFileDiagFlags; /* 464/7ac */
389 CHAR PlaceholderCompatibilityMode; /* 468/7b0 */
390 CHAR PlaceholderCompatibilityModeReserved[7]; /* 469/7b1 */
391 PVOID LeapSecondData; /* 470/7b8 */
392 ULONG LeapSecondFlags; /* 474/7c0 */
393 ULONG NtGlobalFlag2; /* 478/7c4 */
394 } PEB, *PPEB;
397 /***********************************************************************
398 * TEB data structure
400 typedef struct _TEB
401 { /* win32/win64 */
402 NT_TIB Tib; /* 000/0000 */
403 PVOID EnvironmentPointer; /* 01c/0038 */
404 CLIENT_ID ClientId; /* 020/0040 */
405 PVOID ActiveRpcHandle; /* 028/0050 */
406 PVOID ThreadLocalStoragePointer; /* 02c/0058 */
407 PPEB Peb; /* 030/0060 */
408 ULONG LastErrorValue; /* 034/0068 */
409 ULONG CountOfOwnedCriticalSections; /* 038/006c */
410 PVOID CsrClientThread; /* 03c/0070 */
411 PVOID Win32ThreadInfo; /* 040/0078 */
412 ULONG User32Reserved[26]; /* 044/0080 */
413 ULONG UserReserved[5]; /* 0ac/00e8 */
414 PVOID WOW32Reserved; /* 0c0/0100 */
415 ULONG CurrentLocale; /* 0c4/0108 */
416 ULONG FpSoftwareStatusRegister; /* 0c8/010c */
417 PVOID ReservedForDebuggerInstrumentation[16]; /* 0cc/0110 */
418 #ifdef _WIN64
419 PVOID SystemReserved1[30]; /* /0190 */
420 #else
421 PVOID SystemReserved1[26]; /* 10c/ used for krnl386 private data in Wine */
422 #endif
423 char PlaceholderCompatibilityMode; /* 174/0280 */
424 char PlaceholderReserved[11]; /* 175/0281 */
425 DWORD ProxiedProcessId; /* 180/028c */
426 ACTIVATION_CONTEXT_STACK ActivationContextStack; /* 184/0290 */
427 UCHAR WorkingOnBehalfOfTicket[8]; /* 19c/02b8 */
428 LONG ExceptionCode; /* 1a4/02c0 */
429 ACTIVATION_CONTEXT_STACK *ActivationContextStackPointer; /* 1a8/02c8 */
430 ULONG_PTR InstrumentationCallbackSp; /* 1ac/02d0 */
431 ULONG_PTR InstrumentationCallbackPreviousPc; /* 1b0/02d8 */
432 ULONG_PTR InstrumentationCallbackPreviousSp; /* 1b4/02e0 */
433 #ifdef _WIN64
434 ULONG TxFsContext; /* /02e8 */
435 BOOLEAN InstrumentationCallbackDisabled; /* /02ec */
436 #else
437 BOOLEAN InstrumentationCallbackDisabled; /* 1b8/ */
438 BYTE SpareBytes1[23]; /* 1b9/ */
439 ULONG TxFsContext; /* 1d0/ */
440 #endif
441 GDI_TEB_BATCH GdiTebBatch; /* 1d4/02f0 used for ntdll private data in Wine */
442 CLIENT_ID RealClientId; /* 6b4/07d8 */
443 HANDLE GdiCachedProcessHandle; /* 6bc/07e8 */
444 ULONG GdiClientPID; /* 6c0/07f0 */
445 ULONG GdiClientTID; /* 6c4/07f4 */
446 PVOID GdiThreadLocaleInfo; /* 6c8/07f8 */
447 ULONG_PTR Win32ClientInfo[62]; /* 6cc/0800 used for user32 private data in Wine */
448 PVOID glDispatchTable[233]; /* 7c4/09f0 */
449 PVOID glReserved1[29]; /* b68/1138 */
450 PVOID glReserved2; /* bdc/1220 */
451 PVOID glSectionInfo; /* be0/1228 */
452 PVOID glSection; /* be4/1230 */
453 PVOID glTable; /* be8/1238 */
454 PVOID glCurrentRC; /* bec/1240 */
455 PVOID glContext; /* bf0/1248 */
456 ULONG LastStatusValue; /* bf4/1250 */
457 UNICODE_STRING StaticUnicodeString; /* bf8/1258 */
458 WCHAR StaticUnicodeBuffer[261]; /* c00/1268 */
459 PVOID DeallocationStack; /* e0c/1478 */
460 PVOID TlsSlots[64]; /* e10/1480 */
461 LIST_ENTRY TlsLinks; /* f10/1680 */
462 PVOID Vdm; /* f18/1690 */
463 PVOID ReservedForNtRpc; /* f1c/1698 */
464 PVOID DbgSsReserved[2]; /* f20/16a0 */
465 ULONG HardErrorDisabled; /* f28/16b0 */
466 PVOID Instrumentation[16]; /* f2c/16b8 */
467 PVOID WinSockData; /* f6c/1738 */
468 ULONG GdiBatchCount; /* f70/1740 */
469 ULONG Spare2; /* f74/1744 */
470 ULONG GuaranteedStackBytes; /* f78/1748 */
471 PVOID ReservedForPerf; /* f7c/1750 */
472 PVOID ReservedForOle; /* f80/1758 */
473 ULONG WaitingOnLoaderLock; /* f84/1760 */
474 PVOID Reserved5[3]; /* f88/1768 */
475 PVOID *TlsExpansionSlots; /* f94/1780 */
476 #ifdef _WIN64
477 PVOID DeallocationBStore; /* /1788 */
478 PVOID BStoreLimit; /* /1790 */
479 #endif
480 ULONG ImpersonationLocale; /* f98/1798 */
481 ULONG IsImpersonating; /* f9c/179c */
482 PVOID NlsCache; /* fa0/17a0 */
483 PVOID ShimData; /* fa4/17a8 */
484 ULONG HeapVirtualAffinity; /* fa8/17b0 */
485 PVOID CurrentTransactionHandle; /* fac/17b8 */
486 TEB_ACTIVE_FRAME *ActiveFrame; /* fb0/17c0 */
487 TEB_FLS_DATA *FlsSlots; /* fb4/17c8 */
488 PVOID PreferredLanguages; /* fb8/17d0 */
489 PVOID UserPrefLanguages; /* fbc/17d8 */
490 PVOID MergedPrefLanguages; /* fc0/17e0 */
491 ULONG MuiImpersonation; /* fc4/17e8 */
492 USHORT CrossTebFlags; /* fc8/17ec */
493 USHORT SameTebFlags; /* fca/17ee */
494 PVOID TxnScopeEnterCallback; /* fcc/17f0 */
495 PVOID TxnScopeExitCallback; /* fd0/17f8 */
496 PVOID TxnScopeContext; /* fd4/1800 */
497 ULONG LockCount; /* fd8/1808 */
498 LONG WowTebOffset; /* fdc/180c */
499 PVOID ResourceRetValue; /* fe0/1810 */
500 PVOID ReservedForWdf; /* fe4/1818 */
501 ULONGLONG ReservedForCrt; /* fe8/1820 */
502 GUID EffectiveContainerId; /* ff0/1828 */
503 } TEB, *PTEB;
506 /***********************************************************************
507 * The 64-bit version of the PEB and TEB for WoW64
509 #ifndef _WIN64
511 typedef struct _NT_TIB64
513 ULONG64 ExceptionList; /* 0000 */
514 ULONG64 StackBase; /* 0008 */
515 ULONG64 StackLimit; /* 0010 */
516 ULONG64 SubSystemTib; /* 0018 */
517 ULONG64 FiberData; /* 0020 */
518 ULONG64 ArbitraryUserPointer; /* 0028 */
519 ULONG64 Self; /* 0030 */
520 } NT_TIB64;
522 typedef struct _CLIENT_ID64
524 ULONG64 UniqueProcess;
525 ULONG64 UniqueThread;
526 } CLIENT_ID64;
528 typedef struct _LIST_ENTRY64
530 ULONG64 Flink;
531 ULONG64 Blink;
532 } LIST_ENTRY64;
534 typedef struct _UNICODE_STRING64
536 USHORT Length;
537 USHORT MaximumLength;
538 ULONG64 Buffer;
539 } UNICODE_STRING64;
541 typedef struct _ACTIVATION_CONTEXT_STACK64
543 ULONG64 ActiveFrame;
544 LIST_ENTRY64 FrameListCache;
545 ULONG Flags;
546 ULONG NextCookieSequenceNumber;
547 ULONG64 StackId;
548 } ACTIVATION_CONTEXT_STACK64;
550 typedef struct _PEB64
552 BOOLEAN InheritedAddressSpace; /* 0000 */
553 BOOLEAN ReadImageFileExecOptions; /* 0001 */
554 BOOLEAN BeingDebugged; /* 0002 */
555 BOOLEAN SpareBool; /* 0003 */
556 ULONG64 Mutant; /* 0008 */
557 ULONG64 ImageBaseAddress; /* 0010 */
558 ULONG64 LdrData; /* 0018 */
559 ULONG64 ProcessParameters; /* 0020 */
560 ULONG64 SubSystemData; /* 0028 */
561 ULONG64 ProcessHeap; /* 0030 */
562 ULONG64 FastPebLock; /* 0038 */
563 ULONG64 FastPebLockRoutine; /* 0040 */
564 ULONG64 FastPebUnlockRoutine; /* 0048 */
565 ULONG EnvironmentUpdateCount; /* 0050 */
566 ULONG64 KernelCallbackTable; /* 0058 */
567 ULONG Reserved; /* 0060 */
568 ULONG AtlThunkSListPtr32; /* 0064 */
569 ULONG64 FreeList; /* 0068 */
570 ULONG TlsExpansionCounter; /* 0070 */
571 ULONG64 TlsBitmap; /* 0078 */
572 ULONG TlsBitmapBits[2]; /* 0080 */
573 ULONG64 ReadOnlySharedMemoryBase; /* 0088 */
574 ULONG64 ReadOnlySharedMemoryHeap; /* 0090 */
575 ULONG64 ReadOnlyStaticServerData; /* 0098 */
576 ULONG64 AnsiCodePageData; /* 00a0 */
577 ULONG64 OemCodePageData; /* 00a8 */
578 ULONG64 UnicodeCaseTableData; /* 00b0 */
579 ULONG NumberOfProcessors; /* 00b8 */
580 ULONG NtGlobalFlag; /* 00bc */
581 LARGE_INTEGER CriticalSectionTimeout; /* 00c0 */
582 ULONG64 HeapSegmentReserve; /* 00c8 */
583 ULONG64 HeapSegmentCommit; /* 00d0 */
584 ULONG64 HeapDeCommitTotalFreeThreshold; /* 00d8 */
585 ULONG64 HeapDeCommitFreeBlockThreshold; /* 00e0 */
586 ULONG NumberOfHeaps; /* 00e8 */
587 ULONG MaximumNumberOfHeaps; /* 00ec */
588 ULONG64 ProcessHeaps; /* 00f0 */
589 ULONG64 GdiSharedHandleTable; /* 00f8 */
590 ULONG64 ProcessStarterHelper; /* 0100 */
591 ULONG64 GdiDCAttributeList; /* 0108 */
592 ULONG64 LoaderLock; /* 0110 */
593 ULONG OSMajorVersion; /* 0118 */
594 ULONG OSMinorVersion; /* 011c */
595 ULONG OSBuildNumber; /* 0120 */
596 ULONG OSPlatformId; /* 0124 */
597 ULONG ImageSubSystem; /* 0128 */
598 ULONG ImageSubSystemMajorVersion; /* 012c */
599 ULONG ImageSubSystemMinorVersion; /* 0130 */
600 ULONG ImageProcessAffinityMask; /* 0134 */
601 ULONG64 GdiHandleBuffer[28]; /* 0138 */
602 ULONG unknown[6]; /* 0218 */
603 ULONG64 PostProcessInitRoutine; /* 0230 */
604 ULONG64 TlsExpansionBitmap; /* 0238 */
605 ULONG TlsExpansionBitmapBits[32]; /* 0240 */
606 ULONG SessionId; /* 02c0 */
607 ULARGE_INTEGER AppCompatFlags; /* 02c8 */
608 ULARGE_INTEGER AppCompatFlagsUser; /* 02d0 */
609 ULONG64 ShimData; /* 02d8 */
610 ULONG64 AppCompatInfo; /* 02e0 */
611 UNICODE_STRING64 CSDVersion; /* 02e8 */
612 ULONG64 ActivationContextData; /* 02f8 */
613 ULONG64 ProcessAssemblyStorageMap; /* 0300 */
614 ULONG64 SystemDefaultActivationData; /* 0308 */
615 ULONG64 SystemAssemblyStorageMap; /* 0310 */
616 ULONG64 MinimumStackCommit; /* 0318 */
617 ULONG64 FlsCallback; /* 0320 */
618 LIST_ENTRY64 FlsListHead; /* 0328 */
619 ULONG64 FlsBitmap; /* 0338 */
620 ULONG FlsBitmapBits[4]; /* 0340 */
621 ULONG FlsHighIndex; /* 0350 */
622 ULONG64 WerRegistrationData; /* 0358 */
623 ULONG64 WerShipAssertPtr; /* 0360 */
624 ULONG64 pUnused; /* 0368 */
625 ULONG64 pImageHeaderHash; /* 0370 */
626 ULONG TracingFlags; /* 0378 */
627 ULONGLONG CsrServerReadOnlySharedMemoryBase; /* 0380 */
628 ULONG TppWorkerpListLock; /* 0388 */
629 LIST_ENTRY64 TppWorkerpList; /* 0390 */
630 ULONG64 WaitOnAddressHashTable [0x80]; /* 03a0 */
631 ULONG64 TelemetryCoverageHeader; /* 07a0 */
632 ULONG CloudFileFlags; /* 07a8 */
633 ULONG CloudFileDiagFlags; /* 07ac */
634 CHAR PlaceholderCompatibilityMode; /* 07b0 */
635 CHAR PlaceholderCompatibilityModeReserved[7]; /* 07b1 */
636 ULONG64 LeapSecondData; /* 07b8 */
637 ULONG LeapSecondFlags; /* 07c0 */
638 ULONG NtGlobalFlag2; /* 07c4 */
639 } PEB64;
641 typedef struct _TEB64
643 NT_TIB64 Tib; /* 0000 */
644 ULONG64 EnvironmentPointer; /* 0038 */
645 CLIENT_ID64 ClientId; /* 0040 */
646 ULONG64 ActiveRpcHandle; /* 0050 */
647 ULONG64 ThreadLocalStoragePointer; /* 0058 */
648 ULONG64 Peb; /* 0060 */
649 ULONG LastErrorValue; /* 0068 */
650 ULONG CountOfOwnedCriticalSections; /* 006c */
651 ULONG64 CsrClientThread; /* 0070 */
652 ULONG64 Win32ThreadInfo; /* 0078 */
653 ULONG User32Reserved[26]; /* 0080 */
654 ULONG UserReserved[5]; /* 00e8 */
655 ULONG64 WOW32Reserved; /* 0100 */
656 ULONG CurrentLocale; /* 0108 */
657 ULONG FpSoftwareStatusRegister; /* 010c */
658 ULONG64 ReservedForDebuggerInstrumentation[16]; /* 0110 */
659 ULONG64 SystemReserved1[30]; /* 0190 */
660 char PlaceholderCompatibilityMode; /* 0280 */
661 char PlaceholderReserved[11]; /* 0281 */
662 DWORD ProxiedProcessId; /* 028c */
663 ACTIVATION_CONTEXT_STACK64 ActivationContextStack; /* 0290 */
664 UCHAR WorkingOnBehalfOfTicket[8]; /* 02b8 */
665 LONG ExceptionCode; /* 02c0 */
666 ULONG64 ActivationContextStackPointer; /* 02c8 */
667 ULONG64 InstrumentationCallbackSp; /* 02d0 */
668 ULONG64 InstrumentationCallbackPreviousPc; /* 02d8 */
669 ULONG64 InstrumentationCallbackPreviousSp; /* 02e0 */
670 ULONG TxFsContext; /* 02e8 */
671 BOOLEAN InstrumentationCallbackDisabled; /* 02ec */
672 ULONG64 GdiTebBatch[0x9d]; /* 02f0 */
673 CLIENT_ID64 RealClientId; /* 07d8 */
674 ULONG64 GdiCachedProcessHandle; /* 07e8 */
675 ULONG GdiClientPID; /* 07f0 */
676 ULONG GdiClientTID; /* 07f4 */
677 ULONG64 GdiThreadLocaleInfo; /* 07f8 */
678 ULONG64 Win32ClientInfo[62]; /* 0800 */
679 ULONG64 glDispatchTable[233]; /* 09f0 */
680 ULONG64 glReserved1[29]; /* 1138 */
681 ULONG64 glReserved2; /* 1220 */
682 ULONG64 glSectionInfo; /* 1228 */
683 ULONG64 glSection; /* 1230 */
684 ULONG64 glTable; /* 1238 */
685 ULONG64 glCurrentRC; /* 1240 */
686 ULONG64 glContext; /* 1248 */
687 ULONG LastStatusValue; /* 1250 */
688 UNICODE_STRING64 StaticUnicodeString; /* 1258 */
689 WCHAR StaticUnicodeBuffer[261]; /* 1268 */
690 ULONG64 DeallocationStack; /* 1478 */
691 ULONG64 TlsSlots[64]; /* 1480 */
692 LIST_ENTRY64 TlsLinks; /* 1680 */
693 ULONG64 Vdm; /* 1690 */
694 ULONG64 ReservedForNtRpc; /* 1698 */
695 ULONG64 DbgSsReserved[2]; /* 16a0 */
696 ULONG HardErrorDisabled; /* 16b0 */
697 ULONG64 Instrumentation[16]; /* 16b8 */
698 ULONG64 WinSockData; /* 1738 */
699 ULONG GdiBatchCount; /* 1740 */
700 ULONG Spare2; /* 1744 */
701 ULONG GuaranteedStackBytes; /* 1748 */
702 ULONG64 ReservedForPerf; /* 1750 */
703 ULONG64 ReservedForOle; /* 1758 */
704 ULONG WaitingOnLoaderLock; /* 1760 */
705 ULONG64 Reserved5[3]; /* 1768 */
706 ULONG64 TlsExpansionSlots; /* 1780 */
707 ULONG64 DeallocationBStore; /* 1788 */
708 ULONG64 BStoreLimit; /* 1790 */
709 ULONG ImpersonationLocale; /* 1798 */
710 ULONG IsImpersonating; /* 179c */
711 ULONG64 NlsCache; /* 17a0 */
712 ULONG64 ShimData; /* 17a8 */
713 ULONG HeapVirtualAffinity; /* 17b0 */
714 ULONG64 CurrentTransactionHandle; /* 17b8 */
715 ULONG64 ActiveFrame; /* 17c0 */
716 ULONG64 FlsSlots; /* 17c8 */
717 ULONG64 PreferredLanguages; /* 17d0 */
718 ULONG64 UserPrefLanguages; /* 17d8 */
719 ULONG64 MergedPrefLanguages; /* 17e0 */
720 ULONG MuiImpersonation; /* 17e8 */
721 USHORT CrossTebFlags; /* 17ec */
722 USHORT SameTebFlags; /* 17ee */
723 ULONG64 TxnScopeEnterCallback; /* 17f0 */
724 ULONG64 TxnScopeExitCallback; /* 17f8 */
725 ULONG64 TxnScopeContext; /* 1800 */
726 ULONG LockCount; /* 1808 */
727 LONG WowTebOffset; /* 180c */
728 ULONG64 ResourceRetValue; /* 1810 */
729 ULONG64 ReservedForWdf; /* 1818 */
730 ULONGLONG ReservedForCrt; /* 1820 */
731 GUID EffectiveContainerId; /* 1828 */
732 } TEB64;
734 /* reserved TEB64 TLS slots for Wow64 */
735 #define WOW64_TLS_FILESYSREDIR 8
737 #endif /* _WIN64 */
739 /***********************************************************************
740 * Enums
743 typedef enum _FILE_INFORMATION_CLASS {
744 FileDirectoryInformation = 1,
745 FileFullDirectoryInformation,
746 FileBothDirectoryInformation,
747 FileBasicInformation,
748 FileStandardInformation,
749 FileInternalInformation,
750 FileEaInformation,
751 FileAccessInformation,
752 FileNameInformation,
753 FileRenameInformation,
754 FileLinkInformation,
755 FileNamesInformation,
756 FileDispositionInformation,
757 FilePositionInformation,
758 FileFullEaInformation,
759 FileModeInformation,
760 FileAlignmentInformation,
761 FileAllInformation,
762 FileAllocationInformation,
763 FileEndOfFileInformation,
764 FileAlternateNameInformation,
765 FileStreamInformation,
766 FilePipeInformation,
767 FilePipeLocalInformation,
768 FilePipeRemoteInformation,
769 FileMailslotQueryInformation,
770 FileMailslotSetInformation,
771 FileCompressionInformation,
772 FileObjectIdInformation,
773 FileCompletionInformation,
774 FileMoveClusterInformation,
775 FileQuotaInformation,
776 FileReparsePointInformation,
777 FileNetworkOpenInformation,
778 FileAttributeTagInformation,
779 FileTrackingInformation,
780 FileIdBothDirectoryInformation,
781 FileIdFullDirectoryInformation,
782 FileValidDataLengthInformation,
783 FileShortNameInformation,
784 FileIoCompletionNotificationInformation,
785 FileIoStatusBlockRangeInformation,
786 FileIoPriorityHintInformation,
787 FileSfioReserveInformation,
788 FileSfioVolumeInformation,
789 FileHardLinkInformation,
790 FileProcessIdsUsingFileInformation,
791 FileNormalizedNameInformation,
792 FileNetworkPhysicalNameInformation,
793 FileIdGlobalTxDirectoryInformation,
794 FileIsRemoteDeviceInformation,
795 FileAttributeCacheInformation,
796 FileNumaNodeInformation,
797 FileStandardLinkInformation,
798 FileRemoteProtocolInformation,
799 FileRenameInformationBypassAccessCheck,
800 FileLinkInformationBypassAccessCheck,
801 FileVolumeNameInformation,
802 FileIdInformation,
803 FileIdExtdDirectoryInformation,
804 FileReplaceCompletionInformation,
805 FileHardLinkFullIdInformation,
806 FileIdExtdBothDirectoryInformation,
807 FileMaximumInformation
808 } FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS;
810 typedef struct _FILE_DIRECTORY_INFORMATION {
811 ULONG NextEntryOffset;
812 ULONG FileIndex;
813 LARGE_INTEGER CreationTime;
814 LARGE_INTEGER LastAccessTime;
815 LARGE_INTEGER LastWriteTime;
816 LARGE_INTEGER ChangeTime;
817 LARGE_INTEGER EndOfFile;
818 LARGE_INTEGER AllocationSize;
819 ULONG FileAttributes;
820 ULONG FileNameLength;
821 WCHAR FileName[ANYSIZE_ARRAY];
822 } FILE_DIRECTORY_INFORMATION, *PFILE_DIRECTORY_INFORMATION;
824 typedef struct _FILE_FULL_DIRECTORY_INFORMATION {
825 ULONG NextEntryOffset;
826 ULONG FileIndex;
827 LARGE_INTEGER CreationTime;
828 LARGE_INTEGER LastAccessTime;
829 LARGE_INTEGER LastWriteTime;
830 LARGE_INTEGER ChangeTime;
831 LARGE_INTEGER EndOfFile;
832 LARGE_INTEGER AllocationSize;
833 ULONG FileAttributes;
834 ULONG FileNameLength;
835 ULONG EaSize;
836 WCHAR FileName[ANYSIZE_ARRAY];
837 } FILE_FULL_DIRECTORY_INFORMATION, *PFILE_FULL_DIRECTORY_INFORMATION,
838 FILE_FULL_DIR_INFORMATION, *PFILE_FULL_DIR_INFORMATION;
840 typedef struct _FILE_ID_FULL_DIRECTORY_INFORMATION {
841 ULONG NextEntryOffset;
842 ULONG FileIndex;
843 LARGE_INTEGER CreationTime;
844 LARGE_INTEGER LastAccessTime;
845 LARGE_INTEGER LastWriteTime;
846 LARGE_INTEGER ChangeTime;
847 LARGE_INTEGER EndOfFile;
848 LARGE_INTEGER AllocationSize;
849 ULONG FileAttributes;
850 ULONG FileNameLength;
851 ULONG EaSize;
852 LARGE_INTEGER FileId;
853 WCHAR FileName[ANYSIZE_ARRAY];
854 } FILE_ID_FULL_DIRECTORY_INFORMATION, *PFILE_ID_FULL_DIRECTORY_INFORMATION;
856 typedef struct _FILE_BOTH_DIRECTORY_INFORMATION {
857 ULONG NextEntryOffset;
858 ULONG FileIndex;
859 LARGE_INTEGER CreationTime;
860 LARGE_INTEGER LastAccessTime;
861 LARGE_INTEGER LastWriteTime;
862 LARGE_INTEGER ChangeTime;
863 LARGE_INTEGER EndOfFile;
864 LARGE_INTEGER AllocationSize;
865 ULONG FileAttributes;
866 ULONG FileNameLength;
867 ULONG EaSize;
868 CHAR ShortNameLength;
869 WCHAR ShortName[12];
870 WCHAR FileName[ANYSIZE_ARRAY];
871 } FILE_BOTH_DIRECTORY_INFORMATION, *PFILE_BOTH_DIRECTORY_INFORMATION,
872 FILE_BOTH_DIR_INFORMATION, *PFILE_BOTH_DIR_INFORMATION;
874 typedef struct _FILE_ID_BOTH_DIRECTORY_INFORMATION {
875 ULONG NextEntryOffset;
876 ULONG FileIndex;
877 LARGE_INTEGER CreationTime;
878 LARGE_INTEGER LastAccessTime;
879 LARGE_INTEGER LastWriteTime;
880 LARGE_INTEGER ChangeTime;
881 LARGE_INTEGER EndOfFile;
882 LARGE_INTEGER AllocationSize;
883 ULONG FileAttributes;
884 ULONG FileNameLength;
885 ULONG EaSize;
886 CHAR ShortNameLength;
887 WCHAR ShortName[12];
888 LARGE_INTEGER FileId;
889 WCHAR FileName[ANYSIZE_ARRAY];
890 } FILE_ID_BOTH_DIRECTORY_INFORMATION, *PFILE_ID_BOTH_DIRECTORY_INFORMATION;
892 typedef struct _FILE_ID_GLOBAL_TX_DIR_INFORMATION {
893 ULONG NextEntryOffset;
894 ULONG FileIndex;
895 LARGE_INTEGER CreationTime;
896 LARGE_INTEGER LastAccessTime;
897 LARGE_INTEGER LastWriteTime;
898 LARGE_INTEGER ChangeTime;
899 LARGE_INTEGER EndOfFile;
900 LARGE_INTEGER AllocationSize;
901 ULONG FileAttributes;
902 ULONG FileNameLength;
903 LARGE_INTEGER FileId;
904 GUID LockingTransactionId;
905 ULONG TxInfoFlags;
906 WCHAR FileName[ANYSIZE_ARRAY];
907 } FILE_ID_GLOBAL_TX_DIR_INFORMATION, *PFILE_ID_GLOBAL_TX_DIR_INFORMATION;
909 typedef struct _FILE_BASIC_INFORMATION {
910 LARGE_INTEGER CreationTime;
911 LARGE_INTEGER LastAccessTime;
912 LARGE_INTEGER LastWriteTime;
913 LARGE_INTEGER ChangeTime;
914 ULONG FileAttributes;
915 } FILE_BASIC_INFORMATION, *PFILE_BASIC_INFORMATION;
917 typedef struct _FILE_STANDARD_INFORMATION {
918 LARGE_INTEGER AllocationSize;
919 LARGE_INTEGER EndOfFile;
920 ULONG NumberOfLinks;
921 BOOLEAN DeletePending;
922 BOOLEAN Directory;
923 } FILE_STANDARD_INFORMATION, *PFILE_STANDARD_INFORMATION;
925 typedef struct _FILE_INTERNAL_INFORMATION {
926 LARGE_INTEGER IndexNumber;
927 } FILE_INTERNAL_INFORMATION, *PFILE_INTERNAL_INFORMATION;
929 typedef struct _FILE_ID_128 {
930 UCHAR Identifier[16];
931 } FILE_ID_128, *PFILE_ID_128;
933 typedef struct _FILE_ID_INFORMATION {
934 ULONGLONG VolumeSerialNumber;
935 FILE_ID_128 FileId;
936 } FILE_ID_INFORMATION, *PFILE_ID_INFORMATION;
938 typedef struct _FILE_EA_INFORMATION {
939 ULONG EaSize;
940 } FILE_EA_INFORMATION, *PFILE_EA_INFORMATION;
942 typedef struct _FILE_ACCESS_INFORMATION {
943 ACCESS_MASK AccessFlags;
944 } FILE_ACCESS_INFORMATION, *PFILE_ACCESS_INFORMATION;
946 typedef struct _FILE_NAME_INFORMATION {
947 ULONG FileNameLength;
948 WCHAR FileName[1];
949 } FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION;
951 typedef struct _FILE_RENAME_INFORMATION {
952 BOOLEAN ReplaceIfExists;
953 HANDLE RootDirectory;
954 ULONG FileNameLength;
955 WCHAR FileName[1];
956 } FILE_RENAME_INFORMATION, *PFILE_RENAME_INFORMATION;
958 typedef struct _FILE_LINK_INFORMATION {
959 BOOLEAN ReplaceIfExists;
960 HANDLE RootDirectory;
961 ULONG FileNameLength;
962 WCHAR FileName[1];
963 } FILE_LINK_INFORMATION, *PFILE_LINK_INFORMATION;
965 typedef struct _FILE_NAMES_INFORMATION {
966 ULONG NextEntryOffset;
967 ULONG FileIndex;
968 ULONG FileNameLength;
969 WCHAR FileName[1];
970 } FILE_NAMES_INFORMATION, *PFILE_NAMES_INFORMATION;
972 typedef struct _FILE_DISPOSITION_INFORMATION {
973 BOOLEAN DoDeleteFile;
974 } FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION;
976 typedef struct _FILE_POSITION_INFORMATION {
977 LARGE_INTEGER CurrentByteOffset;
978 } FILE_POSITION_INFORMATION, *PFILE_POSITION_INFORMATION;
980 typedef struct _FILE_ALIGNMENT_INFORMATION {
981 ULONG AlignmentRequirement;
982 } FILE_ALIGNMENT_INFORMATION, *PFILE_ALIGNMENT_INFORMATION;
984 typedef struct _FILE_ALLOCATION_INFORMATION {
985 LARGE_INTEGER AllocationSize;
986 } FILE_ALLOCATION_INFORMATION, *PFILE_ALLOCATION_INFORMATION;
988 typedef struct _FILE_END_OF_FILE_INFORMATION {
989 LARGE_INTEGER EndOfFile;
990 } FILE_END_OF_FILE_INFORMATION, *PFILE_END_OF_FILE_INFORMATION;
992 typedef struct _FILE_NETWORK_OPEN_INFORMATION {
993 LARGE_INTEGER CreationTime;
994 LARGE_INTEGER LastAccessTime;
995 LARGE_INTEGER LastWriteTime;
996 LARGE_INTEGER ChangeTime;
997 LARGE_INTEGER AllocationSize;
998 LARGE_INTEGER EndOfFile;
999 ULONG FileAttributes;
1000 } FILE_NETWORK_OPEN_INFORMATION, *PFILE_NETWORK_OPEN_INFORMATION;
1002 typedef struct _FILE_FULL_EA_INFORMATION {
1003 ULONG NextEntryOffset;
1004 UCHAR Flags;
1005 UCHAR EaNameLength;
1006 USHORT EaValueLength;
1007 CHAR EaName[1];
1008 } FILE_FULL_EA_INFORMATION, *PFILE_FULL_EA_INFORMATION;
1010 typedef struct _FILE_MODE_INFORMATION {
1011 ULONG Mode;
1012 } FILE_MODE_INFORMATION, *PFILE_MODE_INFORMATION;
1014 typedef struct _FILE_STREAM_INFORMATION
1016 ULONG NextEntryOffset;
1017 ULONG StreamNameLength;
1018 LARGE_INTEGER StreamSize;
1019 LARGE_INTEGER StreamAllocationSize;
1020 WCHAR StreamName[1];
1021 } FILE_STREAM_INFORMATION, *PFILE_STREAM_INFORMATION;
1023 typedef struct _FILE_ATTRIBUTE_TAG_INFORMATION
1025 ULONG FileAttributes;
1026 ULONG ReparseTag;
1027 } FILE_ATTRIBUTE_TAG_INFORMATION, *PFILE_ATTRIBUTE_TAG_INFORMATION;
1029 typedef struct _FILE_MAILSLOT_QUERY_INFORMATION {
1030 ULONG MaximumMessageSize;
1031 ULONG MailslotQuota;
1032 ULONG NextMessageSize;
1033 ULONG MessagesAvailable;
1034 LARGE_INTEGER ReadTimeout;
1035 } FILE_MAILSLOT_QUERY_INFORMATION, *PFILE_MAILSLOT_QUERY_INFORMATION;
1037 typedef struct _FILE_MAILSLOT_SET_INFORMATION {
1038 LARGE_INTEGER ReadTimeout;
1039 } FILE_MAILSLOT_SET_INFORMATION, *PFILE_MAILSLOT_SET_INFORMATION;
1041 typedef struct _FILE_PIPE_INFORMATION {
1042 ULONG ReadMode;
1043 ULONG CompletionMode;
1044 } FILE_PIPE_INFORMATION, *PFILE_PIPE_INFORMATION;
1046 typedef struct _FILE_PIPE_LOCAL_INFORMATION {
1047 ULONG NamedPipeType;
1048 ULONG NamedPipeConfiguration;
1049 ULONG MaximumInstances;
1050 ULONG CurrentInstances;
1051 ULONG InboundQuota;
1052 ULONG ReadDataAvailable;
1053 ULONG OutboundQuota;
1054 ULONG WriteQuotaAvailable;
1055 ULONG NamedPipeState;
1056 ULONG NamedPipeEnd;
1057 } FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION;
1059 #define FILE_PIPE_DISCONNECTED_STATE 0x00000001
1060 #define FILE_PIPE_LISTENING_STATE 0x00000002
1061 #define FILE_PIPE_CONNECTED_STATE 0x00000003
1062 #define FILE_PIPE_CLOSING_STATE 0x00000004
1064 typedef struct _FILE_OBJECTID_BUFFER
1066 BYTE ObjectId[16];
1067 union
1069 struct
1071 BYTE BirthVolumeId[16];
1072 BYTE BirthObjectId[16];
1073 BYTE DomainId[16];
1074 } DUMMYSTRUCTNAME;
1075 BYTE ExtendedInfo[48];
1076 } DUMMYUNIONNAME;
1077 } FILE_OBJECTID_BUFFER, *PFILE_OBJECTID_BUFFER;
1079 typedef struct _FILE_OBJECTID_INFORMATION {
1080 LONGLONG FileReference;
1081 UCHAR ObjectId[16];
1082 union {
1083 struct {
1084 UCHAR BirthVolumeId[16];
1085 UCHAR BirthObjectId[16];
1086 UCHAR DomainId[16];
1087 } DUMMYSTRUCTNAME;
1088 UCHAR ExtendedInfo[48];
1089 } DUMMYUNIONNAME;
1090 } FILE_OBJECTID_INFORMATION, *PFILE_OBJECTID_INFORMATION;
1092 typedef struct _FILE_QUOTA_INFORMATION {
1093 ULONG NextEntryOffset;
1094 ULONG SidLength;
1095 LARGE_INTEGER ChangeTime;
1096 LARGE_INTEGER QuotaUsed;
1097 LARGE_INTEGER QuotaThreshold;
1098 LARGE_INTEGER QuotaLimit;
1099 SID Sid;
1100 } FILE_QUOTA_INFORMATION, *PFILE_QUOTA_INFORMATION;
1102 typedef struct _FILE_REPARSE_POINT_INFORMATION {
1103 LONGLONG FileReference;
1104 ULONG Tag;
1105 } FILE_REPARSE_POINT_INFORMATION, *PFILE_REPARSE_POINT_INFORMATION;
1107 typedef struct _FILE_ALL_INFORMATION {
1108 FILE_BASIC_INFORMATION BasicInformation;
1109 FILE_STANDARD_INFORMATION StandardInformation;
1110 FILE_INTERNAL_INFORMATION InternalInformation;
1111 FILE_EA_INFORMATION EaInformation;
1112 FILE_ACCESS_INFORMATION AccessInformation;
1113 FILE_POSITION_INFORMATION PositionInformation;
1114 FILE_MODE_INFORMATION ModeInformation;
1115 FILE_ALIGNMENT_INFORMATION AlignmentInformation;
1116 FILE_NAME_INFORMATION NameInformation;
1117 } FILE_ALL_INFORMATION, *PFILE_ALL_INFORMATION;
1119 typedef struct _FILE_IO_COMPLETION_NOTIFICATION_INFORMATION {
1120 ULONG Flags;
1121 } FILE_IO_COMPLETION_NOTIFICATION_INFORMATION, *PFILE_IO_COMPLETION_NOTIFICATION_INFORMATION;
1123 #define FILE_SKIP_COMPLETION_PORT_ON_SUCCESS 0x1
1124 #define FILE_SKIP_SET_EVENT_ON_HANDLE 0x2
1125 #define FILE_SKIP_SET_USER_EVENT_ON_FAST_IO 0x4
1127 typedef enum _FSINFOCLASS {
1128 FileFsVolumeInformation = 1,
1129 FileFsLabelInformation,
1130 FileFsSizeInformation,
1131 FileFsDeviceInformation,
1132 FileFsAttributeInformation,
1133 FileFsControlInformation,
1134 FileFsFullSizeInformation,
1135 FileFsObjectIdInformation,
1136 FileFsMaximumInformation
1137 } FS_INFORMATION_CLASS, *PFS_INFORMATION_CLASS;
1139 typedef enum _KEY_INFORMATION_CLASS {
1140 KeyBasicInformation,
1141 KeyNodeInformation,
1142 KeyFullInformation,
1143 KeyNameInformation,
1144 KeyCachedInformation,
1145 KeyFlagsInformation,
1146 KeyVirtualizationInformation,
1147 KeyHandleTagsInformation,
1148 MaxKeyInfoClass
1149 } KEY_INFORMATION_CLASS;
1151 typedef enum _KEY_VALUE_INFORMATION_CLASS {
1152 KeyValueBasicInformation,
1153 KeyValueFullInformation,
1154 KeyValuePartialInformation,
1155 KeyValueFullInformationAlign64,
1156 KeyValuePartialInformationAlign64
1157 } KEY_VALUE_INFORMATION_CLASS;
1159 typedef enum _OBJECT_INFORMATION_CLASS {
1160 ObjectBasicInformation,
1161 ObjectNameInformation,
1162 ObjectTypeInformation,
1163 ObjectAllInformation,
1164 ObjectDataInformation
1165 } OBJECT_INFORMATION_CLASS, *POBJECT_INFORMATION_CLASS;
1167 typedef enum _PROCESSINFOCLASS {
1168 ProcessBasicInformation = 0,
1169 ProcessQuotaLimits = 1,
1170 ProcessIoCounters = 2,
1171 ProcessVmCounters = 3,
1172 ProcessTimes = 4,
1173 ProcessBasePriority = 5,
1174 ProcessRaisePriority = 6,
1175 ProcessDebugPort = 7,
1176 ProcessExceptionPort = 8,
1177 ProcessAccessToken = 9,
1178 ProcessLdtInformation = 10,
1179 ProcessLdtSize = 11,
1180 ProcessDefaultHardErrorMode = 12,
1181 ProcessIoPortHandlers = 13,
1182 ProcessPooledUsageAndLimits = 14,
1183 ProcessWorkingSetWatch = 15,
1184 ProcessUserModeIOPL = 16,
1185 ProcessEnableAlignmentFaultFixup = 17,
1186 ProcessPriorityClass = 18,
1187 ProcessWx86Information = 19,
1188 ProcessHandleCount = 20,
1189 ProcessAffinityMask = 21,
1190 ProcessPriorityBoost = 22,
1191 ProcessDeviceMap = 23,
1192 ProcessSessionInformation = 24,
1193 ProcessForegroundInformation = 25,
1194 ProcessWow64Information = 26,
1195 ProcessImageFileName = 27,
1196 ProcessLUIDDeviceMapsEnabled = 28,
1197 ProcessBreakOnTermination = 29,
1198 ProcessDebugObjectHandle = 30,
1199 ProcessDebugFlags = 31,
1200 ProcessHandleTracing = 32,
1201 ProcessIoPriority = 33,
1202 ProcessExecuteFlags = 34,
1203 ProcessTlsInformation = 35,
1204 ProcessCookie = 36,
1205 ProcessImageInformation = 37,
1206 ProcessCycleTime = 38,
1207 ProcessPagePriority = 39,
1208 ProcessInstrumentationCallback = 40,
1209 ProcessThreadStackAllocation = 41,
1210 ProcessWorkingSetWatchEx = 42,
1211 ProcessImageFileNameWin32 = 43,
1212 MaxProcessInfoClass
1213 } PROCESSINFOCLASS, PROCESS_INFORMATION_CLASS;
1215 #define MEM_EXECUTE_OPTION_DISABLE 0x01
1216 #define MEM_EXECUTE_OPTION_ENABLE 0x02
1217 #define MEM_EXECUTE_OPTION_DISABLE_THUNK_EMULATION 0x04
1218 #define MEM_EXECUTE_OPTION_PERMANENT 0x08
1220 typedef enum _SECTION_INHERIT {
1221 ViewShare = 1,
1222 ViewUnmap = 2
1223 } SECTION_INHERIT;
1225 typedef enum _SYSTEM_INFORMATION_CLASS {
1226 SystemBasicInformation = 0,
1227 SystemCpuInformation = 1,
1228 SystemPerformanceInformation = 2,
1229 SystemTimeOfDayInformation = 3, /* was SystemTimeInformation */
1230 Unknown4,
1231 SystemProcessInformation = 5,
1232 Unknown6,
1233 Unknown7,
1234 SystemProcessorPerformanceInformation = 8,
1235 Unknown9,
1236 Unknown10,
1237 SystemModuleInformation = 11,
1238 Unknown12,
1239 Unknown13,
1240 Unknown14,
1241 Unknown15,
1242 SystemHandleInformation = 16,
1243 Unknown17,
1244 SystemPageFileInformation = 18,
1245 Unknown19,
1246 Unknown20,
1247 SystemCacheInformation = 21,
1248 Unknown22,
1249 SystemInterruptInformation = 23,
1250 SystemDpcBehaviourInformation = 24,
1251 SystemFullMemoryInformation = 25,
1252 SystemNotImplemented6 = 25,
1253 SystemLoadImage = 26,
1254 SystemUnloadImage = 27,
1255 SystemTimeAdjustmentInformation = 28,
1256 SystemTimeAdjustment = 28,
1257 SystemSummaryMemoryInformation = 29,
1258 SystemNotImplemented7 = 29,
1259 SystemNextEventIdInformation = 30,
1260 SystemNotImplemented8 = 30,
1261 SystemEventIdsInformation = 31,
1262 SystemCrashDumpInformation = 32,
1263 SystemExceptionInformation = 33,
1264 SystemCrashDumpStateInformation = 34,
1265 SystemKernelDebuggerInformation = 35,
1266 SystemContextSwitchInformation = 36,
1267 SystemRegistryQuotaInformation = 37,
1268 SystemCurrentTimeZoneInformation = 44,
1269 SystemTimeZoneInformation = 44,
1270 SystemLookasideInformation = 45,
1271 SystemSetTimeSlipEvent = 46,
1272 SystemCreateSession = 47,
1273 SystemDeleteSession = 48,
1274 SystemInvalidInfoClass4 = 49,
1275 SystemRangeStartInformation = 50,
1276 SystemVerifierInformation = 51,
1277 SystemAddVerifier = 52,
1278 SystemSessionProcessesInformation = 53,
1279 SystemLoadGdiDriverInSystemSpace = 54,
1280 SystemNumaProcessorMap = 55,
1281 SystemPrefetcherInformation = 56,
1282 SystemExtendedProcessInformation = 57,
1283 SystemRecommendedSharedDataAlignment = 58,
1284 SystemComPlusPackage = 59,
1285 SystemNumaAvailableMemory = 60,
1286 SystemProcessorPowerInformation = 61,
1287 SystemEmulationBasicInformation = 62,
1288 SystemEmulationProcessorInformation = 63,
1289 SystemExtendedHandleInformation = 64,
1290 SystemLostDelayedWriteInformation = 65,
1291 SystemBigPoolInformation = 66,
1292 SystemSessionPoolTagInformation = 67,
1293 SystemSessionMappedViewInformation = 68,
1294 SystemHotpatchInformation = 69,
1295 SystemObjectSecurityMode = 70,
1296 SystemWatchdogTimerHandler = 71,
1297 SystemWatchdogTimerInformation = 72,
1298 SystemLogicalProcessorInformation = 73,
1299 SystemWow64SharedInformation = 74,
1300 SystemRegisterFirmwareTableInformationHandler = 75,
1301 SystemFirmwareTableInformation = 76,
1302 SystemModuleInformationEx = 77,
1303 SystemVerifierTriageInformation = 78,
1304 SystemSuperfetchInformation = 79,
1305 SystemMemoryListInformation = 80,
1306 SystemFileCacheInformationEx = 81,
1307 SystemDynamicTimeZoneInformation = 102,
1308 SystemLogicalProcessorInformationEx = 107,
1309 SystemInformationClassMax
1310 } SYSTEM_INFORMATION_CLASS, *PSYSTEM_INFORMATION_CLASS;
1312 typedef enum _THREADINFOCLASS {
1313 ThreadBasicInformation = 0,
1314 ThreadTimes,
1315 ThreadPriority,
1316 ThreadBasePriority,
1317 ThreadAffinityMask,
1318 ThreadImpersonationToken,
1319 ThreadDescriptorTableEntry,
1320 ThreadEnableAlignmentFaultFixup,
1321 ThreadEventPair_Reusable,
1322 ThreadQuerySetWin32StartAddress,
1323 ThreadZeroTlsCell,
1324 ThreadPerformanceCount,
1325 ThreadAmILastThread,
1326 ThreadIdealProcessor,
1327 ThreadPriorityBoost,
1328 ThreadSetTlsArrayAddress,
1329 ThreadIsIoPending,
1330 ThreadHideFromDebugger,
1331 ThreadBreakOnTermination,
1332 ThreadSwitchLegacyState,
1333 ThreadIsTerminated,
1334 ThreadLastSystemCall,
1335 ThreadIoPriority,
1336 ThreadCycleTime,
1337 ThreadPagePriority,
1338 ThreadActualBasePriority,
1339 ThreadTebInformation,
1340 ThreadCSwitchMon,
1341 ThreadCSwitchPmu,
1342 ThreadWow64Context,
1343 ThreadGroupInformation,
1344 ThreadUmsInformation,
1345 ThreadCounterProfiling,
1346 ThreadIdealProcessorEx,
1347 ThreadSuspendCount = 35,
1348 ThreadDescription = 38,
1349 MaxThreadInfoClass
1350 } THREADINFOCLASS;
1352 typedef struct _THREAD_BASIC_INFORMATION
1354 NTSTATUS ExitStatus;
1355 PVOID TebBaseAddress;
1356 CLIENT_ID ClientId;
1357 ULONG_PTR AffinityMask;
1358 LONG Priority;
1359 LONG BasePriority;
1360 } THREAD_BASIC_INFORMATION, *PTHREAD_BASIC_INFORMATION;
1362 typedef struct _THREAD_DESCRIPTOR_INFORMATION
1364 DWORD Selector;
1365 LDT_ENTRY Entry;
1366 } THREAD_DESCRIPTOR_INFORMATION, *PTHREAD_DESCRIPTOR_INFORMATION;
1368 typedef struct _THREAD_DESCRIPTION_INFORMATION
1370 UNICODE_STRING Description;
1371 } THREAD_DESCRIPTION_INFORMATION, *PTHREAD_DESCRIPTION_INFORMATION;
1373 typedef struct _KERNEL_USER_TIMES {
1374 LARGE_INTEGER CreateTime;
1375 LARGE_INTEGER ExitTime;
1376 LARGE_INTEGER KernelTime;
1377 LARGE_INTEGER UserTime;
1378 } KERNEL_USER_TIMES, *PKERNEL_USER_TIMES;
1380 typedef enum _WINSTATIONINFOCLASS {
1381 WinStationInformation = 8
1382 } WINSTATIONINFOCLASS;
1384 typedef enum _MEMORY_INFORMATION_CLASS {
1385 MemoryBasicInformation,
1386 MemoryWorkingSetList,
1387 MemorySectionName,
1388 MemoryBasicVlmInformation,
1389 MemoryWorkingSetExInformation
1390 } MEMORY_INFORMATION_CLASS;
1392 typedef struct _MEMORY_SECTION_NAME
1394 UNICODE_STRING SectionFileName;
1395 } MEMORY_SECTION_NAME, *PMEMORY_SECTION_NAME;
1397 typedef union _MEMORY_WORKING_SET_EX_BLOCK {
1398 ULONG_PTR Flags;
1399 struct {
1400 ULONG_PTR Valid : 1;
1401 ULONG_PTR ShareCount : 3;
1402 ULONG_PTR Win32Protection : 11;
1403 ULONG_PTR Shared : 1;
1404 ULONG_PTR Node : 6;
1405 ULONG_PTR Locked : 1;
1406 ULONG_PTR LargePage : 1;
1407 } DUMMYSTRUCTNAME;
1408 } MEMORY_WORKING_SET_EX_BLOCK, *PMEMORY_WORKING_SET_EX_BLOCK;
1410 typedef struct _MEMORY_WORKING_SET_EX_INFORMATION {
1411 PVOID VirtualAddress;
1412 MEMORY_WORKING_SET_EX_BLOCK VirtualAttributes;
1413 } MEMORY_WORKING_SET_EX_INFORMATION, *PMEMORY_WORKING_SET_EX_INFORMATION;
1415 typedef enum _MUTANT_INFORMATION_CLASS
1417 MutantBasicInformation
1418 } MUTANT_INFORMATION_CLASS, *PMUTANT_INFORMATION_CLASS;
1420 typedef struct _MUTANT_BASIC_INFORMATION {
1421 LONG CurrentCount;
1422 BOOLEAN OwnedByCaller;
1423 BOOLEAN AbandonedState;
1424 } MUTANT_BASIC_INFORMATION, *PMUTANT_BASIC_INFORMATION;
1426 typedef enum _TIMER_INFORMATION_CLASS
1428 TimerBasicInformation = 0
1429 } TIMER_INFORMATION_CLASS;
1431 typedef struct _TIMER_BASIC_INFORMATION
1433 LARGE_INTEGER RemainingTime;
1434 BOOLEAN TimerState;
1435 } TIMER_BASIC_INFORMATION, *PTIMER_BASIC_INFORMATION;
1438 /* return type of RtlDetermineDosPathNameType_U (FIXME: not the correct names) */
1439 typedef enum
1441 INVALID_PATH = 0,
1442 UNC_PATH, /* "//foo" */
1443 ABSOLUTE_DRIVE_PATH, /* "c:/foo" */
1444 RELATIVE_DRIVE_PATH, /* "c:foo" */
1445 ABSOLUTE_PATH, /* "/foo" */
1446 RELATIVE_PATH, /* "foo" */
1447 DEVICE_PATH, /* "//./foo" */
1448 UNC_DOT_PATH /* "//." */
1449 } DOS_PATHNAME_TYPE;
1452 /***********************************************************************
1453 * Types and data structures
1456 /* This is used by NtQuerySystemInformation */
1457 typedef struct _SYSTEM_THREAD_INFORMATION
1458 { /* win32/win64 */
1459 LARGE_INTEGER KernelTime; /* 00/00 */
1460 LARGE_INTEGER UserTime; /* 08/08 */
1461 LARGE_INTEGER CreateTime; /* 10/10 */
1462 DWORD dwTickCount; /* 18/18 */
1463 LPVOID StartAddress; /* 1c/20 */
1464 CLIENT_ID ClientId; /* 20/28 */
1465 DWORD dwCurrentPriority; /* 28/38 */
1466 DWORD dwBasePriority; /* 2c/3c */
1467 DWORD dwContextSwitches; /* 30/40 */
1468 DWORD dwThreadState; /* 34/44 */
1469 DWORD dwWaitReason; /* 38/48 */
1470 DWORD dwUnknown; /* 3c/4c */
1471 } SYSTEM_THREAD_INFORMATION, *PSYSTEM_THREAD_INFORMATION;
1473 typedef struct _IO_STATUS_BLOCK {
1474 union {
1475 NTSTATUS Status;
1476 PVOID Pointer;
1477 } DUMMYUNIONNAME;
1479 ULONG_PTR Information;
1480 } IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
1482 typedef void (WINAPI * PIO_APC_ROUTINE)(PVOID,PIO_STATUS_BLOCK,ULONG);
1484 typedef struct _KEY_BASIC_INFORMATION {
1485 LARGE_INTEGER LastWriteTime;
1486 ULONG TitleIndex;
1487 ULONG NameLength;
1488 WCHAR Name[1];
1489 } KEY_BASIC_INFORMATION, *PKEY_BASIC_INFORMATION;
1491 typedef struct _KEY_NODE_INFORMATION
1493 LARGE_INTEGER LastWriteTime;
1494 ULONG TitleIndex;
1495 ULONG ClassOffset;
1496 ULONG ClassLength;
1497 ULONG NameLength;
1498 WCHAR Name[1];
1499 /* Class[1]; */
1500 } KEY_NODE_INFORMATION, *PKEY_NODE_INFORMATION;
1502 typedef struct _KEY_FULL_INFORMATION
1504 LARGE_INTEGER LastWriteTime;
1505 ULONG TitleIndex;
1506 ULONG ClassOffset;
1507 ULONG ClassLength;
1508 ULONG SubKeys;
1509 ULONG MaxNameLen;
1510 ULONG MaxClassLen;
1511 ULONG Values;
1512 ULONG MaxValueNameLen;
1513 ULONG MaxValueDataLen;
1514 WCHAR Class[1];
1515 } KEY_FULL_INFORMATION, *PKEY_FULL_INFORMATION;
1517 typedef struct _KEY_NAME_INFORMATION {
1518 ULONG NameLength;
1519 WCHAR Name[1];
1520 } KEY_NAME_INFORMATION, *PKEY_NAME_INFORMATION;
1522 typedef struct _KEY_CACHED_INFORMATION
1524 LARGE_INTEGER LastWriteTime;
1525 ULONG TitleIndex;
1526 ULONG SubKeys;
1527 ULONG MaxNameLen;
1528 ULONG Values;
1529 ULONG MaxValueNameLen;
1530 ULONG MaxValueDataLen;
1531 ULONG NameLength;
1532 } KEY_CACHED_INFORMATION, *PKEY_CACHED_INFORMATION;
1534 typedef struct _KEY_VALUE_ENTRY
1536 PUNICODE_STRING ValueName;
1537 ULONG DataLength;
1538 ULONG DataOffset;
1539 ULONG Type;
1540 } KEY_VALUE_ENTRY, *PKEY_VALUE_ENTRY;
1542 typedef struct _KEY_VALUE_BASIC_INFORMATION {
1543 ULONG TitleIndex;
1544 ULONG Type;
1545 ULONG NameLength;
1546 WCHAR Name[1];
1547 } KEY_VALUE_BASIC_INFORMATION, *PKEY_VALUE_BASIC_INFORMATION;
1549 typedef struct _KEY_VALUE_FULL_INFORMATION {
1550 ULONG TitleIndex;
1551 ULONG Type;
1552 ULONG DataOffset;
1553 ULONG DataLength;
1554 ULONG NameLength;
1555 WCHAR Name[1];
1556 } KEY_VALUE_FULL_INFORMATION, *PKEY_VALUE_FULL_INFORMATION;
1558 typedef struct _KEY_VALUE_PARTIAL_INFORMATION {
1559 ULONG TitleIndex;
1560 ULONG Type;
1561 ULONG DataLength;
1562 UCHAR Data[1];
1563 } KEY_VALUE_PARTIAL_INFORMATION, *PKEY_VALUE_PARTIAL_INFORMATION;
1565 #ifndef __OBJECT_ATTRIBUTES_DEFINED__
1566 #define __OBJECT_ATTRIBUTES_DEFINED__
1567 typedef struct _OBJECT_ATTRIBUTES {
1568 ULONG Length;
1569 HANDLE RootDirectory;
1570 PUNICODE_STRING ObjectName;
1571 ULONG Attributes;
1572 PVOID SecurityDescriptor; /* type SECURITY_DESCRIPTOR */
1573 PVOID SecurityQualityOfService; /* type SECURITY_QUALITY_OF_SERVICE */
1574 } OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
1575 #endif
1577 typedef struct _OBJECT_DATA_INFORMATION {
1578 BOOLEAN InheritHandle;
1579 BOOLEAN ProtectFromClose;
1580 } OBJECT_DATA_INFORMATION, *POBJECT_DATA_INFORMATION;
1582 typedef struct _OBJECT_BASIC_INFORMATION {
1583 ULONG Attributes;
1584 ACCESS_MASK GrantedAccess;
1585 ULONG HandleCount;
1586 ULONG PointerCount;
1587 ULONG PagedPoolUsage;
1588 ULONG NonPagedPoolUsage;
1589 ULONG Reserved[3];
1590 ULONG NameInformationLength;
1591 ULONG TypeInformationLength;
1592 ULONG SecurityDescriptorLength;
1593 LARGE_INTEGER CreateTime;
1594 } OBJECT_BASIC_INFORMATION, *POBJECT_BASIC_INFORMATION;
1596 typedef struct _OBJECT_NAME_INFORMATION {
1597 UNICODE_STRING Name;
1598 } OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;
1600 typedef struct __OBJECT_TYPE_INFORMATION {
1601 UNICODE_STRING TypeName;
1602 ULONG Reserved [22];
1603 } OBJECT_TYPE_INFORMATION, *POBJECT_TYPE_INFORMATION;
1605 typedef struct _PROCESS_BASIC_INFORMATION {
1606 #ifdef __WINESRC__
1607 DWORD_PTR ExitStatus;
1608 PPEB PebBaseAddress;
1609 DWORD_PTR AffinityMask;
1610 DWORD_PTR BasePriority;
1611 ULONG_PTR UniqueProcessId;
1612 ULONG_PTR InheritedFromUniqueProcessId;
1613 #else
1614 PVOID Reserved1;
1615 PPEB PebBaseAddress;
1616 PVOID Reserved2[2];
1617 ULONG_PTR UniqueProcessId;
1618 PVOID Reserved3;
1619 #endif
1620 } PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION;
1622 #define PROCESS_PRIOCLASS_IDLE 1
1623 #define PROCESS_PRIOCLASS_NORMAL 2
1624 #define PROCESS_PRIOCLASS_HIGH 3
1625 #define PROCESS_PRIOCLASS_REALTIME 4
1626 #define PROCESS_PRIOCLASS_BELOW_NORMAL 5
1627 #define PROCESS_PRIOCLASS_ABOVE_NORMAL 6
1629 typedef struct _PROCESS_PRIORITY_CLASS {
1630 BOOLEAN Foreground;
1631 UCHAR PriorityClass;
1632 } PROCESS_PRIORITY_CLASS, *PPROCESS_PRIORITY_CLASS;
1634 typedef struct _PROCESS_STACK_ALLOCATION_INFORMATION
1636 SIZE_T ReserveSize;
1637 SIZE_T ZeroBits;
1638 PVOID StackBase;
1639 } PROCESS_STACK_ALLOCATION_INFORMATION, *PPROCESS_STACK_ALLOCATION_INFORMATION;
1641 typedef struct _PROCESS_STACK_ALLOCATION_INFORMATION_EX
1643 ULONG PreferredNode;
1644 ULONG Reserved0;
1645 ULONG Reserved1;
1646 ULONG Reserved2;
1647 PROCESS_STACK_ALLOCATION_INFORMATION AllocInfo;
1648 } PROCESS_STACK_ALLOCATION_INFORMATION_EX, *PPROCESS_STACK_ALLOCATION_INFORMATION_EX;
1650 typedef struct _RTL_HEAP_DEFINITION {
1651 ULONG Length; /* = sizeof(RTL_HEAP_DEFINITION) */
1653 ULONG Unknown[11];
1654 } RTL_HEAP_DEFINITION, *PRTL_HEAP_DEFINITION;
1656 typedef struct _RTL_RWLOCK {
1657 RTL_CRITICAL_SECTION rtlCS;
1659 HANDLE hSharedReleaseSemaphore;
1660 UINT uSharedWaiters;
1662 HANDLE hExclusiveReleaseSemaphore;
1663 UINT uExclusiveWaiters;
1665 INT iNumberActive;
1666 HANDLE hOwningThreadId;
1667 DWORD dwTimeoutBoost;
1668 PVOID pDebugInfo;
1669 } RTL_RWLOCK, *LPRTL_RWLOCK;
1671 /* System Information Class 0x00 */
1673 typedef struct _SYSTEM_BASIC_INFORMATION {
1674 #ifdef __WINESRC__
1675 DWORD unknown;
1676 ULONG KeMaximumIncrement;
1677 ULONG PageSize;
1678 ULONG MmNumberOfPhysicalPages;
1679 ULONG MmLowestPhysicalPage;
1680 ULONG MmHighestPhysicalPage;
1681 ULONG_PTR AllocationGranularity;
1682 PVOID LowestUserAddress;
1683 PVOID HighestUserAddress;
1684 ULONG_PTR ActiveProcessorsAffinityMask;
1685 BYTE NumberOfProcessors;
1686 #else
1687 BYTE Reserved1[24];
1688 PVOID Reserved2[4];
1689 CCHAR NumberOfProcessors;
1690 #endif
1691 } SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
1693 /* System Information Class 0x01 */
1695 typedef struct _SYSTEM_CPU_INFORMATION {
1696 WORD Architecture;
1697 WORD Level;
1698 WORD Revision; /* combination of CPU model and stepping */
1699 WORD Reserved; /* always zero */
1700 DWORD FeatureSet; /* see bit flags below */
1701 } SYSTEM_CPU_INFORMATION, *PSYSTEM_CPU_INFORMATION;
1703 /* definitions of bits in the Feature set for the x86 processors */
1704 #define CPU_FEATURE_VME 0x00000005 /* Virtual 86 Mode Extensions */
1705 #define CPU_FEATURE_TSC 0x00000002 /* Time Stamp Counter available */
1706 #define CPU_FEATURE_CMOV 0x00000008 /* Conditional Move instruction*/
1707 #define CPU_FEATURE_PGE 0x00000014 /* Page table Entry Global bit */
1708 #define CPU_FEATURE_PSE 0x00000024 /* Page Size Extension */
1709 #define CPU_FEATURE_MTRR 0x00000040 /* Memory Type Range Registers */
1710 #define CPU_FEATURE_CX8 0x00000080 /* Compare and eXchange 8 byte instr. */
1711 #define CPU_FEATURE_MMX 0x00000100 /* Multi Media eXtensions */
1712 #define CPU_FEATURE_X86 0x00000200 /* seems to be always ON, on the '86 */
1713 #define CPU_FEATURE_PAT 0x00000400 /* Page Attribute Table */
1714 #define CPU_FEATURE_FXSR 0x00000800 /* FXSAVE and FXSTORE instructions */
1715 #define CPU_FEATURE_SEP 0x00001000 /* SYSENTER and SYSEXIT instructions */
1716 #define CPU_FEATURE_SSE 0x00002000 /* SSE extensions (ext. MMX) */
1717 #define CPU_FEATURE_3DNOW 0x00004000 /* 3DNOW instructions available */
1718 #define CPU_FEATURE_SSE2 0x00010000 /* SSE2 extensions (XMMI64) */
1719 #define CPU_FEATURE_DS 0x00020000 /* Debug Store */
1720 #define CPU_FEATURE_HTT 0x00040000 /* Hyper Threading Technology */
1721 #define CPU_FEATURE_SSE3 0x00080000 /* SSE3 extensions */
1722 #define CPU_FEATURE_CX128 0x00100000 /* cmpxchg16b instruction */
1723 #define CPU_FEATURE_XSAVE 0x00800000 /* XSAVE instructions */
1724 #define CPU_FEATURE_2NDLEV 0x04000000 /* Second-level address translation */
1725 #define CPU_FEATURE_VIRT 0x08000000 /* Virtualization support */
1726 #define CPU_FEATURE_RDFS 0x10000000 /* RDFSBASE etc. instructions */
1727 #define CPU_FEATURE_NX 0x20000000 /* Data execution prevention */
1729 /* FIXME: following values are made up, actual flags are unknown */
1730 #define CPU_FEATURE_SSSE3 0x00008000 /* SSSE3 instructions */
1731 #define CPU_FEATURE_SSE41 0x01000000 /* SSE41 instructions */
1732 #define CPU_FEATURE_SSE42 0x02000000 /* SSE42 instructions */
1733 #define CPU_FEATURE_AVX 0x40000000 /* AVX instructions */
1734 #define CPU_FEATURE_AVX2 0x80000000 /* AVX2 instructions */
1736 #define CPU_FEATURE_PAE 0x00200000
1737 #define CPU_FEATURE_DAZ 0x00400000
1738 #define CPU_FEATURE_ARM_VFP_32 0x00000001
1739 #define CPU_FEATURE_ARM_NEON 0x00000002
1740 #define CPU_FEATURE_ARM_V8_CRC32 0x00000004
1741 #define CPU_FEATURE_ARM_V8_CRYPTO 0x00000008
1743 /* System Information Class 0x02 */
1745 /* Documented in "Windows NT/2000 Native API Reference" by Gary Nebbett. */
1746 typedef struct _SYSTEM_PERFORMANCE_INFORMATION {
1747 LARGE_INTEGER IdleTime;
1748 LARGE_INTEGER ReadTransferCount;
1749 LARGE_INTEGER WriteTransferCount;
1750 LARGE_INTEGER OtherTransferCount;
1751 ULONG ReadOperationCount;
1752 ULONG WriteOperationCount;
1753 ULONG OtherOperationCount;
1754 ULONG AvailablePages;
1755 ULONG TotalCommittedPages;
1756 ULONG TotalCommitLimit;
1757 ULONG PeakCommitment;
1758 ULONG PageFaults;
1759 ULONG WriteCopyFaults;
1760 ULONG TransitionFaults;
1761 ULONG Reserved1;
1762 ULONG DemandZeroFaults;
1763 ULONG PagesRead;
1764 ULONG PageReadIos;
1765 ULONG Reserved2[2];
1766 ULONG PagefilePagesWritten;
1767 ULONG PagefilePageWriteIos;
1768 ULONG MappedFilePagesWritten;
1769 ULONG MappedFilePageWriteIos;
1770 ULONG PagedPoolUsage;
1771 ULONG NonPagedPoolUsage;
1772 ULONG PagedPoolAllocs;
1773 ULONG PagedPoolFrees;
1774 ULONG NonPagedPoolAllocs;
1775 ULONG NonPagedPoolFrees;
1776 ULONG TotalFreeSystemPtes;
1777 ULONG SystemCodePage;
1778 ULONG TotalSystemDriverPages;
1779 ULONG TotalSystemCodePages;
1780 ULONG SmallNonPagedLookasideListAllocateHits;
1781 ULONG SmallPagedLookasideListAllocateHits;
1782 ULONG Reserved3;
1783 ULONG MmSystemCachePage;
1784 ULONG PagedPoolPage;
1785 ULONG SystemDriverPage;
1786 ULONG FastReadNoWait;
1787 ULONG FastReadWait;
1788 ULONG FastReadResourceMiss;
1789 ULONG FastReadNotPossible;
1790 ULONG FastMdlReadNoWait;
1791 ULONG FastMdlReadWait;
1792 ULONG FastMdlReadResourceMiss;
1793 ULONG FastMdlReadNotPossible;
1794 ULONG MapDataNoWait;
1795 ULONG MapDataWait;
1796 ULONG MapDataNoWaitMiss;
1797 ULONG MapDataWaitMiss;
1798 ULONG PinMappedDataCount;
1799 ULONG PinReadNoWait;
1800 ULONG PinReadWait;
1801 ULONG PinReadNoWaitMiss;
1802 ULONG PinReadWaitMiss;
1803 ULONG CopyReadNoWait;
1804 ULONG CopyReadWait;
1805 ULONG CopyReadNoWaitMiss;
1806 ULONG CopyReadWaitMiss;
1807 ULONG MdlReadNoWait;
1808 ULONG MdlReadWait;
1809 ULONG MdlReadNoWaitMiss;
1810 ULONG MdlReadWaitMiss;
1811 ULONG ReadAheadIos;
1812 ULONG LazyWriteIos;
1813 ULONG LazyWritePages;
1814 ULONG DataFlushes;
1815 ULONG DataPages;
1816 ULONG ContextSwitches;
1817 ULONG FirstLevelTbFills;
1818 ULONG SecondLevelTbFills;
1819 ULONG SystemCalls;
1820 } SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION;
1822 /* System Information Class 0x03 */
1824 typedef struct _SYSTEM_TIMEOFDAY_INFORMATION {
1825 #ifdef __WINESRC__
1826 LARGE_INTEGER BootTime;
1827 LARGE_INTEGER SystemTime;
1828 LARGE_INTEGER TimeZoneBias;
1829 ULONG TimeZoneId;
1830 ULONG Reserved;
1831 ULONGLONG BootTimeBias;
1832 ULONGLONG SleepTimeBias;
1833 #else
1834 BYTE Reserved1[48];
1835 #endif
1836 } SYSTEM_TIMEOFDAY_INFORMATION, *PSYSTEM_TIMEOFDAY_INFORMATION; /* was SYSTEM_TIME_INFORMATION */
1838 /* System Information Class 0x08 */
1840 typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION {
1841 LARGE_INTEGER IdleTime;
1842 LARGE_INTEGER KernelTime;
1843 LARGE_INTEGER UserTime;
1844 LARGE_INTEGER Reserved1[2];
1845 ULONG Reserved2;
1846 } SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION, *PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION;
1848 /* System Information Class 0x0b */
1850 typedef struct _SYSTEM_DRIVER_INFORMATION {
1851 PVOID pvAddress;
1852 DWORD dwUnknown1;
1853 DWORD dwUnknown2;
1854 DWORD dwEntryIndex;
1855 DWORD dwUnknown3;
1856 char szName[MAX_PATH + 1];
1857 } SYSTEM_DRIVER_INFORMATION, *PSYSTEM_DRIVER_INFORMATION;
1859 /* System Information Class 0x10 */
1861 typedef struct _SYSTEM_HANDLE_ENTRY {
1862 ULONG OwnerPid;
1863 BYTE ObjectType;
1864 BYTE HandleFlags;
1865 USHORT HandleValue;
1866 PVOID ObjectPointer;
1867 ULONG AccessMask;
1868 } SYSTEM_HANDLE_ENTRY, *PSYSTEM_HANDLE_ENTRY;
1870 typedef struct _SYSTEM_HANDLE_INFORMATION {
1871 ULONG Count;
1872 SYSTEM_HANDLE_ENTRY Handle[1];
1873 } SYSTEM_HANDLE_INFORMATION, *PSYSTEM_HANDLE_INFORMATION;
1875 /* System Information Class 0x15 */
1877 typedef struct _SYSTEM_CACHE_INFORMATION {
1878 ULONG CurrentSize;
1879 ULONG PeakSize;
1880 ULONG PageFaultCount;
1881 ULONG MinimumWorkingSet;
1882 ULONG MaximumWorkingSet;
1883 ULONG unused[4];
1884 #ifdef _WIN64
1885 ULONG unknown64[7];
1886 #endif
1887 } SYSTEM_CACHE_INFORMATION, *PSYSTEM_CACHE_INFORMATION;
1889 /* System Information Class 0x17 */
1891 typedef struct _SYSTEM_INTERRUPT_INFORMATION {
1892 BYTE Reserved1[24];
1893 } SYSTEM_INTERRUPT_INFORMATION, *PSYSTEM_INTERRUPT_INFORMATION;
1895 typedef struct _SYSTEM_CONFIGURATION_INFO {
1896 union {
1897 ULONG OemId;
1898 struct {
1899 WORD ProcessorArchitecture;
1900 WORD Reserved;
1901 } tag1;
1902 } tag2;
1903 ULONG PageSize;
1904 PVOID MinimumApplicationAddress;
1905 PVOID MaximumApplicationAddress;
1906 ULONG ActiveProcessorMask;
1907 ULONG NumberOfProcessors;
1908 ULONG ProcessorType;
1909 ULONG AllocationGranularity;
1910 WORD ProcessorLevel;
1911 WORD ProcessorRevision;
1912 } SYSTEM_CONFIGURATION_INFO, *PSYSTEM_CONFIGURATION_INFO;
1914 typedef struct _SYSTEM_EXCEPTION_INFORMATION {
1915 BYTE Reserved1[16];
1916 } SYSTEM_EXCEPTION_INFORMATION, *PSYSTEM_EXCEPTION_INFORMATION;
1918 typedef struct _SYSTEM_LOOKASIDE_INFORMATION {
1919 BYTE Reserved1[32];
1920 } SYSTEM_LOOKASIDE_INFORMATION, *PSYSTEM_LOOKASIDE_INFORMATION;
1922 typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION {
1923 BOOLEAN DebuggerEnabled;
1924 BOOLEAN DebuggerNotPresent;
1925 } SYSTEM_KERNEL_DEBUGGER_INFORMATION, *PSYSTEM_KERNEL_DEBUGGER_INFORMATION;
1927 typedef struct _VM_COUNTERS
1929 SIZE_T PeakVirtualSize;
1930 SIZE_T VirtualSize;
1931 ULONG PageFaultCount;
1932 SIZE_T PeakWorkingSetSize;
1933 SIZE_T WorkingSetSize;
1934 SIZE_T QuotaPeakPagedPoolUsage;
1935 SIZE_T QuotaPagedPoolUsage;
1936 SIZE_T QuotaPeakNonPagedPoolUsage;
1937 SIZE_T QuotaNonPagedPoolUsage;
1938 SIZE_T PagefileUsage;
1939 SIZE_T PeakPagefileUsage;
1940 } VM_COUNTERS, *PVM_COUNTERS;
1942 typedef struct _VM_COUNTERS_EX
1944 SIZE_T PeakVirtualSize;
1945 SIZE_T VirtualSize;
1946 ULONG PageFaultCount;
1947 SIZE_T PeakWorkingSetSize;
1948 SIZE_T WorkingSetSize;
1949 SIZE_T QuotaPeakPagedPoolUsage;
1950 SIZE_T QuotaPagedPoolUsage;
1951 SIZE_T QuotaPeakNonPagedPoolUsage;
1952 SIZE_T QuotaNonPagedPoolUsage;
1953 SIZE_T PagefileUsage;
1954 SIZE_T PeakPagefileUsage;
1955 SIZE_T PrivateUsage;
1956 } VM_COUNTERS_EX, *PVM_COUNTERS_EX;
1958 typedef struct _SYSTEM_PROCESS_INFORMATION {
1959 #ifdef __WINESRC__ /* win32/win64 */
1960 ULONG NextEntryOffset; /* 00/00 */
1961 DWORD dwThreadCount; /* 04/04 */
1962 DWORD dwUnknown1[6]; /* 08/08 */
1963 LARGE_INTEGER CreationTime; /* 20/20 */
1964 LARGE_INTEGER UserTime; /* 28/28 */
1965 LARGE_INTEGER KernelTime; /* 30/30 */
1966 UNICODE_STRING ProcessName; /* 38/38 */
1967 DWORD dwBasePriority; /* 40/48 */
1968 HANDLE UniqueProcessId; /* 44/50 */
1969 HANDLE ParentProcessId; /* 48/58 */
1970 ULONG HandleCount; /* 4c/60 */
1971 ULONG SessionId; /* 50/64 */
1972 DWORD dwUnknown4; /* 54/68 */
1973 VM_COUNTERS_EX vmCounters; /* 58/70 */
1974 IO_COUNTERS ioCounters; /* 88/d0 */
1975 SYSTEM_THREAD_INFORMATION ti[1]; /* b8/100 */
1976 #else
1977 ULONG NextEntryOffset; /* 00/00 */
1978 BYTE Reserved1[52]; /* 04/04 */
1979 PVOID Reserved2[3]; /* 38/38 */
1980 HANDLE UniqueProcessId; /* 44/50 */
1981 PVOID Reserved3; /* 48/58 */
1982 ULONG HandleCount; /* 4c/60 */
1983 BYTE Reserved4[4]; /* 50/64 */
1984 PVOID Reserved5[11]; /* 54/68 */
1985 SIZE_T PeakPagefileUsage; /* 80/c0 */
1986 SIZE_T PrivatePageCount; /* 84/c8 */
1987 LARGE_INTEGER Reserved6[6]; /* 88/d0 */
1988 #endif
1989 } SYSTEM_PROCESS_INFORMATION, *PSYSTEM_PROCESS_INFORMATION;
1991 typedef struct _SYSTEM_REGISTRY_QUOTA_INFORMATION {
1992 ULONG RegistryQuotaAllowed;
1993 ULONG RegistryQuotaUsed;
1994 PVOID Reserved1;
1995 } SYSTEM_REGISTRY_QUOTA_INFORMATION, *PSYSTEM_REGISTRY_QUOTA_INFORMATION;
1997 typedef struct _SYSTEM_TIME_ADJUSTMENT_QUERY {
1998 ULONG TimeAdjustment;
1999 ULONG TimeIncrement;
2000 BOOLEAN TimeAdjustmentDisabled;
2001 } SYSTEM_TIME_ADJUSTMENT_QUERY, *PSYSTEM_TIME_ADJUSTMENT_QUERY;
2003 typedef struct _SYSTEM_TIME_ADJUSTMENT {
2004 ULONG TimeAdjustment;
2005 BOOLEAN TimeAdjustmentDisabled;
2006 } SYSTEM_TIME_ADJUSTMENT, *PSYSTEM_TIME_ADJUSTMENT;
2008 typedef enum _SYSTEM_FIRMWARE_TABLE_ACTION
2010 SystemFirmwareTable_Enumerate = 0,
2011 SystemFirmwareTable_Get = 1
2012 } SYSTEM_FIRMWARE_TABLE_ACTION, *PSYSTEM_FIRMWARE_TABLE_ACTION;
2014 /* System Information Class 0x4C */
2016 typedef struct _SYSTEM_FIRMWARE_TABLE_INFORMATION
2018 ULONG ProviderSignature;
2019 SYSTEM_FIRMWARE_TABLE_ACTION Action;
2020 ULONG TableID;
2021 ULONG TableBufferLength;
2022 UCHAR TableBuffer[1];
2023 } SYSTEM_FIRMWARE_TABLE_INFORMATION, *PSYSTEM_FIRMWARE_TABLE_INFORMATION;
2025 typedef struct _TIME_FIELDS
2026 { CSHORT Year;
2027 CSHORT Month;
2028 CSHORT Day;
2029 CSHORT Hour;
2030 CSHORT Minute;
2031 CSHORT Second;
2032 CSHORT Milliseconds;
2033 CSHORT Weekday;
2034 } TIME_FIELDS, *PTIME_FIELDS;
2036 typedef struct _WINSTATIONINFORMATIONW {
2037 BYTE Reserved2[70];
2038 ULONG LogonId;
2039 BYTE Reserved3[1140];
2040 } WINSTATIONINFORMATIONW, *PWINSTATIONINFORMATIONW;
2042 typedef BOOLEAN (WINAPI * PWINSTATIONQUERYINFORMATIONW)(HANDLE,ULONG,WINSTATIONINFOCLASS,PVOID,ULONG,PULONG);
2044 typedef struct _LDR_RESOURCE_INFO
2046 ULONG_PTR Type;
2047 ULONG_PTR Name;
2048 ULONG Language;
2049 } LDR_RESOURCE_INFO, *PLDR_RESOURCE_INFO;
2052 /* debug buffer definitions */
2054 typedef struct _DEBUG_BUFFER {
2055 HANDLE SectionHandle;
2056 PVOID SectionBase;
2057 PVOID RemoteSectionBase;
2058 ULONG SectionBaseDelta;
2059 HANDLE EventPairHandle;
2060 ULONG Unknown[2];
2061 HANDLE RemoteThreadHandle;
2062 ULONG InfoClassMask;
2063 ULONG SizeOfInfo;
2064 ULONG AllocatedSize;
2065 ULONG SectionSize;
2066 PVOID ModuleInformation;
2067 PVOID BackTraceInformation;
2068 PVOID HeapInformation;
2069 PVOID LockInformation;
2070 PVOID Reserved[8];
2071 } DEBUG_BUFFER, *PDEBUG_BUFFER;
2073 #define PDI_MODULES 0x01
2074 #define PDI_BACKTRACE 0x02
2075 #define PDI_HEAPS 0x04
2076 #define PDI_HEAP_TAGS 0x08
2077 #define PDI_HEAP_BLOCKS 0x10
2078 #define PDI_LOCKS 0x20
2080 typedef struct _DEBUG_MODULE_INFORMATION {
2081 ULONG Reserved[2];
2082 ULONG Base;
2083 ULONG Size;
2084 ULONG Flags;
2085 USHORT Index;
2086 USHORT Unknown;
2087 USHORT LoadCount;
2088 USHORT ModuleNameOffset;
2089 CHAR ImageName[256];
2090 } DEBUG_MODULE_INFORMATION, *PDEBUG_MODULE_INFORMATION;
2092 typedef struct _DEBUG_HEAP_INFORMATION {
2093 ULONG Base;
2094 ULONG Flags;
2095 USHORT Granularity;
2096 USHORT Unknown;
2097 ULONG Allocated;
2098 ULONG Committed;
2099 ULONG TagCount;
2100 ULONG BlockCount;
2101 ULONG Reserved[7];
2102 PVOID Tags;
2103 PVOID Blocks;
2104 } DEBUG_HEAP_INFORMATION, *PDEBUG_HEAP_INFORMATION;
2106 typedef struct _DEBUG_LOCK_INFORMATION {
2107 PVOID Address;
2108 USHORT Type;
2109 USHORT CreatorBackTraceIndex;
2110 ULONG OwnerThreadId;
2111 ULONG ActiveCount;
2112 ULONG ContentionCount;
2113 ULONG EntryCount;
2114 ULONG RecursionCount;
2115 ULONG NumberOfSharedWaiters;
2116 ULONG NumberOfExclusiveWaiters;
2117 } DEBUG_LOCK_INFORMATION, *PDEBUG_LOCK_INFORMATION;
2119 typedef struct _PORT_MESSAGE_HEADER {
2120 USHORT DataSize;
2121 USHORT MessageSize;
2122 USHORT MessageType;
2123 USHORT VirtualRangesOffset;
2124 CLIENT_ID ClientId;
2125 ULONG MessageId;
2126 ULONG SectionSize;
2127 } PORT_MESSAGE_HEADER, *PPORT_MESSAGE_HEADER, PORT_MESSAGE, *PPORT_MESSAGE;
2129 typedef unsigned short RTL_ATOM, *PRTL_ATOM;
2131 /* Wine doesn't implement atom table as NT does:
2132 * - in NT, atom tables are user space tables, which ntdll directly accesses
2133 * - on Wine, (even local) atom tables are wineserver objects, hence a HANDLE
2135 typedef struct atom_table *RTL_ATOM_TABLE, **PRTL_ATOM_TABLE;
2137 typedef enum _ATOM_INFORMATION_CLASS {
2138 AtomBasicInformation = 0,
2139 AtomTableInformation = 1,
2140 } ATOM_INFORMATION_CLASS;
2142 typedef struct _ATOM_BASIC_INFORMATION {
2143 USHORT ReferenceCount;
2144 USHORT Pinned;
2145 USHORT NameLength;
2146 WCHAR Name[1];
2147 } ATOM_BASIC_INFORMATION, *PATOM_BASIC_INFORMATION;
2149 /* FIXME: names probably not correct */
2150 typedef struct _RTL_HANDLE
2152 struct _RTL_HANDLE * Next;
2153 } RTL_HANDLE;
2155 /* FIXME: names probably not correct */
2156 typedef struct _RTL_HANDLE_TABLE
2158 ULONG MaxHandleCount; /* 0x00 */
2159 ULONG HandleSize; /* 0x04 */
2160 ULONG Unused[2]; /* 0x08-0x0c */
2161 PVOID NextFree; /* 0x10 */
2162 PVOID FirstHandle; /* 0x14 */
2163 PVOID ReservedMemory; /* 0x18 */
2164 PVOID MaxHandle; /* 0x1c */
2165 } RTL_HANDLE_TABLE;
2167 /***********************************************************************
2168 * Defines
2171 /* flags for NtCreateFile and NtOpenFile */
2172 #define FILE_DIRECTORY_FILE 0x00000001
2173 #define FILE_WRITE_THROUGH 0x00000002
2174 #define FILE_SEQUENTIAL_ONLY 0x00000004
2175 #define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008
2176 #define FILE_SYNCHRONOUS_IO_ALERT 0x00000010
2177 #define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020
2178 #define FILE_NON_DIRECTORY_FILE 0x00000040
2179 #define FILE_CREATE_TREE_CONNECTION 0x00000080
2180 #define FILE_COMPLETE_IF_OPLOCKED 0x00000100
2181 #define FILE_NO_EA_KNOWLEDGE 0x00000200
2182 #define FILE_OPEN_FOR_RECOVERY 0x00000400
2183 #define FILE_RANDOM_ACCESS 0x00000800
2184 #define FILE_DELETE_ON_CLOSE 0x00001000
2185 #define FILE_OPEN_BY_FILE_ID 0x00002000
2186 #define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000
2187 #define FILE_NO_COMPRESSION 0x00008000
2188 #define FILE_RESERVE_OPFILTER 0x00100000
2189 #define FILE_OPEN_REPARSE_POINT 0x00200000
2190 #define FILE_OPEN_OFFLINE_FILE 0x00400000
2191 #define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000
2193 #define FILE_ATTRIBUTE_VALID_FLAGS 0x00007fb7
2194 #define FILE_ATTRIBUTE_VALID_SET_FLAGS 0x000031a7
2196 /* status for NtCreateFile or NtOpenFile */
2197 #define FILE_SUPERSEDED 0
2198 #define FILE_OPENED 1
2199 #define FILE_CREATED 2
2200 #define FILE_OVERWRITTEN 3
2201 #define FILE_EXISTS 4
2202 #define FILE_DOES_NOT_EXIST 5
2204 /* disposition for NtCreateFile */
2205 #define FILE_SUPERSEDE 0
2206 #define FILE_OPEN 1
2207 #define FILE_CREATE 2
2208 #define FILE_OPEN_IF 3
2209 #define FILE_OVERWRITE 4
2210 #define FILE_OVERWRITE_IF 5
2211 #define FILE_MAXIMUM_DISPOSITION 5
2213 /* Characteristics of a File System */
2214 #define FILE_REMOVABLE_MEDIA 0x00000001
2215 #define FILE_READ_ONLY_DEVICE 0x00000002
2216 #define FILE_FLOPPY_DISKETTE 0x00000004
2217 #define FILE_WRITE_ONE_MEDIA 0x00000008
2218 #define FILE_REMOTE_DEVICE 0x00000010
2219 #define FILE_DEVICE_IS_MOUNTED 0x00000020
2220 #define FILE_VIRTUAL_VOLUME 0x00000040
2221 #define FILE_AUTOGENERATED_DEVICE_NAME 0x00000080
2222 #define FILE_DEVICE_SECURE_OPEN 0x00000100
2223 #define FILE_CHARACTERISTIC_PNP_DEVICE 0x00000800
2224 #define FILE_CHARACTERISTIC_TS_DEVICE 0x00001000
2225 #define FILE_CHARACTERISTIC_WEBDAV_DEVICE 0x00002000
2226 #define FILE_CHARACTERISTIC_CSV 0x00010000
2227 #define FILE_DEVICE_ALLOW_APPCONTAINER_TRAVERSAL 0x00020000
2228 #define FILE_PORTABLE_DEVICE 0x00040000
2230 /* options for NtCreateNamedPipeFile */
2231 #define FILE_PIPE_INBOUND 0x00000000
2232 #define FILE_PIPE_OUTBOUND 0x00000001
2233 #define FILE_PIPE_FULL_DUPLEX 0x00000002
2235 /* options for pipe's type */
2236 #define FILE_PIPE_TYPE_MESSAGE 0x00000001
2237 #define FILE_PIPE_TYPE_BYTE 0x00000000
2238 /* options for pipe's message mode */
2239 #define FILE_PIPE_MESSAGE_MODE 0x00000001
2240 #define FILE_PIPE_BYTE_STREAM_MODE 0x00000000
2241 /* options for pipe's blocking mode */
2242 #define FILE_PIPE_COMPLETE_OPERATION 0x00000001
2243 #define FILE_PIPE_QUEUE_OPERATION 0x00000000
2244 /* and client / server end */
2245 #define FILE_PIPE_SERVER_END 0x00000001
2246 #define FILE_PIPE_CLIENT_END 0x00000000
2248 #define INTERNAL_TS_ACTIVE_CONSOLE_ID ( *((volatile ULONG*)(0x7ffe02d8)) )
2250 #define LOGONID_CURRENT ((ULONG)-1)
2252 #define OBJ_INHERIT 0x00000002
2253 #define OBJ_PERMANENT 0x00000010
2254 #define OBJ_EXCLUSIVE 0x00000020
2255 #define OBJ_CASE_INSENSITIVE 0x00000040
2256 #define OBJ_OPENIF 0x00000080
2257 #define OBJ_OPENLINK 0x00000100
2258 #define OBJ_KERNEL_HANDLE 0x00000200
2259 #define OBJ_VALID_ATTRIBUTES 0x000003F2
2261 #define SERVERNAME_CURRENT ((HANDLE)NULL)
2263 typedef void (CALLBACK *PNTAPCFUNC)(ULONG_PTR,ULONG_PTR,ULONG_PTR); /* FIXME: not the right name */
2264 typedef void (CALLBACK *PRTL_THREAD_START_ROUTINE)(LPVOID); /* FIXME: not the right name */
2265 typedef DWORD (CALLBACK *PRTL_WORK_ITEM_ROUTINE)(LPVOID); /* FIXME: not the right name */
2266 typedef void (NTAPI *RTL_WAITORTIMERCALLBACKFUNC)(PVOID,BOOLEAN); /* FIXME: not the right name */
2269 /* DbgPrintEx default levels */
2270 #define DPFLTR_ERROR_LEVEL 0
2271 #define DPFLTR_WARNING_LEVEL 1
2272 #define DPFLTR_TRACE_LEVEL 2
2273 #define DPFLTR_INFO_LEVEL 3
2274 #define DPFLTR_MASK 0x8000000
2276 /* Well-known LUID values */
2277 #define SE_MIN_WELL_KNOWN_PRIVILEGE 2
2278 #define SE_CREATE_TOKEN_PRIVILEGE 2
2279 #define SE_ASSIGNPRIMARYTOKEN_PRIVILEGE 3
2280 #define SE_LOCK_MEMORY_PRIVILEGE 4
2281 #define SE_INCREASE_QUOTA_PRIVILEGE 5
2282 #define SE_UNSOLICITED_INPUT_PRIVILEGE 6 /* obsolete */
2283 #define SE_MACHINE_ACCOUNT_PRIVILEGE 6
2284 #define SE_TCB_PRIVILEGE 7
2285 #define SE_SECURITY_PRIVILEGE 8
2286 #define SE_TAKE_OWNERSHIP_PRIVILEGE 9
2287 #define SE_LOAD_DRIVER_PRIVILEGE 10
2288 #define SE_SYSTEM_PROFILE_PRIVILEGE 11
2289 #define SE_SYSTEMTIME_PRIVILEGE 12
2290 #define SE_PROF_SINGLE_PROCESS_PRIVILEGE 13
2291 #define SE_INC_BASE_PRIORITY_PRIVILEGE 14
2292 #define SE_CREATE_PAGEFILE_PRIVILEGE 15
2293 #define SE_CREATE_PERMANENT_PRIVILEGE 16
2294 #define SE_BACKUP_PRIVILEGE 17
2295 #define SE_RESTORE_PRIVILEGE 18
2296 #define SE_SHUTDOWN_PRIVILEGE 19
2297 #define SE_DEBUG_PRIVILEGE 20
2298 #define SE_AUDIT_PRIVILEGE 21
2299 #define SE_SYSTEM_ENVIRONMENT_PRIVILEGE 22
2300 #define SE_CHANGE_NOTIFY_PRIVILEGE 23
2301 #define SE_REMOTE_SHUTDOWN_PRIVILEGE 24
2302 #define SE_UNDOCK_PRIVILEGE 25
2303 #define SE_SYNC_AGENT_PRIVILEGE 26
2304 #define SE_ENABLE_DELEGATION_PRIVILEGE 27
2305 #define SE_MANAGE_VOLUME_PRIVILEGE 28
2306 #define SE_IMPERSONATE_PRIVILEGE 29
2307 #define SE_CREATE_GLOBAL_PRIVILEGE 30
2308 #define SE_MAX_WELL_KNOWN_PRIVILEGE SE_CREATE_GLOBAL_PRIVILEGE
2310 /* NtGlobalFlag bits */
2311 #define FLG_STOP_ON_EXCEPTION 0x00000001
2312 #define FLG_SHOW_LDR_SNAPS 0x00000002
2313 #define FLG_DEBUG_INITIAL_COMMAND 0x00000004
2314 #define FLG_STOP_ON_HUNG_GUI 0x00000008
2315 #define FLG_HEAP_ENABLE_TAIL_CHECK 0x00000010
2316 #define FLG_HEAP_ENABLE_FREE_CHECK 0x00000020
2317 #define FLG_HEAP_VALIDATE_PARAMETERS 0x00000040
2318 #define FLG_HEAP_VALIDATE_ALL 0x00000080
2319 #define FLG_APPLICATION_VERIFIER 0x00000100
2320 #define FLG_POOL_ENABLE_TAGGING 0x00000400
2321 #define FLG_HEAP_ENABLE_TAGGING 0x00000800
2322 #define FLG_USER_STACK_TRACE_DB 0x00001000
2323 #define FLG_KERNEL_STACK_TRACE_DB 0x00002000
2324 #define FLG_MAINTAIN_OBJECT_TYPELIST 0x00004000
2325 #define FLG_HEAP_ENABLE_TAG_BY_DLL 0x00008000
2326 #define FLG_DISABLE_STACK_EXTENSION 0x00010000
2327 #define FLG_ENABLE_CSRDEBUG 0x00020000
2328 #define FLG_ENABLE_KDEBUG_SYMBOL_LOAD 0x00040000
2329 #define FLG_DISABLE_PAGE_KERNEL_STACKS 0x00080000
2330 #define FLG_ENABLE_SYSTEM_CRIT_BREAKS 0x00100000
2331 #define FLG_HEAP_DISABLE_COALESCING 0x00200000
2332 #define FLG_ENABLE_CLOSE_EXCEPTIONS 0x00400000
2333 #define FLG_ENABLE_EXCEPTION_LOGGING 0x00800000
2334 #define FLG_ENABLE_HANDLE_TYPE_TAGGING 0x01000000
2335 #define FLG_HEAP_PAGE_ALLOCS 0x02000000
2336 #define FLG_DEBUG_INITIAL_COMMAND_EX 0x04000000
2337 #define FLG_DISABLE_DBGPRINT 0x08000000
2338 #define FLG_CRITSEC_EVENT_CREATION 0x10000000
2339 #define FLG_LDR_TOP_DOWN 0x20000000
2340 #define FLG_ENABLE_HANDLE_EXCEPTIONS 0x40000000
2341 #define FLG_DISABLE_PROTDLLS 0x80000000
2343 /* Rtl*Registry* functions structs and defines */
2344 #define RTL_REGISTRY_ABSOLUTE 0
2345 #define RTL_REGISTRY_SERVICES 1
2346 #define RTL_REGISTRY_CONTROL 2
2347 #define RTL_REGISTRY_WINDOWS_NT 3
2348 #define RTL_REGISTRY_DEVICEMAP 4
2349 #define RTL_REGISTRY_USER 5
2351 #define RTL_REGISTRY_HANDLE 0x40000000
2352 #define RTL_REGISTRY_OPTIONAL 0x80000000
2354 #define RTL_QUERY_REGISTRY_SUBKEY 0x00000001
2355 #define RTL_QUERY_REGISTRY_TOPKEY 0x00000002
2356 #define RTL_QUERY_REGISTRY_REQUIRED 0x00000004
2357 #define RTL_QUERY_REGISTRY_NOVALUE 0x00000008
2358 #define RTL_QUERY_REGISTRY_NOEXPAND 0x00000010
2359 #define RTL_QUERY_REGISTRY_DIRECT 0x00000020
2360 #define RTL_QUERY_REGISTRY_DELETE 0x00000040
2361 #define RTL_QUERY_REGISTRY_TYPECHECK 0x00000100
2363 #define RTL_QUERY_REGISTRY_TYPECHECK_SHIFT 24
2365 typedef NTSTATUS (WINAPI *PRTL_QUERY_REGISTRY_ROUTINE)( PCWSTR ValueName,
2366 ULONG ValueType,
2367 PVOID ValueData,
2368 ULONG ValueLength,
2369 PVOID Context,
2370 PVOID EntryContext);
2372 typedef struct _RTL_QUERY_REGISTRY_TABLE
2374 PRTL_QUERY_REGISTRY_ROUTINE QueryRoutine;
2375 ULONG Flags;
2376 PWSTR Name;
2377 PVOID EntryContext;
2378 ULONG DefaultType;
2379 PVOID DefaultData;
2380 ULONG DefaultLength;
2381 } RTL_QUERY_REGISTRY_TABLE, *PRTL_QUERY_REGISTRY_TABLE;
2383 typedef struct _KEY_MULTIPLE_VALUE_INFORMATION
2385 PUNICODE_STRING ValueName;
2386 ULONG DataLength;
2387 ULONG DataOffset;
2388 ULONG Type;
2389 } KEY_MULTIPLE_VALUE_INFORMATION, *PKEY_MULTIPLE_VALUE_INFORMATION;
2391 typedef VOID (CALLBACK *PRTL_OVERLAPPED_COMPLETION_ROUTINE)(DWORD,DWORD,LPVOID);
2393 typedef VOID (CALLBACK *PTIMER_APC_ROUTINE) ( PVOID, ULONG, LONG );
2395 typedef enum _EVENT_INFORMATION_CLASS {
2396 EventBasicInformation
2397 } EVENT_INFORMATION_CLASS, *PEVENT_INFORMATION_CLASS;
2399 typedef struct _EVENT_BASIC_INFORMATION {
2400 EVENT_TYPE EventType;
2401 LONG EventState;
2402 } EVENT_BASIC_INFORMATION, *PEVENT_BASIC_INFORMATION;
2404 typedef enum _SEMAPHORE_INFORMATION_CLASS {
2405 SemaphoreBasicInformation
2406 } SEMAPHORE_INFORMATION_CLASS, *PSEMAPHORE_INFORMATION_CLASS;
2408 typedef struct _SEMAPHORE_BASIC_INFORMATION {
2409 ULONG CurrentCount;
2410 ULONG MaximumCount;
2411 } SEMAPHORE_BASIC_INFORMATION, *PSEMAPHORE_BASIC_INFORMATION;
2413 typedef enum _SECTION_INFORMATION_CLASS
2415 SectionBasicInformation,
2416 SectionImageInformation,
2417 SectionRelocationInformation,
2418 SectionOriginalBaseInformation,
2419 SectionInternalImageInformation
2420 } SECTION_INFORMATION_CLASS;
2422 typedef struct _SECTION_BASIC_INFORMATION {
2423 PVOID BaseAddress;
2424 ULONG Attributes;
2425 LARGE_INTEGER Size;
2426 } SECTION_BASIC_INFORMATION, *PSECTION_BASIC_INFORMATION;
2428 typedef struct _SECTION_IMAGE_INFORMATION {
2429 PVOID TransferAddress;
2430 ULONG ZeroBits;
2431 SIZE_T MaximumStackSize;
2432 SIZE_T CommittedStackSize;
2433 ULONG SubSystemType;
2434 USHORT MinorSubsystemVersion;
2435 USHORT MajorSubsystemVersion;
2436 USHORT MajorOperatingSystemVersion;
2437 USHORT MinorOperatingSystemVersion;
2438 USHORT ImageCharacteristics;
2439 USHORT DllCharacteristics;
2440 USHORT Machine;
2441 BOOLEAN ImageContainsCode;
2442 union
2444 UCHAR ImageFlags;
2445 struct
2447 UCHAR ComPlusNativeReady : 1;
2448 UCHAR ComPlusILOnly : 1;
2449 UCHAR ImageDynamicallyRelocated : 1;
2450 UCHAR ImageMappedFlat : 1;
2451 UCHAR BaseBelow4gb : 1;
2452 UCHAR ComPlusPrefer32bit : 1;
2453 UCHAR Reserved : 2;
2454 } DUMMYSTRUCTNAME;
2455 } DUMMYUNIONNAME;
2456 ULONG LoaderFlags;
2457 ULONG ImageFileSize;
2458 ULONG CheckSum;
2459 } SECTION_IMAGE_INFORMATION, *PSECTION_IMAGE_INFORMATION;
2461 typedef struct _LPC_SECTION_WRITE {
2462 ULONG Length;
2463 HANDLE SectionHandle;
2464 ULONG SectionOffset;
2465 ULONG ViewSize;
2466 PVOID ViewBase;
2467 PVOID TargetViewBase;
2468 } LPC_SECTION_WRITE, *PLPC_SECTION_WRITE;
2470 typedef struct _LPC_SECTION_READ {
2471 ULONG Length;
2472 ULONG ViewSize;
2473 PVOID ViewBase;
2474 } LPC_SECTION_READ, *PLPC_SECTION_READ;
2476 typedef struct _LPC_MESSAGE {
2477 USHORT DataSize;
2478 USHORT MessageSize;
2479 USHORT MessageType;
2480 USHORT VirtualRangesOffset;
2481 CLIENT_ID ClientId;
2482 ULONG_PTR MessageId;
2483 ULONG_PTR SectionSize;
2484 UCHAR Data[ANYSIZE_ARRAY];
2485 } LPC_MESSAGE, *PLPC_MESSAGE;
2487 typedef struct _RTL_USER_PROCESS_INFORMATION
2489 ULONG Length;
2490 HANDLE Process;
2491 HANDLE Thread;
2492 CLIENT_ID ClientId;
2493 SECTION_IMAGE_INFORMATION ImageInformation;
2494 } RTL_USER_PROCESS_INFORMATION, *PRTL_USER_PROCESS_INFORMATION;
2496 typedef enum _SHUTDOWN_ACTION {
2497 ShutdownNoReboot,
2498 ShutdownReboot,
2499 ShutdownPowerOff
2500 } SHUTDOWN_ACTION, *PSHUTDOWN_ACTION;
2502 typedef struct _COUNTED_REASON_CONTEXT
2504 ULONG Version;
2505 ULONG Flags;
2506 union
2508 struct
2510 UNICODE_STRING ResourceFileName;
2511 USHORT ResourceReasonId;
2512 ULONG StringCount;
2513 UNICODE_STRING *ReasonStrings;
2514 } DUMMYSTRUCTNAME;
2515 UNICODE_STRING SimpleString;
2516 } DUMMYUNIONNAME;
2517 } COUNTED_REASON_CONTEXT, *PCOUNTED_REASON_CONTEXT;
2519 typedef enum _KPROFILE_SOURCE {
2520 ProfileTime,
2521 ProfileAlignmentFixup,
2522 ProfileTotalIssues,
2523 ProfilePipelineDry,
2524 ProfileLoadInstructions,
2525 ProfilePipelineFrozen,
2526 ProfileBranchInstructions,
2527 ProfileTotalNonissues,
2528 ProfileDcacheMisses,
2529 ProfileIcacheMisses,
2530 ProfileCacheMisses,
2531 ProfileBranchMispredictions,
2532 ProfileStoreInstructions,
2533 ProfileFpInstructions,
2534 ProfileIntegerInstructions,
2535 Profile2Issue,
2536 Profile3Issue,
2537 Profile4Issue,
2538 ProfileSpecialInstructions,
2539 ProfileTotalCycles,
2540 ProfileIcacheIssues,
2541 ProfileDcacheAccesses,
2542 ProfileMemoryBarrierCycles,
2543 ProfileLoadLinkedIssues,
2544 ProfileMaximum
2545 } KPROFILE_SOURCE, *PKPROFILE_SOURCE;
2547 typedef struct _DIRECTORY_BASIC_INFORMATION {
2548 UNICODE_STRING ObjectName;
2549 UNICODE_STRING ObjectTypeName;
2550 } DIRECTORY_BASIC_INFORMATION, *PDIRECTORY_BASIC_INFORMATION;
2552 typedef struct _INITIAL_TEB {
2553 void *OldStackBase;
2554 void *OldStackLimit;
2555 void *StackBase;
2556 void *StackLimit;
2557 void *DeallocationStack;
2558 } INITIAL_TEB, *PINITIAL_TEB;
2560 typedef enum _PORT_INFORMATION_CLASS {
2561 PortNoInformation
2562 } PORT_INFORMATION_CLASS, *PPORT_INFORMATION_CLASS;
2564 typedef enum _IO_COMPLETION_INFORMATION_CLASS {
2565 IoCompletionBasicInformation
2566 } IO_COMPLETION_INFORMATION_CLASS, *PIO_COMPLETION_INFORMATION_CLASS;
2568 typedef struct _FILE_COMPLETION_INFORMATION {
2569 HANDLE CompletionPort;
2570 ULONG_PTR CompletionKey;
2571 } FILE_COMPLETION_INFORMATION, *PFILE_COMPLETION_INFORMATION;
2573 #define IO_COMPLETION_QUERY_STATE 0x0001
2574 #define IO_COMPLETION_MODIFY_STATE 0x0002
2575 #define IO_COMPLETION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
2577 typedef struct _FILE_IO_COMPLETION_INFORMATION {
2578 ULONG_PTR CompletionKey;
2579 ULONG_PTR CompletionValue;
2580 IO_STATUS_BLOCK IoStatusBlock;
2581 } FILE_IO_COMPLETION_INFORMATION, *PFILE_IO_COMPLETION_INFORMATION;
2583 typedef enum _HARDERROR_RESPONSE_OPTION {
2584 OptionAbortRetryIgnore,
2585 OptionOk,
2586 OptionOkCancel,
2587 OptionRetryCancel,
2588 OptionYesNo,
2589 OptionYesNoCancel,
2590 OptionShutdownSystem
2591 } HARDERROR_RESPONSE_OPTION, *PHARDERROR_RESPONSE_OPTION;
2593 typedef enum _HARDERROR_RESPONSE {
2594 ResponseReturnToCaller,
2595 ResponseNotHandled,
2596 ResponseAbort,
2597 ResponseCancel,
2598 ResponseIgnore,
2599 ResponseNo,
2600 ResponseOk,
2601 ResponseRetry,
2602 ResponseYes
2603 } HARDERROR_RESPONSE, *PHARDERROR_RESPONSE;
2605 typedef enum _SYSDBG_COMMAND {
2606 SysDbgQueryModuleInformation,
2607 SysDbgQueryTraceInformation,
2608 SysDbgSetTracepoint,
2609 SysDbgSetSpecialCall,
2610 SysDbgClearSpecialCalls,
2611 SysDbgQuerySpecialCalls,
2612 SysDbgBreakPoint,
2613 SysDbgQueryVersion,
2614 SysDbgReadVirtual,
2615 SysDbgWriteVirtual,
2616 SysDbgReadPhysical,
2617 SysDbgWritePhysical,
2618 SysDbgReadControlSpace,
2619 SysDbgWriteControlSpace,
2620 SysDbgReadIoSpace,
2621 SysDbgWriteIoSpace,
2622 SysDbgReadMsr,
2623 SysDbgWriteMsr,
2624 SysDbgReadBusData,
2625 SysDbgWriteBusData
2626 } SYSDBG_COMMAND, *PSYSDBG_COMMAND;
2628 typedef struct _CPTABLEINFO
2630 USHORT CodePage;
2631 USHORT MaximumCharacterSize;
2632 USHORT DefaultChar;
2633 USHORT UniDefaultChar;
2634 USHORT TransDefaultChar;
2635 USHORT TransUniDefaultChar;
2636 USHORT DBCSCodePage;
2637 UCHAR LeadByte[12];
2638 USHORT *MultiByteTable;
2639 void *WideCharTable;
2640 USHORT *DBCSRanges;
2641 USHORT *DBCSOffsets;
2642 } CPTABLEINFO, *PCPTABLEINFO;
2644 typedef struct _NLSTABLEINFO
2646 CPTABLEINFO OemTableInfo;
2647 CPTABLEINFO AnsiTableInfo;
2648 USHORT *UpperCaseTable;
2649 USHORT *LowerCaseTable;
2650 } NLSTABLEINFO, *PNLSTABLEINFO;
2652 /*************************************************************************
2653 * Loader structures
2655 * Those are not part of standard Winternl.h
2658 typedef struct _LDR_SERVICE_TAG_RECORD
2660 struct _LDR_SERVICE_TAG_RECORD *Next;
2661 ULONG ServiceTag;
2662 } LDR_SERVICE_TAG_RECORD, *PLDR_SERVICE_TAG_RECORD;
2664 typedef struct _LDRP_CSLIST
2666 SINGLE_LIST_ENTRY *Tail;
2667 } LDRP_CSLIST, *PLDRP_CSLIST;
2669 typedef enum _LDR_DDAG_STATE
2671 LdrModulesMerged = -5,
2672 LdrModulesInitError = -4,
2673 LdrModulesSnapError = -3,
2674 LdrModulesUnloaded = -2,
2675 LdrModulesUnloading = -1,
2676 LdrModulesPlaceHolder = 0,
2677 LdrModulesMapping = 1,
2678 LdrModulesMapped = 2,
2679 LdrModulesWaitingForDependencies = 3,
2680 LdrModulesSnapping = 4,
2681 LdrModulesSnapped = 5,
2682 LdrModulesCondensed = 6,
2683 LdrModulesReadyToInit = 7,
2684 LdrModulesInitializing = 8,
2685 LdrModulesReadyToRun = 9,
2686 } LDR_DDAG_STATE;
2688 typedef struct _LDR_DDAG_NODE
2690 LIST_ENTRY Modules;
2691 LDR_SERVICE_TAG_RECORD *ServiceTagList;
2692 ULONG LoadCount;
2693 ULONG ReferenceCount;
2694 ULONG DependencyCount;
2695 union
2697 LDRP_CSLIST Dependencies;
2698 SINGLE_LIST_ENTRY RemovalLink;
2700 LDRP_CSLIST IncomingDependencies;
2701 LDR_DDAG_STATE State;
2702 SINGLE_LIST_ENTRY CondenseLink;
2703 ULONG PreorderNumber;
2704 ULONG LowestLink;
2705 } LDR_DDAG_NODE, *PLDR_DDAG_NODE;
2707 typedef enum _LDR_DLL_LOAD_REASON
2709 LoadReasonStaticDependency,
2710 LoadReasonStaticForwarderDependency,
2711 LoadReasonDynamicForwarderDependency,
2712 LoadReasonDelayloadDependency,
2713 LoadReasonDynamicLoad,
2714 LoadReasonAsImageLoad,
2715 LoadReasonAsDataLoad,
2716 LoadReasonUnknown = -1
2717 } LDR_DLL_LOAD_REASON, *PLDR_DLL_LOAD_REASON;
2719 typedef struct _LDR_DATA_TABLE_ENTRY
2721 LIST_ENTRY InLoadOrderLinks;
2722 LIST_ENTRY InMemoryOrderLinks;
2723 LIST_ENTRY InInitializationOrderLinks;
2724 void* DllBase;
2725 void* EntryPoint;
2726 ULONG SizeOfImage;
2727 UNICODE_STRING FullDllName;
2728 UNICODE_STRING BaseDllName;
2729 ULONG Flags;
2730 SHORT LoadCount;
2731 SHORT TlsIndex;
2732 HANDLE SectionHandle;
2733 ULONG CheckSum;
2734 ULONG TimeDateStamp;
2735 HANDLE ActivationContext;
2736 void* Lock;
2737 LDR_DDAG_NODE* DdagNode;
2738 LIST_ENTRY NodeModuleLink;
2739 struct _LDRP_LOAD_CONTEXT *LoadContext;
2740 void* ParentDllBase;
2741 void* SwitchBackContext;
2742 RTL_BALANCED_NODE BaseAddressIndexNode;
2743 RTL_BALANCED_NODE MappingInfoIndexNode;
2744 ULONG_PTR OriginalBase;
2745 LARGE_INTEGER LoadTime;
2746 ULONG BaseNameHashValue;
2747 LDR_DLL_LOAD_REASON LoadReason;
2748 ULONG ImplicitPathOptions;
2749 ULONG ReferenceCount;
2750 } LDR_DATA_TABLE_ENTRY, *PLDR_DATA_TABLE_ENTRY;
2752 typedef struct _LDR_DLL_LOADED_NOTIFICATION_DATA
2754 ULONG Flags;
2755 const UNICODE_STRING *FullDllName;
2756 const UNICODE_STRING *BaseDllName;
2757 void *DllBase;
2758 ULONG SizeOfImage;
2759 } LDR_DLL_LOADED_NOTIFICATION_DATA, *PLDR_DLL_LOADED_NOTIFICATION_DATA;
2761 typedef struct _LDR_DLL_UNLOADED_NOTIFICATION_DATA
2763 ULONG Flags;
2764 const UNICODE_STRING *FullDllName;
2765 const UNICODE_STRING *BaseDllName;
2766 void *DllBase;
2767 ULONG SizeOfImage;
2768 } LDR_DLL_UNLOADED_NOTIFICATION_DATA, *PLDR_DLL_UNLOADED_NOTIFICATION_DATA;
2770 typedef union _LDR_DLL_NOTIFICATION_DATA
2772 LDR_DLL_LOADED_NOTIFICATION_DATA Loaded;
2773 LDR_DLL_UNLOADED_NOTIFICATION_DATA Unloaded;
2774 } LDR_DLL_NOTIFICATION_DATA, *PLDR_DLL_NOTIFICATION_DATA;
2776 typedef void (CALLBACK *PLDR_DLL_NOTIFICATION_FUNCTION)(ULONG, LDR_DLL_NOTIFICATION_DATA*, void*);
2778 /* those defines are (some of the) regular LDR_DATA_TABLE_ENTRY.Flags values */
2779 #define LDR_IMAGE_IS_DLL 0x00000004
2780 #define LDR_LOAD_IN_PROGRESS 0x00001000
2781 #define LDR_UNLOAD_IN_PROGRESS 0x00002000
2782 #define LDR_NO_DLL_CALLS 0x00040000
2783 #define LDR_PROCESS_ATTACHED 0x00080000
2784 #define LDR_COR_IMAGE 0x00400000
2785 #define LDR_COR_ILONLY 0x01000000
2787 /* these ones is Wine specific */
2788 #define LDR_DONT_RESOLVE_REFS 0x40000000
2789 #define LDR_WINE_INTERNAL 0x80000000
2791 /* flag for LdrAddRefDll */
2792 #define LDR_ADDREF_DLL_PIN 0x00000001
2794 #define LDR_DLL_NOTIFICATION_REASON_LOADED 1
2795 #define LDR_DLL_NOTIFICATION_REASON_UNLOADED 2
2797 /* FIXME: to be checked */
2798 #define MAXIMUM_FILENAME_LENGTH 256
2800 typedef struct _SYSTEM_MODULE
2802 PVOID Section; /* 00/00 */
2803 PVOID MappedBaseAddress; /* 04/08 */
2804 PVOID ImageBaseAddress; /* 08/10 */
2805 ULONG ImageSize; /* 0c/18 */
2806 ULONG Flags; /* 10/1c */
2807 WORD LoadOrderIndex; /* 14/20 */
2808 WORD InitOrderIndex; /* 16/22 */
2809 WORD LoadCount; /* 18/24 */
2810 WORD NameOffset; /* 1a/26 */
2811 BYTE Name[MAXIMUM_FILENAME_LENGTH]; /* 1c/28 */
2812 } SYSTEM_MODULE, *PSYSTEM_MODULE;
2814 typedef struct _SYSTEM_MODULE_INFORMATION
2816 ULONG ModulesCount;
2817 SYSTEM_MODULE Modules[1]; /* FIXME: should be Modules[0] */
2818 } SYSTEM_MODULE_INFORMATION, *PSYSTEM_MODULE_INFORMATION;
2820 #define PROCESS_CREATE_FLAGS_BREAKAWAY 0x00000001
2821 #define PROCESS_CREATE_FLAGS_NO_DEBUG_INHERIT 0x00000002
2822 #define PROCESS_CREATE_FLAGS_INHERIT_HANDLES 0x00000004
2823 #define PROCESS_CREATE_FLAGS_OVERRIDE_ADDRESS_SPACE 0x00000008
2824 #define PROCESS_CREATE_FLAGS_LARGE_PAGES 0x00000010
2825 #define PROCESS_CREATE_FLAGS_LARGE_PAGE_SYSTEM_DLL 0x00000020
2826 #define PROCESS_CREATE_FLAGS_PROTECTED_PROCESS 0x00000040
2827 #define PROCESS_CREATE_FLAGS_CREATE_SESSION 0x00000080
2828 #define PROCESS_CREATE_FLAGS_INHERIT_FROM_PARENT 0x00000100
2829 #define PROCESS_CREATE_FLAGS_SUSPENDED 0x00000200
2830 #define PROCESS_CREATE_FLAGS_EXTENDED_UNKNOWN 0x00000400
2832 typedef struct _RTL_PROCESS_MODULE_INFORMATION_EX
2834 USHORT NextOffset;
2835 SYSTEM_MODULE BaseInfo;
2836 ULONG ImageCheckSum;
2837 ULONG TimeDateStamp;
2838 void *DefaultBase;
2839 } RTL_PROCESS_MODULE_INFORMATION_EX;
2841 #define THREAD_CREATE_FLAGS_CREATE_SUSPENDED 0x00000001
2842 #define THREAD_CREATE_FLAGS_SKIP_THREAD_ATTACH 0x00000002
2843 #define THREAD_CREATE_FLAGS_HIDE_FROM_DEBUGGER 0x00000004
2844 #define THREAD_CREATE_FLAGS_HAS_SECURITY_DESCRIPTOR 0x00000010
2845 #define THREAD_CREATE_FLAGS_ACCESS_CHECK_IN_TARGET 0x00000020
2846 #define THREAD_CREATE_FLAGS_INITIAL_THREAD 0x00000080
2848 typedef LONG (CALLBACK *PRTL_EXCEPTION_FILTER)(PEXCEPTION_POINTERS);
2850 typedef void (CALLBACK *PTP_IO_CALLBACK)(PTP_CALLBACK_INSTANCE,void*,void*,IO_STATUS_BLOCK*,PTP_IO);
2852 #define PS_ATTRIBUTE_THREAD 0x00010000
2853 #define PS_ATTRIBUTE_INPUT 0x00020000
2854 #define PS_ATTRIBUTE_ADDITIVE 0x00040000
2856 typedef enum _PS_ATTRIBUTE_NUM
2858 PsAttributeParentProcess,
2859 PsAttributeDebugPort,
2860 PsAttributeToken,
2861 PsAttributeClientId,
2862 PsAttributeTebAddress,
2863 PsAttributeImageName,
2864 PsAttributeImageInfo,
2865 PsAttributeMemoryReserve,
2866 PsAttributePriorityClass,
2867 PsAttributeErrorMode,
2868 PsAttributeStdHandleInfo,
2869 PsAttributeHandleList,
2870 PsAttributeGroupAffinity,
2871 PsAttributePreferredNode,
2872 PsAttributeIdealProcessor,
2873 PsAttributeUmsThread,
2874 PsAttributeMitigationOptions,
2875 PsAttributeProtectionLevel,
2876 PsAttributeSecureProcess,
2877 PsAttributeJobList,
2878 PsAttributeChildProcessPolicy,
2879 PsAttributeAllApplicationPackagesPolicy,
2880 PsAttributeWin32kFilter,
2881 PsAttributeSafeOpenPromptOriginClaim,
2882 PsAttributeBnoIsolation,
2883 PsAttributeDesktopAppPolicy,
2884 PsAttributeChpe,
2885 PsAttributeMax
2886 } PS_ATTRIBUTE_NUM;
2888 #define PS_ATTRIBUTE_PARENT_PROCESS (PsAttributeParentProcess | PS_ATTRIBUTE_INPUT | PS_ATTRIBUTE_ADDITIVE)
2889 #define PS_ATTRIBUTE_DEBUG_PORT (PsAttributeDebugPort | PS_ATTRIBUTE_INPUT | PS_ATTRIBUTE_ADDITIVE)
2890 #define PS_ATTRIBUTE_TOKEN (PsAttributeToken | PS_ATTRIBUTE_INPUT | PS_ATTRIBUTE_ADDITIVE)
2891 #define PS_ATTRIBUTE_CLIENT_ID (PsAttributeClientId | PS_ATTRIBUTE_THREAD)
2892 #define PS_ATTRIBUTE_TEB_ADDRESS (PsAttributeTebAddress | PS_ATTRIBUTE_THREAD)
2893 #define PS_ATTRIBUTE_IMAGE_NAME (PsAttributeImageName | PS_ATTRIBUTE_INPUT)
2894 #define PS_ATTRIBUTE_IMAGE_INFO (PsAttributeImageInfo)
2895 #define PS_ATTRIBUTE_MEMORY_RESERVE (PsAttributeMemoryReserve | PS_ATTRIBUTE_INPUT)
2896 #define PS_ATTRIBUTE_PRIORITY_CLASS (PsAttributePriorityClass | PS_ATTRIBUTE_INPUT)
2897 #define PS_ATTRIBUTE_ERROR_MODE (PsAttributeErrorMode | PS_ATTRIBUTE_INPUT)
2898 #define PS_ATTRIBUTE_STD_HANDLE_INFO (PsAttributeStdHandleInfo | PS_ATTRIBUTE_INPUT)
2899 #define PS_ATTRIBUTE_HANDLE_LIST (PsAttributeHandleList | PS_ATTRIBUTE_INPUT)
2900 #define PS_ATTRIBUTE_GROUP_AFFINITY (PsAttributeGroupAffinity | PS_ATTRIBUTE_THREAD | PS_ATTRIBUTE_INPUT)
2901 #define PS_ATTRIBUTE_PREFERRED_NODE (PsAttributePreferredNode | PS_ATTRIBUTE_INPUT)
2902 #define PS_ATTRIBUTE_IDEAL_PROCESSOR (PsAttributeIdealProcessor | PS_ATTRIBUTE_THREAD | PS_ATTRIBUTE_INPUT)
2903 #define PS_ATTRIBUTE_MITIGATION_OPTIONS (PsAttributeMitigationOptions | PS_ATTRIBUTE_INPUT | PS_ATTRIBUTE_UNKNOWN)
2904 #define PS_ATTRIBUTE_PROTECTION_LEVEL (PsAttributeProtectionLevel | PS_ATTRIBUTE_INPUT | PS_ATTRIBUTE_UNKNOWN)
2905 #define PS_ATTRIBUTE_SECURE_PROCESS (PsAttributeSecureProcess | PS_ATTRIBUTE_INPUT)
2906 #define PS_ATTRIBUTE_JOB_LIST (PsAttributeJobList | PS_ATTRIBUTE_INPUT)
2907 #define PS_ATTRIBUTE_CHILD_PROCESS_POLICY (PsAttributeChildProcessPolicy | PS_ATTRIBUTE_INPUT)
2908 #define PS_ATTRIBUTE_ALL_APPLICATION_PACKAGES_POLICY (PsAttributeAllApplicationPackagesPolicy | PS_ATTRIBUTE_INPUT)
2909 #define PS_ATTRIBUTE_WIN32K_FILTER (PsAttributeWin32kFilter | PS_ATTRIBUTE_INPUT)
2910 #define PS_ATTRIBUTE_SAFE_OPEN_PROMPT_ORIGIN_CLAIM (PsAttributeSafeOpenPromptOriginClaim | PS_ATTRIBUTE_INPUT)
2911 #define PS_ATTRIBUTE_BNO_ISOLATION (PsAttributeBnoIsolation | PS_ATTRIBUTE_INPUT)
2912 #define PS_ATTRIBUTE_DESKTOP_APP_POLICY (PsAttributeDesktopAppPolicy | PS_ATTRIBUTE_INPUT)
2914 typedef struct _PS_ATTRIBUTE
2916 ULONG_PTR Attribute;
2917 SIZE_T Size;
2918 union
2920 ULONG_PTR Value;
2921 void *ValuePtr;
2923 SIZE_T *ReturnLength;
2924 } PS_ATTRIBUTE;
2926 typedef struct _PS_ATTRIBUTE_LIST
2928 SIZE_T TotalLength;
2929 PS_ATTRIBUTE Attributes[1];
2930 } PS_ATTRIBUTE_LIST, *PPS_ATTRIBUTE_LIST;
2932 typedef enum _PS_CREATE_STATE
2934 PsCreateInitialState,
2935 PsCreateFailOnFileOpen,
2936 PsCreateFailOnSectionCreate,
2937 PsCreateFailExeFormat,
2938 PsCreateFailMachineMismatch,
2939 PsCreateFailExeName,
2940 PsCreateSuccess,
2941 PsCreateMaximumStates
2942 } PS_CREATE_STATE;
2944 typedef struct _PS_CREATE_INFO
2946 SIZE_T Size;
2947 PS_CREATE_STATE State;
2948 union
2950 struct
2952 union
2954 ULONG InitFlags;
2955 struct
2957 UCHAR WriteOutputOnExit : 1;
2958 UCHAR DetectManifest : 1;
2959 UCHAR IFEOSkipDebugger : 1;
2960 UCHAR IFEODoNotPropagateKeyState : 1;
2961 UCHAR SpareBits1 : 4;
2962 UCHAR SpareBits2 : 8;
2963 USHORT ProhibitedImageCharacteristics : 16;
2966 ACCESS_MASK AdditionalFileAccess;
2967 } InitState;
2968 struct
2970 HANDLE FileHandle;
2971 } FailSection;
2972 struct
2974 USHORT DllCharacteristics;
2975 } ExeFormat;
2976 struct
2978 HANDLE IFEOKey;
2979 } ExeName;
2980 struct
2982 union
2984 ULONG OutputFlags;
2985 struct
2987 UCHAR ProtectedProcess : 1;
2988 UCHAR AddressSpaceOverride : 1;
2989 UCHAR DevOverrideEnabled : 1;
2990 UCHAR ManifestDetected : 1;
2991 UCHAR ProtectedProcessLight : 1;
2992 UCHAR SpareBits1 : 3;
2993 UCHAR SpareBits2 : 8;
2994 USHORT SpareBits3 : 16;
2997 HANDLE FileHandle;
2998 HANDLE SectionHandle;
2999 ULONGLONG UserProcessParametersNative;
3000 ULONG UserProcessParametersWow64;
3001 ULONG CurrentParameterFlags;
3002 ULONGLONG PebAddressNative;
3003 ULONG PebAddressWow64;
3004 ULONGLONG ManifestAddress;
3005 ULONG ManifestSize;
3006 } SuccessState;
3008 } PS_CREATE_INFO, *PPS_CREATE_INFO;
3010 #define DEBUG_READ_EVENT 0x0001
3011 #define DEBUG_PROCESS_ASSIGN 0x0002
3012 #define DEBUG_SET_INFORMATION 0x0004
3013 #define DEBUG_QUERY_INFORMATION 0x0008
3014 #define DEBUG_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x0f)
3016 #define DEBUG_KILL_ON_CLOSE 0x1
3018 /***********************************************************************
3019 * Function declarations
3022 NTSYSAPI void WINAPI DbgBreakPoint(void);
3023 NTSYSAPI NTSTATUS WINAPIV DbgPrint(LPCSTR fmt, ...);
3024 NTSYSAPI NTSTATUS WINAPIV DbgPrintEx(ULONG iComponentId, ULONG Level, LPCSTR fmt, ...);
3025 NTSYSAPI NTSTATUS WINAPI DbgUiConnectToDbg(void);
3026 NTSYSAPI HANDLE WINAPI DbgUiGetThreadDebugObject(void);
3027 NTSYSAPI NTSTATUS WINAPI DbgUiIssueRemoteBreakin(HANDLE);
3028 NTSYSAPI void WINAPI DbgUiRemoteBreakin(void*);
3029 NTSYSAPI void WINAPI DbgUiSetThreadDebugObject(HANDLE);
3030 NTSYSAPI void WINAPI DbgUserBreakPoint(void);
3031 NTSYSAPI NTSTATUS WINAPI LdrAccessResource(HMODULE,const IMAGE_RESOURCE_DATA_ENTRY*,void**,PULONG);
3032 NTSYSAPI NTSTATUS WINAPI LdrAddDllDirectory(const UNICODE_STRING*,void**);
3033 NTSYSAPI NTSTATUS WINAPI LdrAddRefDll(ULONG,HMODULE);
3034 NTSYSAPI NTSTATUS WINAPI LdrDisableThreadCalloutsForDll(HMODULE);
3035 NTSYSAPI NTSTATUS WINAPI LdrFindEntryForAddress(const void*, PLDR_DATA_TABLE_ENTRY*);
3036 NTSYSAPI NTSTATUS WINAPI LdrFindResourceDirectory_U(HMODULE,const LDR_RESOURCE_INFO*,ULONG,const IMAGE_RESOURCE_DIRECTORY**);
3037 NTSYSAPI NTSTATUS WINAPI LdrFindResource_U(HMODULE,const LDR_RESOURCE_INFO*,ULONG,const IMAGE_RESOURCE_DATA_ENTRY**);
3038 NTSYSAPI NTSTATUS WINAPI LdrGetDllDirectory(UNICODE_STRING*);
3039 NTSYSAPI NTSTATUS WINAPI LdrGetDllHandle(LPCWSTR, ULONG, const UNICODE_STRING*, HMODULE*);
3040 NTSYSAPI NTSTATUS WINAPI LdrGetDllPath(PCWSTR,ULONG,PWSTR*,PWSTR*);
3041 NTSYSAPI NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE, const ANSI_STRING*, ULONG, void**);
3042 NTSYSAPI NTSTATUS WINAPI LdrLoadDll(LPCWSTR, DWORD, const UNICODE_STRING*, HMODULE*);
3043 NTSYSAPI NTSTATUS WINAPI LdrLockLoaderLock(ULONG,ULONG*,ULONG_PTR*);
3044 IMAGE_BASE_RELOCATION * WINAPI LdrProcessRelocationBlock(void*,UINT,USHORT*,INT_PTR);
3045 NTSYSAPI NTSTATUS WINAPI LdrQueryImageFileExecutionOptions(const UNICODE_STRING*,LPCWSTR,ULONG,void*,ULONG,ULONG*);
3046 NTSYSAPI NTSTATUS WINAPI LdrQueryProcessModuleInformation(SYSTEM_MODULE_INFORMATION*, ULONG, ULONG*);
3047 NTSYSAPI NTSTATUS WINAPI LdrRegisterDllNotification(ULONG,PLDR_DLL_NOTIFICATION_FUNCTION,void*,void**);
3048 NTSYSAPI NTSTATUS WINAPI LdrRemoveDllDirectory(void*);
3049 NTSYSAPI NTSTATUS WINAPI LdrSetDefaultDllDirectories(ULONG);
3050 NTSYSAPI NTSTATUS WINAPI LdrSetDllDirectory(const UNICODE_STRING*);
3051 NTSYSAPI void WINAPI LdrShutdownProcess(void);
3052 NTSYSAPI void WINAPI LdrShutdownThread(void);
3053 NTSYSAPI NTSTATUS WINAPI LdrUnloadDll(HMODULE);
3054 NTSYSAPI NTSTATUS WINAPI LdrUnlockLoaderLock(ULONG,ULONG_PTR);
3055 NTSYSAPI NTSTATUS WINAPI LdrUnregisterDllNotification(void*);
3056 NTSYSAPI NTSTATUS WINAPI NtAcceptConnectPort(PHANDLE,ULONG,PLPC_MESSAGE,BOOLEAN,PLPC_SECTION_WRITE,PLPC_SECTION_READ);
3057 NTSYSAPI NTSTATUS WINAPI NtAccessCheck(PSECURITY_DESCRIPTOR,HANDLE,ACCESS_MASK,PGENERIC_MAPPING,PPRIVILEGE_SET,PULONG,PULONG,NTSTATUS*);
3058 NTSYSAPI NTSTATUS WINAPI NtAccessCheckAndAuditAlarm(PUNICODE_STRING,HANDLE,PUNICODE_STRING,PUNICODE_STRING,PSECURITY_DESCRIPTOR,ACCESS_MASK,PGENERIC_MAPPING,BOOLEAN,PACCESS_MASK,PBOOLEAN,PBOOLEAN);
3059 NTSYSAPI NTSTATUS WINAPI NtAddAtom(const WCHAR*,ULONG,RTL_ATOM*);
3060 NTSYSAPI NTSTATUS WINAPI NtAdjustGroupsToken(HANDLE,BOOLEAN,PTOKEN_GROUPS,ULONG,PTOKEN_GROUPS,PULONG);
3061 NTSYSAPI NTSTATUS WINAPI NtAdjustPrivilegesToken(HANDLE,BOOLEAN,PTOKEN_PRIVILEGES,DWORD,PTOKEN_PRIVILEGES,PDWORD);
3062 NTSYSAPI NTSTATUS WINAPI NtAlertResumeThread(HANDLE,PULONG);
3063 NTSYSAPI NTSTATUS WINAPI NtAlertThread(HANDLE ThreadHandle);
3064 NTSYSAPI NTSTATUS WINAPI NtAllocateLocallyUniqueId(PLUID lpLuid);
3065 NTSYSAPI NTSTATUS WINAPI NtAllocateUuids(PULARGE_INTEGER,PULONG,PULONG,PUCHAR);
3066 NTSYSAPI NTSTATUS WINAPI NtAllocateVirtualMemory(HANDLE,PVOID*,ULONG_PTR,SIZE_T*,ULONG,ULONG);
3067 NTSYSAPI NTSTATUS WINAPI NtAllocateVirtualMemoryEx(HANDLE,PVOID*,SIZE_T*,ULONG,ULONG,MEM_EXTENDED_PARAMETER*,ULONG);
3068 NTSYSAPI NTSTATUS WINAPI NtAreMappedFilesTheSame(PVOID,PVOID);
3069 NTSYSAPI NTSTATUS WINAPI NtAssignProcessToJobObject(HANDLE,HANDLE);
3070 NTSYSAPI NTSTATUS WINAPI NtCallbackReturn(PVOID,ULONG,NTSTATUS);
3071 NTSYSAPI NTSTATUS WINAPI NtCancelIoFile(HANDLE,PIO_STATUS_BLOCK);
3072 NTSYSAPI NTSTATUS WINAPI NtCancelIoFileEx(HANDLE,PIO_STATUS_BLOCK,PIO_STATUS_BLOCK);
3073 NTSYSAPI NTSTATUS WINAPI NtCancelTimer(HANDLE, BOOLEAN*);
3074 NTSYSAPI NTSTATUS WINAPI NtClearEvent(HANDLE);
3075 NTSYSAPI NTSTATUS WINAPI NtClearPowerRequest(HANDLE,POWER_REQUEST_TYPE);
3076 NTSYSAPI NTSTATUS WINAPI NtClose(HANDLE);
3077 NTSYSAPI NTSTATUS WINAPI NtCloseObjectAuditAlarm(PUNICODE_STRING,HANDLE,BOOLEAN);
3078 NTSYSAPI NTSTATUS WINAPI NtCompleteConnectPort(HANDLE);
3079 NTSYSAPI NTSTATUS WINAPI NtConnectPort(PHANDLE,PUNICODE_STRING,PSECURITY_QUALITY_OF_SERVICE,PLPC_SECTION_WRITE,PLPC_SECTION_READ,PULONG,PVOID,PULONG);
3080 NTSYSAPI NTSTATUS WINAPI NtContinue(PCONTEXT,BOOLEAN);
3081 NTSYSAPI NTSTATUS WINAPI NtCreateDebugObject(HANDLE*,ACCESS_MASK,OBJECT_ATTRIBUTES*,ULONG);
3082 NTSYSAPI NTSTATUS WINAPI NtCreateDirectoryObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
3083 NTSYSAPI NTSTATUS WINAPI NtCreateEvent(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *,EVENT_TYPE,BOOLEAN);
3084 NTSYSAPI NTSTATUS WINAPI NtCreateEventPair(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
3085 NTSYSAPI NTSTATUS WINAPI NtCreateFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,PLARGE_INTEGER,ULONG,ULONG,ULONG,ULONG,PVOID,ULONG);
3086 NTSYSAPI NTSTATUS WINAPI NtCreateIoCompletion(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,ULONG);
3087 NTSYSAPI NTSTATUS WINAPI NtCreateJobObject(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
3088 NTSYSAPI NTSTATUS WINAPI NtCreateKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,PULONG);
3089 NTSYSAPI NTSTATUS WINAPI NtCreateKeyTransacted(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,HANDLE,ULONG*);
3090 NTSYSAPI NTSTATUS WINAPI NtCreateKeyedEvent(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG);
3091 NTSYSAPI NTSTATUS WINAPI NtCreateMailslotFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG,ULONG,PLARGE_INTEGER);
3092 NTSYSAPI NTSTATUS WINAPI NtCreateMutant(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,BOOLEAN);
3093 NTSYSAPI NTSTATUS WINAPI NtCreateNamedPipeFile(PHANDLE,ULONG,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,PLARGE_INTEGER);
3094 NTSYSAPI NTSTATUS WINAPI NtCreatePagingFile(PUNICODE_STRING,PLARGE_INTEGER,PLARGE_INTEGER,PLARGE_INTEGER);
3095 NTSYSAPI NTSTATUS WINAPI NtCreatePort(PHANDLE,POBJECT_ATTRIBUTES,ULONG,ULONG,PULONG);
3096 NTSYSAPI NTSTATUS WINAPI NtCreatePowerRequest(HANDLE*,COUNTED_REASON_CONTEXT*);
3097 NTSYSAPI NTSTATUS WINAPI NtCreateProcess(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,HANDLE,BOOLEAN,HANDLE,HANDLE,HANDLE);
3098 NTSYSAPI NTSTATUS WINAPI NtCreateProfile(PHANDLE,HANDLE,PVOID,ULONG,ULONG,PVOID,ULONG,KPROFILE_SOURCE,KAFFINITY);
3099 NTSYSAPI NTSTATUS WINAPI NtCreateSection(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const LARGE_INTEGER*,ULONG,ULONG,HANDLE);
3100 NTSYSAPI NTSTATUS WINAPI NtCreateSemaphore(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,LONG,LONG);
3101 NTSYSAPI NTSTATUS WINAPI NtCreateSymbolicLinkObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PUNICODE_STRING);
3102 NTSYSAPI NTSTATUS WINAPI NtCreateThread(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,HANDLE,PCLIENT_ID,PCONTEXT,PINITIAL_TEB,BOOLEAN);
3103 NTSYSAPI NTSTATUS WINAPI NtCreateThreadEx(HANDLE*,ACCESS_MASK,OBJECT_ATTRIBUTES*,HANDLE,PRTL_THREAD_START_ROUTINE,void*,ULONG,SIZE_T,SIZE_T,SIZE_T,PS_ATTRIBUTE_LIST*);
3104 NTSYSAPI NTSTATUS WINAPI NtCreateTimer(HANDLE*, ACCESS_MASK, const OBJECT_ATTRIBUTES*, TIMER_TYPE);
3105 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);
3106 NTSYSAPI NTSTATUS WINAPI NtCreateUserProcess(HANDLE*,HANDLE*,ACCESS_MASK,ACCESS_MASK,OBJECT_ATTRIBUTES*,OBJECT_ATTRIBUTES*,ULONG,ULONG,RTL_USER_PROCESS_PARAMETERS*,PS_CREATE_INFO*,PS_ATTRIBUTE_LIST*);
3107 NTSYSAPI NTSTATUS WINAPI NtDelayExecution(BOOLEAN,const LARGE_INTEGER*);
3108 NTSYSAPI NTSTATUS WINAPI NtDeleteAtom(RTL_ATOM);
3109 NTSYSAPI NTSTATUS WINAPI NtDeleteFile(POBJECT_ATTRIBUTES);
3110 NTSYSAPI NTSTATUS WINAPI NtDeleteKey(HANDLE);
3111 NTSYSAPI NTSTATUS WINAPI NtDeleteValueKey(HANDLE,const UNICODE_STRING *);
3112 NTSYSAPI NTSTATUS WINAPI NtDeviceIoControlFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,PVOID,ULONG,PVOID,ULONG);
3113 NTSYSAPI NTSTATUS WINAPI NtDisplayString(PUNICODE_STRING);
3114 NTSYSAPI NTSTATUS WINAPI NtDuplicateObject(HANDLE,HANDLE,HANDLE,PHANDLE,ACCESS_MASK,ULONG,ULONG);
3115 NTSYSAPI NTSTATUS WINAPI NtDuplicateToken(HANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,SECURITY_IMPERSONATION_LEVEL,TOKEN_TYPE,PHANDLE);
3116 NTSYSAPI NTSTATUS WINAPI NtEnumerateKey(HANDLE,ULONG,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *);
3117 NTSYSAPI NTSTATUS WINAPI NtEnumerateValueKey(HANDLE,ULONG,KEY_VALUE_INFORMATION_CLASS,PVOID,ULONG,PULONG);
3118 NTSYSAPI NTSTATUS WINAPI NtExtendSection(HANDLE,PLARGE_INTEGER);
3119 NTSYSAPI NTSTATUS WINAPI NtFilterToken(HANDLE,ULONG,TOKEN_GROUPS*,TOKEN_PRIVILEGES*,TOKEN_GROUPS*,HANDLE*);
3120 NTSYSAPI NTSTATUS WINAPI NtFindAtom(const WCHAR*,ULONG,RTL_ATOM*);
3121 NTSYSAPI NTSTATUS WINAPI NtFlushBuffersFile(HANDLE,IO_STATUS_BLOCK*);
3122 NTSYSAPI NTSTATUS WINAPI NtFlushInstructionCache(HANDLE,LPCVOID,SIZE_T);
3123 NTSYSAPI NTSTATUS WINAPI NtFlushKey(HANDLE);
3124 NTSYSAPI void WINAPI NtFlushProcessWriteBuffers(void);
3125 NTSYSAPI NTSTATUS WINAPI NtFlushVirtualMemory(HANDLE,LPCVOID*,SIZE_T*,ULONG);
3126 NTSYSAPI NTSTATUS WINAPI NtFlushWriteBuffer(VOID);
3127 NTSYSAPI NTSTATUS WINAPI NtFreeVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
3128 NTSYSAPI NTSTATUS WINAPI NtFsControlFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,PVOID,ULONG,PVOID,ULONG);
3129 NTSYSAPI NTSTATUS WINAPI NtGetContextThread(HANDLE,CONTEXT*);
3130 NTSYSAPI ULONG WINAPI NtGetCurrentProcessorNumber(void);
3131 NTSYSAPI NTSTATUS WINAPI NtGetNlsSectionPtr(ULONG,ULONG,void*,void**,SIZE_T*);
3132 NTSYSAPI NTSTATUS WINAPI NtGetPlugPlayEvent(ULONG,ULONG,PVOID,ULONG);
3133 NTSYSAPI ULONG WINAPI NtGetTickCount(VOID);
3134 NTSYSAPI NTSTATUS WINAPI NtGetWriteWatch(HANDLE,ULONG,PVOID,SIZE_T,PVOID*,ULONG_PTR*,ULONG*);
3135 NTSYSAPI NTSTATUS WINAPI NtImpersonateAnonymousToken(HANDLE);
3136 NTSYSAPI NTSTATUS WINAPI NtImpersonateClientOfPort(HANDLE,PPORT_MESSAGE);
3137 NTSYSAPI NTSTATUS WINAPI NtImpersonateThread(HANDLE,HANDLE,PSECURITY_QUALITY_OF_SERVICE);
3138 NTSYSAPI NTSTATUS WINAPI NtInitializeRegistry(BOOLEAN);
3139 NTSYSAPI NTSTATUS WINAPI NtInitiatePowerAction(POWER_ACTION,SYSTEM_POWER_STATE,ULONG,BOOLEAN);
3140 NTSYSAPI NTSTATUS WINAPI NtIsProcessInJob(HANDLE,HANDLE);
3141 NTSYSAPI NTSTATUS WINAPI NtListenPort(HANDLE,PLPC_MESSAGE);
3142 NTSYSAPI NTSTATUS WINAPI NtLoadDriver(const UNICODE_STRING *);
3143 NTSYSAPI NTSTATUS WINAPI NtLoadKey(const OBJECT_ATTRIBUTES *,OBJECT_ATTRIBUTES *);
3144 NTSYSAPI NTSTATUS WINAPI NtLockFile(HANDLE,HANDLE,PIO_APC_ROUTINE,void*,PIO_STATUS_BLOCK,PLARGE_INTEGER,PLARGE_INTEGER,ULONG*,BOOLEAN,BOOLEAN);
3145 NTSYSAPI NTSTATUS WINAPI NtLockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
3146 NTSYSAPI NTSTATUS WINAPI NtMakeTemporaryObject(HANDLE);
3147 NTSYSAPI NTSTATUS WINAPI NtMapViewOfSection(HANDLE,HANDLE,PVOID*,ULONG_PTR,SIZE_T,const LARGE_INTEGER*,SIZE_T*,SECTION_INHERIT,ULONG,ULONG);
3148 NTSYSAPI NTSTATUS WINAPI NtNotifyChangeDirectoryFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,ULONG,BOOLEAN);
3149 NTSYSAPI NTSTATUS WINAPI NtNotifyChangeKey(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,BOOLEAN,PVOID,ULONG,BOOLEAN);
3150 NTSYSAPI NTSTATUS WINAPI NtNotifyChangeMultipleKeys(HANDLE,ULONG,OBJECT_ATTRIBUTES*,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,BOOLEAN,PVOID,ULONG,BOOLEAN);
3151 NTSYSAPI NTSTATUS WINAPI NtOpenDirectoryObject(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
3152 NTSYSAPI NTSTATUS WINAPI NtOpenEvent(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *);
3153 NTSYSAPI NTSTATUS WINAPI NtOpenEventPair(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
3154 NTSYSAPI NTSTATUS WINAPI NtOpenFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG);
3155 NTSYSAPI NTSTATUS WINAPI NtOpenIoCompletion(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
3156 NTSYSAPI NTSTATUS WINAPI NtOpenJobObject(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
3157 NTSYSAPI NTSTATUS WINAPI NtOpenKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *);
3158 NTSYSAPI NTSTATUS WINAPI NtOpenKeyEx(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG);
3159 NTSYSAPI NTSTATUS WINAPI NtOpenKeyTransacted(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,HANDLE);
3160 NTSYSAPI NTSTATUS WINAPI NtOpenKeyTransactedEx(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,HANDLE);
3161 NTSYSAPI NTSTATUS WINAPI NtOpenKeyedEvent(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
3162 NTSYSAPI NTSTATUS WINAPI NtOpenMutant(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
3163 NTSYSAPI NTSTATUS WINAPI NtOpenObjectAuditAlarm(PUNICODE_STRING,PHANDLE,PUNICODE_STRING,PUNICODE_STRING,PSECURITY_DESCRIPTOR,HANDLE,ACCESS_MASK,ACCESS_MASK,PPRIVILEGE_SET,BOOLEAN,BOOLEAN,PBOOLEAN);
3164 NTSYSAPI NTSTATUS WINAPI NtOpenProcess(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const CLIENT_ID*);
3165 NTSYSAPI NTSTATUS WINAPI NtOpenProcessToken(HANDLE,DWORD,HANDLE *);
3166 NTSYSAPI NTSTATUS WINAPI NtOpenProcessTokenEx(HANDLE,DWORD,DWORD,HANDLE *);
3167 NTSYSAPI NTSTATUS WINAPI NtOpenSection(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
3168 NTSYSAPI NTSTATUS WINAPI NtOpenSemaphore(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
3169 NTSYSAPI NTSTATUS WINAPI NtOpenSymbolicLinkObject(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
3170 NTSYSAPI NTSTATUS WINAPI NtOpenThread(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const CLIENT_ID*);
3171 NTSYSAPI NTSTATUS WINAPI NtOpenThreadToken(HANDLE,DWORD,BOOLEAN,HANDLE *);
3172 NTSYSAPI NTSTATUS WINAPI NtOpenThreadTokenEx(HANDLE,DWORD,BOOLEAN,DWORD,HANDLE *);
3173 NTSYSAPI NTSTATUS WINAPI NtOpenTimer(HANDLE*, ACCESS_MASK, const OBJECT_ATTRIBUTES*);
3174 NTSYSAPI NTSTATUS WINAPI NtPowerInformation(POWER_INFORMATION_LEVEL,PVOID,ULONG,PVOID,ULONG);
3175 NTSYSAPI NTSTATUS WINAPI NtPrivilegeCheck(HANDLE,PPRIVILEGE_SET,PBOOLEAN);
3176 NTSYSAPI NTSTATUS WINAPI NtPrivilegeObjectAuditAlarm(PUNICODE_STRING,HANDLE,HANDLE,ULONG,PPRIVILEGE_SET,BOOLEAN);
3177 NTSYSAPI NTSTATUS WINAPI NtPrivilegedServiceAuditAlarm(PUNICODE_STRING,PUNICODE_STRING,HANDLE,PPRIVILEGE_SET,BOOLEAN);
3178 NTSYSAPI NTSTATUS WINAPI NtProtectVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG,ULONG*);
3179 NTSYSAPI NTSTATUS WINAPI NtPulseEvent(HANDLE,LONG*);
3180 NTSYSAPI NTSTATUS WINAPI NtQueueApcThread(HANDLE,PNTAPCFUNC,ULONG_PTR,ULONG_PTR,ULONG_PTR);
3181 NTSYSAPI NTSTATUS WINAPI NtQueryAttributesFile(const OBJECT_ATTRIBUTES*,FILE_BASIC_INFORMATION*);
3182 NTSYSAPI NTSTATUS WINAPI NtQueryDefaultLocale(BOOLEAN,LCID*);
3183 NTSYSAPI NTSTATUS WINAPI NtQueryDefaultUILanguage(LANGID*);
3184 NTSYSAPI NTSTATUS WINAPI NtQueryDirectoryFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,FILE_INFORMATION_CLASS,BOOLEAN,PUNICODE_STRING,BOOLEAN);
3185 NTSYSAPI NTSTATUS WINAPI NtQueryDirectoryObject(HANDLE,PDIRECTORY_BASIC_INFORMATION,ULONG,BOOLEAN,BOOLEAN,PULONG,PULONG);
3186 NTSYSAPI NTSTATUS WINAPI NtQueryEaFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,BOOLEAN,PVOID,ULONG,PULONG,BOOLEAN);
3187 NTSYSAPI NTSTATUS WINAPI NtQueryEvent(HANDLE,EVENT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
3188 NTSYSAPI NTSTATUS WINAPI NtQueryFullAttributesFile(const OBJECT_ATTRIBUTES*,FILE_NETWORK_OPEN_INFORMATION*);
3189 NTSYSAPI NTSTATUS WINAPI NtQueryInformationAtom(RTL_ATOM,ATOM_INFORMATION_CLASS,PVOID,ULONG,ULONG*);
3190 NTSYSAPI NTSTATUS WINAPI NtQueryInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,LONG,FILE_INFORMATION_CLASS);
3191 NTSYSAPI NTSTATUS WINAPI NtQueryInformationJobObject(HANDLE,JOBOBJECTINFOCLASS,PVOID,ULONG,PULONG);
3192 NTSYSAPI NTSTATUS WINAPI NtQueryInformationPort(HANDLE,PORT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
3193 NTSYSAPI NTSTATUS WINAPI NtQueryInformationProcess(HANDLE,PROCESSINFOCLASS,PVOID,ULONG,PULONG);
3194 NTSYSAPI NTSTATUS WINAPI NtQueryInformationThread(HANDLE,THREADINFOCLASS,PVOID,ULONG,PULONG);
3195 NTSYSAPI NTSTATUS WINAPI NtQueryInformationToken(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,ULONG,PULONG);
3196 NTSYSAPI NTSTATUS WINAPI NtQueryInstallUILanguage(LANGID*);
3197 NTSYSAPI NTSTATUS WINAPI NtQueryIntervalProfile(KPROFILE_SOURCE,PULONG);
3198 NTSYSAPI NTSTATUS WINAPI NtQueryIoCompletion(HANDLE,IO_COMPLETION_INFORMATION_CLASS,PVOID,ULONG,PULONG);
3199 NTSYSAPI NTSTATUS WINAPI NtQueryKey(HANDLE,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *);
3200 NTSYSAPI NTSTATUS WINAPI NtQueryMultipleValueKey(HANDLE,PKEY_MULTIPLE_VALUE_INFORMATION,ULONG,PVOID,ULONG,PULONG);
3201 NTSYSAPI NTSTATUS WINAPI NtQueryMutant(HANDLE,MUTANT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
3202 NTSYSAPI NTSTATUS WINAPI NtQueryObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG, PULONG);
3203 NTSYSAPI NTSTATUS WINAPI NtQueryOpenSubKeys(POBJECT_ATTRIBUTES,PULONG);
3204 NTSYSAPI NTSTATUS WINAPI NtQueryPerformanceCounter(PLARGE_INTEGER, PLARGE_INTEGER);
3205 NTSYSAPI NTSTATUS WINAPI NtQuerySecurityObject(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,ULONG,PULONG);
3206 NTSYSAPI NTSTATUS WINAPI NtQuerySection(HANDLE,SECTION_INFORMATION_CLASS,PVOID,SIZE_T,SIZE_T*);
3207 NTSYSAPI NTSTATUS WINAPI NtQuerySemaphore(HANDLE,SEMAPHORE_INFORMATION_CLASS,PVOID,ULONG,PULONG);
3208 NTSYSAPI NTSTATUS WINAPI NtQuerySymbolicLinkObject(HANDLE,PUNICODE_STRING,PULONG);
3209 NTSYSAPI NTSTATUS WINAPI NtQuerySystemEnvironmentValue(PUNICODE_STRING,PWCHAR,ULONG,PULONG);
3210 NTSYSAPI NTSTATUS WINAPI NtQuerySystemInformation(SYSTEM_INFORMATION_CLASS,PVOID,ULONG,PULONG);
3211 NTSYSAPI NTSTATUS WINAPI NtQuerySystemInformationEx(SYSTEM_INFORMATION_CLASS,void*,ULONG,void*,ULONG,ULONG*);
3212 NTSYSAPI NTSTATUS WINAPI NtQuerySystemTime(PLARGE_INTEGER);
3213 NTSYSAPI NTSTATUS WINAPI NtQueryTimer(HANDLE,TIMER_INFORMATION_CLASS,PVOID,ULONG,PULONG);
3214 NTSYSAPI NTSTATUS WINAPI NtQueryTimerResolution(PULONG,PULONG,PULONG);
3215 NTSYSAPI NTSTATUS WINAPI NtQueryValueKey(HANDLE,const UNICODE_STRING *,KEY_VALUE_INFORMATION_CLASS,void *,DWORD,DWORD *);
3216 NTSYSAPI NTSTATUS WINAPI NtQueryLicenseValue(const UNICODE_STRING *,ULONG *,PVOID,ULONG,ULONG *);
3217 NTSYSAPI NTSTATUS WINAPI NtQueryVirtualMemory(HANDLE,LPCVOID,MEMORY_INFORMATION_CLASS,PVOID,SIZE_T,SIZE_T*);
3218 NTSYSAPI NTSTATUS WINAPI NtQueryVolumeInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS);
3219 NTSYSAPI NTSTATUS WINAPI NtRaiseException(PEXCEPTION_RECORD,PCONTEXT,BOOL);
3220 NTSYSAPI NTSTATUS WINAPI NtRaiseHardError(NTSTATUS,ULONG,PUNICODE_STRING,PVOID*,HARDERROR_RESPONSE_OPTION,PHARDERROR_RESPONSE);
3221 NTSYSAPI NTSTATUS WINAPI NtReadFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,PLARGE_INTEGER,PULONG);
3222 NTSYSAPI NTSTATUS WINAPI NtReadFileScatter(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,FILE_SEGMENT_ELEMENT*,ULONG,PLARGE_INTEGER,PULONG);
3223 NTSYSAPI NTSTATUS WINAPI NtReadRequestData(HANDLE,PLPC_MESSAGE,ULONG,PVOID,ULONG,PULONG);
3224 NTSYSAPI NTSTATUS WINAPI NtReadVirtualMemory(HANDLE,const void*,void*,SIZE_T,SIZE_T*);
3225 NTSYSAPI NTSTATUS WINAPI NtRegisterThreadTerminatePort(HANDLE);
3226 NTSYSAPI NTSTATUS WINAPI NtReleaseKeyedEvent(HANDLE,const void*,BOOLEAN,const LARGE_INTEGER*);
3227 NTSYSAPI NTSTATUS WINAPI NtReleaseMutant(HANDLE,PLONG);
3228 NTSYSAPI NTSTATUS WINAPI NtReleaseSemaphore(HANDLE,ULONG,PULONG);
3229 NTSYSAPI NTSTATUS WINAPI NtRemoveIoCompletion(HANDLE,PULONG_PTR,PULONG_PTR,PIO_STATUS_BLOCK,PLARGE_INTEGER);
3230 NTSYSAPI NTSTATUS WINAPI NtRemoveIoCompletionEx(HANDLE,FILE_IO_COMPLETION_INFORMATION*,ULONG,ULONG*,LARGE_INTEGER*,BOOLEAN);
3231 NTSYSAPI NTSTATUS WINAPI NtRenameKey(HANDLE,UNICODE_STRING*);
3232 NTSYSAPI NTSTATUS WINAPI NtReplaceKey(POBJECT_ATTRIBUTES,HANDLE,POBJECT_ATTRIBUTES);
3233 NTSYSAPI NTSTATUS WINAPI NtReplyPort(HANDLE,PLPC_MESSAGE);
3234 NTSYSAPI NTSTATUS WINAPI NtReplyWaitReceivePort(HANDLE,PULONG,PLPC_MESSAGE,PLPC_MESSAGE);
3235 NTSYSAPI NTSTATUS WINAPI NtReplyWaitReceivePortEx(HANDLE,PVOID*,PPORT_MESSAGE,PPORT_MESSAGE,PLARGE_INTEGER);
3236 NTSYSAPI NTSTATUS WINAPI NtReplyWaitReplyPort(HANDLE,PLPC_MESSAGE);
3237 NTSYSAPI NTSTATUS WINAPI NtRequestPort(HANDLE,PLPC_MESSAGE);
3238 NTSYSAPI NTSTATUS WINAPI NtRequestWaitReplyPort(HANDLE,PLPC_MESSAGE,PLPC_MESSAGE);
3239 NTSYSAPI NTSTATUS WINAPI NtResetEvent(HANDLE,LONG*);
3240 NTSYSAPI NTSTATUS WINAPI NtResetWriteWatch(HANDLE,PVOID,SIZE_T);
3241 NTSYSAPI NTSTATUS WINAPI NtRestoreKey(HANDLE,HANDLE,ULONG);
3242 NTSYSAPI NTSTATUS WINAPI NtResumeProcess(HANDLE);
3243 NTSYSAPI NTSTATUS WINAPI NtResumeThread(HANDLE,PULONG);
3244 NTSYSAPI NTSTATUS WINAPI NtSaveKey(HANDLE,HANDLE);
3245 NTSYSAPI NTSTATUS WINAPI NtSecureConnectPort(PHANDLE,PUNICODE_STRING,PSECURITY_QUALITY_OF_SERVICE,PLPC_SECTION_WRITE,PSID,PLPC_SECTION_READ,PULONG,PVOID,PULONG);
3246 NTSYSAPI NTSTATUS WINAPI NtSetContextThread(HANDLE,const CONTEXT*);
3247 NTSYSAPI NTSTATUS WINAPI NtSetDefaultHardErrorPort(HANDLE);
3248 NTSYSAPI NTSTATUS WINAPI NtSetDefaultLocale(BOOLEAN,LCID);
3249 NTSYSAPI NTSTATUS WINAPI NtSetDefaultUILanguage(LANGID);
3250 NTSYSAPI NTSTATUS WINAPI NtSetEaFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG);
3251 NTSYSAPI NTSTATUS WINAPI NtSetEvent(HANDLE,LONG*);
3252 NTSYSAPI NTSTATUS WINAPI NtSetHighEventPair(HANDLE);
3253 NTSYSAPI NTSTATUS WINAPI NtSetHighWaitLowEventPair(HANDLE);
3254 NTSYSAPI NTSTATUS WINAPI NtSetHighWaitLowThread(VOID);
3255 NTSYSAPI NTSTATUS WINAPI NtSetInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FILE_INFORMATION_CLASS);
3256 NTSYSAPI NTSTATUS WINAPI NtSetInformationJobObject(HANDLE,JOBOBJECTINFOCLASS,PVOID,ULONG);
3257 NTSYSAPI NTSTATUS WINAPI NtSetInformationKey(HANDLE,const int,PVOID,ULONG);
3258 NTSYSAPI NTSTATUS WINAPI NtSetInformationObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG);
3259 NTSYSAPI NTSTATUS WINAPI NtSetInformationProcess(HANDLE,PROCESS_INFORMATION_CLASS,PVOID,ULONG);
3260 NTSYSAPI NTSTATUS WINAPI NtSetInformationThread(HANDLE,THREADINFOCLASS,LPCVOID,ULONG);
3261 NTSYSAPI NTSTATUS WINAPI NtSetInformationToken(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,ULONG);
3262 NTSYSAPI NTSTATUS WINAPI NtSetIntervalProfile(ULONG,KPROFILE_SOURCE);
3263 NTSYSAPI NTSTATUS WINAPI NtSetIoCompletion(HANDLE,ULONG_PTR,ULONG_PTR,NTSTATUS,SIZE_T);
3264 NTSYSAPI NTSTATUS WINAPI NtSetLdtEntries(ULONG,LDT_ENTRY,ULONG,LDT_ENTRY);
3265 NTSYSAPI NTSTATUS WINAPI NtSetLowEventPair(HANDLE);
3266 NTSYSAPI NTSTATUS WINAPI NtSetLowWaitHighEventPair(HANDLE);
3267 NTSYSAPI NTSTATUS WINAPI NtSetLowWaitHighThread(VOID);
3268 NTSYSAPI NTSTATUS WINAPI NtSetPowerRequest(HANDLE,POWER_REQUEST_TYPE);
3269 NTSYSAPI NTSTATUS WINAPI NtSetSecurityObject(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
3270 NTSYSAPI NTSTATUS WINAPI NtSetSystemEnvironmentValue(PUNICODE_STRING,PUNICODE_STRING);
3271 NTSYSAPI NTSTATUS WINAPI NtSetSystemInformation(SYSTEM_INFORMATION_CLASS,PVOID,ULONG);
3272 NTSYSAPI NTSTATUS WINAPI NtSetSystemPowerState(POWER_ACTION,SYSTEM_POWER_STATE,ULONG);
3273 NTSYSAPI NTSTATUS WINAPI NtSetSystemTime(const LARGE_INTEGER*,LARGE_INTEGER*);
3274 NTSYSAPI NTSTATUS WINAPI NtSetThreadExecutionState(EXECUTION_STATE,EXECUTION_STATE*);
3275 NTSYSAPI NTSTATUS WINAPI NtSetTimer(HANDLE, const LARGE_INTEGER*, PTIMER_APC_ROUTINE, PVOID, BOOLEAN, ULONG, BOOLEAN*);
3276 NTSYSAPI NTSTATUS WINAPI NtSetTimerResolution(ULONG,BOOLEAN,PULONG);
3277 NTSYSAPI NTSTATUS WINAPI NtSetValueKey(HANDLE,const UNICODE_STRING *,ULONG,ULONG,const void *,ULONG);
3278 NTSYSAPI NTSTATUS WINAPI NtSetVolumeInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS);
3279 NTSYSAPI NTSTATUS WINAPI NtSignalAndWaitForSingleObject(HANDLE,HANDLE,BOOLEAN,const LARGE_INTEGER*);
3280 NTSYSAPI NTSTATUS WINAPI NtShutdownSystem(SHUTDOWN_ACTION);
3281 NTSYSAPI NTSTATUS WINAPI NtStartProfile(HANDLE);
3282 NTSYSAPI NTSTATUS WINAPI NtStopProfile(HANDLE);
3283 NTSYSAPI NTSTATUS WINAPI NtSuspendProcess(HANDLE);
3284 NTSYSAPI NTSTATUS WINAPI NtSuspendThread(HANDLE,PULONG);
3285 NTSYSAPI NTSTATUS WINAPI NtSystemDebugControl(SYSDBG_COMMAND,PVOID,ULONG,PVOID,ULONG,PULONG);
3286 NTSYSAPI NTSTATUS WINAPI NtTerminateJobObject(HANDLE,NTSTATUS);
3287 NTSYSAPI NTSTATUS WINAPI NtTerminateProcess(HANDLE,LONG);
3288 NTSYSAPI NTSTATUS WINAPI NtTerminateThread(HANDLE,LONG);
3289 NTSYSAPI NTSTATUS WINAPI NtTestAlert(VOID);
3290 NTSYSAPI NTSTATUS WINAPI NtUnloadDriver(const UNICODE_STRING *);
3291 NTSYSAPI NTSTATUS WINAPI NtUnloadKey(POBJECT_ATTRIBUTES);
3292 NTSYSAPI NTSTATUS WINAPI NtUnloadKeyEx(POBJECT_ATTRIBUTES,HANDLE);
3293 NTSYSAPI NTSTATUS WINAPI NtUnlockFile(HANDLE,PIO_STATUS_BLOCK,PLARGE_INTEGER,PLARGE_INTEGER,PULONG);
3294 NTSYSAPI NTSTATUS WINAPI NtUnlockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
3295 NTSYSAPI NTSTATUS WINAPI NtUnmapViewOfSection(HANDLE,PVOID);
3296 NTSYSAPI NTSTATUS WINAPI NtVdmControl(ULONG,PVOID);
3297 NTSYSAPI NTSTATUS WINAPI NtWaitForKeyedEvent(HANDLE,const void*,BOOLEAN,const LARGE_INTEGER*);
3298 NTSYSAPI NTSTATUS WINAPI NtWaitForSingleObject(HANDLE,BOOLEAN,const LARGE_INTEGER*);
3299 NTSYSAPI NTSTATUS WINAPI NtWaitForMultipleObjects(ULONG,const HANDLE*,BOOLEAN,BOOLEAN,const LARGE_INTEGER*);
3300 NTSYSAPI NTSTATUS WINAPI NtWaitHighEventPair(HANDLE);
3301 NTSYSAPI NTSTATUS WINAPI NtWaitLowEventPair(HANDLE);
3302 NTSYSAPI NTSTATUS WINAPI NtWriteFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,const void*,ULONG,PLARGE_INTEGER,PULONG);
3303 NTSYSAPI NTSTATUS WINAPI NtWriteFileGather(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,FILE_SEGMENT_ELEMENT*,ULONG,PLARGE_INTEGER,PULONG);
3304 NTSYSAPI NTSTATUS WINAPI NtWriteRequestData(HANDLE,PLPC_MESSAGE,ULONG,PVOID,ULONG,PULONG);
3305 NTSYSAPI NTSTATUS WINAPI NtWriteVirtualMemory(HANDLE,void*,const void*,SIZE_T,SIZE_T*);
3306 NTSYSAPI NTSTATUS WINAPI NtYieldExecution(void);
3308 NTSYSAPI NTSTATUS WINAPI RtlAbsoluteToSelfRelativeSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PULONG);
3309 NTSYSAPI void WINAPI RtlAcquirePebLock(void);
3310 NTSYSAPI BYTE WINAPI RtlAcquireResourceExclusive(LPRTL_RWLOCK,BYTE);
3311 NTSYSAPI BYTE WINAPI RtlAcquireResourceShared(LPRTL_RWLOCK,BYTE);
3312 NTSYSAPI void WINAPI RtlAcquireSRWLockExclusive(RTL_SRWLOCK*);
3313 NTSYSAPI void WINAPI RtlAcquireSRWLockShared(RTL_SRWLOCK*);
3314 NTSYSAPI NTSTATUS WINAPI RtlActivateActivationContext(DWORD,HANDLE,ULONG_PTR*);
3315 NTSYSAPI NTSTATUS WINAPI RtlActivateActivationContextEx(ULONG,TEB*,HANDLE,ULONG_PTR*);
3316 NTSYSAPI NTSTATUS WINAPI RtlAddAce(PACL,DWORD,DWORD,PACE_HEADER,DWORD);
3317 NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedAce(PACL,DWORD,DWORD,PSID);
3318 NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
3319 NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedObjectAce(PACL,DWORD,DWORD,DWORD,GUID*,GUID*,PSID);
3320 NTSYSAPI NTSTATUS WINAPI RtlAddAccessDeniedAce(PACL,DWORD,DWORD,PSID);
3321 NTSYSAPI NTSTATUS WINAPI RtlAddAccessDeniedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
3322 NTSYSAPI NTSTATUS WINAPI RtlAddAccessDeniedObjectAce(PACL,DWORD,DWORD,DWORD,GUID*,GUID*,PSID);
3323 NTSYSAPI NTSTATUS WINAPI RtlAddAtomToAtomTable(RTL_ATOM_TABLE,const WCHAR*,RTL_ATOM*);
3324 NTSYSAPI NTSTATUS WINAPI RtlAddAuditAccessAce(PACL,DWORD,DWORD,PSID,BOOL,BOOL);
3325 NTSYSAPI NTSTATUS WINAPI RtlAddAuditAccessAceEx(PACL,DWORD,DWORD,DWORD,PSID,BOOL,BOOL);
3326 NTSYSAPI NTSTATUS WINAPI RtlAddAuditAccessObjectAce(PACL,DWORD,DWORD,DWORD,GUID*,GUID*,PSID,BOOL,BOOL);
3327 NTSYSAPI NTSTATUS WINAPI RtlAddMandatoryAce(PACL,DWORD,DWORD,DWORD,DWORD,PSID);
3328 NTSYSAPI void WINAPI RtlAddRefActivationContext(HANDLE);
3329 NTSYSAPI PVOID WINAPI RtlAddVectoredExceptionHandler(ULONG,PVECTORED_EXCEPTION_HANDLER);
3330 NTSYSAPI NTSTATUS WINAPI RtlAdjustPrivilege(ULONG,BOOLEAN,BOOLEAN,PBOOLEAN);
3331 NTSYSAPI NTSTATUS WINAPI RtlAllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY,BYTE,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,PSID *);
3332 NTSYSAPI RTL_HANDLE * WINAPI RtlAllocateHandle(RTL_HANDLE_TABLE *,ULONG *);
3333 NTSYSAPI PVOID WINAPI RtlAllocateHeap(HANDLE,ULONG,SIZE_T) __WINE_ALLOC_SIZE(3);
3334 NTSYSAPI WCHAR WINAPI RtlAnsiCharToUnicodeChar(LPSTR *);
3335 NTSYSAPI DWORD WINAPI RtlAnsiStringToUnicodeSize(const STRING *);
3336 NTSYSAPI NTSTATUS WINAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING,PCANSI_STRING,BOOLEAN);
3337 NTSYSAPI NTSTATUS WINAPI RtlAppendAsciizToString(STRING *,LPCSTR);
3338 NTSYSAPI NTSTATUS WINAPI RtlAppendStringToString(STRING *,const STRING *);
3339 NTSYSAPI NTSTATUS WINAPI RtlAppendUnicodeStringToString(UNICODE_STRING *,const UNICODE_STRING *);
3340 NTSYSAPI NTSTATUS WINAPI RtlAppendUnicodeToString(UNICODE_STRING *,LPCWSTR);
3341 NTSYSAPI BOOLEAN WINAPI RtlAreAllAccessesGranted(ACCESS_MASK,ACCESS_MASK);
3342 NTSYSAPI BOOLEAN WINAPI RtlAreAnyAccessesGranted(ACCESS_MASK,ACCESS_MASK);
3343 NTSYSAPI BOOLEAN WINAPI RtlAreBitsSet(PCRTL_BITMAP,ULONG,ULONG);
3344 NTSYSAPI BOOLEAN WINAPI RtlAreBitsClear(PCRTL_BITMAP,ULONG,ULONG);
3345 NTSYSAPI NTSTATUS WINAPI RtlCharToInteger(PCSZ,ULONG,PULONG);
3346 NTSYSAPI NTSTATUS WINAPI RtlCheckRegistryKey(ULONG, PWSTR);
3347 NTSYSAPI void WINAPI RtlClearAllBits(PRTL_BITMAP);
3348 NTSYSAPI void WINAPI RtlClearBits(PRTL_BITMAP,ULONG,ULONG);
3349 NTSYSAPI NTSTATUS WINAPI RtlCreateActivationContext(HANDLE*,const void*);
3350 NTSYSAPI PDEBUG_BUFFER WINAPI RtlCreateQueryDebugBuffer(ULONG,BOOLEAN);
3351 NTSYSAPI NTSTATUS WINAPI RtlCreateRegistryKey(ULONG,PWSTR);
3352 NTSYSAPI ULONG WINAPI RtlCompactHeap(HANDLE,ULONG);
3353 NTSYSAPI LONG WINAPI RtlCompareString(const STRING*,const STRING*,BOOLEAN);
3354 NTSYSAPI LONG WINAPI RtlCompareUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
3355 NTSYSAPI LONG WINAPI RtlCompareUnicodeStrings(const WCHAR*,SIZE_T,const WCHAR*,SIZE_T,BOOLEAN);
3356 NTSYSAPI NTSTATUS WINAPI RtlCompressBuffer(USHORT,PUCHAR,ULONG,PUCHAR,ULONG,ULONG,PULONG,PVOID);
3357 NTSYSAPI DWORD WINAPI RtlComputeCrc32(DWORD,const BYTE*,INT);
3358 NTSYSAPI NTSTATUS WINAPI RtlConvertSidToUnicodeString(PUNICODE_STRING,PSID,BOOLEAN);
3359 NTSYSAPI NTSTATUS WINAPI RtlConvertToAutoInheritSecurityObject(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR*,GUID*,BOOL,PGENERIC_MAPPING);
3360 NTSYSAPI void WINAPI RtlCopyLuid(PLUID,const LUID*);
3361 NTSYSAPI void WINAPI RtlCopyLuidAndAttributesArray(ULONG,const LUID_AND_ATTRIBUTES*,PLUID_AND_ATTRIBUTES);
3362 NTSYSAPI BOOLEAN WINAPI RtlCopySid(DWORD,PSID,PSID);
3363 NTSYSAPI NTSTATUS WINAPI RtlCopySecurityDescriptor(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR);
3364 NTSYSAPI void WINAPI RtlCopyString(STRING*,const STRING*);
3365 NTSYSAPI void WINAPI RtlCopyUnicodeString(UNICODE_STRING*,const UNICODE_STRING*);
3366 NTSYSAPI NTSTATUS WINAPI RtlCreateAcl(PACL,DWORD,DWORD);
3367 NTSYSAPI NTSTATUS WINAPI RtlCreateAtomTable(ULONG,RTL_ATOM_TABLE*);
3368 NTSYSAPI NTSTATUS WINAPI RtlCreateEnvironment(BOOLEAN, PWSTR*);
3369 NTSYSAPI HANDLE WINAPI RtlCreateHeap(ULONG,PVOID,SIZE_T,SIZE_T,PVOID,PRTL_HEAP_DEFINITION);
3370 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*);
3371 NTSYSAPI NTSTATUS WINAPI RtlCreateProcessParametersEx(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*,ULONG);
3372 NTSYSAPI NTSTATUS WINAPI RtlCreateSecurityDescriptor(PSECURITY_DESCRIPTOR,DWORD);
3373 NTSYSAPI NTSTATUS WINAPI RtlCreateTimerQueue(PHANDLE);
3374 NTSYSAPI NTSTATUS WINAPI RtlCreateTimer(PHANDLE, HANDLE, RTL_WAITORTIMERCALLBACKFUNC, PVOID, DWORD, DWORD, ULONG);
3375 NTSYSAPI BOOLEAN WINAPI RtlCreateUnicodeString(PUNICODE_STRING,LPCWSTR);
3376 NTSYSAPI BOOLEAN WINAPI RtlCreateUnicodeStringFromAsciiz(PUNICODE_STRING,LPCSTR);
3377 NTSYSAPI NTSTATUS WINAPI RtlCreateUserProcess(UNICODE_STRING*,ULONG,RTL_USER_PROCESS_PARAMETERS*,SECURITY_DESCRIPTOR*,SECURITY_DESCRIPTOR*,HANDLE,BOOLEAN,HANDLE,HANDLE,RTL_USER_PROCESS_INFORMATION*);
3378 NTSYSAPI NTSTATUS WINAPI RtlCreateUserThread(HANDLE,SECURITY_DESCRIPTOR*,BOOLEAN,PVOID,SIZE_T,SIZE_T,PRTL_THREAD_START_ROUTINE,void*,HANDLE*,CLIENT_ID*);
3379 NTSYSAPI NTSTATUS WINAPI RtlCreateUserStack(SIZE_T,SIZE_T,ULONG,SIZE_T,SIZE_T,INITIAL_TEB*);
3380 NTSYSAPI NTSTATUS WINAPI RtlCustomCPToUnicodeN(CPTABLEINFO*,WCHAR*,DWORD,DWORD*,const char*,DWORD);
3381 NTSYSAPI void WINAPI RtlDeactivateActivationContext(DWORD,ULONG_PTR);
3382 NTSYSAPI PVOID WINAPI RtlDecodePointer(PVOID);
3383 NTSYSAPI NTSTATUS WINAPI RtlDecompressBuffer(USHORT,PUCHAR,ULONG,PUCHAR,ULONG,PULONG);
3384 NTSYSAPI NTSTATUS WINAPI RtlDecompressFragment(USHORT,PUCHAR,ULONG,PUCHAR,ULONG,ULONG,PULONG,PVOID);
3385 NTSYSAPI NTSTATUS WINAPI RtlDeleteAce(PACL,DWORD);
3386 NTSYSAPI NTSTATUS WINAPI RtlDeleteAtomFromAtomTable(RTL_ATOM_TABLE,RTL_ATOM);
3387 NTSYSAPI NTSTATUS WINAPI RtlDeleteCriticalSection(RTL_CRITICAL_SECTION *);
3388 NTSYSAPI NTSTATUS WINAPI RtlDeleteRegistryValue(ULONG, PCWSTR, PCWSTR);
3389 NTSYSAPI void WINAPI RtlDeleteResource(LPRTL_RWLOCK);
3390 NTSYSAPI NTSTATUS WINAPI RtlDeleteSecurityObject(PSECURITY_DESCRIPTOR*);
3391 NTSYSAPI NTSTATUS WINAPI RtlDeleteTimer(HANDLE, HANDLE, HANDLE);
3392 NTSYSAPI NTSTATUS WINAPI RtlDeleteTimerQueueEx(HANDLE, HANDLE);
3393 NTSYSAPI PRTL_USER_PROCESS_PARAMETERS WINAPI RtlDeNormalizeProcessParams(RTL_USER_PROCESS_PARAMETERS*);
3394 NTSYSAPI NTSTATUS WINAPI RtlDeregisterWait(HANDLE);
3395 NTSYSAPI NTSTATUS WINAPI RtlDeregisterWaitEx(HANDLE,HANDLE);
3396 NTSYSAPI NTSTATUS WINAPI RtlDestroyAtomTable(RTL_ATOM_TABLE);
3397 NTSYSAPI NTSTATUS WINAPI RtlDestroyEnvironment(PWSTR);
3398 NTSYSAPI NTSTATUS WINAPI RtlDestroyHandleTable(RTL_HANDLE_TABLE *);
3399 NTSYSAPI HANDLE WINAPI RtlDestroyHeap(HANDLE);
3400 NTSYSAPI void WINAPI RtlDestroyProcessParameters(RTL_USER_PROCESS_PARAMETERS*);
3401 NTSYSAPI NTSTATUS WINAPI RtlDestroyQueryDebugBuffer(PDEBUG_BUFFER);
3402 NTSYSAPI DOS_PATHNAME_TYPE WINAPI RtlDetermineDosPathNameType_U(PCWSTR);
3403 NTSYSAPI BOOLEAN WINAPI RtlDllShutdownInProgress(void);
3404 NTSYSAPI BOOLEAN WINAPI RtlDoesFileExists_U(LPCWSTR);
3405 NTSYSAPI BOOLEAN WINAPI RtlDosPathNameToNtPathName_U(PCWSTR,PUNICODE_STRING,PWSTR*,CURDIR*);
3406 NTSYSAPI NTSTATUS WINAPI RtlDosPathNameToNtPathName_U_WithStatus(PCWSTR,PUNICODE_STRING,PWSTR*,CURDIR*);
3407 NTSYSAPI ULONG WINAPI RtlDosSearchPath_U(LPCWSTR, LPCWSTR, LPCWSTR, ULONG, LPWSTR, LPWSTR*);
3408 NTSYSAPI WCHAR WINAPI RtlDowncaseUnicodeChar(WCHAR);
3409 NTSYSAPI NTSTATUS WINAPI RtlDowncaseUnicodeString(UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
3410 NTSYSAPI void WINAPI RtlDumpResource(LPRTL_RWLOCK);
3411 NTSYSAPI NTSTATUS WINAPI RtlDuplicateUnicodeString(int,const UNICODE_STRING*,UNICODE_STRING*);
3412 NTSYSAPI NTSTATUS WINAPI RtlEmptyAtomTable(RTL_ATOM_TABLE,BOOLEAN);
3413 NTSYSAPI PVOID WINAPI RtlEncodePointer(PVOID);
3414 NTSYSAPI NTSTATUS WINAPI RtlEnterCriticalSection(RTL_CRITICAL_SECTION *);
3415 NTSYSAPI void WINAPI RtlEraseUnicodeString(UNICODE_STRING*);
3416 NTSYSAPI NTSTATUS WINAPI RtlEqualComputerName(const UNICODE_STRING*,const UNICODE_STRING*);
3417 NTSYSAPI NTSTATUS WINAPI RtlEqualDomainName(const UNICODE_STRING*,const UNICODE_STRING*);
3418 NTSYSAPI BOOLEAN WINAPI RtlEqualLuid(const LUID*,const LUID*);
3419 NTSYSAPI BOOL WINAPI RtlEqualPrefixSid(PSID,PSID);
3420 NTSYSAPI BOOL WINAPI RtlEqualSid(PSID,PSID);
3421 NTSYSAPI BOOLEAN WINAPI RtlEqualString(const STRING*,const STRING*,BOOLEAN);
3422 NTSYSAPI BOOLEAN WINAPI RtlEqualUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
3423 NTSYSAPI void DECLSPEC_NORETURN WINAPI RtlExitUserProcess(ULONG);
3424 NTSYSAPI void DECLSPEC_NORETURN WINAPI RtlExitUserThread(ULONG);
3425 NTSYSAPI NTSTATUS WINAPI RtlExpandEnvironmentStrings(const WCHAR*,WCHAR*,SIZE_T,WCHAR*,SIZE_T,SIZE_T*);
3426 NTSYSAPI NTSTATUS WINAPI RtlExpandEnvironmentStrings_U(PCWSTR, const UNICODE_STRING*, UNICODE_STRING*, ULONG*);
3427 NTSYSAPI NTSTATUS WINAPI RtlFindActivationContextSectionString(ULONG,const GUID*,ULONG,const UNICODE_STRING*,PVOID);
3428 NTSYSAPI NTSTATUS WINAPI RtlFindActivationContextSectionGuid(ULONG,const GUID*,ULONG,const GUID*,PVOID);
3429 NTSYSAPI NTSTATUS WINAPI RtlFindCharInUnicodeString(int,const UNICODE_STRING*,const UNICODE_STRING*,USHORT*);
3430 NTSYSAPI ULONG WINAPI RtlFindClearBits(PCRTL_BITMAP,ULONG,ULONG);
3431 NTSYSAPI ULONG WINAPI RtlFindClearBitsAndSet(PRTL_BITMAP,ULONG,ULONG);
3432 NTSYSAPI ULONG WINAPI RtlFindClearRuns(PCRTL_BITMAP,PRTL_BITMAP_RUN,ULONG,BOOLEAN);
3433 NTSYSAPI ULONG WINAPI RtlFindLastBackwardRunSet(PCRTL_BITMAP,ULONG,PULONG);
3434 NTSYSAPI ULONG WINAPI RtlFindLastBackwardRunClear(PCRTL_BITMAP,ULONG,PULONG);
3435 NTSYSAPI CCHAR WINAPI RtlFindLeastSignificantBit(ULONGLONG);
3436 NTSYSAPI ULONG WINAPI RtlFindLongestRunSet(PCRTL_BITMAP,PULONG);
3437 NTSYSAPI ULONG WINAPI RtlFindLongestRunClear(PCRTL_BITMAP,PULONG);
3438 NTSYSAPI NTSTATUS WINAPI RtlFindMessage(HMODULE,ULONG,ULONG,ULONG,const MESSAGE_RESOURCE_ENTRY**);
3439 NTSYSAPI CCHAR WINAPI RtlFindMostSignificantBit(ULONGLONG);
3440 NTSYSAPI ULONG WINAPI RtlFindNextForwardRunSet(PCRTL_BITMAP,ULONG,PULONG);
3441 NTSYSAPI ULONG WINAPI RtlFindNextForwardRunClear(PCRTL_BITMAP,ULONG,PULONG);
3442 NTSYSAPI ULONG WINAPI RtlFindSetBits(PCRTL_BITMAP,ULONG,ULONG);
3443 NTSYSAPI ULONG WINAPI RtlFindSetBitsAndClear(PRTL_BITMAP,ULONG,ULONG);
3444 NTSYSAPI ULONG WINAPI RtlFindSetRuns(PCRTL_BITMAP,PRTL_BITMAP_RUN,ULONG,BOOLEAN);
3445 NTSYSAPI BOOLEAN WINAPI RtlFirstFreeAce(PACL,PACE_HEADER *);
3446 NTSYSAPI NTSTATUS WINAPI RtlFlsAlloc(PFLS_CALLBACK_FUNCTION,ULONG *);
3447 NTSYSAPI NTSTATUS WINAPI RtlFlsFree(ULONG);
3448 NTSYSAPI NTSTATUS WINAPI RtlFlsGetValue(ULONG,void **);
3449 NTSYSAPI NTSTATUS WINAPI RtlFlsSetValue(ULONG,void *);
3450 NTSYSAPI NTSTATUS WINAPI RtlFormatCurrentUserKeyPath(PUNICODE_STRING);
3451 NTSYSAPI NTSTATUS WINAPI RtlFormatMessage(LPCWSTR,ULONG,BOOLEAN,BOOLEAN,BOOLEAN,__ms_va_list *,LPWSTR,ULONG,ULONG*);
3452 NTSYSAPI NTSTATUS WINAPI RtlFormatMessageEx(LPCWSTR,ULONG,BOOLEAN,BOOLEAN,BOOLEAN,__ms_va_list *,LPWSTR,ULONG,ULONG*,ULONG);
3453 NTSYSAPI void WINAPI RtlFreeAnsiString(PANSI_STRING);
3454 NTSYSAPI BOOLEAN WINAPI RtlFreeHandle(RTL_HANDLE_TABLE *,RTL_HANDLE *);
3455 NTSYSAPI BOOLEAN WINAPI RtlFreeHeap(HANDLE,ULONG,PVOID);
3456 NTSYSAPI void WINAPI RtlFreeOemString(POEM_STRING);
3457 NTSYSAPI DWORD WINAPI RtlFreeSid(PSID);
3458 NTSYSAPI void WINAPI RtlFreeThreadActivationContextStack(void);
3459 NTSYSAPI void WINAPI RtlFreeUnicodeString(PUNICODE_STRING);
3460 NTSYSAPI void WINAPI RtlFreeUserStack(void*);
3461 NTSYSAPI NTSTATUS WINAPI RtlGetAce(PACL,DWORD,LPVOID *);
3462 NTSYSAPI NTSTATUS WINAPI RtlGetActiveActivationContext(HANDLE*);
3463 NTSYSAPI NTSTATUS WINAPI RtlGetCompressionWorkSpaceSize(USHORT,PULONG,PULONG);
3464 NTSYSAPI NTSTATUS WINAPI RtlGetControlSecurityDescriptor(PSECURITY_DESCRIPTOR, PSECURITY_DESCRIPTOR_CONTROL,LPDWORD);
3465 NTSYSAPI ULONG WINAPI RtlGetCurrentDirectory_U(ULONG, LPWSTR);
3466 NTSYSAPI PEB * WINAPI RtlGetCurrentPeb(void);
3467 NTSYSAPI NTSTATUS WINAPI RtlGetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR,PBOOLEAN,PACL *,PBOOLEAN);
3468 NTSYSAPI NTSTATUS WINAPI RtlGetExePath(PCWSTR,PWSTR*);
3469 NTSYSAPI TEB_ACTIVE_FRAME * WINAPI RtlGetFrame(void);
3470 NTSYSAPI ULONG WINAPI RtlGetFullPathName_U(PCWSTR,ULONG,PWSTR,PWSTR*);
3471 NTSYSAPI NTSTATUS WINAPI RtlGetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID *,PBOOLEAN);
3472 NTSYSAPI NTSTATUS WINAPI RtlGetLastNtStatus(void);
3473 NTSYSAPI DWORD WINAPI RtlGetLastWin32Error(void);
3474 NTSYSAPI DWORD WINAPI RtlGetLongestNtPathLength(void);
3475 NTSYSAPI ULONG WINAPI RtlGetNtGlobalFlags(void);
3476 NTSYSAPI BOOLEAN WINAPI RtlGetNtProductType(LPDWORD);
3477 NTSYSAPI NTSTATUS WINAPI RtlGetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID *,PBOOLEAN);
3478 NTSYSAPI ULONG WINAPI RtlGetProcessHeaps(ULONG,HANDLE*);
3479 NTSYSAPI NTSTATUS WINAPI RtlGetProcessPreferredUILanguages(DWORD,ULONG*,WCHAR*,ULONG*);
3480 NTSYSAPI NTSTATUS WINAPI RtlGetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR,PBOOLEAN,PACL *,PBOOLEAN);
3481 NTSYSAPI NTSTATUS WINAPI RtlGetSearchPath(PWSTR*);
3482 NTSYSAPI NTSTATUS WINAPI RtlGetSystemPreferredUILanguages(DWORD,ULONG,ULONG*,WCHAR*,ULONG*);
3483 NTSYSAPI LONGLONG WINAPI RtlGetSystemTimePrecise(void);
3484 NTSYSAPI DWORD WINAPI RtlGetThreadErrorMode(void);
3485 NTSYSAPI NTSTATUS WINAPI RtlGetThreadPreferredUILanguages(DWORD,ULONG*,WCHAR*,ULONG*);
3486 NTSYSAPI NTSTATUS WINAPI RtlGetUserPreferredUILanguages(DWORD,ULONG,ULONG*,WCHAR*,ULONG*);
3487 NTSYSAPI NTSTATUS WINAPI RtlGetVersion(RTL_OSVERSIONINFOEXW*);
3488 NTSYSAPI NTSTATUS WINAPI RtlGUIDFromString(PUNICODE_STRING,GUID*);
3489 NTSYSAPI PSID_IDENTIFIER_AUTHORITY WINAPI RtlIdentifierAuthoritySid(PSID);
3490 NTSYSAPI NTSTATUS WINAPI RtlIdnToAscii(DWORD,const WCHAR*,INT,WCHAR*,INT*);
3491 NTSYSAPI NTSTATUS WINAPI RtlIdnToNameprepUnicode(DWORD,const WCHAR*,INT,WCHAR*,INT*);
3492 NTSYSAPI NTSTATUS WINAPI RtlIdnToUnicode(DWORD,const WCHAR*,INT,WCHAR*,INT*);
3493 NTSYSAPI PVOID WINAPI RtlImageDirectoryEntryToData(HMODULE,BOOL,WORD,ULONG *);
3494 NTSYSAPI PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE);
3495 NTSYSAPI PIMAGE_SECTION_HEADER WINAPI RtlImageRvaToSection(const IMAGE_NT_HEADERS *,HMODULE,DWORD);
3496 NTSYSAPI PVOID WINAPI RtlImageRvaToVa(const IMAGE_NT_HEADERS *,HMODULE,DWORD,IMAGE_SECTION_HEADER **);
3497 NTSYSAPI NTSTATUS WINAPI RtlImpersonateSelf(SECURITY_IMPERSONATION_LEVEL);
3498 NTSYSAPI void WINAPI RtlInitString(PSTRING,PCSZ);
3499 NTSYSAPI void WINAPI RtlInitAnsiString(PANSI_STRING,PCSZ);
3500 NTSYSAPI NTSTATUS WINAPI RtlInitAnsiStringEx(PANSI_STRING,PCSZ);
3501 NTSYSAPI void WINAPI RtlInitCodePageTable(USHORT*,CPTABLEINFO*);
3502 NTSYSAPI void WINAPI RtlInitNlsTables(USHORT*,USHORT*,USHORT*,NLSTABLEINFO*);
3503 NTSYSAPI void WINAPI RtlInitUnicodeString(PUNICODE_STRING,PCWSTR);
3504 NTSYSAPI NTSTATUS WINAPI RtlInitUnicodeStringEx(PUNICODE_STRING,PCWSTR);
3505 NTSYSAPI void WINAPI RtlInitializeBitMap(PRTL_BITMAP,PULONG,ULONG);
3506 NTSYSAPI void WINAPI RtlInitializeConditionVariable(RTL_CONDITION_VARIABLE *);
3507 NTSYSAPI NTSTATUS WINAPI RtlInitializeCriticalSection(RTL_CRITICAL_SECTION *);
3508 NTSYSAPI NTSTATUS WINAPI RtlInitializeCriticalSectionAndSpinCount(RTL_CRITICAL_SECTION *,ULONG);
3509 NTSYSAPI NTSTATUS WINAPI RtlInitializeCriticalSectionEx(RTL_CRITICAL_SECTION *,ULONG,ULONG);
3510 NTSYSAPI void WINAPI RtlInitializeHandleTable(ULONG,ULONG,RTL_HANDLE_TABLE *);
3511 NTSYSAPI void WINAPI RtlInitializeResource(LPRTL_RWLOCK);
3512 NTSYSAPI void WINAPI RtlInitializeSRWLock(RTL_SRWLOCK*);
3513 NTSYSAPI BOOL WINAPI RtlInitializeSid(PSID,PSID_IDENTIFIER_AUTHORITY,BYTE);
3514 NTSYSAPI NTSTATUS WINAPI RtlInt64ToUnicodeString(ULONGLONG,ULONG,UNICODE_STRING *);
3515 NTSYSAPI NTSTATUS WINAPI RtlIntegerToChar(ULONG,ULONG,ULONG,PCHAR);
3516 NTSYSAPI NTSTATUS WINAPI RtlIntegerToUnicodeString(ULONG,ULONG,UNICODE_STRING *);
3517 NTSYSAPI BOOLEAN WINAPI RtlIsActivationContextActive(HANDLE);
3518 NTSYSAPI BOOL WINAPI RtlIsCriticalSectionLocked(RTL_CRITICAL_SECTION *);
3519 NTSYSAPI BOOL WINAPI RtlIsCriticalSectionLockedByThread(RTL_CRITICAL_SECTION *);
3520 NTSYSAPI ULONG WINAPI RtlIsDosDeviceName_U(PCWSTR);
3521 NTSYSAPI BOOLEAN WINAPI RtlIsNameLegalDOS8Dot3(const UNICODE_STRING*,POEM_STRING,PBOOLEAN);
3522 NTSYSAPI NTSTATUS WINAPI RtlIsNormalizedString(ULONG,const WCHAR*,INT,BOOLEAN*);
3523 NTSYSAPI BOOLEAN WINAPI RtlIsProcessorFeaturePresent(UINT);
3524 NTSYSAPI BOOLEAN WINAPI RtlIsTextUnicode(LPCVOID,INT,INT *);
3525 NTSYSAPI BOOLEAN WINAPI RtlIsValidHandle(const RTL_HANDLE_TABLE *, const RTL_HANDLE *);
3526 NTSYSAPI BOOLEAN WINAPI RtlIsValidIndexHandle(const RTL_HANDLE_TABLE *, ULONG Index, RTL_HANDLE **);
3527 NTSYSAPI NTSTATUS WINAPI RtlLeaveCriticalSection(RTL_CRITICAL_SECTION *);
3528 NTSYSAPI DWORD WINAPI RtlLengthRequiredSid(DWORD);
3529 NTSYSAPI ULONG WINAPI RtlLengthSecurityDescriptor(PSECURITY_DESCRIPTOR);
3530 NTSYSAPI DWORD WINAPI RtlLengthSid(PSID);
3531 NTSYSAPI NTSTATUS WINAPI RtlLocalTimeToSystemTime(const LARGE_INTEGER*,PLARGE_INTEGER);
3532 NTSYSAPI NTSTATUS WINAPI RtlLocaleNameToLcid(const WCHAR*,LCID*,ULONG);
3533 NTSYSAPI BOOLEAN WINAPI RtlLockHeap(HANDLE);
3534 NTSYSAPI NTSTATUS WINAPI RtlLookupAtomInAtomTable(RTL_ATOM_TABLE,const WCHAR*,RTL_ATOM*);
3535 NTSYSAPI NTSTATUS WINAPI RtlMakeSelfRelativeSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,LPDWORD);
3536 NTSYSAPI void WINAPI RtlMapGenericMask(PACCESS_MASK,const GENERIC_MAPPING*);
3537 NTSYSAPI NTSTATUS WINAPI RtlMultiByteToUnicodeN(LPWSTR,DWORD,LPDWORD,LPCSTR,DWORD);
3538 NTSYSAPI NTSTATUS WINAPI RtlMultiByteToUnicodeSize(DWORD*,LPCSTR,UINT);
3539 NTSYSAPI NTSTATUS WINAPI RtlNewSecurityObject(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR*,BOOLEAN,HANDLE,PGENERIC_MAPPING);
3540 NTSYSAPI PRTL_USER_PROCESS_PARAMETERS WINAPI RtlNormalizeProcessParams(RTL_USER_PROCESS_PARAMETERS*);
3541 NTSYSAPI NTSTATUS WINAPI RtlNormalizeString(ULONG,const WCHAR*,INT,WCHAR*,INT*);
3542 NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS);
3543 NTSYSAPI ULONG WINAPI RtlNtStatusToDosErrorNoTeb(NTSTATUS);
3544 NTSYSAPI ULONG WINAPI RtlNumberOfSetBits(PCRTL_BITMAP);
3545 NTSYSAPI ULONG WINAPI RtlNumberOfClearBits(PCRTL_BITMAP);
3546 NTSYSAPI UINT WINAPI RtlOemStringToUnicodeSize(const STRING*);
3547 NTSYSAPI NTSTATUS WINAPI RtlOemStringToUnicodeString(UNICODE_STRING*,const STRING*,BOOLEAN);
3548 NTSYSAPI NTSTATUS WINAPI RtlOemToUnicodeN(LPWSTR,DWORD,LPDWORD,LPCSTR,DWORD);
3549 NTSYSAPI NTSTATUS WINAPI RtlOpenCurrentUser(ACCESS_MASK,PHANDLE);
3550 NTSYSAPI PVOID WINAPI RtlPcToFileHeader(PVOID,PVOID*);
3551 NTSYSAPI NTSTATUS WINAPI RtlPinAtomInAtomTable(RTL_ATOM_TABLE,RTL_ATOM);
3552 NTSYSAPI void WINAPI RtlPopFrame(TEB_ACTIVE_FRAME*);
3553 NTSYSAPI BOOLEAN WINAPI RtlPrefixString(const STRING*,const STRING*,BOOLEAN);
3554 NTSYSAPI BOOLEAN WINAPI RtlPrefixUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
3555 NTSYSAPI void WINAPI RtlProcessFlsData(void*,ULONG);
3556 NTSYSAPI void WINAPI RtlPushFrame(TEB_ACTIVE_FRAME*);
3557 NTSYSAPI NTSTATUS WINAPI RtlQueryActivationContextApplicationSettings(DWORD,HANDLE,const WCHAR*,const WCHAR*,WCHAR*,SIZE_T,SIZE_T*);
3558 NTSYSAPI NTSTATUS WINAPI RtlQueryAtomInAtomTable(RTL_ATOM_TABLE,RTL_ATOM,ULONG*,ULONG*,WCHAR*,ULONG*);
3559 NTSYSAPI NTSTATUS WINAPI RtlQueryDynamicTimeZoneInformation(RTL_DYNAMIC_TIME_ZONE_INFORMATION*);
3560 NTSYSAPI NTSTATUS WINAPI RtlQueryEnvironmentVariable(WCHAR*,const WCHAR*,SIZE_T,WCHAR*,SIZE_T,SIZE_T*);
3561 NTSYSAPI NTSTATUS WINAPI RtlQueryEnvironmentVariable_U(PWSTR,PUNICODE_STRING,PUNICODE_STRING);
3562 NTSYSAPI NTSTATUS WINAPI RtlQueryHeapInformation(HANDLE,HEAP_INFORMATION_CLASS,PVOID,SIZE_T,PSIZE_T);
3563 NTSYSAPI NTSTATUS WINAPI RtlQueryInformationAcl(PACL,LPVOID,DWORD,ACL_INFORMATION_CLASS);
3564 NTSYSAPI NTSTATUS WINAPI RtlQueryInformationActivationContext(ULONG,HANDLE,PVOID,ULONG,PVOID,SIZE_T,SIZE_T*);
3565 NTSYSAPI BOOL WINAPI RtlQueryPerformanceCounter(LARGE_INTEGER*);
3566 NTSYSAPI BOOL WINAPI RtlQueryPerformanceFrequency(LARGE_INTEGER*);
3567 NTSYSAPI NTSTATUS WINAPI RtlQueryProcessDebugInformation(ULONG,ULONG,PDEBUG_BUFFER);
3568 NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID);
3569 NTSYSAPI NTSTATUS WINAPI RtlQueryTimeZoneInformation(RTL_TIME_ZONE_INFORMATION*);
3570 NTSYSAPI BOOL WINAPI RtlQueryUnbiasedInterruptTime(ULONGLONG*);
3571 NTSYSAPI NTSTATUS WINAPI RtlQueueWorkItem(PRTL_WORK_ITEM_ROUTINE,PVOID,ULONG);
3572 NTSYSAPI void WINAPI RtlRaiseException(PEXCEPTION_RECORD);
3573 NTSYSAPI void WINAPI RtlRaiseStatus(NTSTATUS);
3574 NTSYSAPI ULONG WINAPI RtlRandom(PULONG);
3575 NTSYSAPI PVOID WINAPI RtlReAllocateHeap(HANDLE,ULONG,PVOID,SIZE_T);
3576 NTSYSAPI NTSTATUS WINAPI RtlRegisterWait(PHANDLE,HANDLE,RTL_WAITORTIMERCALLBACKFUNC,PVOID,ULONG,ULONG);
3577 NTSYSAPI void WINAPI RtlReleaseActivationContext(HANDLE);
3578 NTSYSAPI void WINAPI RtlReleasePath(PWSTR);
3579 NTSYSAPI void WINAPI RtlReleasePebLock(void);
3580 NTSYSAPI void WINAPI RtlReleaseResource(LPRTL_RWLOCK);
3581 NTSYSAPI void WINAPI RtlReleaseSRWLockExclusive(RTL_SRWLOCK*);
3582 NTSYSAPI void WINAPI RtlReleaseSRWLockShared(RTL_SRWLOCK*);
3583 NTSYSAPI ULONG WINAPI RtlRemoveVectoredExceptionHandler(PVOID);
3584 NTSYSAPI void WINAPI RtlResetRtlTranslations(const NLSTABLEINFO*);
3585 NTSYSAPI void WINAPI RtlRestoreLastWin32Error(DWORD);
3586 NTSYSAPI void WINAPI RtlSecondsSince1970ToTime(DWORD,LARGE_INTEGER *);
3587 NTSYSAPI void WINAPI RtlSecondsSince1980ToTime(DWORD,LARGE_INTEGER *);
3588 NTSYSAPI NTSTATUS WINAPI RtlSelfRelativeToAbsoluteSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PDWORD,PACL,PDWORD,PACL,PDWORD,PSID,PDWORD,PSID,PDWORD);
3589 NTSYSAPI void WINAPI RtlSetAllBits(PRTL_BITMAP);
3590 NTSYSAPI void WINAPI RtlSetBits(PRTL_BITMAP,ULONG,ULONG);
3591 NTSYSAPI ULONG WINAPI RtlSetCriticalSectionSpinCount(RTL_CRITICAL_SECTION*,ULONG);
3592 NTSYSAPI NTSTATUS WINAPI RtlSetControlSecurityDescriptor(PSECURITY_DESCRIPTOR,SECURITY_DESCRIPTOR_CONTROL,SECURITY_DESCRIPTOR_CONTROL);
3593 NTSYSAPI NTSTATUS WINAPI RtlSetCurrentDirectory_U(const UNICODE_STRING*);
3594 NTSYSAPI void WINAPI RtlSetCurrentEnvironment(PWSTR, PWSTR*);
3595 NTSYSAPI NTSTATUS WINAPI RtlSetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR,BOOLEAN,PACL,BOOLEAN);
3596 NTSYSAPI NTSTATUS WINAPI RtlSetEnvironmentVariable(PWSTR*,PUNICODE_STRING,PUNICODE_STRING);
3597 NTSYSAPI NTSTATUS WINAPI RtlSetHeapInformation(HANDLE,HEAP_INFORMATION_CLASS,PVOID,SIZE_T);
3598 NTSYSAPI NTSTATUS WINAPI RtlSetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID,BOOLEAN);
3599 NTSYSAPI NTSTATUS WINAPI RtlSetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID,BOOLEAN);
3600 NTSYSAPI NTSTATUS WINAPI RtlSetIoCompletionCallback(HANDLE,PRTL_OVERLAPPED_COMPLETION_ROUTINE,ULONG);
3601 NTSYSAPI void WINAPI RtlSetLastWin32Error(DWORD);
3602 NTSYSAPI void WINAPI RtlSetLastWin32ErrorAndNtStatusFromNtStatus(NTSTATUS);
3603 NTSYSAPI NTSTATUS WINAPI RtlSetProcessPreferredUILanguages(DWORD,PCZZWSTR,ULONG*);
3604 NTSYSAPI NTSTATUS WINAPI RtlSetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR,BOOLEAN,PACL,BOOLEAN);
3605 NTSYSAPI NTSTATUS WINAPI RtlSetSearchPathMode(ULONG);
3606 NTSYSAPI NTSTATUS WINAPI RtlSetThreadErrorMode(DWORD,LPDWORD);
3607 NTSYSAPI NTSTATUS WINAPI RtlSetThreadPreferredUILanguages(DWORD,PCZZWSTR,ULONG*);
3608 NTSYSAPI NTSTATUS WINAPI RtlSetTimeZoneInformation(const RTL_TIME_ZONE_INFORMATION*);
3609 NTSYSAPI void WINAPI RtlSetUnhandledExceptionFilter(PRTL_EXCEPTION_FILTER);
3610 NTSYSAPI SIZE_T WINAPI RtlSizeHeap(HANDLE,ULONG,const void*);
3611 NTSYSAPI NTSTATUS WINAPI RtlSleepConditionVariableCS(RTL_CONDITION_VARIABLE*,RTL_CRITICAL_SECTION*,const LARGE_INTEGER*);
3612 NTSYSAPI NTSTATUS WINAPI RtlSleepConditionVariableSRW(RTL_CONDITION_VARIABLE*,RTL_SRWLOCK*,const LARGE_INTEGER*,ULONG);
3613 NTSYSAPI NTSTATUS WINAPI RtlStringFromGUID(REFGUID,PUNICODE_STRING);
3614 NTSYSAPI LPDWORD WINAPI RtlSubAuthoritySid(PSID,DWORD);
3615 NTSYSAPI LPBYTE WINAPI RtlSubAuthorityCountSid(PSID);
3616 NTSYSAPI NTSTATUS WINAPI RtlSystemTimeToLocalTime(const LARGE_INTEGER*,PLARGE_INTEGER);
3617 NTSYSAPI void WINAPI RtlTimeToTimeFields(const LARGE_INTEGER*,PTIME_FIELDS);
3618 NTSYSAPI BOOLEAN WINAPI RtlTimeFieldsToTime(PTIME_FIELDS,PLARGE_INTEGER);
3619 NTSYSAPI void WINAPI RtlTimeToElapsedTimeFields(const LARGE_INTEGER *,PTIME_FIELDS);
3620 NTSYSAPI BOOLEAN WINAPI RtlTimeToSecondsSince1970(const LARGE_INTEGER *,LPDWORD);
3621 NTSYSAPI BOOLEAN WINAPI RtlTimeToSecondsSince1980(const LARGE_INTEGER *,LPDWORD);
3622 NTSYSAPI BOOLEAN WINAPI RtlTryAcquireSRWLockExclusive(RTL_SRWLOCK *);
3623 NTSYSAPI BOOLEAN WINAPI RtlTryAcquireSRWLockShared(RTL_SRWLOCK *);
3624 NTSYSAPI BOOL WINAPI RtlTryEnterCriticalSection(RTL_CRITICAL_SECTION *);
3625 NTSYSAPI NTSTATUS WINAPI RtlUTF8ToUnicodeN(WCHAR*,DWORD,DWORD*,const char*,DWORD);
3626 NTSYSAPI ULONGLONG __cdecl RtlUlonglongByteSwap(ULONGLONG);
3627 NTSYSAPI DWORD WINAPI RtlUnicodeStringToAnsiSize(const UNICODE_STRING*);
3628 NTSYSAPI NTSTATUS WINAPI RtlUnicodeStringToAnsiString(PANSI_STRING,PCUNICODE_STRING,BOOLEAN);
3629 NTSYSAPI NTSTATUS WINAPI RtlUnicodeStringToInteger(const UNICODE_STRING *,ULONG,ULONG *);
3630 NTSYSAPI DWORD WINAPI RtlUnicodeStringToOemSize(const UNICODE_STRING*);
3631 NTSYSAPI NTSTATUS WINAPI RtlUnicodeStringToOemString(POEM_STRING,PCUNICODE_STRING,BOOLEAN);
3632 NTSYSAPI NTSTATUS WINAPI RtlUnicodeToCustomCPN(CPTABLEINFO*,char*,DWORD,DWORD*,const WCHAR*,DWORD);
3633 NTSYSAPI NTSTATUS WINAPI RtlUnicodeToMultiByteN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
3634 NTSYSAPI NTSTATUS WINAPI RtlUnicodeToMultiByteSize(PULONG,PCWSTR,ULONG);
3635 NTSYSAPI NTSTATUS WINAPI RtlUnicodeToOemN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
3636 NTSYSAPI NTSTATUS WINAPI RtlUnicodeToUTF8N(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
3637 NTSYSAPI ULONG WINAPI RtlUniform(PULONG);
3638 NTSYSAPI BOOLEAN WINAPI RtlUnlockHeap(HANDLE);
3639 NTSYSAPI void WINAPI RtlUnwind(PVOID,PVOID,PEXCEPTION_RECORD,PVOID);
3640 #ifdef __x86_64__
3641 NTSYSAPI void WINAPI RtlUnwindEx(PVOID,PVOID,PEXCEPTION_RECORD,PVOID,PCONTEXT,PUNWIND_HISTORY_TABLE);
3642 #elif defined(__ia64__)
3643 NTSYSAPI void WINAPI RtlUnwind2(FRAME_POINTERS,PVOID,PEXCEPTION_RECORD,PVOID,PCONTEXT);
3644 NTSYSAPI void WINAPI RtlUnwindEx(FRAME_POINTERS,PVOID,PEXCEPTION_RECORD,PVOID,PCONTEXT,PUNWIND_HISTORY_TABLE);
3645 #endif
3646 NTSYSAPI WCHAR WINAPI RtlUpcaseUnicodeChar(WCHAR);
3647 NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeString(UNICODE_STRING*,const UNICODE_STRING *,BOOLEAN);
3648 NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeStringToAnsiString(STRING*,const UNICODE_STRING*,BOOLEAN);
3649 NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeStringToCountedOemString(STRING*,const UNICODE_STRING*,BOOLEAN);
3650 NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeStringToOemString(STRING*,const UNICODE_STRING*,BOOLEAN);
3651 NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeToCustomCPN(CPTABLEINFO*,char*,DWORD,DWORD*,const WCHAR*,DWORD);
3652 NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeToMultiByteN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
3653 NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeToOemN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
3654 NTSYSAPI NTSTATUS WINAPI RtlUpdateTimer(HANDLE, HANDLE, DWORD, DWORD);
3655 NTSYSAPI CHAR WINAPI RtlUpperChar(CHAR);
3656 NTSYSAPI void WINAPI RtlUpperString(STRING *,const STRING *);
3657 NTSYSAPI void WINAPI RtlUserThreadStart(PRTL_THREAD_START_ROUTINE,void*);
3658 NTSYSAPI NTSTATUS WINAPI RtlValidSecurityDescriptor(PSECURITY_DESCRIPTOR);
3659 NTSYSAPI BOOLEAN WINAPI RtlValidRelativeSecurityDescriptor(PSECURITY_DESCRIPTOR,ULONG,SECURITY_INFORMATION);
3660 NTSYSAPI BOOLEAN WINAPI RtlValidAcl(PACL);
3661 NTSYSAPI BOOLEAN WINAPI RtlValidSid(PSID);
3662 NTSYSAPI BOOLEAN WINAPI RtlValidateHeap(HANDLE,ULONG,LPCVOID);
3663 NTSYSAPI NTSTATUS WINAPI RtlVerifyVersionInfo(const RTL_OSVERSIONINFOEXW*,DWORD,DWORDLONG);
3664 NTSYSAPI NTSTATUS WINAPI RtlWaitOnAddress(const void *,const void *,SIZE_T,const LARGE_INTEGER *);
3665 NTSYSAPI void WINAPI RtlWakeAddressAll(const void *);
3666 NTSYSAPI void WINAPI RtlWakeAddressSingle(const void *);
3667 NTSYSAPI void WINAPI RtlWakeAllConditionVariable(RTL_CONDITION_VARIABLE *);
3668 NTSYSAPI void WINAPI RtlWakeConditionVariable(RTL_CONDITION_VARIABLE *);
3669 NTSYSAPI NTSTATUS WINAPI RtlWalkHeap(HANDLE,PVOID);
3670 NTSYSAPI NTSTATUS WINAPI RtlWow64EnableFsRedirection(BOOLEAN);
3671 NTSYSAPI NTSTATUS WINAPI RtlWow64EnableFsRedirectionEx(ULONG,ULONG*);
3672 #ifdef __x86_64__
3673 NTSYSAPI NTSTATUS WINAPI RtlWow64GetThreadContext(HANDLE, WOW64_CONTEXT *);
3674 NTSYSAPI NTSTATUS WINAPI RtlWow64SetThreadContext(HANDLE, const WOW64_CONTEXT *);
3675 #endif
3676 NTSYSAPI NTSTATUS WINAPI RtlWriteRegistryValue(ULONG,PCWSTR,PCWSTR,ULONG,PVOID,ULONG);
3677 NTSYSAPI NTSTATUS WINAPI RtlZombifyActivationContext(HANDLE);
3678 NTSYSAPI NTSTATUS WINAPI RtlpNtCreateKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,PULONG);
3679 NTSYSAPI NTSTATUS WINAPI RtlpNtEnumerateSubKey(HANDLE,UNICODE_STRING *, ULONG);
3680 NTSYSAPI NTSTATUS WINAPI RtlpWaitForCriticalSection(RTL_CRITICAL_SECTION *);
3681 NTSYSAPI NTSTATUS WINAPI RtlpUnWaitCriticalSection(RTL_CRITICAL_SECTION *);
3682 NTSYSAPI NTSTATUS WINAPI vDbgPrintEx(ULONG,ULONG,LPCSTR,__ms_va_list);
3683 NTSYSAPI NTSTATUS WINAPI vDbgPrintExWithPrefix(LPCSTR,ULONG,ULONG,LPCSTR,__ms_va_list);
3685 #if defined(__x86_64__) || defined(__i386__)
3686 NTSYSAPI NTSTATUS WINAPI RtlCopyExtendedContext(CONTEXT_EX*,ULONG,CONTEXT_EX*);
3687 NTSYSAPI NTSTATUS WINAPI RtlInitializeExtendedContext(void*,ULONG,CONTEXT_EX**);
3688 NTSYSAPI NTSTATUS WINAPI RtlInitializeExtendedContext2(void*,ULONG,CONTEXT_EX**,ULONG64);
3689 NTSYSAPI ULONG64 WINAPI RtlGetEnabledExtendedFeatures(ULONG64);
3690 NTSYSAPI NTSTATUS WINAPI RtlGetExtendedContextLength(ULONG,ULONG*);
3691 NTSYSAPI NTSTATUS WINAPI RtlGetExtendedContextLength2(ULONG,ULONG*,ULONG64);
3692 NTSYSAPI void * WINAPI RtlLocateLegacyContext(CONTEXT_EX*,ULONG*);
3693 NTSYSAPI void * WINAPI RtlLocateExtendedFeature(CONTEXT_EX*,ULONG,ULONG*);
3694 NTSYSAPI void * WINAPI RtlLocateExtendedFeature2(CONTEXT_EX*,ULONG,XSTATE_CONFIGURATION*,ULONG*);
3695 NTSYSAPI ULONG64 WINAPI RtlGetExtendedFeaturesMask(CONTEXT_EX*);
3696 NTSYSAPI void WINAPI RtlSetExtendedFeaturesMask(CONTEXT_EX*,ULONG64);
3697 #endif
3699 #ifndef __WINE_USE_MSVCRT
3700 NTSYSAPI int __cdecl _strnicmp(LPCSTR,LPCSTR,size_t);
3701 #endif
3703 /* 32-bit only functions */
3705 #ifndef _WIN64
3706 NTSYSAPI LONGLONG WINAPI RtlConvertLongToLargeInteger(LONG);
3707 NTSYSAPI ULONGLONG WINAPI RtlConvertUlongToLargeInteger(ULONG);
3708 NTSYSAPI LONGLONG WINAPI RtlEnlargedIntegerMultiply(INT,INT);
3709 NTSYSAPI ULONGLONG WINAPI RtlEnlargedUnsignedMultiply(UINT,UINT);
3710 NTSYSAPI UINT WINAPI RtlEnlargedUnsignedDivide(ULONGLONG,UINT,UINT *);
3711 NTSYSAPI LONGLONG WINAPI RtlExtendedMagicDivide(LONGLONG,LONGLONG,INT);
3712 NTSYSAPI LONGLONG WINAPI RtlExtendedIntegerMultiply(LONGLONG,INT);
3713 NTSYSAPI LONGLONG WINAPI RtlExtendedLargeIntegerDivide(LONGLONG,INT,INT *);
3714 NTSYSAPI LONGLONG WINAPI RtlInterlockedCompareExchange64(LONGLONG*,LONGLONG,LONGLONG);
3715 NTSYSAPI LONGLONG WINAPI RtlLargeIntegerAdd(LONGLONG,LONGLONG);
3716 NTSYSAPI LONGLONG WINAPI RtlLargeIntegerArithmeticShift(LONGLONG,INT);
3717 NTSYSAPI ULONGLONG WINAPI RtlLargeIntegerDivide( ULONGLONG,ULONGLONG,ULONGLONG *);
3718 NTSYSAPI LONGLONG WINAPI RtlLargeIntegerNegate(LONGLONG);
3719 NTSYSAPI LONGLONG WINAPI RtlLargeIntegerShiftLeft(LONGLONG,INT);
3720 NTSYSAPI LONGLONG WINAPI RtlLargeIntegerShiftRight(LONGLONG,INT);
3721 NTSYSAPI LONGLONG WINAPI RtlLargeIntegerSubtract(LONGLONG,LONGLONG);
3722 NTSYSAPI NTSTATUS WINAPI RtlLargeIntegerToChar(const ULONGLONG *,ULONG,ULONG,PCHAR);
3723 #endif
3725 /* Threadpool functions */
3727 NTSYSAPI NTSTATUS WINAPI TpAllocCleanupGroup(TP_CLEANUP_GROUP **);
3728 NTSYSAPI NTSTATUS WINAPI TpAllocIoCompletion(TP_IO **,HANDLE,PTP_IO_CALLBACK,void *,TP_CALLBACK_ENVIRON *);
3729 NTSYSAPI NTSTATUS WINAPI TpAllocPool(TP_POOL **,PVOID);
3730 NTSYSAPI NTSTATUS WINAPI TpAllocTimer(TP_TIMER **,PTP_TIMER_CALLBACK,PVOID,TP_CALLBACK_ENVIRON *);
3731 NTSYSAPI NTSTATUS WINAPI TpAllocWait(TP_WAIT **,PTP_WAIT_CALLBACK,PVOID,TP_CALLBACK_ENVIRON *);
3732 NTSYSAPI NTSTATUS WINAPI TpAllocWork(TP_WORK **,PTP_WORK_CALLBACK,PVOID,TP_CALLBACK_ENVIRON *);
3733 NTSYSAPI void WINAPI TpCallbackLeaveCriticalSectionOnCompletion(TP_CALLBACK_INSTANCE *,RTL_CRITICAL_SECTION *);
3734 NTSYSAPI NTSTATUS WINAPI TpCallbackMayRunLong(TP_CALLBACK_INSTANCE *);
3735 NTSYSAPI void WINAPI TpCallbackReleaseMutexOnCompletion(TP_CALLBACK_INSTANCE *,HANDLE);
3736 NTSYSAPI void WINAPI TpCallbackReleaseSemaphoreOnCompletion(TP_CALLBACK_INSTANCE *,HANDLE,DWORD);
3737 NTSYSAPI void WINAPI TpCallbackSetEventOnCompletion(TP_CALLBACK_INSTANCE *,HANDLE);
3738 NTSYSAPI void WINAPI TpCallbackUnloadDllOnCompletion(TP_CALLBACK_INSTANCE *,HMODULE);
3739 NTSYSAPI void WINAPI TpCancelAsyncIoOperation(TP_IO *);
3740 NTSYSAPI void WINAPI TpDisassociateCallback(TP_CALLBACK_INSTANCE *);
3741 NTSYSAPI BOOL WINAPI TpIsTimerSet(TP_TIMER *);
3742 NTSYSAPI void WINAPI TpPostWork(TP_WORK *);
3743 NTSYSAPI NTSTATUS WINAPI TpQueryPoolStackInformation(TP_POOL *, TP_POOL_STACK_INFORMATION *stack_info);
3744 NTSYSAPI void WINAPI TpReleaseCleanupGroup(TP_CLEANUP_GROUP *);
3745 NTSYSAPI void WINAPI TpReleaseCleanupGroupMembers(TP_CLEANUP_GROUP *,BOOL,PVOID);
3746 NTSYSAPI void WINAPI TpReleaseIoCompletion(TP_IO *);
3747 NTSYSAPI void WINAPI TpReleasePool(TP_POOL *);
3748 NTSYSAPI void WINAPI TpReleaseTimer(TP_TIMER *);
3749 NTSYSAPI void WINAPI TpReleaseWait(TP_WAIT *);
3750 NTSYSAPI void WINAPI TpReleaseWork(TP_WORK *);
3751 NTSYSAPI void WINAPI TpSetPoolMaxThreads(TP_POOL *,DWORD);
3752 NTSYSAPI BOOL WINAPI TpSetPoolMinThreads(TP_POOL *,DWORD);
3753 NTSYSAPI NTSTATUS WINAPI TpSetPoolStackInformation(TP_POOL *, TP_POOL_STACK_INFORMATION *stack_info);
3754 NTSYSAPI void WINAPI TpSetTimer(TP_TIMER *, LARGE_INTEGER *,LONG,LONG);
3755 NTSYSAPI void WINAPI TpSetWait(TP_WAIT *,HANDLE,LARGE_INTEGER *);
3756 NTSYSAPI NTSTATUS WINAPI TpSimpleTryPost(PTP_SIMPLE_CALLBACK,PVOID,TP_CALLBACK_ENVIRON *);
3757 NTSYSAPI void WINAPI TpStartAsyncIoOperation(TP_IO *);
3758 NTSYSAPI void WINAPI TpWaitForIoCompletion(TP_IO *,BOOL);
3759 NTSYSAPI void WINAPI TpWaitForTimer(TP_TIMER *,BOOL);
3760 NTSYSAPI void WINAPI TpWaitForWait(TP_WAIT *,BOOL);
3761 NTSYSAPI void WINAPI TpWaitForWork(TP_WORK *,BOOL);
3763 /* Wine internal functions */
3765 NTSYSAPI NTSTATUS CDECL wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, char *nameA, SIZE_T *size,
3766 UINT disposition );
3767 NTSYSAPI NTSTATUS CDECL wine_unix_to_nt_file_name( const char *name, WCHAR *buffer, SIZE_T *size );
3770 /***********************************************************************
3771 * Inline functions
3774 #define InitializeObjectAttributes(p,n,a,r,s) \
3775 do { \
3776 (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
3777 (p)->RootDirectory = r; \
3778 (p)->Attributes = a; \
3779 (p)->ObjectName = n; \
3780 (p)->SecurityDescriptor = s; \
3781 (p)->SecurityQualityOfService = NULL; \
3782 } while (0)
3784 #define NtCurrentProcess() ((HANDLE)-1)
3786 #define RtlFillMemory(Destination,Length,Fill) memset((Destination),(Fill),(Length))
3787 #define RtlMoveMemory(Destination,Source,Length) memmove((Destination),(Source),(Length))
3788 #define RtlStoreUlong(p,v) do { ULONG _v = (v); memcpy((p), &_v, sizeof(_v)); } while (0)
3789 #define RtlStoreUlonglong(p,v) do { ULONGLONG _v = (v); memcpy((p), &_v, sizeof(_v)); } while (0)
3790 #define RtlRetrieveUlong(p,s) memcpy((p), (s), sizeof(ULONG))
3791 #define RtlRetrieveUlonglong(p,s) memcpy((p), (s), sizeof(ULONGLONG))
3792 #define RtlZeroMemory(Destination,Length) memset((Destination),0,(Length))
3794 static inline BOOLEAN RtlCheckBit(PCRTL_BITMAP lpBits, ULONG ulBit)
3796 if (lpBits && ulBit < lpBits->SizeOfBitMap &&
3797 lpBits->Buffer[ulBit >> 5] & (1 << (ulBit & 31)))
3798 return TRUE;
3799 return FALSE;
3802 /* These are implemented as __fastcall, so we can't let Winelib apps link with them */
3803 static inline USHORT RtlUshortByteSwap(USHORT s)
3805 return (s >> 8) | (s << 8);
3807 static inline ULONG RtlUlongByteSwap(ULONG i)
3809 #if defined(__i386__) && defined(__GNUC__)
3810 ULONG ret;
3811 __asm__("bswap %0" : "=r" (ret) : "0" (i) );
3812 return ret;
3813 #else
3814 return ((ULONG)RtlUshortByteSwap((USHORT)i) << 16) | RtlUshortByteSwap((USHORT)(i >> 16));
3815 #endif
3818 /* list manipulation macros */
3819 #define InitializeListHead(le) (void)((le)->Flink = (le)->Blink = (le))
3820 #define InsertHeadList(le,e) do { PLIST_ENTRY f = (le)->Flink; (e)->Flink = f; (e)->Blink = (le); f->Blink = (e); (le)->Flink = (e); } while (0)
3821 #define InsertTailList(le,e) do { PLIST_ENTRY b = (le)->Blink; (e)->Flink = (le); (e)->Blink = b; b->Flink = (e); (le)->Blink = (e); } while (0)
3822 #define IsListEmpty(le) ((le)->Flink == (le))
3823 #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)
3824 static inline PLIST_ENTRY RemoveHeadList(PLIST_ENTRY le)
3826 PLIST_ENTRY f, b, e;
3828 e = le->Flink;
3829 f = le->Flink->Flink;
3830 b = le->Flink->Blink;
3831 f->Blink = b;
3832 b->Flink = f;
3834 if (e != le) e->Flink = e->Blink = NULL;
3835 return e;
3837 static inline PLIST_ENTRY RemoveTailList(PLIST_ENTRY le)
3839 PLIST_ENTRY f, b, e;
3841 e = le->Blink;
3842 f = le->Blink->Flink;
3843 b = le->Blink->Blink;
3844 f->Blink = b;
3845 b->Flink = f;
3847 if (e != le) e->Flink = e->Blink = NULL;
3848 return e;
3852 #ifdef __WINESRC__
3854 /* Wine internal functions */
3855 extern NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out );
3857 /* The thread information for 16-bit threads */
3858 /* NtCurrentTeb()->SubSystemTib points to this */
3859 typedef struct
3861 void *unknown; /* 00 unknown */
3862 UNICODE_STRING *exe_name; /* 04 exe module name */
3864 /* the following fields do not exist under Windows */
3865 UNICODE_STRING exe_str; /* exe name string pointed to by exe_name */
3866 CURDIR curdir; /* current directory */
3867 WCHAR curdir_buffer[MAX_PATH];
3868 } WIN16_SUBSYSTEM_TIB;
3870 #endif /* __WINESRC__ */
3872 #ifdef __cplusplus
3873 } /* extern "C" */
3874 #endif /* defined(__cplusplus) */
3876 #endif /* __WINE_WINTERNL_H */