wintrust: Support WSS_GET_SECONDARY_SIG_COUNT in Softpub provider.
[wine.git] / include / winternl.h
blobbeb0cb7aa054d94b8317162d6df3bb5a4f9fecb4
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_PTR EnvironmentSize;
203 ULONG_PTR 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 ApiSetMap; /* 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 32-bit/64-bit version of the PEB and TEB for WoW64
509 typedef struct _NT_TIB32
511 ULONG ExceptionList; /* 0000 */
512 ULONG StackBase; /* 0004 */
513 ULONG StackLimit; /* 0008 */
514 ULONG SubSystemTib; /* 000c */
515 ULONG FiberData; /* 0010 */
516 ULONG ArbitraryUserPointer; /* 0014 */
517 ULONG Self; /* 0018 */
518 } NT_TIB32;
520 typedef struct _NT_TIB64
522 ULONG64 ExceptionList; /* 0000 */
523 ULONG64 StackBase; /* 0008 */
524 ULONG64 StackLimit; /* 0010 */
525 ULONG64 SubSystemTib; /* 0018 */
526 ULONG64 FiberData; /* 0020 */
527 ULONG64 ArbitraryUserPointer; /* 0028 */
528 ULONG64 Self; /* 0030 */
529 } NT_TIB64;
531 typedef struct _CLIENT_ID32
533 ULONG UniqueProcess;
534 ULONG UniqueThread;
535 } CLIENT_ID32;
537 typedef struct _CLIENT_ID64
539 ULONG64 UniqueProcess;
540 ULONG64 UniqueThread;
541 } CLIENT_ID64;
543 typedef struct _LIST_ENTRY32
545 ULONG Flink;
546 ULONG Blink;
547 } LIST_ENTRY32;
549 typedef struct _LIST_ENTRY64
551 ULONG64 Flink;
552 ULONG64 Blink;
553 } LIST_ENTRY64;
555 typedef struct _UNICODE_STRING32
557 USHORT Length;
558 USHORT MaximumLength;
559 ULONG Buffer;
560 } UNICODE_STRING32;
562 typedef struct _UNICODE_STRING64
564 USHORT Length;
565 USHORT MaximumLength;
566 ULONG64 Buffer;
567 } UNICODE_STRING64;
569 typedef struct _ACTIVATION_CONTEXT_STACK32
571 ULONG ActiveFrame;
572 LIST_ENTRY32 FrameListCache;
573 ULONG Flags;
574 ULONG NextCookieSequenceNumber;
575 ULONG32 StackId;
576 } ACTIVATION_CONTEXT_STACK32;
578 typedef struct _ACTIVATION_CONTEXT_STACK64
580 ULONG64 ActiveFrame;
581 LIST_ENTRY64 FrameListCache;
582 ULONG Flags;
583 ULONG NextCookieSequenceNumber;
584 ULONG64 StackId;
585 } ACTIVATION_CONTEXT_STACK64;
587 typedef struct _CURDIR32
589 UNICODE_STRING32 DosPath;
590 ULONG Handle;
591 } CURDIR32;
593 typedef struct _CURDIR64
595 UNICODE_STRING64 DosPath;
596 ULONG64 Handle;
597 } CURDIR64;
599 typedef struct RTL_DRIVE_LETTER_CURDIR32
601 USHORT Flags;
602 USHORT Length;
603 ULONG TimeStamp;
604 UNICODE_STRING32 DosPath;
605 } RTL_DRIVE_LETTER_CURDIR32;
607 typedef struct RTL_DRIVE_LETTER_CURDIR64
609 USHORT Flags;
610 USHORT Length;
611 ULONG TimeStamp;
612 UNICODE_STRING64 DosPath;
613 } RTL_DRIVE_LETTER_CURDIR64;
615 typedef struct _RTL_USER_PROCESS_PARAMETERS32
617 ULONG AllocationSize;
618 ULONG Size;
619 ULONG Flags;
620 ULONG DebugFlags;
621 ULONG ConsoleHandle;
622 ULONG ConsoleFlags;
623 ULONG hStdInput;
624 ULONG hStdOutput;
625 ULONG hStdError;
626 CURDIR32 CurrentDirectory;
627 UNICODE_STRING32 DllPath;
628 UNICODE_STRING32 ImagePathName;
629 UNICODE_STRING32 CommandLine;
630 ULONG Environment;
631 ULONG dwX;
632 ULONG dwY;
633 ULONG dwXSize;
634 ULONG dwYSize;
635 ULONG dwXCountChars;
636 ULONG dwYCountChars;
637 ULONG dwFillAttribute;
638 ULONG dwFlags;
639 ULONG wShowWindow;
640 UNICODE_STRING32 WindowTitle;
641 UNICODE_STRING32 Desktop;
642 UNICODE_STRING32 ShellInfo;
643 UNICODE_STRING32 RuntimeInfo;
644 RTL_DRIVE_LETTER_CURDIR32 DLCurrentDirectory[0x20];
645 ULONG EnvironmentSize;
646 ULONG EnvironmentVersion;
647 ULONG PackageDependencyData;
648 ULONG ProcessGroupId;
649 ULONG LoaderThreads;
650 } RTL_USER_PROCESS_PARAMETERS32;
652 typedef struct _RTL_USER_PROCESS_PARAMETERS64
654 ULONG AllocationSize;
655 ULONG Size;
656 ULONG Flags;
657 ULONG DebugFlags;
658 ULONG64 ConsoleHandle;
659 ULONG ConsoleFlags;
660 ULONG64 hStdInput;
661 ULONG64 hStdOutput;
662 ULONG64 hStdError;
663 CURDIR64 CurrentDirectory;
664 UNICODE_STRING64 DllPath;
665 UNICODE_STRING64 ImagePathName;
666 UNICODE_STRING64 CommandLine;
667 ULONG64 Environment;
668 ULONG dwX;
669 ULONG dwY;
670 ULONG dwXSize;
671 ULONG dwYSize;
672 ULONG dwXCountChars;
673 ULONG dwYCountChars;
674 ULONG dwFillAttribute;
675 ULONG dwFlags;
676 ULONG wShowWindow;
677 UNICODE_STRING64 WindowTitle;
678 UNICODE_STRING64 Desktop;
679 UNICODE_STRING64 ShellInfo;
680 UNICODE_STRING64 RuntimeInfo;
681 RTL_DRIVE_LETTER_CURDIR64 DLCurrentDirectory[0x20];
682 ULONG64 EnvironmentSize;
683 ULONG64 EnvironmentVersion;
684 ULONG64 PackageDependencyData;
685 ULONG ProcessGroupId;
686 ULONG LoaderThreads;
687 } RTL_USER_PROCESS_PARAMETERS64;
689 typedef struct _PEB_LDR_DATA32
691 ULONG Length;
692 BOOLEAN Initialized;
693 ULONG SsHandle;
694 LIST_ENTRY32 InLoadOrderModuleList;
695 LIST_ENTRY32 InMemoryOrderModuleList;
696 LIST_ENTRY32 InInitializationOrderModuleList;
697 ULONG EntryInProgress;
698 BOOLEAN ShutdownInProgress;
699 ULONG ShutdownThreadId;
700 } PEB_LDR_DATA32, *PPEB_LDR_DATA32;
702 typedef struct _PEB_LDR_DATA64
704 ULONG Length;
705 BOOLEAN Initialized;
706 ULONG64 SsHandle;
707 LIST_ENTRY64 InLoadOrderModuleList;
708 LIST_ENTRY64 InMemoryOrderModuleList;
709 LIST_ENTRY64 InInitializationOrderModuleList;
710 ULONG64 EntryInProgress;
711 BOOLEAN ShutdownInProgress;
712 ULONG64 ShutdownThreadId;
713 } PEB_LDR_DATA64, *PPEB_LDR_DATA64;
715 typedef struct _PEB32
717 BOOLEAN InheritedAddressSpace; /* 0000 */
718 BOOLEAN ReadImageFileExecOptions; /* 0001 */
719 BOOLEAN BeingDebugged; /* 0002 */
720 BOOLEAN SpareBool; /* 0003 */
721 ULONG Mutant; /* 0004 */
722 ULONG ImageBaseAddress; /* 0008 */
723 ULONG LdrData; /* 000c */
724 ULONG ProcessParameters; /* 0010 */
725 ULONG SubSystemData; /* 0014 */
726 ULONG ProcessHeap; /* 0018 */
727 ULONG FastPebLock; /* 001c */
728 ULONG FastPebLockRoutine; /* 0020 */
729 ULONG FastPebUnlockRoutine; /* 0024 */
730 ULONG EnvironmentUpdateCount; /* 0028 */
731 ULONG KernelCallbackTable; /* 002c */
732 ULONG Reserved; /* 0030 */
733 ULONG AtlThunkSListPtr32; /* 0034 */
734 ULONG ApiSetMap; /* 0038 */
735 ULONG TlsExpansionCounter; /* 003c */
736 ULONG TlsBitmap; /* 0040 */
737 ULONG TlsBitmapBits[2]; /* 0044 */
738 ULONG ReadOnlySharedMemoryBase; /* 004c */
739 ULONG ReadOnlySharedMemoryHeap; /* 0050 */
740 ULONG ReadOnlyStaticServerData; /* 0054 */
741 ULONG AnsiCodePageData; /* 0058 */
742 ULONG OemCodePageData; /* 005c */
743 ULONG UnicodeCaseTableData; /* 0060 */
744 ULONG NumberOfProcessors; /* 0064 */
745 ULONG NtGlobalFlag; /* 0068 */
746 LARGE_INTEGER CriticalSectionTimeout; /* 0070 */
747 ULONG HeapSegmentReserve; /* 0078 */
748 ULONG HeapSegmentCommit; /* 007c */
749 ULONG HeapDeCommitTotalFreeThreshold; /* 0080 */
750 ULONG HeapDeCommitFreeBlockThreshold; /* 0084 */
751 ULONG NumberOfHeaps; /* 0088 */
752 ULONG MaximumNumberOfHeaps; /* 008c */
753 ULONG ProcessHeaps; /* 0090 */
754 ULONG GdiSharedHandleTable; /* 0094 */
755 ULONG ProcessStarterHelper; /* 0098 */
756 ULONG GdiDCAttributeList; /* 009c */
757 ULONG LoaderLock; /* 00a0 */
758 ULONG OSMajorVersion; /* 00a4 */
759 ULONG OSMinorVersion; /* 00a8 */
760 ULONG OSBuildNumber; /* 00ac */
761 ULONG OSPlatformId; /* 00b0 */
762 ULONG ImageSubSystem; /* 00b4 */
763 ULONG ImageSubSystemMajorVersion; /* 00b8 */
764 ULONG ImageSubSystemMinorVersion; /* 00bc */
765 ULONG ImageProcessAffinityMask; /* 00c0 */
766 ULONG GdiHandleBuffer[28]; /* 00c4 */
767 ULONG unknown[6]; /* 0134 */
768 ULONG PostProcessInitRoutine; /* 014c */
769 ULONG TlsExpansionBitmap; /* 0150 */
770 ULONG TlsExpansionBitmapBits[32]; /* 0154 */
771 ULONG SessionId; /* 01d4 */
772 ULARGE_INTEGER AppCompatFlags; /* 01d8 */
773 ULARGE_INTEGER AppCompatFlagsUser; /* 01e0 */
774 ULONG ShimData; /* 01e8 */
775 ULONG AppCompatInfo; /* 01ec */
776 UNICODE_STRING CSDVersion; /* 01f0 */
777 ULONG ActivationContextData; /* 01f8 */
778 ULONG ProcessAssemblyStorageMap; /* 01fc */
779 ULONG SystemDefaultActivationData; /* 0200 */
780 ULONG SystemAssemblyStorageMap; /* 0204 */
781 ULONG MinimumStackCommit; /* 0208 */
782 ULONG FlsCallback; /* 020c */
783 LIST_ENTRY FlsListHead; /* 0210 */
784 ULONG FlsBitmap; /* 0218 */
785 ULONG FlsBitmapBits[4]; /* 021c */
786 ULONG FlsHighIndex; /* 022c */
787 ULONG WerRegistrationData; /* 0230 */
788 ULONG WerShipAssertPtr; /* 0234 */
789 ULONG pUnused; /* 0238 */
790 ULONG pImageHeaderHash; /* 023c */
791 ULONG TracingFlags; /* 0240 */
792 ULONGLONG CsrServerReadOnlySharedMemoryBase; /* 0248 */
793 ULONG TppWorkerpListLock; /* 0250 */
794 LIST_ENTRY TppWorkerpList; /* 0254 */
795 ULONG WaitOnAddressHashTable [0x80]; /* 025c */
796 ULONG TelemetryCoverageHeader; /* 045c */
797 ULONG CloudFileFlags; /* 0460 */
798 ULONG CloudFileDiagFlags; /* 0464 */
799 CHAR PlaceholderCompatibilityMode; /* 0468 */
800 CHAR PlaceholderCompatibilityModeReserved[7]; /* 0469 */
801 ULONG LeapSecondData; /* 0470 */
802 ULONG LeapSecondFlags; /* 0474 */
803 ULONG NtGlobalFlag2; /* 0478 */
804 } PEB32;
806 typedef struct _PEB64
808 BOOLEAN InheritedAddressSpace; /* 0000 */
809 BOOLEAN ReadImageFileExecOptions; /* 0001 */
810 BOOLEAN BeingDebugged; /* 0002 */
811 BOOLEAN SpareBool; /* 0003 */
812 ULONG64 Mutant; /* 0008 */
813 ULONG64 ImageBaseAddress; /* 0010 */
814 ULONG64 LdrData; /* 0018 */
815 ULONG64 ProcessParameters; /* 0020 */
816 ULONG64 SubSystemData; /* 0028 */
817 ULONG64 ProcessHeap; /* 0030 */
818 ULONG64 FastPebLock; /* 0038 */
819 ULONG64 FastPebLockRoutine; /* 0040 */
820 ULONG64 FastPebUnlockRoutine; /* 0048 */
821 ULONG EnvironmentUpdateCount; /* 0050 */
822 ULONG64 KernelCallbackTable; /* 0058 */
823 ULONG Reserved; /* 0060 */
824 ULONG AtlThunkSListPtr32; /* 0064 */
825 ULONG64 ApiSetMap; /* 0068 */
826 ULONG TlsExpansionCounter; /* 0070 */
827 ULONG64 TlsBitmap; /* 0078 */
828 ULONG TlsBitmapBits[2]; /* 0080 */
829 ULONG64 ReadOnlySharedMemoryBase; /* 0088 */
830 ULONG64 ReadOnlySharedMemoryHeap; /* 0090 */
831 ULONG64 ReadOnlyStaticServerData; /* 0098 */
832 ULONG64 AnsiCodePageData; /* 00a0 */
833 ULONG64 OemCodePageData; /* 00a8 */
834 ULONG64 UnicodeCaseTableData; /* 00b0 */
835 ULONG NumberOfProcessors; /* 00b8 */
836 ULONG NtGlobalFlag; /* 00bc */
837 LARGE_INTEGER CriticalSectionTimeout; /* 00c0 */
838 ULONG64 HeapSegmentReserve; /* 00c8 */
839 ULONG64 HeapSegmentCommit; /* 00d0 */
840 ULONG64 HeapDeCommitTotalFreeThreshold; /* 00d8 */
841 ULONG64 HeapDeCommitFreeBlockThreshold; /* 00e0 */
842 ULONG NumberOfHeaps; /* 00e8 */
843 ULONG MaximumNumberOfHeaps; /* 00ec */
844 ULONG64 ProcessHeaps; /* 00f0 */
845 ULONG64 GdiSharedHandleTable; /* 00f8 */
846 ULONG64 ProcessStarterHelper; /* 0100 */
847 ULONG64 GdiDCAttributeList; /* 0108 */
848 ULONG64 LoaderLock; /* 0110 */
849 ULONG OSMajorVersion; /* 0118 */
850 ULONG OSMinorVersion; /* 011c */
851 ULONG OSBuildNumber; /* 0120 */
852 ULONG OSPlatformId; /* 0124 */
853 ULONG ImageSubSystem; /* 0128 */
854 ULONG ImageSubSystemMajorVersion; /* 012c */
855 ULONG ImageSubSystemMinorVersion; /* 0130 */
856 ULONG ImageProcessAffinityMask; /* 0134 */
857 ULONG64 GdiHandleBuffer[28]; /* 0138 */
858 ULONG unknown[6]; /* 0218 */
859 ULONG64 PostProcessInitRoutine; /* 0230 */
860 ULONG64 TlsExpansionBitmap; /* 0238 */
861 ULONG TlsExpansionBitmapBits[32]; /* 0240 */
862 ULONG SessionId; /* 02c0 */
863 ULARGE_INTEGER AppCompatFlags; /* 02c8 */
864 ULARGE_INTEGER AppCompatFlagsUser; /* 02d0 */
865 ULONG64 ShimData; /* 02d8 */
866 ULONG64 AppCompatInfo; /* 02e0 */
867 UNICODE_STRING64 CSDVersion; /* 02e8 */
868 ULONG64 ActivationContextData; /* 02f8 */
869 ULONG64 ProcessAssemblyStorageMap; /* 0300 */
870 ULONG64 SystemDefaultActivationData; /* 0308 */
871 ULONG64 SystemAssemblyStorageMap; /* 0310 */
872 ULONG64 MinimumStackCommit; /* 0318 */
873 ULONG64 FlsCallback; /* 0320 */
874 LIST_ENTRY64 FlsListHead; /* 0328 */
875 ULONG64 FlsBitmap; /* 0338 */
876 ULONG FlsBitmapBits[4]; /* 0340 */
877 ULONG FlsHighIndex; /* 0350 */
878 ULONG64 WerRegistrationData; /* 0358 */
879 ULONG64 WerShipAssertPtr; /* 0360 */
880 ULONG64 pUnused; /* 0368 */
881 ULONG64 pImageHeaderHash; /* 0370 */
882 ULONG TracingFlags; /* 0378 */
883 ULONGLONG CsrServerReadOnlySharedMemoryBase; /* 0380 */
884 ULONG TppWorkerpListLock; /* 0388 */
885 LIST_ENTRY64 TppWorkerpList; /* 0390 */
886 ULONG64 WaitOnAddressHashTable [0x80]; /* 03a0 */
887 ULONG64 TelemetryCoverageHeader; /* 07a0 */
888 ULONG CloudFileFlags; /* 07a8 */
889 ULONG CloudFileDiagFlags; /* 07ac */
890 CHAR PlaceholderCompatibilityMode; /* 07b0 */
891 CHAR PlaceholderCompatibilityModeReserved[7]; /* 07b1 */
892 ULONG64 LeapSecondData; /* 07b8 */
893 ULONG LeapSecondFlags; /* 07c0 */
894 ULONG NtGlobalFlag2; /* 07c4 */
895 } PEB64;
897 typedef struct _TEB32
899 NT_TIB32 Tib; /* 0000 */
900 ULONG EnvironmentPointer; /* 001c */
901 CLIENT_ID32 ClientId; /* 0020 */
902 ULONG ActiveRpcHandle; /* 0028 */
903 ULONG ThreadLocalStoragePointer; /* 002c */
904 ULONG Peb; /* 0030 */
905 ULONG LastErrorValue; /* 0034 */
906 ULONG CountOfOwnedCriticalSections; /* 0038 */
907 ULONG CsrClientThread; /* 003c */
908 ULONG Win32ThreadInfo; /* 0040 */
909 ULONG User32Reserved[26]; /* 0044 */
910 ULONG UserReserved[5]; /* 00ac */
911 ULONG WOW32Reserved; /* 00c0 */
912 ULONG CurrentLocale; /* 00c4 */
913 ULONG FpSoftwareStatusRegister; /* 00c8 */
914 ULONG ReservedForDebuggerInstrumentation[16]; /* 00cc */
915 ULONG SystemReserved1[26]; /* 010c */
916 char PlaceholderCompatibilityMode; /* 0174 */
917 char PlaceholderReserved[11]; /* 0175 */
918 DWORD ProxiedProcessId; /* 0180 */
919 ACTIVATION_CONTEXT_STACK32 ActivationContextStack; /* 0184 */
920 UCHAR WorkingOnBehalfOfTicket[8]; /* 019c */
921 LONG ExceptionCode; /* 01a4 */
922 ULONG ActivationContextStackPointer; /* 01a8 */
923 ULONG InstrumentationCallbackSp; /* 01ac */
924 ULONG InstrumentationCallbackPreviousPc; /* 01b0 */
925 ULONG InstrumentationCallbackPreviousSp; /* 01b4 */
926 BOOLEAN InstrumentationCallbackDisabled; /* 01b8 */
927 BYTE SpareBytes1[23]; /* 01b9 */
928 ULONG TxFsContext; /* 01d0 */
929 ULONG GdiTebBatch[0x138]; /* 01d4 */
930 CLIENT_ID32 RealClientId; /* 06b4 */
931 ULONG GdiCachedProcessHandle; /* 06bc */
932 ULONG GdiClientPID; /* 06c0 */
933 ULONG GdiClientTID; /* 06c4 */
934 ULONG GdiThreadLocaleInfo; /* 06c8 */
935 ULONG Win32ClientInfo[62]; /* 06cc */
936 ULONG glDispatchTable[233]; /* 07c4 */
937 ULONG glReserved1[29]; /* 0b68 */
938 ULONG glReserved2; /* 0bdc */
939 ULONG glSectionInfo; /* 0be0 */
940 ULONG glSection; /* 0be4 */
941 ULONG glTable; /* 0be8 */
942 ULONG glCurrentRC; /* 0bec */
943 ULONG glContext; /* 0bf0 */
944 ULONG LastStatusValue; /* 0bf4 */
945 UNICODE_STRING32 StaticUnicodeString; /* 0bf8 */
946 WCHAR StaticUnicodeBuffer[261]; /* 0c00 */
947 ULONG DeallocationStack; /* 0e0c */
948 ULONG TlsSlots[64]; /* 0e10 */
949 LIST_ENTRY32 TlsLinks; /* 0f10 */
950 ULONG Vdm; /* 0f18 */
951 ULONG ReservedForNtRpc; /* 0f1c */
952 ULONG DbgSsReserved[2]; /* 0f20 */
953 ULONG HardErrorDisabled; /* 0f28 */
954 ULONG Instrumentation[16]; /* 0f2c */
955 ULONG WinSockData; /* 0f6c */
956 ULONG GdiBatchCount; /* 0f70 */
957 ULONG Spare2; /* 0f74 */
958 ULONG GuaranteedStackBytes; /* 0f78 */
959 ULONG ReservedForPerf; /* 0f7c */
960 ULONG ReservedForOle; /* 0f80 */
961 ULONG WaitingOnLoaderLock; /* 0f84 */
962 ULONG Reserved5[3]; /* 0f88 */
963 ULONG TlsExpansionSlots; /* 0f94 */
964 ULONG ImpersonationLocale; /* 0f98 */
965 ULONG IsImpersonating; /* 0f9c */
966 ULONG NlsCache; /* 0fa0 */
967 ULONG ShimData; /* 0fa4 */
968 ULONG HeapVirtualAffinity; /* 0fa8 */
969 ULONG CurrentTransactionHandle; /* 0fac */
970 ULONG ActiveFrame; /* 0fb0 */
971 ULONG FlsSlots; /* 0fb4 */
972 ULONG PreferredLanguages; /* 0fb8 */
973 ULONG UserPrefLanguages; /* 0fbc */
974 ULONG MergedPrefLanguages; /* 0fc0 */
975 ULONG MuiImpersonation; /* 0fc4 */
976 USHORT CrossTebFlags; /* 0fc8 */
977 USHORT SameTebFlags; /* 0fca */
978 ULONG TxnScopeEnterCallback; /* 0fcc */
979 ULONG TxnScopeExitCallback; /* 0fd0 */
980 ULONG TxnScopeContext; /* 0fd4 */
981 ULONG LockCount; /* 0fd8 */
982 LONG WowTebOffset; /* 0fdc */
983 ULONG ResourceRetValue; /* 0fe0 */
984 ULONG ReservedForWdf; /* 0fe4 */
985 ULONGLONG ReservedForCrt; /* 0fe8 */
986 GUID EffectiveContainerId; /* 0ff0 */
987 } TEB32;
989 typedef struct _TEB64
991 NT_TIB64 Tib; /* 0000 */
992 ULONG64 EnvironmentPointer; /* 0038 */
993 CLIENT_ID64 ClientId; /* 0040 */
994 ULONG64 ActiveRpcHandle; /* 0050 */
995 ULONG64 ThreadLocalStoragePointer; /* 0058 */
996 ULONG64 Peb; /* 0060 */
997 ULONG LastErrorValue; /* 0068 */
998 ULONG CountOfOwnedCriticalSections; /* 006c */
999 ULONG64 CsrClientThread; /* 0070 */
1000 ULONG64 Win32ThreadInfo; /* 0078 */
1001 ULONG User32Reserved[26]; /* 0080 */
1002 ULONG UserReserved[5]; /* 00e8 */
1003 ULONG64 WOW32Reserved; /* 0100 */
1004 ULONG CurrentLocale; /* 0108 */
1005 ULONG FpSoftwareStatusRegister; /* 010c */
1006 ULONG64 ReservedForDebuggerInstrumentation[16]; /* 0110 */
1007 ULONG64 SystemReserved1[30]; /* 0190 */
1008 char PlaceholderCompatibilityMode; /* 0280 */
1009 char PlaceholderReserved[11]; /* 0281 */
1010 DWORD ProxiedProcessId; /* 028c */
1011 ACTIVATION_CONTEXT_STACK64 ActivationContextStack; /* 0290 */
1012 UCHAR WorkingOnBehalfOfTicket[8]; /* 02b8 */
1013 LONG ExceptionCode; /* 02c0 */
1014 ULONG64 ActivationContextStackPointer; /* 02c8 */
1015 ULONG64 InstrumentationCallbackSp; /* 02d0 */
1016 ULONG64 InstrumentationCallbackPreviousPc; /* 02d8 */
1017 ULONG64 InstrumentationCallbackPreviousSp; /* 02e0 */
1018 ULONG TxFsContext; /* 02e8 */
1019 BOOLEAN InstrumentationCallbackDisabled; /* 02ec */
1020 ULONG64 GdiTebBatch[0x9d]; /* 02f0 */
1021 CLIENT_ID64 RealClientId; /* 07d8 */
1022 ULONG64 GdiCachedProcessHandle; /* 07e8 */
1023 ULONG GdiClientPID; /* 07f0 */
1024 ULONG GdiClientTID; /* 07f4 */
1025 ULONG64 GdiThreadLocaleInfo; /* 07f8 */
1026 ULONG64 Win32ClientInfo[62]; /* 0800 */
1027 ULONG64 glDispatchTable[233]; /* 09f0 */
1028 ULONG64 glReserved1[29]; /* 1138 */
1029 ULONG64 glReserved2; /* 1220 */
1030 ULONG64 glSectionInfo; /* 1228 */
1031 ULONG64 glSection; /* 1230 */
1032 ULONG64 glTable; /* 1238 */
1033 ULONG64 glCurrentRC; /* 1240 */
1034 ULONG64 glContext; /* 1248 */
1035 ULONG LastStatusValue; /* 1250 */
1036 UNICODE_STRING64 StaticUnicodeString; /* 1258 */
1037 WCHAR StaticUnicodeBuffer[261]; /* 1268 */
1038 ULONG64 DeallocationStack; /* 1478 */
1039 ULONG64 TlsSlots[64]; /* 1480 */
1040 LIST_ENTRY64 TlsLinks; /* 1680 */
1041 ULONG64 Vdm; /* 1690 */
1042 ULONG64 ReservedForNtRpc; /* 1698 */
1043 ULONG64 DbgSsReserved[2]; /* 16a0 */
1044 ULONG HardErrorDisabled; /* 16b0 */
1045 ULONG64 Instrumentation[16]; /* 16b8 */
1046 ULONG64 WinSockData; /* 1738 */
1047 ULONG GdiBatchCount; /* 1740 */
1048 ULONG Spare2; /* 1744 */
1049 ULONG GuaranteedStackBytes; /* 1748 */
1050 ULONG64 ReservedForPerf; /* 1750 */
1051 ULONG64 ReservedForOle; /* 1758 */
1052 ULONG WaitingOnLoaderLock; /* 1760 */
1053 ULONG64 Reserved5[3]; /* 1768 */
1054 ULONG64 TlsExpansionSlots; /* 1780 */
1055 ULONG64 DeallocationBStore; /* 1788 */
1056 ULONG64 BStoreLimit; /* 1790 */
1057 ULONG ImpersonationLocale; /* 1798 */
1058 ULONG IsImpersonating; /* 179c */
1059 ULONG64 NlsCache; /* 17a0 */
1060 ULONG64 ShimData; /* 17a8 */
1061 ULONG HeapVirtualAffinity; /* 17b0 */
1062 ULONG64 CurrentTransactionHandle; /* 17b8 */
1063 ULONG64 ActiveFrame; /* 17c0 */
1064 ULONG64 FlsSlots; /* 17c8 */
1065 ULONG64 PreferredLanguages; /* 17d0 */
1066 ULONG64 UserPrefLanguages; /* 17d8 */
1067 ULONG64 MergedPrefLanguages; /* 17e0 */
1068 ULONG MuiImpersonation; /* 17e8 */
1069 USHORT CrossTebFlags; /* 17ec */
1070 USHORT SameTebFlags; /* 17ee */
1071 ULONG64 TxnScopeEnterCallback; /* 17f0 */
1072 ULONG64 TxnScopeExitCallback; /* 17f8 */
1073 ULONG64 TxnScopeContext; /* 1800 */
1074 ULONG LockCount; /* 1808 */
1075 LONG WowTebOffset; /* 180c */
1076 ULONG64 ResourceRetValue; /* 1810 */
1077 ULONG64 ReservedForWdf; /* 1818 */
1078 ULONGLONG ReservedForCrt; /* 1820 */
1079 GUID EffectiveContainerId; /* 1828 */
1080 } TEB64;
1082 /* reserved TEB64 TLS slots for Wow64 */
1083 #define WOW64_TLS_CPURESERVED 1
1084 #define WOW64_TLS_TEMPLIST 3
1085 #define WOW64_TLS_USERCALLBACKDATA 5
1086 #define WOW64_TLS_FILESYSREDIR 8
1089 /***********************************************************************
1090 * Enums
1093 typedef enum _FILE_INFORMATION_CLASS {
1094 FileDirectoryInformation = 1,
1095 FileFullDirectoryInformation,
1096 FileBothDirectoryInformation,
1097 FileBasicInformation,
1098 FileStandardInformation,
1099 FileInternalInformation,
1100 FileEaInformation,
1101 FileAccessInformation,
1102 FileNameInformation,
1103 FileRenameInformation,
1104 FileLinkInformation,
1105 FileNamesInformation,
1106 FileDispositionInformation,
1107 FilePositionInformation,
1108 FileFullEaInformation,
1109 FileModeInformation,
1110 FileAlignmentInformation,
1111 FileAllInformation,
1112 FileAllocationInformation,
1113 FileEndOfFileInformation,
1114 FileAlternateNameInformation,
1115 FileStreamInformation,
1116 FilePipeInformation,
1117 FilePipeLocalInformation,
1118 FilePipeRemoteInformation,
1119 FileMailslotQueryInformation,
1120 FileMailslotSetInformation,
1121 FileCompressionInformation,
1122 FileObjectIdInformation,
1123 FileCompletionInformation,
1124 FileMoveClusterInformation,
1125 FileQuotaInformation,
1126 FileReparsePointInformation,
1127 FileNetworkOpenInformation,
1128 FileAttributeTagInformation,
1129 FileTrackingInformation,
1130 FileIdBothDirectoryInformation,
1131 FileIdFullDirectoryInformation,
1132 FileValidDataLengthInformation,
1133 FileShortNameInformation,
1134 FileIoCompletionNotificationInformation,
1135 FileIoStatusBlockRangeInformation,
1136 FileIoPriorityHintInformation,
1137 FileSfioReserveInformation,
1138 FileSfioVolumeInformation,
1139 FileHardLinkInformation,
1140 FileProcessIdsUsingFileInformation,
1141 FileNormalizedNameInformation,
1142 FileNetworkPhysicalNameInformation,
1143 FileIdGlobalTxDirectoryInformation,
1144 FileIsRemoteDeviceInformation,
1145 FileAttributeCacheInformation,
1146 FileNumaNodeInformation,
1147 FileStandardLinkInformation,
1148 FileRemoteProtocolInformation,
1149 FileRenameInformationBypassAccessCheck,
1150 FileLinkInformationBypassAccessCheck,
1151 FileVolumeNameInformation,
1152 FileIdInformation,
1153 FileIdExtdDirectoryInformation,
1154 FileReplaceCompletionInformation,
1155 FileHardLinkFullIdInformation,
1156 FileIdExtdBothDirectoryInformation,
1157 FileMaximumInformation
1158 } FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS;
1160 typedef struct _FILE_DIRECTORY_INFORMATION {
1161 ULONG NextEntryOffset;
1162 ULONG FileIndex;
1163 LARGE_INTEGER CreationTime;
1164 LARGE_INTEGER LastAccessTime;
1165 LARGE_INTEGER LastWriteTime;
1166 LARGE_INTEGER ChangeTime;
1167 LARGE_INTEGER EndOfFile;
1168 LARGE_INTEGER AllocationSize;
1169 ULONG FileAttributes;
1170 ULONG FileNameLength;
1171 WCHAR FileName[ANYSIZE_ARRAY];
1172 } FILE_DIRECTORY_INFORMATION, *PFILE_DIRECTORY_INFORMATION;
1174 typedef struct _FILE_FULL_DIRECTORY_INFORMATION {
1175 ULONG NextEntryOffset;
1176 ULONG FileIndex;
1177 LARGE_INTEGER CreationTime;
1178 LARGE_INTEGER LastAccessTime;
1179 LARGE_INTEGER LastWriteTime;
1180 LARGE_INTEGER ChangeTime;
1181 LARGE_INTEGER EndOfFile;
1182 LARGE_INTEGER AllocationSize;
1183 ULONG FileAttributes;
1184 ULONG FileNameLength;
1185 ULONG EaSize;
1186 WCHAR FileName[ANYSIZE_ARRAY];
1187 } FILE_FULL_DIRECTORY_INFORMATION, *PFILE_FULL_DIRECTORY_INFORMATION,
1188 FILE_FULL_DIR_INFORMATION, *PFILE_FULL_DIR_INFORMATION;
1190 typedef struct _FILE_ID_FULL_DIRECTORY_INFORMATION {
1191 ULONG NextEntryOffset;
1192 ULONG FileIndex;
1193 LARGE_INTEGER CreationTime;
1194 LARGE_INTEGER LastAccessTime;
1195 LARGE_INTEGER LastWriteTime;
1196 LARGE_INTEGER ChangeTime;
1197 LARGE_INTEGER EndOfFile;
1198 LARGE_INTEGER AllocationSize;
1199 ULONG FileAttributes;
1200 ULONG FileNameLength;
1201 ULONG EaSize;
1202 LARGE_INTEGER FileId;
1203 WCHAR FileName[ANYSIZE_ARRAY];
1204 } FILE_ID_FULL_DIRECTORY_INFORMATION, *PFILE_ID_FULL_DIRECTORY_INFORMATION;
1206 typedef struct _FILE_BOTH_DIRECTORY_INFORMATION {
1207 ULONG NextEntryOffset;
1208 ULONG FileIndex;
1209 LARGE_INTEGER CreationTime;
1210 LARGE_INTEGER LastAccessTime;
1211 LARGE_INTEGER LastWriteTime;
1212 LARGE_INTEGER ChangeTime;
1213 LARGE_INTEGER EndOfFile;
1214 LARGE_INTEGER AllocationSize;
1215 ULONG FileAttributes;
1216 ULONG FileNameLength;
1217 ULONG EaSize;
1218 CHAR ShortNameLength;
1219 WCHAR ShortName[12];
1220 WCHAR FileName[ANYSIZE_ARRAY];
1221 } FILE_BOTH_DIRECTORY_INFORMATION, *PFILE_BOTH_DIRECTORY_INFORMATION,
1222 FILE_BOTH_DIR_INFORMATION, *PFILE_BOTH_DIR_INFORMATION;
1224 typedef struct _FILE_ID_BOTH_DIRECTORY_INFORMATION {
1225 ULONG NextEntryOffset;
1226 ULONG FileIndex;
1227 LARGE_INTEGER CreationTime;
1228 LARGE_INTEGER LastAccessTime;
1229 LARGE_INTEGER LastWriteTime;
1230 LARGE_INTEGER ChangeTime;
1231 LARGE_INTEGER EndOfFile;
1232 LARGE_INTEGER AllocationSize;
1233 ULONG FileAttributes;
1234 ULONG FileNameLength;
1235 ULONG EaSize;
1236 CHAR ShortNameLength;
1237 WCHAR ShortName[12];
1238 LARGE_INTEGER FileId;
1239 WCHAR FileName[ANYSIZE_ARRAY];
1240 } FILE_ID_BOTH_DIRECTORY_INFORMATION, *PFILE_ID_BOTH_DIRECTORY_INFORMATION;
1242 typedef struct _FILE_ID_GLOBAL_TX_DIR_INFORMATION {
1243 ULONG NextEntryOffset;
1244 ULONG FileIndex;
1245 LARGE_INTEGER CreationTime;
1246 LARGE_INTEGER LastAccessTime;
1247 LARGE_INTEGER LastWriteTime;
1248 LARGE_INTEGER ChangeTime;
1249 LARGE_INTEGER EndOfFile;
1250 LARGE_INTEGER AllocationSize;
1251 ULONG FileAttributes;
1252 ULONG FileNameLength;
1253 LARGE_INTEGER FileId;
1254 GUID LockingTransactionId;
1255 ULONG TxInfoFlags;
1256 WCHAR FileName[ANYSIZE_ARRAY];
1257 } FILE_ID_GLOBAL_TX_DIR_INFORMATION, *PFILE_ID_GLOBAL_TX_DIR_INFORMATION;
1259 typedef struct _FILE_BASIC_INFORMATION {
1260 LARGE_INTEGER CreationTime;
1261 LARGE_INTEGER LastAccessTime;
1262 LARGE_INTEGER LastWriteTime;
1263 LARGE_INTEGER ChangeTime;
1264 ULONG FileAttributes;
1265 } FILE_BASIC_INFORMATION, *PFILE_BASIC_INFORMATION;
1267 typedef struct _FILE_STANDARD_INFORMATION {
1268 LARGE_INTEGER AllocationSize;
1269 LARGE_INTEGER EndOfFile;
1270 ULONG NumberOfLinks;
1271 BOOLEAN DeletePending;
1272 BOOLEAN Directory;
1273 } FILE_STANDARD_INFORMATION, *PFILE_STANDARD_INFORMATION;
1275 typedef struct _FILE_INTERNAL_INFORMATION {
1276 LARGE_INTEGER IndexNumber;
1277 } FILE_INTERNAL_INFORMATION, *PFILE_INTERNAL_INFORMATION;
1279 typedef struct _FILE_ID_128 {
1280 UCHAR Identifier[16];
1281 } FILE_ID_128, *PFILE_ID_128;
1283 typedef struct _FILE_ID_INFORMATION {
1284 ULONGLONG VolumeSerialNumber;
1285 FILE_ID_128 FileId;
1286 } FILE_ID_INFORMATION, *PFILE_ID_INFORMATION;
1288 typedef struct _FILE_EA_INFORMATION {
1289 ULONG EaSize;
1290 } FILE_EA_INFORMATION, *PFILE_EA_INFORMATION;
1292 typedef struct _FILE_ACCESS_INFORMATION {
1293 ACCESS_MASK AccessFlags;
1294 } FILE_ACCESS_INFORMATION, *PFILE_ACCESS_INFORMATION;
1296 typedef struct _FILE_NAME_INFORMATION {
1297 ULONG FileNameLength;
1298 WCHAR FileName[1];
1299 } FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION;
1301 typedef struct _FILE_RENAME_INFORMATION {
1302 BOOLEAN ReplaceIfExists;
1303 HANDLE RootDirectory;
1304 ULONG FileNameLength;
1305 WCHAR FileName[1];
1306 } FILE_RENAME_INFORMATION, *PFILE_RENAME_INFORMATION;
1308 typedef struct _FILE_LINK_INFORMATION {
1309 BOOLEAN ReplaceIfExists;
1310 HANDLE RootDirectory;
1311 ULONG FileNameLength;
1312 WCHAR FileName[1];
1313 } FILE_LINK_INFORMATION, *PFILE_LINK_INFORMATION;
1315 typedef struct _FILE_NAMES_INFORMATION {
1316 ULONG NextEntryOffset;
1317 ULONG FileIndex;
1318 ULONG FileNameLength;
1319 WCHAR FileName[1];
1320 } FILE_NAMES_INFORMATION, *PFILE_NAMES_INFORMATION;
1322 typedef struct _FILE_DISPOSITION_INFORMATION {
1323 BOOLEAN DoDeleteFile;
1324 } FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION;
1326 typedef struct _FILE_POSITION_INFORMATION {
1327 LARGE_INTEGER CurrentByteOffset;
1328 } FILE_POSITION_INFORMATION, *PFILE_POSITION_INFORMATION;
1330 typedef struct _FILE_ALIGNMENT_INFORMATION {
1331 ULONG AlignmentRequirement;
1332 } FILE_ALIGNMENT_INFORMATION, *PFILE_ALIGNMENT_INFORMATION;
1334 typedef struct _FILE_ALLOCATION_INFORMATION {
1335 LARGE_INTEGER AllocationSize;
1336 } FILE_ALLOCATION_INFORMATION, *PFILE_ALLOCATION_INFORMATION;
1338 typedef struct _FILE_END_OF_FILE_INFORMATION {
1339 LARGE_INTEGER EndOfFile;
1340 } FILE_END_OF_FILE_INFORMATION, *PFILE_END_OF_FILE_INFORMATION;
1342 typedef struct _FILE_NETWORK_OPEN_INFORMATION {
1343 LARGE_INTEGER CreationTime;
1344 LARGE_INTEGER LastAccessTime;
1345 LARGE_INTEGER LastWriteTime;
1346 LARGE_INTEGER ChangeTime;
1347 LARGE_INTEGER AllocationSize;
1348 LARGE_INTEGER EndOfFile;
1349 ULONG FileAttributes;
1350 } FILE_NETWORK_OPEN_INFORMATION, *PFILE_NETWORK_OPEN_INFORMATION;
1352 typedef struct _FILE_FULL_EA_INFORMATION {
1353 ULONG NextEntryOffset;
1354 UCHAR Flags;
1355 UCHAR EaNameLength;
1356 USHORT EaValueLength;
1357 CHAR EaName[1];
1358 } FILE_FULL_EA_INFORMATION, *PFILE_FULL_EA_INFORMATION;
1360 typedef struct _FILE_MODE_INFORMATION {
1361 ULONG Mode;
1362 } FILE_MODE_INFORMATION, *PFILE_MODE_INFORMATION;
1364 typedef struct _FILE_STREAM_INFORMATION
1366 ULONG NextEntryOffset;
1367 ULONG StreamNameLength;
1368 LARGE_INTEGER StreamSize;
1369 LARGE_INTEGER StreamAllocationSize;
1370 WCHAR StreamName[1];
1371 } FILE_STREAM_INFORMATION, *PFILE_STREAM_INFORMATION;
1373 typedef struct _FILE_ATTRIBUTE_TAG_INFORMATION
1375 ULONG FileAttributes;
1376 ULONG ReparseTag;
1377 } FILE_ATTRIBUTE_TAG_INFORMATION, *PFILE_ATTRIBUTE_TAG_INFORMATION;
1379 typedef struct _FILE_MAILSLOT_QUERY_INFORMATION {
1380 ULONG MaximumMessageSize;
1381 ULONG MailslotQuota;
1382 ULONG NextMessageSize;
1383 ULONG MessagesAvailable;
1384 LARGE_INTEGER ReadTimeout;
1385 } FILE_MAILSLOT_QUERY_INFORMATION, *PFILE_MAILSLOT_QUERY_INFORMATION;
1387 typedef struct _FILE_MAILSLOT_SET_INFORMATION {
1388 LARGE_INTEGER ReadTimeout;
1389 } FILE_MAILSLOT_SET_INFORMATION, *PFILE_MAILSLOT_SET_INFORMATION;
1391 typedef struct _FILE_PIPE_INFORMATION {
1392 ULONG ReadMode;
1393 ULONG CompletionMode;
1394 } FILE_PIPE_INFORMATION, *PFILE_PIPE_INFORMATION;
1396 typedef struct _FILE_PIPE_LOCAL_INFORMATION {
1397 ULONG NamedPipeType;
1398 ULONG NamedPipeConfiguration;
1399 ULONG MaximumInstances;
1400 ULONG CurrentInstances;
1401 ULONG InboundQuota;
1402 ULONG ReadDataAvailable;
1403 ULONG OutboundQuota;
1404 ULONG WriteQuotaAvailable;
1405 ULONG NamedPipeState;
1406 ULONG NamedPipeEnd;
1407 } FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION;
1409 #define FILE_PIPE_DISCONNECTED_STATE 0x00000001
1410 #define FILE_PIPE_LISTENING_STATE 0x00000002
1411 #define FILE_PIPE_CONNECTED_STATE 0x00000003
1412 #define FILE_PIPE_CLOSING_STATE 0x00000004
1414 typedef struct _FILE_OBJECTID_BUFFER
1416 BYTE ObjectId[16];
1417 union
1419 struct
1421 BYTE BirthVolumeId[16];
1422 BYTE BirthObjectId[16];
1423 BYTE DomainId[16];
1424 } DUMMYSTRUCTNAME;
1425 BYTE ExtendedInfo[48];
1426 } DUMMYUNIONNAME;
1427 } FILE_OBJECTID_BUFFER, *PFILE_OBJECTID_BUFFER;
1429 typedef struct _FILE_OBJECTID_INFORMATION {
1430 LONGLONG FileReference;
1431 UCHAR ObjectId[16];
1432 union {
1433 struct {
1434 UCHAR BirthVolumeId[16];
1435 UCHAR BirthObjectId[16];
1436 UCHAR DomainId[16];
1437 } DUMMYSTRUCTNAME;
1438 UCHAR ExtendedInfo[48];
1439 } DUMMYUNIONNAME;
1440 } FILE_OBJECTID_INFORMATION, *PFILE_OBJECTID_INFORMATION;
1442 typedef struct _FILE_QUOTA_INFORMATION {
1443 ULONG NextEntryOffset;
1444 ULONG SidLength;
1445 LARGE_INTEGER ChangeTime;
1446 LARGE_INTEGER QuotaUsed;
1447 LARGE_INTEGER QuotaThreshold;
1448 LARGE_INTEGER QuotaLimit;
1449 SID Sid;
1450 } FILE_QUOTA_INFORMATION, *PFILE_QUOTA_INFORMATION;
1452 typedef struct _FILE_REPARSE_POINT_INFORMATION {
1453 LONGLONG FileReference;
1454 ULONG Tag;
1455 } FILE_REPARSE_POINT_INFORMATION, *PFILE_REPARSE_POINT_INFORMATION;
1457 typedef struct _FILE_ALL_INFORMATION {
1458 FILE_BASIC_INFORMATION BasicInformation;
1459 FILE_STANDARD_INFORMATION StandardInformation;
1460 FILE_INTERNAL_INFORMATION InternalInformation;
1461 FILE_EA_INFORMATION EaInformation;
1462 FILE_ACCESS_INFORMATION AccessInformation;
1463 FILE_POSITION_INFORMATION PositionInformation;
1464 FILE_MODE_INFORMATION ModeInformation;
1465 FILE_ALIGNMENT_INFORMATION AlignmentInformation;
1466 FILE_NAME_INFORMATION NameInformation;
1467 } FILE_ALL_INFORMATION, *PFILE_ALL_INFORMATION;
1469 typedef struct _FILE_IO_COMPLETION_NOTIFICATION_INFORMATION {
1470 ULONG Flags;
1471 } FILE_IO_COMPLETION_NOTIFICATION_INFORMATION, *PFILE_IO_COMPLETION_NOTIFICATION_INFORMATION;
1473 #define FILE_SKIP_COMPLETION_PORT_ON_SUCCESS 0x1
1474 #define FILE_SKIP_SET_EVENT_ON_HANDLE 0x2
1475 #define FILE_SKIP_SET_USER_EVENT_ON_FAST_IO 0x4
1477 typedef struct _PROCESS_INSTRUMENTATION_CALLBACK_INFORMATION
1479 ULONG Version;
1480 ULONG Reserved;
1481 VOID *Callback;
1482 } PROCESS_INSTRUMENTATION_CALLBACK_INFORMATION, *PPROCESS_INSTRUMENTATION_CALLBACK_INFORMATION;
1484 typedef enum _FSINFOCLASS {
1485 FileFsVolumeInformation = 1,
1486 FileFsLabelInformation,
1487 FileFsSizeInformation,
1488 FileFsDeviceInformation,
1489 FileFsAttributeInformation,
1490 FileFsControlInformation,
1491 FileFsFullSizeInformation,
1492 FileFsObjectIdInformation,
1493 FileFsMaximumInformation
1494 } FS_INFORMATION_CLASS, *PFS_INFORMATION_CLASS;
1496 typedef enum _KEY_INFORMATION_CLASS {
1497 KeyBasicInformation,
1498 KeyNodeInformation,
1499 KeyFullInformation,
1500 KeyNameInformation,
1501 KeyCachedInformation,
1502 KeyFlagsInformation,
1503 KeyVirtualizationInformation,
1504 KeyHandleTagsInformation,
1505 MaxKeyInfoClass
1506 } KEY_INFORMATION_CLASS;
1508 typedef enum _KEY_VALUE_INFORMATION_CLASS {
1509 KeyValueBasicInformation,
1510 KeyValueFullInformation,
1511 KeyValuePartialInformation,
1512 KeyValueFullInformationAlign64,
1513 KeyValuePartialInformationAlign64
1514 } KEY_VALUE_INFORMATION_CLASS;
1516 typedef enum _OBJECT_INFORMATION_CLASS {
1517 ObjectBasicInformation,
1518 ObjectNameInformation,
1519 ObjectTypeInformation,
1520 ObjectTypesInformation,
1521 ObjectDataInformation
1522 } OBJECT_INFORMATION_CLASS, *POBJECT_INFORMATION_CLASS;
1524 typedef enum _PROCESSINFOCLASS {
1525 ProcessBasicInformation = 0,
1526 ProcessQuotaLimits = 1,
1527 ProcessIoCounters = 2,
1528 ProcessVmCounters = 3,
1529 ProcessTimes = 4,
1530 ProcessBasePriority = 5,
1531 ProcessRaisePriority = 6,
1532 ProcessDebugPort = 7,
1533 ProcessExceptionPort = 8,
1534 ProcessAccessToken = 9,
1535 ProcessLdtInformation = 10,
1536 ProcessLdtSize = 11,
1537 ProcessDefaultHardErrorMode = 12,
1538 ProcessIoPortHandlers = 13,
1539 ProcessPooledUsageAndLimits = 14,
1540 ProcessWorkingSetWatch = 15,
1541 ProcessUserModeIOPL = 16,
1542 ProcessEnableAlignmentFaultFixup = 17,
1543 ProcessPriorityClass = 18,
1544 ProcessWx86Information = 19,
1545 ProcessHandleCount = 20,
1546 ProcessAffinityMask = 21,
1547 ProcessPriorityBoost = 22,
1548 ProcessDeviceMap = 23,
1549 ProcessSessionInformation = 24,
1550 ProcessForegroundInformation = 25,
1551 ProcessWow64Information = 26,
1552 ProcessImageFileName = 27,
1553 ProcessLUIDDeviceMapsEnabled = 28,
1554 ProcessBreakOnTermination = 29,
1555 ProcessDebugObjectHandle = 30,
1556 ProcessDebugFlags = 31,
1557 ProcessHandleTracing = 32,
1558 ProcessIoPriority = 33,
1559 ProcessExecuteFlags = 34,
1560 ProcessTlsInformation = 35,
1561 ProcessCookie = 36,
1562 ProcessImageInformation = 37,
1563 ProcessCycleTime = 38,
1564 ProcessPagePriority = 39,
1565 ProcessInstrumentationCallback = 40,
1566 ProcessThreadStackAllocation = 41,
1567 ProcessWorkingSetWatchEx = 42,
1568 ProcessImageFileNameWin32 = 43,
1569 ProcessImageFileMapping = 44,
1570 ProcessAffinityUpdateMode = 45,
1571 ProcessMemoryAllocationMode = 46,
1572 ProcessGroupInformation = 47,
1573 ProcessTokenVirtualizationEnabled = 48,
1574 ProcessConsoleHostProcess = 49,
1575 ProcessWindowInformation = 50,
1576 ProcessHandleInformation = 51,
1577 MaxProcessInfoClass,
1578 #ifdef __WINESRC__
1579 ProcessWineMakeProcessSystem = 1000,
1580 #endif
1581 } PROCESSINFOCLASS, PROCESS_INFORMATION_CLASS;
1583 #define MEM_EXECUTE_OPTION_DISABLE 0x01
1584 #define MEM_EXECUTE_OPTION_ENABLE 0x02
1585 #define MEM_EXECUTE_OPTION_DISABLE_THUNK_EMULATION 0x04
1586 #define MEM_EXECUTE_OPTION_PERMANENT 0x08
1588 typedef enum _SECTION_INHERIT {
1589 ViewShare = 1,
1590 ViewUnmap = 2
1591 } SECTION_INHERIT;
1593 typedef enum _SYSTEM_INFORMATION_CLASS {
1594 SystemBasicInformation = 0,
1595 SystemCpuInformation = 1,
1596 SystemPerformanceInformation = 2,
1597 SystemTimeOfDayInformation = 3, /* was SystemTimeInformation */
1598 SystemPathInformation = 4,
1599 SystemProcessInformation = 5,
1600 SystemCallCountInformation = 6,
1601 SystemDeviceInformation = 7,
1602 SystemProcessorPerformanceInformation = 8,
1603 SystemFlagsInformation = 9,
1604 SystemCallTimeInformation = 10,
1605 SystemModuleInformation = 11,
1606 SystemLocksInformation = 12,
1607 SystemStackTraceInformation = 13,
1608 SystemPagedPoolInformation = 14,
1609 SystemNonPagedPoolInformation = 15,
1610 SystemHandleInformation = 16,
1611 SystemObjectInformation = 17,
1612 SystemPageFileInformation = 18,
1613 SystemVdmInstemulInformation = 19,
1614 SystemVdmBopInformation = 20,
1615 SystemFileCacheInformation = 21,
1616 SystemPoolTagInformation = 22,
1617 SystemInterruptInformation = 23,
1618 SystemDpcBehaviorInformation = 24,
1619 SystemFullMemoryInformation = 25,
1620 SystemNotImplemented6 = 25,
1621 SystemLoadGdiDriverInformation = 26,
1622 SystemUnloadGdiDriverInformation = 27,
1623 SystemTimeAdjustmentInformation = 28,
1624 SystemTimeAdjustment = 28,
1625 SystemSummaryMemoryInformation = 29,
1626 SystemMirrorMemoryInformation = 30,
1627 SystemPerformanceTraceInformation = 31,
1628 SystemObsolete0 = 32,
1629 SystemExceptionInformation = 33,
1630 SystemCrashDumpStateInformation = 34,
1631 SystemKernelDebuggerInformation = 35,
1632 SystemContextSwitchInformation = 36,
1633 SystemRegistryQuotaInformation = 37,
1634 SystemExtendServiceTableInformation = 38,
1635 SystemPrioritySeparation = 39,
1636 SystemVerifierAddDriverInformation = 40,
1637 SystemVerifierRemoveDriverInformation = 41,
1638 SystemProcessorIdleInformation = 42,
1639 SystemLegacyDriverInformation = 43,
1640 SystemCurrentTimeZoneInformation = 44,
1641 SystemLookasideInformation = 45,
1642 SystemTimeSlipNotification = 46,
1643 SystemSessionCreate = 47,
1644 SystemSessionDetach = 48,
1645 SystemSessionInformation = 49,
1646 SystemRangeStartInformation = 50,
1647 SystemVerifierInformation = 51,
1648 SystemVerifierThunkExtend = 52,
1649 SystemSessionProcessesInformation = 53,
1650 SystemLoadGdiDriverInSystemSpace = 54,
1651 SystemNumaProcessorMap = 55,
1652 SystemPrefetcherInformation = 56,
1653 SystemExtendedProcessInformation = 57,
1654 SystemRecommendedSharedDataAlignment = 58,
1655 SystemComPlusPackage = 59,
1656 SystemNumaAvailableMemory = 60,
1657 SystemProcessorPowerInformation = 61,
1658 SystemEmulationBasicInformation = 62,
1659 SystemEmulationProcessorInformation = 63,
1660 SystemExtendedHandleInformation = 64,
1661 SystemLostDelayedWriteInformation = 65,
1662 SystemBigPoolInformation = 66,
1663 SystemSessionPoolTagInformation = 67,
1664 SystemSessionMappedViewInformation = 68,
1665 SystemHotpatchInformation = 69,
1666 SystemObjectSecurityMode = 70,
1667 SystemWatchdogTimerHandler = 71,
1668 SystemWatchdogTimerInformation = 72,
1669 SystemLogicalProcessorInformation = 73,
1670 SystemWow64SharedInformationObsolete = 74,
1671 SystemRegisterFirmwareTableInformationHandler = 75,
1672 SystemFirmwareTableInformation = 76,
1673 SystemModuleInformationEx = 77,
1674 SystemVerifierTriageInformation = 78,
1675 SystemSuperfetchInformation = 79,
1676 SystemMemoryListInformation = 80,
1677 SystemFileCacheInformationEx = 81,
1678 SystemThreadPriorityClientIdInformation = 82,
1679 SystemProcessorIdleCycleTimeInformation = 83,
1680 SystemVerifierCancellationInformation = 84,
1681 SystemProcessorPowerInformationEx = 85,
1682 SystemRefTraceInformation = 86,
1683 SystemSpecialPoolInformation = 87,
1684 SystemProcessIdInformation = 88,
1685 SystemErrorPortInformation = 89,
1686 SystemBootEnvironmentInformation = 90,
1687 SystemHypervisorInformation = 91,
1688 SystemVerifierInformationEx = 92,
1689 SystemTimeZoneInformation = 93,
1690 SystemImageFileExecutionOptionsInformation = 94,
1691 SystemCoverageInformation = 95,
1692 SystemPrefetchPatchInformation = 96,
1693 SystemVerifierFaultsInformation = 97,
1694 SystemSystemPartitionInformation = 98,
1695 SystemSystemDiskInformation = 99,
1696 SystemProcessorPerformanceDistribution = 100,
1697 SystemNumaProximityNodeInformation = 101,
1698 SystemDynamicTimeZoneInformation = 102,
1699 SystemCodeIntegrityInformation = 103,
1700 SystemProcessorMicrocodeUpdateInformation = 104,
1701 SystemProcessorBrandString = 105,
1702 SystemVirtualAddressInformation = 106,
1703 SystemLogicalProcessorInformationEx = 107,
1704 SystemProcessorCycleTimeInformation = 108,
1705 SystemStoreInformation = 109,
1706 SystemRegistryAppendString = 110,
1707 SystemAitSamplingValue = 111,
1708 SystemVhdBootInformation = 112,
1709 SystemCpuQuotaInformation = 113,
1710 SystemNativeBasicInformation = 114,
1711 SystemErrorPortTimeouts = 115,
1712 SystemLowPriorityIoInformation = 116,
1713 SystemTpmBootEntropyInformation = 117,
1714 SystemVerifierCountersInformation = 118,
1715 SystemPagedPoolInformationEx = 119,
1716 SystemSystemPtesInformationEx = 120,
1717 SystemNodeDistanceInformation = 121,
1718 SystemAcpiAuditInformation = 122,
1719 SystemBasicPerformanceInformation = 123,
1720 SystemQueryPerformanceCounterInformation = 124,
1721 SystemSessionBigPoolInformation = 125,
1722 SystemBootGraphicsInformation = 126,
1723 SystemScrubPhysicalMemoryInformation = 127,
1724 SystemBadPageInformation = 128,
1725 SystemProcessorProfileControlArea = 129,
1726 SystemCombinePhysicalMemoryInformation = 130,
1727 SystemEntropyInterruptTimingInformation = 131,
1728 SystemConsoleInformation = 132,
1729 SystemPlatformBinaryInformation = 133,
1730 SystemPolicyInformation = 134,
1731 SystemHypervisorProcessorCountInformation = 135,
1732 SystemDeviceDataInformation = 136,
1733 SystemDeviceDataEnumerationInformation = 137,
1734 SystemMemoryTopologyInformation = 138,
1735 SystemMemoryChannelInformation = 139,
1736 SystemBootLogoInformation = 140,
1737 SystemProcessorPerformanceInformationEx = 141,
1738 SystemCriticalProcessErrorLogInformation = 142,
1739 SystemSecureBootPolicyInformation = 143,
1740 SystemPageFileInformationEx = 144,
1741 SystemSecureBootInformation = 145,
1742 SystemEntropyInterruptTimingRawInformation = 146,
1743 SystemPortableWorkspaceEfiLauncherInformation = 147,
1744 SystemFullProcessInformation = 148,
1745 SystemKernelDebuggerInformationEx = 149,
1746 SystemBootMetadataInformation = 150,
1747 SystemSoftRebootInformation = 151,
1748 SystemElamCertificateInformation = 152,
1749 SystemOfflineDumpConfigInformation = 153,
1750 SystemProcessorFeaturesInformation = 154,
1751 SystemRegistryReconciliationInformation = 155,
1752 SystemEdidInformation = 156,
1753 SystemManufacturingInformation = 157,
1754 SystemEnergyEstimationConfigInformation = 158,
1755 SystemHypervisorDetailInformation = 159,
1756 SystemProcessorCycleStatsInformation = 160,
1757 SystemVmGenerationCountInformation = 161,
1758 SystemTrustedPlatformModuleInformation = 162,
1759 SystemKernelDebuggerFlags = 163,
1760 SystemCodeIntegrityPolicyInformation = 164,
1761 SystemIsolatedUserModeInformation = 165,
1762 SystemHardwareSecurityTestInterfaceResultsInformation = 166,
1763 SystemSingleModuleInformation = 167,
1764 SystemAllowedCpuSetsInformation = 168,
1765 SystemVsmProtectionInformation = 169,
1766 SystemInterruptCpuSetsInformation = 170,
1767 SystemSecureBootPolicyFullInformation = 171,
1768 SystemCodeIntegrityPolicyFullInformation = 172,
1769 SystemAffinitizedInterruptProcessorInformation = 173,
1770 SystemRootSiloInformation = 174,
1771 SystemCpuSetInformation = 175,
1772 SystemCpuSetTagInformation = 176,
1773 SystemWin32WerStartCallout = 177,
1774 SystemSecureKernelProfileInformation = 178,
1775 SystemCodeIntegrityPlatformManifestInformation = 179,
1776 SystemInterruptSteeringInformation = 180,
1777 SystemSupportedProcessorArchitectures = 181,
1778 SystemMemoryUsageInformation = 182,
1779 SystemCodeIntegrityCertificateInformation = 183,
1780 SystemPhysicalMemoryInformation = 184,
1781 SystemControlFlowTransition = 185,
1782 SystemKernelDebuggingAllowed = 186,
1783 SystemActivityModerationExeState = 187,
1784 SystemActivityModerationUserSettings = 188,
1785 SystemCodeIntegrityPoliciesFullInformation = 189,
1786 SystemCodeIntegrityUnlockInformation = 190,
1787 SystemIntegrityQuotaInformation = 191,
1788 SystemFlushInformation = 192,
1789 SystemProcessorIdleMaskInformation = 193,
1790 SystemSecureDumpEncryptionInformation = 194,
1791 SystemWriteConstraintInformation = 195,
1792 SystemKernelVaShadowInformation = 196,
1793 SystemHypervisorSharedPageInformation = 197,
1794 SystemFirmwareBootPerformanceInformation = 198,
1795 SystemCodeIntegrityVerificationInformation = 199,
1796 SystemFirmwarePartitionInformation = 200,
1797 SystemSpeculationControlInformation = 201,
1798 SystemDmaGuardPolicyInformation = 202,
1799 SystemEnclaveLaunchControlInformation = 203,
1800 SystemWorkloadAllowedCpuSetsInformation = 204,
1801 SystemCodeIntegrityUnlockModeInformation = 205,
1802 SystemLeapSecondInformation = 206,
1803 SystemFlags2Information = 207,
1804 SystemSecurityModelInformation = 208,
1805 SystemCodeIntegritySyntheticCacheInformation = 209,
1806 SystemFeatureConfigurationInformation = 210,
1807 SystemFeatureConfigurationSectionInformation = 211,
1808 SystemFeatureUsageSubscriptionInformation = 212,
1809 SystemSecureSpeculationControlInformation = 213,
1810 SystemSpacesBootInformation = 214,
1811 SystemFwRamdiskInformation = 215,
1812 SystemWheaIpmiHardwareInformation = 216,
1813 SystemDifSetRuleClassInformation = 217,
1814 SystemDifClearRuleClassInformation = 218,
1815 SystemDifApplyPluginVerificationOnDriver = 219,
1816 SystemDifRemovePluginVerificationOnDriver = 220,
1817 SystemShadowStackInformation = 221,
1818 SystemBuildVersionInformation = 222,
1819 #ifdef __WINESRC__
1820 SystemWineVersionInformation = 1000,
1821 #endif
1822 } SYSTEM_INFORMATION_CLASS, *PSYSTEM_INFORMATION_CLASS;
1824 typedef struct _SYSTEM_CODEINTEGRITY_INFORMATION
1826 ULONG Length;
1827 ULONG CodeIntegrityOptions;
1828 } SYSTEM_CODEINTEGRITY_INFORMATION, *PSYSTEM_CODEINTEGRITY_INFORMATION;
1830 #define CODEINTEGRITY_OPTION_ENABLED 0x0001
1831 #define CODEINTEGRITY_OPTION_TESTSIGN 0x0002
1832 #define CODEINTEGRITY_OPTION_UMCI_ENABLED 0x0004
1833 #define CODEINTEGRITY_OPTION_UMCI_AUDITMODE_ENABLED 0x0008
1834 #define CODEINTEGRITY_OPTION_UMCI_EXCLUSIONPATHS_ENABLED 0x0010
1835 #define CODEINTEGRITY_OPTION_TEST_BUILD 0x0020
1836 #define CODEINTEGRITY_OPTION_PREPRODUCTION_BUILD 0x0040
1837 #define CODEINTEGRITY_OPTION_DEBUGMODE_ENABLED 0x0080
1838 #define CODEINTEGRITY_OPTION_FLIGHT_BUILD 0x0100
1839 #define CODEINTEGRITY_OPTION_FLIGHTING_ENABLED 0x0200
1840 #define CODEINTEGRITY_OPTION_HVCI_KMCI_ENABLED 0x0400
1841 #define CODEINTEGRITY_OPTION_HVCI_KMCI_AUDITMODE_ENABLED 0x0800
1842 #define CODEINTEGRITY_OPTION_HVCI_KMCI_STRICTMODE_ENABLED 0x1000
1843 #define CODEINTEGRITY_OPTION_HVCI_IUM_ENABLED 0x2000
1845 typedef enum _THREADINFOCLASS {
1846 ThreadBasicInformation = 0,
1847 ThreadTimes,
1848 ThreadPriority,
1849 ThreadBasePriority,
1850 ThreadAffinityMask,
1851 ThreadImpersonationToken,
1852 ThreadDescriptorTableEntry,
1853 ThreadEnableAlignmentFaultFixup,
1854 ThreadEventPair_Reusable,
1855 ThreadQuerySetWin32StartAddress,
1856 ThreadZeroTlsCell,
1857 ThreadPerformanceCount,
1858 ThreadAmILastThread,
1859 ThreadIdealProcessor,
1860 ThreadPriorityBoost,
1861 ThreadSetTlsArrayAddress,
1862 ThreadIsIoPending,
1863 ThreadHideFromDebugger,
1864 ThreadBreakOnTermination,
1865 ThreadSwitchLegacyState,
1866 ThreadIsTerminated,
1867 ThreadLastSystemCall,
1868 ThreadIoPriority,
1869 ThreadCycleTime,
1870 ThreadPagePriority,
1871 ThreadActualBasePriority,
1872 ThreadTebInformation,
1873 ThreadCSwitchMon,
1874 ThreadCSwitchPmu,
1875 ThreadWow64Context,
1876 ThreadGroupInformation,
1877 ThreadUmsInformation,
1878 ThreadCounterProfiling,
1879 ThreadIdealProcessorEx,
1880 ThreadCpuAccountingInformation,
1881 ThreadSuspendCount,
1882 ThreadHeterogeneousCpuPolicy,
1883 ThreadContainerId,
1884 ThreadNameInformation,
1885 ThreadSelectedCpuSets,
1886 ThreadSystemThreadInformation,
1887 ThreadActualGroupAffinity,
1888 ThreadDynamicCodePolicyInfo,
1889 ThreadExplicitCaseSensitivity,
1890 ThreadWorkOnBehalfTicket,
1891 ThreadSubsystemInformation,
1892 ThreadDbgkWerReportActive,
1893 ThreadAttachContainer,
1894 ThreadManageWritesToExecutableMemory,
1895 ThreadPowerThrottlingState,
1896 ThreadWorkloadClass,
1897 MaxThreadInfoClass
1898 } THREADINFOCLASS;
1900 typedef struct _THREAD_BASIC_INFORMATION
1902 NTSTATUS ExitStatus;
1903 PVOID TebBaseAddress;
1904 CLIENT_ID ClientId;
1905 ULONG_PTR AffinityMask;
1906 LONG Priority;
1907 LONG BasePriority;
1908 } THREAD_BASIC_INFORMATION, *PTHREAD_BASIC_INFORMATION;
1910 typedef struct _THREAD_DESCRIPTOR_INFORMATION
1912 DWORD Selector;
1913 LDT_ENTRY Entry;
1914 } THREAD_DESCRIPTOR_INFORMATION, *PTHREAD_DESCRIPTOR_INFORMATION;
1916 typedef struct _THREAD_NAME_INFORMATION
1918 UNICODE_STRING ThreadName;
1919 } THREAD_NAME_INFORMATION, *PTHREAD_NAME_INFORMATION;
1921 typedef struct _KERNEL_USER_TIMES {
1922 LARGE_INTEGER CreateTime;
1923 LARGE_INTEGER ExitTime;
1924 LARGE_INTEGER KernelTime;
1925 LARGE_INTEGER UserTime;
1926 } KERNEL_USER_TIMES, *PKERNEL_USER_TIMES;
1928 typedef enum _WINSTATIONINFOCLASS {
1929 WinStationInformation = 8
1930 } WINSTATIONINFOCLASS;
1932 typedef enum _MEMORY_INFORMATION_CLASS {
1933 MemoryBasicInformation,
1934 MemoryWorkingSetInformation,
1935 MemoryMappedFilenameInformation,
1936 MemoryRegionInformation,
1937 MemoryWorkingSetExInformation,
1938 MemorySharedCommitInformation,
1939 MemoryImageInformation,
1940 MemoryRegionInformationEx,
1941 MemoryPrivilegedBasicInformation,
1942 MemoryEnclaveImageInformation,
1943 MemoryBasicInformationCapped,
1944 MemoryPhysicalContiguityInformation,
1945 #ifdef __WINESRC__
1946 MemoryWineUnixFuncs = 1000,
1947 MemoryWineUnixWow64Funcs,
1948 #endif
1949 } MEMORY_INFORMATION_CLASS;
1951 typedef struct _MEMORY_SECTION_NAME
1953 UNICODE_STRING SectionFileName;
1954 } MEMORY_SECTION_NAME, *PMEMORY_SECTION_NAME;
1956 typedef union _MEMORY_WORKING_SET_EX_BLOCK {
1957 ULONG_PTR Flags;
1958 struct {
1959 ULONG_PTR Valid : 1;
1960 ULONG_PTR ShareCount : 3;
1961 ULONG_PTR Win32Protection : 11;
1962 ULONG_PTR Shared : 1;
1963 ULONG_PTR Node : 6;
1964 ULONG_PTR Locked : 1;
1965 ULONG_PTR LargePage : 1;
1966 } DUMMYSTRUCTNAME;
1967 } MEMORY_WORKING_SET_EX_BLOCK, *PMEMORY_WORKING_SET_EX_BLOCK;
1969 typedef struct _MEMORY_WORKING_SET_EX_INFORMATION {
1970 PVOID VirtualAddress;
1971 MEMORY_WORKING_SET_EX_BLOCK VirtualAttributes;
1972 } MEMORY_WORKING_SET_EX_INFORMATION, *PMEMORY_WORKING_SET_EX_INFORMATION;
1974 typedef enum _MUTANT_INFORMATION_CLASS
1976 MutantBasicInformation
1977 } MUTANT_INFORMATION_CLASS, *PMUTANT_INFORMATION_CLASS;
1979 typedef struct _MUTANT_BASIC_INFORMATION {
1980 LONG CurrentCount;
1981 BOOLEAN OwnedByCaller;
1982 BOOLEAN AbandonedState;
1983 } MUTANT_BASIC_INFORMATION, *PMUTANT_BASIC_INFORMATION;
1985 typedef enum _TIMER_INFORMATION_CLASS
1987 TimerBasicInformation = 0
1988 } TIMER_INFORMATION_CLASS;
1990 typedef struct _TIMER_BASIC_INFORMATION
1992 LARGE_INTEGER RemainingTime;
1993 BOOLEAN TimerState;
1994 } TIMER_BASIC_INFORMATION, *PTIMER_BASIC_INFORMATION;
1996 typedef enum
1998 VmPrefetchInformation,
1999 VmPagePriorityInformation,
2000 VmCfgCallTargetInformation
2001 } VIRTUAL_MEMORY_INFORMATION_CLASS, *PVIRTUAL_MEMORY_INFORMATION_CLASS;
2003 typedef struct _MEMORY_RANGE_ENTRY
2005 PVOID VirtualAddress;
2006 SIZE_T NumberOfBytes;
2007 } MEMORY_RANGE_ENTRY, *PMEMORY_RANGE_ENTRY;
2010 /* return type of RtlDetermineDosPathNameType_U (FIXME: not the correct names) */
2011 typedef enum
2013 INVALID_PATH = 0,
2014 UNC_PATH, /* "//foo" */
2015 ABSOLUTE_DRIVE_PATH, /* "c:/foo" */
2016 RELATIVE_DRIVE_PATH, /* "c:foo" */
2017 ABSOLUTE_PATH, /* "/foo" */
2018 RELATIVE_PATH, /* "foo" */
2019 DEVICE_PATH, /* "//./foo" */
2020 UNC_DOT_PATH /* "//." */
2021 } DOS_PATHNAME_TYPE;
2024 /***********************************************************************
2025 * Types and data structures
2028 /* This is used by NtQuerySystemInformation */
2029 typedef struct _SYSTEM_THREAD_INFORMATION
2030 { /* win32/win64 */
2031 LARGE_INTEGER KernelTime; /* 00/00 */
2032 LARGE_INTEGER UserTime; /* 08/08 */
2033 LARGE_INTEGER CreateTime; /* 10/10 */
2034 DWORD dwTickCount; /* 18/18 */
2035 LPVOID StartAddress; /* 1c/20 */
2036 CLIENT_ID ClientId; /* 20/28 */
2037 DWORD dwCurrentPriority; /* 28/38 */
2038 DWORD dwBasePriority; /* 2c/3c */
2039 DWORD dwContextSwitches; /* 30/40 */
2040 DWORD dwThreadState; /* 34/44 */
2041 DWORD dwWaitReason; /* 38/48 */
2042 DWORD dwUnknown; /* 3c/4c */
2043 } SYSTEM_THREAD_INFORMATION, *PSYSTEM_THREAD_INFORMATION;
2045 typedef struct _SYSTEM_EXTENDED_THREAD_INFORMATION
2047 SYSTEM_THREAD_INFORMATION ThreadInfo; /* 00/00 */
2048 void *StackBase; /* 40/50 */
2049 void *StackLimit; /* 44/58 */
2050 void *Win32StartAddress; /* 48/60 */
2051 void *TebBase; /* 4c/68 */
2052 ULONG_PTR Reserved2; /* 50/70 */
2053 ULONG_PTR Reserved3; /* 54/78 */
2054 ULONG_PTR Reserved4; /* 58/80 */
2055 } SYSTEM_EXTENDED_THREAD_INFORMATION, *PSYSTEM_EXTENDED_THREAD_INFORMATION;
2057 typedef struct _IO_STATUS_BLOCK {
2058 union {
2059 NTSTATUS Status;
2060 PVOID Pointer;
2061 } DUMMYUNIONNAME;
2063 ULONG_PTR Information;
2064 } IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
2066 typedef void (WINAPI * PIO_APC_ROUTINE)(PVOID,PIO_STATUS_BLOCK,ULONG);
2068 typedef struct _KEY_BASIC_INFORMATION {
2069 LARGE_INTEGER LastWriteTime;
2070 ULONG TitleIndex;
2071 ULONG NameLength;
2072 WCHAR Name[1];
2073 } KEY_BASIC_INFORMATION, *PKEY_BASIC_INFORMATION;
2075 typedef struct _KEY_NODE_INFORMATION
2077 LARGE_INTEGER LastWriteTime;
2078 ULONG TitleIndex;
2079 ULONG ClassOffset;
2080 ULONG ClassLength;
2081 ULONG NameLength;
2082 WCHAR Name[1];
2083 /* Class[1]; */
2084 } KEY_NODE_INFORMATION, *PKEY_NODE_INFORMATION;
2086 typedef struct _KEY_FULL_INFORMATION
2088 LARGE_INTEGER LastWriteTime;
2089 ULONG TitleIndex;
2090 ULONG ClassOffset;
2091 ULONG ClassLength;
2092 ULONG SubKeys;
2093 ULONG MaxNameLen;
2094 ULONG MaxClassLen;
2095 ULONG Values;
2096 ULONG MaxValueNameLen;
2097 ULONG MaxValueDataLen;
2098 WCHAR Class[1];
2099 } KEY_FULL_INFORMATION, *PKEY_FULL_INFORMATION;
2101 typedef struct _KEY_NAME_INFORMATION {
2102 ULONG NameLength;
2103 WCHAR Name[1];
2104 } KEY_NAME_INFORMATION, *PKEY_NAME_INFORMATION;
2106 typedef struct _KEY_CACHED_INFORMATION
2108 LARGE_INTEGER LastWriteTime;
2109 ULONG TitleIndex;
2110 ULONG SubKeys;
2111 ULONG MaxNameLen;
2112 ULONG Values;
2113 ULONG MaxValueNameLen;
2114 ULONG MaxValueDataLen;
2115 ULONG NameLength;
2116 } KEY_CACHED_INFORMATION, *PKEY_CACHED_INFORMATION;
2118 typedef struct _KEY_VALUE_ENTRY
2120 PUNICODE_STRING ValueName;
2121 ULONG DataLength;
2122 ULONG DataOffset;
2123 ULONG Type;
2124 } KEY_VALUE_ENTRY, *PKEY_VALUE_ENTRY;
2126 typedef struct _KEY_VALUE_BASIC_INFORMATION {
2127 ULONG TitleIndex;
2128 ULONG Type;
2129 ULONG NameLength;
2130 WCHAR Name[1];
2131 } KEY_VALUE_BASIC_INFORMATION, *PKEY_VALUE_BASIC_INFORMATION;
2133 typedef struct _KEY_VALUE_FULL_INFORMATION {
2134 ULONG TitleIndex;
2135 ULONG Type;
2136 ULONG DataOffset;
2137 ULONG DataLength;
2138 ULONG NameLength;
2139 WCHAR Name[1];
2140 } KEY_VALUE_FULL_INFORMATION, *PKEY_VALUE_FULL_INFORMATION;
2142 typedef struct _KEY_VALUE_PARTIAL_INFORMATION {
2143 ULONG TitleIndex;
2144 ULONG Type;
2145 ULONG DataLength;
2146 UCHAR Data[1];
2147 } KEY_VALUE_PARTIAL_INFORMATION, *PKEY_VALUE_PARTIAL_INFORMATION;
2149 #ifndef __OBJECT_ATTRIBUTES_DEFINED__
2150 #define __OBJECT_ATTRIBUTES_DEFINED__
2151 typedef struct _OBJECT_ATTRIBUTES {
2152 ULONG Length;
2153 HANDLE RootDirectory;
2154 PUNICODE_STRING ObjectName;
2155 ULONG Attributes;
2156 PVOID SecurityDescriptor; /* type SECURITY_DESCRIPTOR */
2157 PVOID SecurityQualityOfService; /* type SECURITY_QUALITY_OF_SERVICE */
2158 } OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
2159 #endif
2161 typedef struct _OBJECT_DATA_INFORMATION {
2162 BOOLEAN InheritHandle;
2163 BOOLEAN ProtectFromClose;
2164 } OBJECT_DATA_INFORMATION, *POBJECT_DATA_INFORMATION;
2166 typedef struct _OBJECT_BASIC_INFORMATION {
2167 ULONG Attributes;
2168 ACCESS_MASK GrantedAccess;
2169 ULONG HandleCount;
2170 ULONG PointerCount;
2171 ULONG PagedPoolUsage;
2172 ULONG NonPagedPoolUsage;
2173 ULONG Reserved[3];
2174 ULONG NameInformationLength;
2175 ULONG TypeInformationLength;
2176 ULONG SecurityDescriptorLength;
2177 LARGE_INTEGER CreateTime;
2178 } OBJECT_BASIC_INFORMATION, *POBJECT_BASIC_INFORMATION;
2180 typedef struct _OBJECT_NAME_INFORMATION {
2181 UNICODE_STRING Name;
2182 } OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;
2184 typedef struct __OBJECT_TYPE_INFORMATION {
2185 UNICODE_STRING TypeName;
2186 ULONG TotalNumberOfObjects;
2187 ULONG TotalNumberOfHandles;
2188 ULONG TotalPagedPoolUsage;
2189 ULONG TotalNonPagedPoolUsage;
2190 ULONG TotalNamePoolUsage;
2191 ULONG TotalHandleTableUsage;
2192 ULONG HighWaterNumberOfObjects;
2193 ULONG HighWaterNumberOfHandles;
2194 ULONG HighWaterPagedPoolUsage;
2195 ULONG HighWaterNonPagedPoolUsage;
2196 ULONG HighWaterNamePoolUsage;
2197 ULONG HighWaterHandleTableUsage;
2198 ULONG InvalidAttributes;
2199 GENERIC_MAPPING GenericMapping;
2200 ULONG ValidAccessMask;
2201 BOOLEAN SecurityRequired;
2202 BOOLEAN MaintainHandleCount;
2203 UCHAR TypeIndex;
2204 CHAR ReservedByte;
2205 ULONG PoolType;
2206 ULONG DefaultPagedPoolCharge;
2207 ULONG DefaultNonPagedPoolCharge;
2208 } OBJECT_TYPE_INFORMATION, *POBJECT_TYPE_INFORMATION;
2210 typedef struct _OBJECT_TYPES_INFORMATION
2212 ULONG NumberOfTypes;
2213 } OBJECT_TYPES_INFORMATION, *POBJECT_TYPES_INFORMATION;
2215 typedef struct _PROCESS_BASIC_INFORMATION {
2216 #ifdef __WINESRC__
2217 NTSTATUS ExitStatus;
2218 PEB *PebBaseAddress;
2219 ULONG_PTR AffinityMask;
2220 LONG BasePriority;
2221 ULONG_PTR UniqueProcessId;
2222 ULONG_PTR InheritedFromUniqueProcessId;
2223 #else
2224 PVOID Reserved1;
2225 PPEB PebBaseAddress;
2226 PVOID Reserved2[2];
2227 ULONG_PTR UniqueProcessId;
2228 PVOID Reserved3;
2229 #endif
2230 } PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION;
2232 #define PROCESS_PRIOCLASS_IDLE 1
2233 #define PROCESS_PRIOCLASS_NORMAL 2
2234 #define PROCESS_PRIOCLASS_HIGH 3
2235 #define PROCESS_PRIOCLASS_REALTIME 4
2236 #define PROCESS_PRIOCLASS_BELOW_NORMAL 5
2237 #define PROCESS_PRIOCLASS_ABOVE_NORMAL 6
2239 typedef struct _PROCESS_PRIORITY_CLASS {
2240 BOOLEAN Foreground;
2241 UCHAR PriorityClass;
2242 } PROCESS_PRIORITY_CLASS, *PPROCESS_PRIORITY_CLASS;
2244 typedef struct _PROCESS_STACK_ALLOCATION_INFORMATION
2246 SIZE_T ReserveSize;
2247 SIZE_T ZeroBits;
2248 PVOID StackBase;
2249 } PROCESS_STACK_ALLOCATION_INFORMATION, *PPROCESS_STACK_ALLOCATION_INFORMATION;
2251 typedef struct _PROCESS_STACK_ALLOCATION_INFORMATION_EX
2253 ULONG PreferredNode;
2254 ULONG Reserved0;
2255 ULONG Reserved1;
2256 ULONG Reserved2;
2257 PROCESS_STACK_ALLOCATION_INFORMATION AllocInfo;
2258 } PROCESS_STACK_ALLOCATION_INFORMATION_EX, *PPROCESS_STACK_ALLOCATION_INFORMATION_EX;
2260 typedef struct _RTL_HEAP_DEFINITION {
2261 ULONG Length; /* = sizeof(RTL_HEAP_DEFINITION) */
2263 ULONG Unknown[11];
2264 } RTL_HEAP_DEFINITION, *PRTL_HEAP_DEFINITION;
2266 typedef struct _RTL_RWLOCK {
2267 RTL_CRITICAL_SECTION rtlCS;
2269 HANDLE hSharedReleaseSemaphore;
2270 UINT uSharedWaiters;
2272 HANDLE hExclusiveReleaseSemaphore;
2273 UINT uExclusiveWaiters;
2275 INT iNumberActive;
2276 HANDLE hOwningThreadId;
2277 DWORD dwTimeoutBoost;
2278 PVOID pDebugInfo;
2279 } RTL_RWLOCK, *LPRTL_RWLOCK;
2281 /* System Information Class 0x00 */
2283 typedef struct _SYSTEM_BASIC_INFORMATION {
2284 #ifdef __WINESRC__
2285 DWORD unknown;
2286 ULONG KeMaximumIncrement;
2287 ULONG PageSize;
2288 ULONG MmNumberOfPhysicalPages;
2289 ULONG MmLowestPhysicalPage;
2290 ULONG MmHighestPhysicalPage;
2291 ULONG_PTR AllocationGranularity;
2292 PVOID LowestUserAddress;
2293 PVOID HighestUserAddress;
2294 ULONG_PTR ActiveProcessorsAffinityMask;
2295 BYTE NumberOfProcessors;
2296 #else
2297 BYTE Reserved1[24];
2298 PVOID Reserved2[4];
2299 CCHAR NumberOfProcessors;
2300 #endif
2301 } SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
2303 /* System Information Class 0x01 */
2305 typedef struct _SYSTEM_CPU_INFORMATION {
2306 USHORT ProcessorArchitecture;
2307 USHORT ProcessorLevel;
2308 USHORT ProcessorRevision;
2309 USHORT MaximumProcessors;
2310 ULONG ProcessorFeatureBits;
2311 } SYSTEM_CPU_INFORMATION, *PSYSTEM_CPU_INFORMATION;
2313 /* definitions of bits in the Feature set for the x86 processors */
2314 #define CPU_FEATURE_VME 0x00000005 /* Virtual 86 Mode Extensions */
2315 #define CPU_FEATURE_TSC 0x00000002 /* Time Stamp Counter available */
2316 #define CPU_FEATURE_CMOV 0x00000008 /* Conditional Move instruction*/
2317 #define CPU_FEATURE_PGE 0x00000014 /* Page table Entry Global bit */
2318 #define CPU_FEATURE_PSE 0x00000024 /* Page Size Extension */
2319 #define CPU_FEATURE_MTRR 0x00000040 /* Memory Type Range Registers */
2320 #define CPU_FEATURE_CX8 0x00000080 /* Compare and eXchange 8 byte instr. */
2321 #define CPU_FEATURE_MMX 0x00000100 /* Multi Media eXtensions */
2322 #define CPU_FEATURE_X86 0x00000200 /* seems to be always ON, on the '86 */
2323 #define CPU_FEATURE_PAT 0x00000400 /* Page Attribute Table */
2324 #define CPU_FEATURE_FXSR 0x00000800 /* FXSAVE and FXSTORE instructions */
2325 #define CPU_FEATURE_SEP 0x00001000 /* SYSENTER and SYSEXIT instructions */
2326 #define CPU_FEATURE_SSE 0x00002000 /* SSE extensions (ext. MMX) */
2327 #define CPU_FEATURE_3DNOW 0x00004000 /* 3DNOW instructions available */
2328 #define CPU_FEATURE_SSE2 0x00010000 /* SSE2 extensions (XMMI64) */
2329 #define CPU_FEATURE_DS 0x00020000 /* Debug Store */
2330 #define CPU_FEATURE_HTT 0x00040000 /* Hyper Threading Technology */
2331 #define CPU_FEATURE_SSE3 0x00080000 /* SSE3 extensions */
2332 #define CPU_FEATURE_CX128 0x00100000 /* cmpxchg16b instruction */
2333 #define CPU_FEATURE_XSAVE 0x00800000 /* XSAVE instructions */
2334 #define CPU_FEATURE_2NDLEV 0x04000000 /* Second-level address translation */
2335 #define CPU_FEATURE_VIRT 0x08000000 /* Virtualization support */
2336 #define CPU_FEATURE_RDFS 0x10000000 /* RDFSBASE etc. instructions */
2337 #define CPU_FEATURE_NX 0x20000000 /* Data execution prevention */
2339 /* FIXME: following values are made up, actual flags are unknown */
2340 #define CPU_FEATURE_SSSE3 0x00008000 /* SSSE3 instructions */
2341 #define CPU_FEATURE_SSE41 0x01000000 /* SSE41 instructions */
2342 #define CPU_FEATURE_SSE42 0x02000000 /* SSE42 instructions */
2343 #define CPU_FEATURE_AVX 0x40000000 /* AVX instructions */
2344 #define CPU_FEATURE_AVX2 0x80000000 /* AVX2 instructions */
2345 #define CPU_FEATURE_PAE 0x00200000
2346 #define CPU_FEATURE_DAZ 0x00400000
2348 #define CPU_FEATURE_ARM_VFP_32 0x00000001
2349 #define CPU_FEATURE_ARM_NEON 0x00000002
2350 #define CPU_FEATURE_ARM_V8_CRC32 0x00000004
2351 #define CPU_FEATURE_ARM_V8_CRYPTO 0x00000008
2353 /* System Information Class 0x02 */
2355 /* Documented in "Windows NT/2000 Native API Reference" by Gary Nebbett. */
2356 typedef struct _SYSTEM_PERFORMANCE_INFORMATION {
2357 LARGE_INTEGER IdleTime;
2358 LARGE_INTEGER ReadTransferCount;
2359 LARGE_INTEGER WriteTransferCount;
2360 LARGE_INTEGER OtherTransferCount;
2361 ULONG ReadOperationCount;
2362 ULONG WriteOperationCount;
2363 ULONG OtherOperationCount;
2364 ULONG AvailablePages;
2365 ULONG TotalCommittedPages;
2366 ULONG TotalCommitLimit;
2367 ULONG PeakCommitment;
2368 ULONG PageFaults;
2369 ULONG WriteCopyFaults;
2370 ULONG TransitionFaults;
2371 ULONG Reserved1;
2372 ULONG DemandZeroFaults;
2373 ULONG PagesRead;
2374 ULONG PageReadIos;
2375 ULONG Reserved2[2];
2376 ULONG PagefilePagesWritten;
2377 ULONG PagefilePageWriteIos;
2378 ULONG MappedFilePagesWritten;
2379 ULONG MappedFilePageWriteIos;
2380 ULONG PagedPoolUsage;
2381 ULONG NonPagedPoolUsage;
2382 ULONG PagedPoolAllocs;
2383 ULONG PagedPoolFrees;
2384 ULONG NonPagedPoolAllocs;
2385 ULONG NonPagedPoolFrees;
2386 ULONG TotalFreeSystemPtes;
2387 ULONG SystemCodePage;
2388 ULONG TotalSystemDriverPages;
2389 ULONG TotalSystemCodePages;
2390 ULONG SmallNonPagedLookasideListAllocateHits;
2391 ULONG SmallPagedLookasideListAllocateHits;
2392 ULONG Reserved3;
2393 ULONG MmSystemCachePage;
2394 ULONG PagedPoolPage;
2395 ULONG SystemDriverPage;
2396 ULONG FastReadNoWait;
2397 ULONG FastReadWait;
2398 ULONG FastReadResourceMiss;
2399 ULONG FastReadNotPossible;
2400 ULONG FastMdlReadNoWait;
2401 ULONG FastMdlReadWait;
2402 ULONG FastMdlReadResourceMiss;
2403 ULONG FastMdlReadNotPossible;
2404 ULONG MapDataNoWait;
2405 ULONG MapDataWait;
2406 ULONG MapDataNoWaitMiss;
2407 ULONG MapDataWaitMiss;
2408 ULONG PinMappedDataCount;
2409 ULONG PinReadNoWait;
2410 ULONG PinReadWait;
2411 ULONG PinReadNoWaitMiss;
2412 ULONG PinReadWaitMiss;
2413 ULONG CopyReadNoWait;
2414 ULONG CopyReadWait;
2415 ULONG CopyReadNoWaitMiss;
2416 ULONG CopyReadWaitMiss;
2417 ULONG MdlReadNoWait;
2418 ULONG MdlReadWait;
2419 ULONG MdlReadNoWaitMiss;
2420 ULONG MdlReadWaitMiss;
2421 ULONG ReadAheadIos;
2422 ULONG LazyWriteIos;
2423 ULONG LazyWritePages;
2424 ULONG DataFlushes;
2425 ULONG DataPages;
2426 ULONG ContextSwitches;
2427 ULONG FirstLevelTbFills;
2428 ULONG SecondLevelTbFills;
2429 ULONG SystemCalls;
2430 } SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION;
2432 /* System Information Class 0x03 */
2434 typedef struct _SYSTEM_TIMEOFDAY_INFORMATION {
2435 #ifdef __WINESRC__
2436 LARGE_INTEGER BootTime;
2437 LARGE_INTEGER SystemTime;
2438 LARGE_INTEGER TimeZoneBias;
2439 ULONG TimeZoneId;
2440 ULONG Reserved;
2441 ULONGLONG BootTimeBias;
2442 ULONGLONG SleepTimeBias;
2443 #else
2444 BYTE Reserved1[48];
2445 #endif
2446 } SYSTEM_TIMEOFDAY_INFORMATION, *PSYSTEM_TIMEOFDAY_INFORMATION; /* was SYSTEM_TIME_INFORMATION */
2448 /* System Information Class 0x08 */
2450 typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION {
2451 LARGE_INTEGER IdleTime;
2452 LARGE_INTEGER KernelTime;
2453 LARGE_INTEGER UserTime;
2454 LARGE_INTEGER Reserved1[2];
2455 ULONG Reserved2;
2456 } SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION, *PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION;
2458 /* System Information Class 0x0b */
2460 typedef struct _SYSTEM_DRIVER_INFORMATION {
2461 PVOID pvAddress;
2462 DWORD dwUnknown1;
2463 DWORD dwUnknown2;
2464 DWORD dwEntryIndex;
2465 DWORD dwUnknown3;
2466 char szName[MAX_PATH + 1];
2467 } SYSTEM_DRIVER_INFORMATION, *PSYSTEM_DRIVER_INFORMATION;
2469 /* System Information Class 0x10 */
2471 typedef struct _SYSTEM_HANDLE_ENTRY {
2472 ULONG OwnerPid;
2473 BYTE ObjectType;
2474 BYTE HandleFlags;
2475 USHORT HandleValue;
2476 PVOID ObjectPointer;
2477 ULONG AccessMask;
2478 } SYSTEM_HANDLE_ENTRY, *PSYSTEM_HANDLE_ENTRY;
2480 typedef struct _SYSTEM_HANDLE_INFORMATION {
2481 ULONG Count;
2482 SYSTEM_HANDLE_ENTRY Handle[1];
2483 } SYSTEM_HANDLE_INFORMATION, *PSYSTEM_HANDLE_INFORMATION;
2485 typedef struct _SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX
2487 void *Object;
2488 ULONG_PTR UniqueProcessId;
2489 ULONG_PTR HandleValue;
2490 ULONG GrantedAccess;
2491 USHORT CreatorBackTraceIndex;
2492 USHORT ObjectTypeIndex;
2493 ULONG HandleAttributes;
2494 ULONG Reserved;
2495 } SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX;
2497 typedef struct _SYSTEM_HANDLE_INFORMATION_EX
2499 ULONG_PTR NumberOfHandles;
2500 ULONG_PTR Reserved;
2501 SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX Handles[1];
2502 } SYSTEM_HANDLE_INFORMATION_EX;
2504 /* System Information Class 0x15 */
2506 typedef struct _SYSTEM_CACHE_INFORMATION {
2507 SIZE_T CurrentSize;
2508 SIZE_T PeakSize;
2509 ULONG PageFaultCount;
2510 SIZE_T MinimumWorkingSet;
2511 SIZE_T MaximumWorkingSet;
2512 SIZE_T CurrentSizeIncludingTransitionInPages;
2513 SIZE_T PeakSizeIncludingTransitionInPages;
2514 ULONG TransitionRePurposeCount;
2515 ULONG Flags;
2516 } SYSTEM_CACHE_INFORMATION, *PSYSTEM_CACHE_INFORMATION;
2518 /* System Information Class 0x17 */
2520 typedef struct _SYSTEM_INTERRUPT_INFORMATION {
2521 ULONG ContextSwitches;
2522 ULONG DpcCount;
2523 ULONG DpcRate;
2524 ULONG TimeIncrement;
2525 ULONG DpcBypassCount;
2526 ULONG ApcBypassCount;
2527 } SYSTEM_INTERRUPT_INFORMATION, *PSYSTEM_INTERRUPT_INFORMATION;
2529 typedef struct _SYSTEM_CONFIGURATION_INFO {
2530 union {
2531 ULONG OemId;
2532 struct {
2533 WORD ProcessorArchitecture;
2534 WORD Reserved;
2535 } tag1;
2536 } tag2;
2537 ULONG PageSize;
2538 PVOID MinimumApplicationAddress;
2539 PVOID MaximumApplicationAddress;
2540 ULONG ActiveProcessorMask;
2541 ULONG NumberOfProcessors;
2542 ULONG ProcessorType;
2543 ULONG AllocationGranularity;
2544 WORD ProcessorLevel;
2545 WORD ProcessorRevision;
2546 } SYSTEM_CONFIGURATION_INFO, *PSYSTEM_CONFIGURATION_INFO;
2548 typedef struct _SYSTEM_EXCEPTION_INFORMATION {
2549 BYTE Reserved1[16];
2550 } SYSTEM_EXCEPTION_INFORMATION, *PSYSTEM_EXCEPTION_INFORMATION;
2552 typedef struct _SYSTEM_LOOKASIDE_INFORMATION {
2553 BYTE Reserved1[32];
2554 } SYSTEM_LOOKASIDE_INFORMATION, *PSYSTEM_LOOKASIDE_INFORMATION;
2556 typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION {
2557 BOOLEAN DebuggerEnabled;
2558 BOOLEAN DebuggerNotPresent;
2559 } SYSTEM_KERNEL_DEBUGGER_INFORMATION, *PSYSTEM_KERNEL_DEBUGGER_INFORMATION;
2561 typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION_EX {
2562 BOOLEAN DebuggerAllowed;
2563 BOOLEAN DebuggerEnabled;
2564 BOOLEAN DebuggerPresent;
2565 } SYSTEM_KERNEL_DEBUGGER_INFORMATION_EX, *PSYSTEM_KERNEL_DEBUGGER_INFORMATION_EX;
2567 typedef struct _VM_COUNTERS
2569 SIZE_T PeakVirtualSize;
2570 SIZE_T VirtualSize;
2571 ULONG PageFaultCount;
2572 SIZE_T PeakWorkingSetSize;
2573 SIZE_T WorkingSetSize;
2574 SIZE_T QuotaPeakPagedPoolUsage;
2575 SIZE_T QuotaPagedPoolUsage;
2576 SIZE_T QuotaPeakNonPagedPoolUsage;
2577 SIZE_T QuotaNonPagedPoolUsage;
2578 SIZE_T PagefileUsage;
2579 SIZE_T PeakPagefileUsage;
2580 } VM_COUNTERS, *PVM_COUNTERS;
2582 typedef struct _VM_COUNTERS_EX
2584 SIZE_T PeakVirtualSize;
2585 SIZE_T VirtualSize;
2586 ULONG PageFaultCount;
2587 SIZE_T PeakWorkingSetSize;
2588 SIZE_T WorkingSetSize;
2589 SIZE_T QuotaPeakPagedPoolUsage;
2590 SIZE_T QuotaPagedPoolUsage;
2591 SIZE_T QuotaPeakNonPagedPoolUsage;
2592 SIZE_T QuotaNonPagedPoolUsage;
2593 SIZE_T PagefileUsage;
2594 SIZE_T PeakPagefileUsage;
2595 SIZE_T PrivateUsage;
2596 } VM_COUNTERS_EX, *PVM_COUNTERS_EX;
2598 typedef struct _SYSTEM_PROCESS_INFORMATION {
2599 #ifdef __WINESRC__ /* win32/win64 */
2600 ULONG NextEntryOffset; /* 00/00 */
2601 DWORD dwThreadCount; /* 04/04 */
2602 LARGE_INTEGER WorkingSetPrivateSize; /* 08/08 */
2603 ULONG HardFaultCount; /* 10/10 */
2604 ULONG NumberOfThreadsHighWatermark;/* 14/14 */
2605 ULONGLONG CycleTime; /* 18/18 */
2606 LARGE_INTEGER CreationTime; /* 20/20 */
2607 LARGE_INTEGER UserTime; /* 28/28 */
2608 LARGE_INTEGER KernelTime; /* 30/30 */
2609 UNICODE_STRING ProcessName; /* 38/38 */
2610 DWORD dwBasePriority; /* 40/48 */
2611 HANDLE UniqueProcessId; /* 44/50 */
2612 HANDLE ParentProcessId; /* 48/58 */
2613 ULONG HandleCount; /* 4c/60 */
2614 ULONG SessionId; /* 50/64 */
2615 ULONG_PTR UniqueProcessKey; /* 54/68 */
2616 VM_COUNTERS_EX vmCounters; /* 58/70 */
2617 IO_COUNTERS ioCounters; /* 88/d0 */
2618 SYSTEM_THREAD_INFORMATION ti[1]; /* b8/100 */
2619 #else
2620 ULONG NextEntryOffset; /* 00/00 */
2621 BYTE Reserved1[52]; /* 04/04 */
2622 PVOID Reserved2[3]; /* 38/38 */
2623 HANDLE UniqueProcessId; /* 44/50 */
2624 PVOID Reserved3; /* 48/58 */
2625 ULONG HandleCount; /* 4c/60 */
2626 BYTE Reserved4[4]; /* 50/64 */
2627 PVOID Reserved5[11]; /* 54/68 */
2628 SIZE_T PeakPagefileUsage; /* 80/c0 */
2629 SIZE_T PrivatePageCount; /* 84/c8 */
2630 LARGE_INTEGER Reserved6[6]; /* 88/d0 */
2631 #endif
2632 } SYSTEM_PROCESS_INFORMATION, *PSYSTEM_PROCESS_INFORMATION;
2634 typedef struct _SYSTEM_REGISTRY_QUOTA_INFORMATION {
2635 ULONG RegistryQuotaAllowed;
2636 ULONG RegistryQuotaUsed;
2637 PVOID Reserved1;
2638 } SYSTEM_REGISTRY_QUOTA_INFORMATION, *PSYSTEM_REGISTRY_QUOTA_INFORMATION;
2640 typedef struct _SYSTEM_TIME_ADJUSTMENT_QUERY {
2641 ULONG TimeAdjustment;
2642 ULONG TimeIncrement;
2643 BOOLEAN TimeAdjustmentDisabled;
2644 } SYSTEM_TIME_ADJUSTMENT_QUERY, *PSYSTEM_TIME_ADJUSTMENT_QUERY;
2646 typedef struct _SYSTEM_TIME_ADJUSTMENT {
2647 ULONG TimeAdjustment;
2648 BOOLEAN TimeAdjustmentDisabled;
2649 } SYSTEM_TIME_ADJUSTMENT, *PSYSTEM_TIME_ADJUSTMENT;
2651 typedef enum _SYSTEM_FIRMWARE_TABLE_ACTION
2653 SystemFirmwareTable_Enumerate = 0,
2654 SystemFirmwareTable_Get = 1
2655 } SYSTEM_FIRMWARE_TABLE_ACTION, *PSYSTEM_FIRMWARE_TABLE_ACTION;
2657 /* System Information Class 0x4C */
2659 typedef struct _SYSTEM_FIRMWARE_TABLE_INFORMATION
2661 ULONG ProviderSignature;
2662 SYSTEM_FIRMWARE_TABLE_ACTION Action;
2663 ULONG TableID;
2664 ULONG TableBufferLength;
2665 UCHAR TableBuffer[1];
2666 } SYSTEM_FIRMWARE_TABLE_INFORMATION, *PSYSTEM_FIRMWARE_TABLE_INFORMATION;
2668 typedef struct _TIME_FIELDS
2669 { CSHORT Year;
2670 CSHORT Month;
2671 CSHORT Day;
2672 CSHORT Hour;
2673 CSHORT Minute;
2674 CSHORT Second;
2675 CSHORT Milliseconds;
2676 CSHORT Weekday;
2677 } TIME_FIELDS, *PTIME_FIELDS;
2679 typedef struct _WINSTATIONINFORMATIONW {
2680 BYTE Reserved2[70];
2681 ULONG LogonId;
2682 BYTE Reserved3[1140];
2683 } WINSTATIONINFORMATIONW, *PWINSTATIONINFORMATIONW;
2685 typedef BOOLEAN (WINAPI * PWINSTATIONQUERYINFORMATIONW)(HANDLE,ULONG,WINSTATIONINFOCLASS,PVOID,ULONG,PULONG);
2687 typedef struct _LDR_RESOURCE_INFO
2689 ULONG_PTR Type;
2690 ULONG_PTR Name;
2691 ULONG Language;
2692 } LDR_RESOURCE_INFO, *PLDR_RESOURCE_INFO;
2695 /* debug buffer definitions */
2697 typedef struct _DEBUG_BUFFER {
2698 HANDLE SectionHandle;
2699 PVOID SectionBase;
2700 PVOID RemoteSectionBase;
2701 ULONG SectionBaseDelta;
2702 HANDLE EventPairHandle;
2703 ULONG Unknown[2];
2704 HANDLE RemoteThreadHandle;
2705 ULONG InfoClassMask;
2706 ULONG SizeOfInfo;
2707 ULONG AllocatedSize;
2708 ULONG SectionSize;
2709 PVOID ModuleInformation;
2710 PVOID BackTraceInformation;
2711 PVOID HeapInformation;
2712 PVOID LockInformation;
2713 PVOID Reserved[8];
2714 } DEBUG_BUFFER, *PDEBUG_BUFFER;
2716 #define PDI_MODULES 0x01
2717 #define PDI_BACKTRACE 0x02
2718 #define PDI_HEAPS 0x04
2719 #define PDI_HEAP_TAGS 0x08
2720 #define PDI_HEAP_BLOCKS 0x10
2721 #define PDI_LOCKS 0x20
2723 typedef struct _DEBUG_MODULE_INFORMATION {
2724 ULONG Reserved[2];
2725 ULONG Base;
2726 ULONG Size;
2727 ULONG Flags;
2728 USHORT Index;
2729 USHORT Unknown;
2730 USHORT LoadCount;
2731 USHORT ModuleNameOffset;
2732 CHAR ImageName[256];
2733 } DEBUG_MODULE_INFORMATION, *PDEBUG_MODULE_INFORMATION;
2735 typedef struct _DEBUG_HEAP_INFORMATION {
2736 ULONG Base;
2737 ULONG Flags;
2738 USHORT Granularity;
2739 USHORT Unknown;
2740 ULONG Allocated;
2741 ULONG Committed;
2742 ULONG TagCount;
2743 ULONG BlockCount;
2744 ULONG Reserved[7];
2745 PVOID Tags;
2746 PVOID Blocks;
2747 } DEBUG_HEAP_INFORMATION, *PDEBUG_HEAP_INFORMATION;
2749 typedef struct _DEBUG_LOCK_INFORMATION {
2750 PVOID Address;
2751 USHORT Type;
2752 USHORT CreatorBackTraceIndex;
2753 ULONG OwnerThreadId;
2754 ULONG ActiveCount;
2755 ULONG ContentionCount;
2756 ULONG EntryCount;
2757 ULONG RecursionCount;
2758 ULONG NumberOfSharedWaiters;
2759 ULONG NumberOfExclusiveWaiters;
2760 } DEBUG_LOCK_INFORMATION, *PDEBUG_LOCK_INFORMATION;
2762 typedef struct _PORT_MESSAGE_HEADER {
2763 USHORT DataSize;
2764 USHORT MessageSize;
2765 USHORT MessageType;
2766 USHORT VirtualRangesOffset;
2767 CLIENT_ID ClientId;
2768 ULONG MessageId;
2769 ULONG SectionSize;
2770 } PORT_MESSAGE_HEADER, *PPORT_MESSAGE_HEADER, PORT_MESSAGE, *PPORT_MESSAGE;
2772 typedef unsigned short RTL_ATOM, *PRTL_ATOM;
2774 typedef enum _ATOM_INFORMATION_CLASS {
2775 AtomBasicInformation = 0,
2776 AtomTableInformation = 1,
2777 } ATOM_INFORMATION_CLASS;
2779 typedef struct _ATOM_BASIC_INFORMATION {
2780 USHORT ReferenceCount;
2781 USHORT Pinned;
2782 USHORT NameLength;
2783 WCHAR Name[1];
2784 } ATOM_BASIC_INFORMATION, *PATOM_BASIC_INFORMATION;
2786 /* FIXME: names probably not correct */
2787 typedef struct _RTL_HANDLE
2789 struct _RTL_HANDLE * Next;
2790 } RTL_HANDLE;
2792 /* FIXME: names probably not correct */
2793 typedef struct _RTL_HANDLE_TABLE
2795 ULONG MaxHandleCount; /* 0x00 */
2796 ULONG HandleSize; /* 0x04 */
2797 ULONG Unused[2]; /* 0x08-0x0c */
2798 PVOID NextFree; /* 0x10 */
2799 PVOID FirstHandle; /* 0x14 */
2800 PVOID ReservedMemory; /* 0x18 */
2801 PVOID MaxHandle; /* 0x1c */
2802 } RTL_HANDLE_TABLE;
2804 typedef struct _RTL_ATOM_TABLE_ENTRY
2806 struct _RTL_ATOM_TABLE_ENTRY *HashLink;
2807 WORD HandleIndex;
2808 WORD Atom;
2809 WORD ReferenceCount;
2810 UCHAR Flags;
2811 UCHAR NameLength;
2812 WCHAR Name[1];
2813 } RTL_ATOM_TABLE_ENTRY, *PRTL_ATOM_TABLE_ENTRY;
2815 typedef struct _RTL_ATOM_TABLE
2817 ULONG Signature;
2818 RTL_CRITICAL_SECTION CriticalSection;
2819 RTL_HANDLE_TABLE HandleTable;
2820 ULONG NumberOfBuckets;
2821 RTL_ATOM_TABLE_ENTRY *Buckets[1];
2822 } *RTL_ATOM_TABLE, **PRTL_ATOM_TABLE;
2824 /***********************************************************************
2825 * Defines
2828 /* flags for NtCreateFile and NtOpenFile */
2829 #define FILE_DIRECTORY_FILE 0x00000001
2830 #define FILE_WRITE_THROUGH 0x00000002
2831 #define FILE_SEQUENTIAL_ONLY 0x00000004
2832 #define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008
2833 #define FILE_SYNCHRONOUS_IO_ALERT 0x00000010
2834 #define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020
2835 #define FILE_NON_DIRECTORY_FILE 0x00000040
2836 #define FILE_CREATE_TREE_CONNECTION 0x00000080
2837 #define FILE_COMPLETE_IF_OPLOCKED 0x00000100
2838 #define FILE_NO_EA_KNOWLEDGE 0x00000200
2839 #define FILE_OPEN_FOR_RECOVERY 0x00000400
2840 #define FILE_RANDOM_ACCESS 0x00000800
2841 #define FILE_DELETE_ON_CLOSE 0x00001000
2842 #define FILE_OPEN_BY_FILE_ID 0x00002000
2843 #define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000
2844 #define FILE_NO_COMPRESSION 0x00008000
2845 #define FILE_RESERVE_OPFILTER 0x00100000
2846 #define FILE_OPEN_REPARSE_POINT 0x00200000
2847 #define FILE_OPEN_OFFLINE_FILE 0x00400000
2848 #define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000
2850 #define FILE_ATTRIBUTE_VALID_FLAGS 0x00007fb7
2851 #define FILE_ATTRIBUTE_VALID_SET_FLAGS 0x000031a7
2853 /* status for NtCreateFile or NtOpenFile */
2854 #define FILE_SUPERSEDED 0
2855 #define FILE_OPENED 1
2856 #define FILE_CREATED 2
2857 #define FILE_OVERWRITTEN 3
2858 #define FILE_EXISTS 4
2859 #define FILE_DOES_NOT_EXIST 5
2861 /* disposition for NtCreateFile */
2862 #define FILE_SUPERSEDE 0
2863 #define FILE_OPEN 1
2864 #define FILE_CREATE 2
2865 #define FILE_OPEN_IF 3
2866 #define FILE_OVERWRITE 4
2867 #define FILE_OVERWRITE_IF 5
2868 #define FILE_MAXIMUM_DISPOSITION 5
2870 /* Characteristics of a File System */
2871 #define FILE_REMOVABLE_MEDIA 0x00000001
2872 #define FILE_READ_ONLY_DEVICE 0x00000002
2873 #define FILE_FLOPPY_DISKETTE 0x00000004
2874 #define FILE_WRITE_ONE_MEDIA 0x00000008
2875 #define FILE_REMOTE_DEVICE 0x00000010
2876 #define FILE_DEVICE_IS_MOUNTED 0x00000020
2877 #define FILE_VIRTUAL_VOLUME 0x00000040
2878 #define FILE_AUTOGENERATED_DEVICE_NAME 0x00000080
2879 #define FILE_DEVICE_SECURE_OPEN 0x00000100
2880 #define FILE_CHARACTERISTIC_PNP_DEVICE 0x00000800
2881 #define FILE_CHARACTERISTIC_TS_DEVICE 0x00001000
2882 #define FILE_CHARACTERISTIC_WEBDAV_DEVICE 0x00002000
2883 #define FILE_CHARACTERISTIC_CSV 0x00010000
2884 #define FILE_DEVICE_ALLOW_APPCONTAINER_TRAVERSAL 0x00020000
2885 #define FILE_PORTABLE_DEVICE 0x00040000
2887 /* options for NtCreateNamedPipeFile */
2888 #define FILE_PIPE_INBOUND 0x00000000
2889 #define FILE_PIPE_OUTBOUND 0x00000001
2890 #define FILE_PIPE_FULL_DUPLEX 0x00000002
2892 /* options for pipe's type */
2893 #define FILE_PIPE_TYPE_MESSAGE 0x00000001
2894 #define FILE_PIPE_TYPE_BYTE 0x00000000
2895 /* options for pipe's message mode */
2896 #define FILE_PIPE_MESSAGE_MODE 0x00000001
2897 #define FILE_PIPE_BYTE_STREAM_MODE 0x00000000
2898 /* options for pipe's blocking mode */
2899 #define FILE_PIPE_COMPLETE_OPERATION 0x00000001
2900 #define FILE_PIPE_QUEUE_OPERATION 0x00000000
2901 /* and client / server end */
2902 #define FILE_PIPE_SERVER_END 0x00000001
2903 #define FILE_PIPE_CLIENT_END 0x00000000
2905 #define INTERNAL_TS_ACTIVE_CONSOLE_ID ( *((volatile ULONG*)(0x7ffe02d8)) )
2907 #define LOGONID_CURRENT ((ULONG)-1)
2909 #define OBJ_PROTECT_CLOSE 0x00000001
2910 #define OBJ_INHERIT 0x00000002
2911 #define OBJ_PERMANENT 0x00000010
2912 #define OBJ_EXCLUSIVE 0x00000020
2913 #define OBJ_CASE_INSENSITIVE 0x00000040
2914 #define OBJ_OPENIF 0x00000080
2915 #define OBJ_OPENLINK 0x00000100
2916 #define OBJ_KERNEL_HANDLE 0x00000200
2917 #define OBJ_VALID_ATTRIBUTES 0x000003F2
2919 #define SERVERNAME_CURRENT ((HANDLE)NULL)
2921 typedef void (CALLBACK *PNTAPCFUNC)(ULONG_PTR,ULONG_PTR,ULONG_PTR); /* FIXME: not the right name */
2922 typedef void (CALLBACK *PRTL_THREAD_START_ROUTINE)(LPVOID); /* FIXME: not the right name */
2923 typedef DWORD (CALLBACK *PRTL_WORK_ITEM_ROUTINE)(LPVOID); /* FIXME: not the right name */
2924 typedef void (NTAPI *RTL_WAITORTIMERCALLBACKFUNC)(PVOID,BOOLEAN); /* FIXME: not the right name */
2927 /* DbgPrintEx default levels */
2928 #define DPFLTR_ERROR_LEVEL 0
2929 #define DPFLTR_WARNING_LEVEL 1
2930 #define DPFLTR_TRACE_LEVEL 2
2931 #define DPFLTR_INFO_LEVEL 3
2932 #define DPFLTR_MASK 0x8000000
2934 /* Well-known LUID values */
2935 #define SE_MIN_WELL_KNOWN_PRIVILEGE 2
2936 #define SE_CREATE_TOKEN_PRIVILEGE 2
2937 #define SE_ASSIGNPRIMARYTOKEN_PRIVILEGE 3
2938 #define SE_LOCK_MEMORY_PRIVILEGE 4
2939 #define SE_INCREASE_QUOTA_PRIVILEGE 5
2940 #define SE_UNSOLICITED_INPUT_PRIVILEGE 6 /* obsolete */
2941 #define SE_MACHINE_ACCOUNT_PRIVILEGE 6
2942 #define SE_TCB_PRIVILEGE 7
2943 #define SE_SECURITY_PRIVILEGE 8
2944 #define SE_TAKE_OWNERSHIP_PRIVILEGE 9
2945 #define SE_LOAD_DRIVER_PRIVILEGE 10
2946 #define SE_SYSTEM_PROFILE_PRIVILEGE 11
2947 #define SE_SYSTEMTIME_PRIVILEGE 12
2948 #define SE_PROF_SINGLE_PROCESS_PRIVILEGE 13
2949 #define SE_INC_BASE_PRIORITY_PRIVILEGE 14
2950 #define SE_CREATE_PAGEFILE_PRIVILEGE 15
2951 #define SE_CREATE_PERMANENT_PRIVILEGE 16
2952 #define SE_BACKUP_PRIVILEGE 17
2953 #define SE_RESTORE_PRIVILEGE 18
2954 #define SE_SHUTDOWN_PRIVILEGE 19
2955 #define SE_DEBUG_PRIVILEGE 20
2956 #define SE_AUDIT_PRIVILEGE 21
2957 #define SE_SYSTEM_ENVIRONMENT_PRIVILEGE 22
2958 #define SE_CHANGE_NOTIFY_PRIVILEGE 23
2959 #define SE_REMOTE_SHUTDOWN_PRIVILEGE 24
2960 #define SE_UNDOCK_PRIVILEGE 25
2961 #define SE_SYNC_AGENT_PRIVILEGE 26
2962 #define SE_ENABLE_DELEGATION_PRIVILEGE 27
2963 #define SE_MANAGE_VOLUME_PRIVILEGE 28
2964 #define SE_IMPERSONATE_PRIVILEGE 29
2965 #define SE_CREATE_GLOBAL_PRIVILEGE 30
2966 #define SE_MAX_WELL_KNOWN_PRIVILEGE SE_CREATE_GLOBAL_PRIVILEGE
2968 /* NtGlobalFlag bits */
2969 #define FLG_STOP_ON_EXCEPTION 0x00000001
2970 #define FLG_SHOW_LDR_SNAPS 0x00000002
2971 #define FLG_DEBUG_INITIAL_COMMAND 0x00000004
2972 #define FLG_STOP_ON_HUNG_GUI 0x00000008
2973 #define FLG_HEAP_ENABLE_TAIL_CHECK 0x00000010
2974 #define FLG_HEAP_ENABLE_FREE_CHECK 0x00000020
2975 #define FLG_HEAP_VALIDATE_PARAMETERS 0x00000040
2976 #define FLG_HEAP_VALIDATE_ALL 0x00000080
2977 #define FLG_APPLICATION_VERIFIER 0x00000100
2978 #define FLG_POOL_ENABLE_TAGGING 0x00000400
2979 #define FLG_HEAP_ENABLE_TAGGING 0x00000800
2980 #define FLG_USER_STACK_TRACE_DB 0x00001000
2981 #define FLG_KERNEL_STACK_TRACE_DB 0x00002000
2982 #define FLG_MAINTAIN_OBJECT_TYPELIST 0x00004000
2983 #define FLG_HEAP_ENABLE_TAG_BY_DLL 0x00008000
2984 #define FLG_DISABLE_STACK_EXTENSION 0x00010000
2985 #define FLG_ENABLE_CSRDEBUG 0x00020000
2986 #define FLG_ENABLE_KDEBUG_SYMBOL_LOAD 0x00040000
2987 #define FLG_DISABLE_PAGE_KERNEL_STACKS 0x00080000
2988 #define FLG_ENABLE_SYSTEM_CRIT_BREAKS 0x00100000
2989 #define FLG_HEAP_DISABLE_COALESCING 0x00200000
2990 #define FLG_ENABLE_CLOSE_EXCEPTIONS 0x00400000
2991 #define FLG_ENABLE_EXCEPTION_LOGGING 0x00800000
2992 #define FLG_ENABLE_HANDLE_TYPE_TAGGING 0x01000000
2993 #define FLG_HEAP_PAGE_ALLOCS 0x02000000
2994 #define FLG_DEBUG_INITIAL_COMMAND_EX 0x04000000
2995 #define FLG_DISABLE_DBGPRINT 0x08000000
2996 #define FLG_CRITSEC_EVENT_CREATION 0x10000000
2997 #define FLG_LDR_TOP_DOWN 0x20000000
2998 #define FLG_ENABLE_HANDLE_EXCEPTIONS 0x40000000
2999 #define FLG_DISABLE_PROTDLLS 0x80000000
3001 /* Rtl*Registry* functions structs and defines */
3002 #define RTL_REGISTRY_ABSOLUTE 0
3003 #define RTL_REGISTRY_SERVICES 1
3004 #define RTL_REGISTRY_CONTROL 2
3005 #define RTL_REGISTRY_WINDOWS_NT 3
3006 #define RTL_REGISTRY_DEVICEMAP 4
3007 #define RTL_REGISTRY_USER 5
3009 #define RTL_REGISTRY_HANDLE 0x40000000
3010 #define RTL_REGISTRY_OPTIONAL 0x80000000
3012 #define RTL_QUERY_REGISTRY_SUBKEY 0x00000001
3013 #define RTL_QUERY_REGISTRY_TOPKEY 0x00000002
3014 #define RTL_QUERY_REGISTRY_REQUIRED 0x00000004
3015 #define RTL_QUERY_REGISTRY_NOVALUE 0x00000008
3016 #define RTL_QUERY_REGISTRY_NOEXPAND 0x00000010
3017 #define RTL_QUERY_REGISTRY_DIRECT 0x00000020
3018 #define RTL_QUERY_REGISTRY_DELETE 0x00000040
3019 #define RTL_QUERY_REGISTRY_TYPECHECK 0x00000100
3021 #define RTL_QUERY_REGISTRY_TYPECHECK_SHIFT 24
3023 typedef NTSTATUS (WINAPI *PRTL_QUERY_REGISTRY_ROUTINE)( PCWSTR ValueName,
3024 ULONG ValueType,
3025 PVOID ValueData,
3026 ULONG ValueLength,
3027 PVOID Context,
3028 PVOID EntryContext);
3030 typedef struct _RTL_QUERY_REGISTRY_TABLE
3032 PRTL_QUERY_REGISTRY_ROUTINE QueryRoutine;
3033 ULONG Flags;
3034 PWSTR Name;
3035 PVOID EntryContext;
3036 ULONG DefaultType;
3037 PVOID DefaultData;
3038 ULONG DefaultLength;
3039 } RTL_QUERY_REGISTRY_TABLE, *PRTL_QUERY_REGISTRY_TABLE;
3041 typedef struct _KEY_MULTIPLE_VALUE_INFORMATION
3043 PUNICODE_STRING ValueName;
3044 ULONG DataLength;
3045 ULONG DataOffset;
3046 ULONG Type;
3047 } KEY_MULTIPLE_VALUE_INFORMATION, *PKEY_MULTIPLE_VALUE_INFORMATION;
3049 typedef VOID (CALLBACK *PRTL_OVERLAPPED_COMPLETION_ROUTINE)(DWORD,DWORD,LPVOID);
3051 typedef VOID (CALLBACK *PTIMER_APC_ROUTINE) ( PVOID, ULONG, LONG );
3053 typedef enum _EVENT_INFORMATION_CLASS {
3054 EventBasicInformation
3055 } EVENT_INFORMATION_CLASS, *PEVENT_INFORMATION_CLASS;
3057 typedef struct _EVENT_BASIC_INFORMATION {
3058 EVENT_TYPE EventType;
3059 LONG EventState;
3060 } EVENT_BASIC_INFORMATION, *PEVENT_BASIC_INFORMATION;
3062 typedef enum _SEMAPHORE_INFORMATION_CLASS {
3063 SemaphoreBasicInformation
3064 } SEMAPHORE_INFORMATION_CLASS, *PSEMAPHORE_INFORMATION_CLASS;
3066 typedef struct _SEMAPHORE_BASIC_INFORMATION {
3067 ULONG CurrentCount;
3068 ULONG MaximumCount;
3069 } SEMAPHORE_BASIC_INFORMATION, *PSEMAPHORE_BASIC_INFORMATION;
3071 typedef enum _SECTION_INFORMATION_CLASS
3073 SectionBasicInformation,
3074 SectionImageInformation,
3075 SectionRelocationInformation,
3076 SectionOriginalBaseInformation,
3077 SectionInternalImageInformation
3078 } SECTION_INFORMATION_CLASS;
3080 typedef struct _SECTION_BASIC_INFORMATION {
3081 PVOID BaseAddress;
3082 ULONG Attributes;
3083 LARGE_INTEGER Size;
3084 } SECTION_BASIC_INFORMATION, *PSECTION_BASIC_INFORMATION;
3086 typedef struct _SECTION_IMAGE_INFORMATION {
3087 PVOID TransferAddress;
3088 ULONG ZeroBits;
3089 SIZE_T MaximumStackSize;
3090 SIZE_T CommittedStackSize;
3091 ULONG SubSystemType;
3092 USHORT MinorSubsystemVersion;
3093 USHORT MajorSubsystemVersion;
3094 USHORT MajorOperatingSystemVersion;
3095 USHORT MinorOperatingSystemVersion;
3096 USHORT ImageCharacteristics;
3097 USHORT DllCharacteristics;
3098 USHORT Machine;
3099 BOOLEAN ImageContainsCode;
3100 union
3102 UCHAR ImageFlags;
3103 struct
3105 UCHAR ComPlusNativeReady : 1;
3106 UCHAR ComPlusILOnly : 1;
3107 UCHAR ImageDynamicallyRelocated : 1;
3108 UCHAR ImageMappedFlat : 1;
3109 UCHAR BaseBelow4gb : 1;
3110 UCHAR ComPlusPrefer32bit : 1;
3111 #ifdef __WINESRC__ /* Wine extensions */
3112 UCHAR WineBuiltin : 1;
3113 UCHAR WineFakeDll : 1;
3114 #else
3115 UCHAR Reserved : 2;
3116 #endif
3117 } DUMMYSTRUCTNAME;
3118 } DUMMYUNIONNAME;
3119 ULONG LoaderFlags;
3120 ULONG ImageFileSize;
3121 ULONG CheckSum;
3122 } SECTION_IMAGE_INFORMATION, *PSECTION_IMAGE_INFORMATION;
3124 typedef struct _LPC_SECTION_WRITE {
3125 ULONG Length;
3126 HANDLE SectionHandle;
3127 ULONG SectionOffset;
3128 ULONG ViewSize;
3129 PVOID ViewBase;
3130 PVOID TargetViewBase;
3131 } LPC_SECTION_WRITE, *PLPC_SECTION_WRITE;
3133 typedef struct _LPC_SECTION_READ {
3134 ULONG Length;
3135 ULONG ViewSize;
3136 PVOID ViewBase;
3137 } LPC_SECTION_READ, *PLPC_SECTION_READ;
3139 typedef struct _LPC_MESSAGE {
3140 USHORT DataSize;
3141 USHORT MessageSize;
3142 USHORT MessageType;
3143 USHORT VirtualRangesOffset;
3144 CLIENT_ID ClientId;
3145 ULONG_PTR MessageId;
3146 ULONG_PTR SectionSize;
3147 UCHAR Data[ANYSIZE_ARRAY];
3148 } LPC_MESSAGE, *PLPC_MESSAGE;
3150 typedef struct _RTL_USER_PROCESS_INFORMATION
3152 ULONG Length;
3153 HANDLE Process;
3154 HANDLE Thread;
3155 CLIENT_ID ClientId;
3156 SECTION_IMAGE_INFORMATION ImageInformation;
3157 } RTL_USER_PROCESS_INFORMATION, *PRTL_USER_PROCESS_INFORMATION;
3159 typedef enum _SHUTDOWN_ACTION {
3160 ShutdownNoReboot,
3161 ShutdownReboot,
3162 ShutdownPowerOff
3163 } SHUTDOWN_ACTION, *PSHUTDOWN_ACTION;
3165 typedef enum _KPROFILE_SOURCE {
3166 ProfileTime,
3167 ProfileAlignmentFixup,
3168 ProfileTotalIssues,
3169 ProfilePipelineDry,
3170 ProfileLoadInstructions,
3171 ProfilePipelineFrozen,
3172 ProfileBranchInstructions,
3173 ProfileTotalNonissues,
3174 ProfileDcacheMisses,
3175 ProfileIcacheMisses,
3176 ProfileCacheMisses,
3177 ProfileBranchMispredictions,
3178 ProfileStoreInstructions,
3179 ProfileFpInstructions,
3180 ProfileIntegerInstructions,
3181 Profile2Issue,
3182 Profile3Issue,
3183 Profile4Issue,
3184 ProfileSpecialInstructions,
3185 ProfileTotalCycles,
3186 ProfileIcacheIssues,
3187 ProfileDcacheAccesses,
3188 ProfileMemoryBarrierCycles,
3189 ProfileLoadLinkedIssues,
3190 ProfileMaximum
3191 } KPROFILE_SOURCE, *PKPROFILE_SOURCE;
3193 typedef struct _DIRECTORY_BASIC_INFORMATION {
3194 UNICODE_STRING ObjectName;
3195 UNICODE_STRING ObjectTypeName;
3196 } DIRECTORY_BASIC_INFORMATION, *PDIRECTORY_BASIC_INFORMATION;
3198 typedef struct _INITIAL_TEB {
3199 void *OldStackBase;
3200 void *OldStackLimit;
3201 void *StackBase;
3202 void *StackLimit;
3203 void *DeallocationStack;
3204 } INITIAL_TEB, *PINITIAL_TEB;
3206 typedef enum _PORT_INFORMATION_CLASS {
3207 PortNoInformation
3208 } PORT_INFORMATION_CLASS, *PPORT_INFORMATION_CLASS;
3210 typedef enum _IO_COMPLETION_INFORMATION_CLASS {
3211 IoCompletionBasicInformation
3212 } IO_COMPLETION_INFORMATION_CLASS, *PIO_COMPLETION_INFORMATION_CLASS;
3214 typedef struct _FILE_COMPLETION_INFORMATION {
3215 HANDLE CompletionPort;
3216 ULONG_PTR CompletionKey;
3217 } FILE_COMPLETION_INFORMATION, *PFILE_COMPLETION_INFORMATION;
3219 #define IO_COMPLETION_QUERY_STATE 0x0001
3220 #define IO_COMPLETION_MODIFY_STATE 0x0002
3221 #define IO_COMPLETION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
3223 typedef struct _FILE_IO_COMPLETION_INFORMATION {
3224 ULONG_PTR CompletionKey;
3225 ULONG_PTR CompletionValue;
3226 IO_STATUS_BLOCK IoStatusBlock;
3227 } FILE_IO_COMPLETION_INFORMATION, *PFILE_IO_COMPLETION_INFORMATION;
3229 typedef enum _HARDERROR_RESPONSE_OPTION {
3230 OptionAbortRetryIgnore,
3231 OptionOk,
3232 OptionOkCancel,
3233 OptionRetryCancel,
3234 OptionYesNo,
3235 OptionYesNoCancel,
3236 OptionShutdownSystem
3237 } HARDERROR_RESPONSE_OPTION, *PHARDERROR_RESPONSE_OPTION;
3239 typedef enum _HARDERROR_RESPONSE {
3240 ResponseReturnToCaller,
3241 ResponseNotHandled,
3242 ResponseAbort,
3243 ResponseCancel,
3244 ResponseIgnore,
3245 ResponseNo,
3246 ResponseOk,
3247 ResponseRetry,
3248 ResponseYes
3249 } HARDERROR_RESPONSE, *PHARDERROR_RESPONSE;
3251 typedef enum _SYSDBG_COMMAND {
3252 SysDbgQueryModuleInformation,
3253 SysDbgQueryTraceInformation,
3254 SysDbgSetTracepoint,
3255 SysDbgSetSpecialCall,
3256 SysDbgClearSpecialCalls,
3257 SysDbgQuerySpecialCalls,
3258 SysDbgBreakPoint,
3259 SysDbgQueryVersion,
3260 SysDbgReadVirtual,
3261 SysDbgWriteVirtual,
3262 SysDbgReadPhysical,
3263 SysDbgWritePhysical,
3264 SysDbgReadControlSpace,
3265 SysDbgWriteControlSpace,
3266 SysDbgReadIoSpace,
3267 SysDbgWriteIoSpace,
3268 SysDbgReadMsr,
3269 SysDbgWriteMsr,
3270 SysDbgReadBusData,
3271 SysDbgWriteBusData
3272 } SYSDBG_COMMAND, *PSYSDBG_COMMAND;
3274 typedef struct _CPTABLEINFO
3276 USHORT CodePage;
3277 USHORT MaximumCharacterSize;
3278 USHORT DefaultChar;
3279 USHORT UniDefaultChar;
3280 USHORT TransDefaultChar;
3281 USHORT TransUniDefaultChar;
3282 USHORT DBCSCodePage;
3283 UCHAR LeadByte[12];
3284 USHORT *MultiByteTable;
3285 void *WideCharTable;
3286 USHORT *DBCSRanges;
3287 USHORT *DBCSOffsets;
3288 } CPTABLEINFO, *PCPTABLEINFO;
3290 typedef struct _NLSTABLEINFO
3292 CPTABLEINFO OemTableInfo;
3293 CPTABLEINFO AnsiTableInfo;
3294 USHORT *UpperCaseTable;
3295 USHORT *LowerCaseTable;
3296 } NLSTABLEINFO, *PNLSTABLEINFO;
3298 /*************************************************************************
3299 * Loader structures
3301 * Those are not part of standard Winternl.h
3304 typedef struct _LDR_SERVICE_TAG_RECORD
3306 struct _LDR_SERVICE_TAG_RECORD *Next;
3307 ULONG ServiceTag;
3308 } LDR_SERVICE_TAG_RECORD, *PLDR_SERVICE_TAG_RECORD;
3310 typedef struct _LDRP_CSLIST
3312 SINGLE_LIST_ENTRY *Tail;
3313 } LDRP_CSLIST, *PLDRP_CSLIST;
3315 typedef struct _LDR_DEPENDENCY
3317 SINGLE_LIST_ENTRY dependency_to_entry;
3318 struct _LDR_DDAG_NODE *dependency_to;
3319 SINGLE_LIST_ENTRY dependency_from_entry;
3320 struct _LDR_DDAG_NODE *dependency_from;
3321 } LDR_DEPENDENCY, *PLDR_DEPENDENCY;
3323 typedef enum _LDR_DDAG_STATE
3325 LdrModulesMerged = -5,
3326 LdrModulesInitError = -4,
3327 LdrModulesSnapError = -3,
3328 LdrModulesUnloaded = -2,
3329 LdrModulesUnloading = -1,
3330 LdrModulesPlaceHolder = 0,
3331 LdrModulesMapping = 1,
3332 LdrModulesMapped = 2,
3333 LdrModulesWaitingForDependencies = 3,
3334 LdrModulesSnapping = 4,
3335 LdrModulesSnapped = 5,
3336 LdrModulesCondensed = 6,
3337 LdrModulesReadyToInit = 7,
3338 LdrModulesInitializing = 8,
3339 LdrModulesReadyToRun = 9,
3340 } LDR_DDAG_STATE;
3342 typedef struct _LDR_DDAG_NODE
3344 LIST_ENTRY Modules;
3345 LDR_SERVICE_TAG_RECORD *ServiceTagList;
3346 LONG LoadCount;
3347 ULONG LoadWhileUnloadingCount;
3348 ULONG LowestLink;
3349 LDRP_CSLIST Dependencies;
3350 LDRP_CSLIST IncomingDependencies;
3351 LDR_DDAG_STATE State;
3352 SINGLE_LIST_ENTRY CondenseLink;
3353 ULONG PreorderNumber;
3354 } LDR_DDAG_NODE, *PLDR_DDAG_NODE;
3356 typedef enum _LDR_DLL_LOAD_REASON
3358 LoadReasonStaticDependency,
3359 LoadReasonStaticForwarderDependency,
3360 LoadReasonDynamicForwarderDependency,
3361 LoadReasonDelayloadDependency,
3362 LoadReasonDynamicLoad,
3363 LoadReasonAsImageLoad,
3364 LoadReasonAsDataLoad,
3365 LoadReasonUnknown = -1
3366 } LDR_DLL_LOAD_REASON, *PLDR_DLL_LOAD_REASON;
3368 typedef struct _LDR_DATA_TABLE_ENTRY
3370 LIST_ENTRY InLoadOrderLinks;
3371 LIST_ENTRY InMemoryOrderLinks;
3372 LIST_ENTRY InInitializationOrderLinks;
3373 void* DllBase;
3374 void* EntryPoint;
3375 ULONG SizeOfImage;
3376 UNICODE_STRING FullDllName;
3377 UNICODE_STRING BaseDllName;
3378 ULONG Flags;
3379 SHORT LoadCount;
3380 SHORT TlsIndex;
3381 LIST_ENTRY HashLinks;
3382 ULONG TimeDateStamp;
3383 HANDLE ActivationContext;
3384 void* Lock;
3385 LDR_DDAG_NODE* DdagNode;
3386 LIST_ENTRY NodeModuleLink;
3387 struct _LDRP_LOAD_CONTEXT *LoadContext;
3388 void* ParentDllBase;
3389 void* SwitchBackContext;
3390 RTL_BALANCED_NODE BaseAddressIndexNode;
3391 RTL_BALANCED_NODE MappingInfoIndexNode;
3392 ULONG_PTR OriginalBase;
3393 LARGE_INTEGER LoadTime;
3394 ULONG BaseNameHashValue;
3395 LDR_DLL_LOAD_REASON LoadReason;
3396 ULONG ImplicitPathOptions;
3397 ULONG ReferenceCount;
3398 } LDR_DATA_TABLE_ENTRY, *PLDR_DATA_TABLE_ENTRY;
3400 typedef struct _LDR_DLL_LOADED_NOTIFICATION_DATA
3402 ULONG Flags;
3403 const UNICODE_STRING *FullDllName;
3404 const UNICODE_STRING *BaseDllName;
3405 void *DllBase;
3406 ULONG SizeOfImage;
3407 } LDR_DLL_LOADED_NOTIFICATION_DATA, *PLDR_DLL_LOADED_NOTIFICATION_DATA;
3409 typedef struct _LDR_DLL_UNLOADED_NOTIFICATION_DATA
3411 ULONG Flags;
3412 const UNICODE_STRING *FullDllName;
3413 const UNICODE_STRING *BaseDllName;
3414 void *DllBase;
3415 ULONG SizeOfImage;
3416 } LDR_DLL_UNLOADED_NOTIFICATION_DATA, *PLDR_DLL_UNLOADED_NOTIFICATION_DATA;
3418 typedef union _LDR_DLL_NOTIFICATION_DATA
3420 LDR_DLL_LOADED_NOTIFICATION_DATA Loaded;
3421 LDR_DLL_UNLOADED_NOTIFICATION_DATA Unloaded;
3422 } LDR_DLL_NOTIFICATION_DATA, *PLDR_DLL_NOTIFICATION_DATA;
3424 typedef void (CALLBACK *PLDR_DLL_NOTIFICATION_FUNCTION)(ULONG, LDR_DLL_NOTIFICATION_DATA*, void*);
3426 /* those defines are (some of the) regular LDR_DATA_TABLE_ENTRY.Flags values */
3427 #define LDR_IMAGE_IS_DLL 0x00000004
3428 #define LDR_LOAD_IN_PROGRESS 0x00001000
3429 #define LDR_UNLOAD_IN_PROGRESS 0x00002000
3430 #define LDR_NO_DLL_CALLS 0x00040000
3431 #define LDR_PROCESS_ATTACHED 0x00080000
3432 #define LDR_COR_IMAGE 0x00400000
3433 #define LDR_COR_ILONLY 0x01000000
3435 /* these ones is Wine specific */
3436 #define LDR_DONT_RESOLVE_REFS 0x40000000
3437 #define LDR_WINE_INTERNAL 0x80000000
3439 /* flag for LdrAddRefDll */
3440 #define LDR_ADDREF_DLL_PIN 0x00000001
3442 /* flags for LdrGetDllHandleEx */
3443 #define LDR_GET_DLL_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT 0x00000001
3444 #define LDR_GET_DLL_HANDLE_EX_FLAG_PIN 0x00000002
3446 #define LDR_DLL_NOTIFICATION_REASON_LOADED 1
3447 #define LDR_DLL_NOTIFICATION_REASON_UNLOADED 2
3449 /* FIXME: to be checked */
3450 #define MAXIMUM_FILENAME_LENGTH 256
3452 typedef struct _RTL_PROCESS_MODULE_INFORMATION
3454 PVOID Section; /* 00/00 */
3455 PVOID MappedBaseAddress; /* 04/08 */
3456 PVOID ImageBaseAddress; /* 08/10 */
3457 ULONG ImageSize; /* 0c/18 */
3458 ULONG Flags; /* 10/1c */
3459 WORD LoadOrderIndex; /* 14/20 */
3460 WORD InitOrderIndex; /* 16/22 */
3461 WORD LoadCount; /* 18/24 */
3462 WORD NameOffset; /* 1a/26 */
3463 BYTE Name[MAXIMUM_FILENAME_LENGTH]; /* 1c/28 */
3464 } RTL_PROCESS_MODULE_INFORMATION, *PRTL_PROCESS_MODULE_INFORMATION;
3466 typedef struct _RTL_PROCESS_MODULES
3468 ULONG ModulesCount;
3469 RTL_PROCESS_MODULE_INFORMATION Modules[1]; /* FIXME: should be Modules[0] */
3470 } RTL_PROCESS_MODULES, *PRTL_PROCESS_MODULES;
3472 #define PROCESS_CREATE_FLAGS_BREAKAWAY 0x00000001
3473 #define PROCESS_CREATE_FLAGS_NO_DEBUG_INHERIT 0x00000002
3474 #define PROCESS_CREATE_FLAGS_INHERIT_HANDLES 0x00000004
3475 #define PROCESS_CREATE_FLAGS_OVERRIDE_ADDRESS_SPACE 0x00000008
3476 #define PROCESS_CREATE_FLAGS_LARGE_PAGES 0x00000010
3477 #define PROCESS_CREATE_FLAGS_LARGE_PAGE_SYSTEM_DLL 0x00000020
3478 #define PROCESS_CREATE_FLAGS_PROTECTED_PROCESS 0x00000040
3479 #define PROCESS_CREATE_FLAGS_CREATE_SESSION 0x00000080
3480 #define PROCESS_CREATE_FLAGS_INHERIT_FROM_PARENT 0x00000100
3481 #define PROCESS_CREATE_FLAGS_SUSPENDED 0x00000200
3482 #define PROCESS_CREATE_FLAGS_EXTENDED_UNKNOWN 0x00000400
3484 typedef struct _RTL_PROCESS_MODULE_INFORMATION_EX
3486 USHORT NextOffset;
3487 RTL_PROCESS_MODULE_INFORMATION BaseInfo;
3488 ULONG ImageCheckSum;
3489 ULONG TimeDateStamp;
3490 void *DefaultBase;
3491 } RTL_PROCESS_MODULE_INFORMATION_EX;
3493 #define THREAD_CREATE_FLAGS_CREATE_SUSPENDED 0x00000001
3494 #define THREAD_CREATE_FLAGS_SKIP_THREAD_ATTACH 0x00000002
3495 #define THREAD_CREATE_FLAGS_HIDE_FROM_DEBUGGER 0x00000004
3496 #define THREAD_CREATE_FLAGS_HAS_SECURITY_DESCRIPTOR 0x00000010
3497 #define THREAD_CREATE_FLAGS_ACCESS_CHECK_IN_TARGET 0x00000020
3498 #define THREAD_CREATE_FLAGS_INITIAL_THREAD 0x00000080
3500 #define EH_NONCONTINUABLE 0x01
3501 #define EH_UNWINDING 0x02
3502 #define EH_EXIT_UNWIND 0x04
3503 #define EH_STACK_INVALID 0x08
3504 #define EH_NESTED_CALL 0x10
3505 #define EH_TARGET_UNWIND 0x20
3506 #define EH_COLLIDED_UNWIND 0x40
3508 #ifdef __WINESRC__
3510 /* Wine-specific exceptions codes */
3512 #define EXCEPTION_WINE_STUB 0x80000100 /* stub entry point called */
3513 #define EXCEPTION_WINE_ASSERTION 0x80000101 /* assertion failed */
3515 /* Wine extension; Windows doesn't have a name for this code. This is an
3516 undocumented exception understood by MS VC debugger, allowing the program
3517 to name a particular thread. */
3518 #define EXCEPTION_WINE_NAME_THREAD 0x406D1388
3520 /* used for C++ exceptions in msvcrt
3521 * parameters:
3522 * [0] CXX_FRAME_MAGIC
3523 * [1] pointer to exception object
3524 * [2] pointer to type
3526 #define EXCEPTION_WINE_CXX_EXCEPTION 0xe06d7363
3527 #define EXCEPTION_WINE_CXX_FRAME_MAGIC 0x19930520
3529 #endif
3531 typedef LONG (CALLBACK *PRTL_EXCEPTION_FILTER)(PEXCEPTION_POINTERS);
3533 typedef void (CALLBACK *PTP_IO_CALLBACK)(PTP_CALLBACK_INSTANCE,void*,void*,IO_STATUS_BLOCK*,PTP_IO);
3535 #define PS_ATTRIBUTE_THREAD 0x00010000
3536 #define PS_ATTRIBUTE_INPUT 0x00020000
3537 #define PS_ATTRIBUTE_ADDITIVE 0x00040000
3539 typedef enum _PS_ATTRIBUTE_NUM
3541 PsAttributeParentProcess,
3542 PsAttributeDebugPort,
3543 PsAttributeToken,
3544 PsAttributeClientId,
3545 PsAttributeTebAddress,
3546 PsAttributeImageName,
3547 PsAttributeImageInfo,
3548 PsAttributeMemoryReserve,
3549 PsAttributePriorityClass,
3550 PsAttributeErrorMode,
3551 PsAttributeStdHandleInfo,
3552 PsAttributeHandleList,
3553 PsAttributeGroupAffinity,
3554 PsAttributePreferredNode,
3555 PsAttributeIdealProcessor,
3556 PsAttributeUmsThread,
3557 PsAttributeMitigationOptions,
3558 PsAttributeProtectionLevel,
3559 PsAttributeSecureProcess,
3560 PsAttributeJobList,
3561 PsAttributeChildProcessPolicy,
3562 PsAttributeAllApplicationPackagesPolicy,
3563 PsAttributeWin32kFilter,
3564 PsAttributeSafeOpenPromptOriginClaim,
3565 PsAttributeBnoIsolation,
3566 PsAttributeDesktopAppPolicy,
3567 PsAttributeChpe,
3568 PsAttributeMax
3569 } PS_ATTRIBUTE_NUM;
3571 #define PS_ATTRIBUTE_PARENT_PROCESS (PsAttributeParentProcess | PS_ATTRIBUTE_INPUT | PS_ATTRIBUTE_ADDITIVE)
3572 #define PS_ATTRIBUTE_DEBUG_PORT (PsAttributeDebugPort | PS_ATTRIBUTE_INPUT | PS_ATTRIBUTE_ADDITIVE)
3573 #define PS_ATTRIBUTE_TOKEN (PsAttributeToken | PS_ATTRIBUTE_INPUT | PS_ATTRIBUTE_ADDITIVE)
3574 #define PS_ATTRIBUTE_CLIENT_ID (PsAttributeClientId | PS_ATTRIBUTE_THREAD)
3575 #define PS_ATTRIBUTE_TEB_ADDRESS (PsAttributeTebAddress | PS_ATTRIBUTE_THREAD)
3576 #define PS_ATTRIBUTE_IMAGE_NAME (PsAttributeImageName | PS_ATTRIBUTE_INPUT)
3577 #define PS_ATTRIBUTE_IMAGE_INFO (PsAttributeImageInfo)
3578 #define PS_ATTRIBUTE_MEMORY_RESERVE (PsAttributeMemoryReserve | PS_ATTRIBUTE_INPUT)
3579 #define PS_ATTRIBUTE_PRIORITY_CLASS (PsAttributePriorityClass | PS_ATTRIBUTE_INPUT)
3580 #define PS_ATTRIBUTE_ERROR_MODE (PsAttributeErrorMode | PS_ATTRIBUTE_INPUT)
3581 #define PS_ATTRIBUTE_STD_HANDLE_INFO (PsAttributeStdHandleInfo | PS_ATTRIBUTE_INPUT)
3582 #define PS_ATTRIBUTE_HANDLE_LIST (PsAttributeHandleList | PS_ATTRIBUTE_INPUT)
3583 #define PS_ATTRIBUTE_GROUP_AFFINITY (PsAttributeGroupAffinity | PS_ATTRIBUTE_THREAD | PS_ATTRIBUTE_INPUT)
3584 #define PS_ATTRIBUTE_PREFERRED_NODE (PsAttributePreferredNode | PS_ATTRIBUTE_INPUT)
3585 #define PS_ATTRIBUTE_IDEAL_PROCESSOR (PsAttributeIdealProcessor | PS_ATTRIBUTE_THREAD | PS_ATTRIBUTE_INPUT)
3586 #define PS_ATTRIBUTE_MITIGATION_OPTIONS (PsAttributeMitigationOptions | PS_ATTRIBUTE_INPUT | PS_ATTRIBUTE_UNKNOWN)
3587 #define PS_ATTRIBUTE_PROTECTION_LEVEL (PsAttributeProtectionLevel | PS_ATTRIBUTE_INPUT | PS_ATTRIBUTE_UNKNOWN)
3588 #define PS_ATTRIBUTE_SECURE_PROCESS (PsAttributeSecureProcess | PS_ATTRIBUTE_INPUT)
3589 #define PS_ATTRIBUTE_JOB_LIST (PsAttributeJobList | PS_ATTRIBUTE_INPUT)
3590 #define PS_ATTRIBUTE_CHILD_PROCESS_POLICY (PsAttributeChildProcessPolicy | PS_ATTRIBUTE_INPUT)
3591 #define PS_ATTRIBUTE_ALL_APPLICATION_PACKAGES_POLICY (PsAttributeAllApplicationPackagesPolicy | PS_ATTRIBUTE_INPUT)
3592 #define PS_ATTRIBUTE_WIN32K_FILTER (PsAttributeWin32kFilter | PS_ATTRIBUTE_INPUT)
3593 #define PS_ATTRIBUTE_SAFE_OPEN_PROMPT_ORIGIN_CLAIM (PsAttributeSafeOpenPromptOriginClaim | PS_ATTRIBUTE_INPUT)
3594 #define PS_ATTRIBUTE_BNO_ISOLATION (PsAttributeBnoIsolation | PS_ATTRIBUTE_INPUT)
3595 #define PS_ATTRIBUTE_DESKTOP_APP_POLICY (PsAttributeDesktopAppPolicy | PS_ATTRIBUTE_INPUT)
3597 typedef struct _PS_ATTRIBUTE
3599 ULONG_PTR Attribute;
3600 SIZE_T Size;
3601 union
3603 ULONG_PTR Value;
3604 void *ValuePtr;
3606 SIZE_T *ReturnLength;
3607 } PS_ATTRIBUTE;
3609 typedef struct _PS_ATTRIBUTE_LIST
3611 SIZE_T TotalLength;
3612 PS_ATTRIBUTE Attributes[1];
3613 } PS_ATTRIBUTE_LIST, *PPS_ATTRIBUTE_LIST;
3615 typedef enum _PS_CREATE_STATE
3617 PsCreateInitialState,
3618 PsCreateFailOnFileOpen,
3619 PsCreateFailOnSectionCreate,
3620 PsCreateFailExeFormat,
3621 PsCreateFailMachineMismatch,
3622 PsCreateFailExeName,
3623 PsCreateSuccess,
3624 PsCreateMaximumStates
3625 } PS_CREATE_STATE;
3627 typedef struct _PS_CREATE_INFO
3629 SIZE_T Size;
3630 PS_CREATE_STATE State;
3631 union
3633 struct
3635 union
3637 ULONG InitFlags;
3638 struct
3640 UCHAR WriteOutputOnExit : 1;
3641 UCHAR DetectManifest : 1;
3642 UCHAR IFEOSkipDebugger : 1;
3643 UCHAR IFEODoNotPropagateKeyState : 1;
3644 UCHAR SpareBits1 : 4;
3645 UCHAR SpareBits2 : 8;
3646 USHORT ProhibitedImageCharacteristics : 16;
3649 ACCESS_MASK AdditionalFileAccess;
3650 } InitState;
3651 struct
3653 HANDLE FileHandle;
3654 } FailSection;
3655 struct
3657 USHORT DllCharacteristics;
3658 } ExeFormat;
3659 struct
3661 HANDLE IFEOKey;
3662 } ExeName;
3663 struct
3665 union
3667 ULONG OutputFlags;
3668 struct
3670 UCHAR ProtectedProcess : 1;
3671 UCHAR AddressSpaceOverride : 1;
3672 UCHAR DevOverrideEnabled : 1;
3673 UCHAR ManifestDetected : 1;
3674 UCHAR ProtectedProcessLight : 1;
3675 UCHAR SpareBits1 : 3;
3676 UCHAR SpareBits2 : 8;
3677 USHORT SpareBits3 : 16;
3680 HANDLE FileHandle;
3681 HANDLE SectionHandle;
3682 ULONGLONG UserProcessParametersNative;
3683 ULONG UserProcessParametersWow64;
3684 ULONG CurrentParameterFlags;
3685 ULONGLONG PebAddressNative;
3686 ULONG PebAddressWow64;
3687 ULONGLONG ManifestAddress;
3688 ULONG ManifestSize;
3689 } SuccessState;
3691 } PS_CREATE_INFO, *PPS_CREATE_INFO;
3693 typedef struct _DBGKM_EXCEPTION
3695 EXCEPTION_RECORD ExceptionRecord;
3696 ULONG FirstChance;
3697 } DBGKM_EXCEPTION, *PDBGKM_EXCEPTION;
3699 typedef struct _DBGKM_CREATE_THREAD
3701 ULONG SubSystemKey;
3702 PVOID StartAddress;
3703 } DBGKM_CREATE_THREAD, *PDBGKM_CREATE_THREAD;
3705 typedef struct _DBGKM_CREATE_PROCESS
3707 ULONG SubSystemKey;
3708 HANDLE FileHandle;
3709 PVOID BaseOfImage;
3710 ULONG DebugInfoFileOffset;
3711 ULONG DebugInfoSize;
3712 DBGKM_CREATE_THREAD InitialThread;
3713 } DBGKM_CREATE_PROCESS, *PDBGKM_CREATE_PROCESS;
3715 typedef struct _DBGKM_EXIT_THREAD
3717 NTSTATUS ExitStatus;
3718 } DBGKM_EXIT_THREAD, *PDBGKM_EXIT_THREAD;
3720 typedef struct _DBGKM_EXIT_PROCESS
3722 NTSTATUS ExitStatus;
3723 } DBGKM_EXIT_PROCESS, *PDBGKM_EXIT_PROCESS;
3725 typedef struct _DBGKM_LOAD_DLL
3727 HANDLE FileHandle;
3728 PVOID BaseOfDll;
3729 ULONG DebugInfoFileOffset;
3730 ULONG DebugInfoSize;
3731 PVOID NamePointer;
3732 } DBGKM_LOAD_DLL, *PDBGKM_LOAD_DLL;
3734 typedef struct _DBGKM_UNLOAD_DLL
3736 PVOID BaseAddress;
3737 } DBGKM_UNLOAD_DLL, *PDBGKM_UNLOAD_DLL;
3739 typedef enum _DBG_STATE
3741 DbgIdle,
3742 DbgReplyPending,
3743 DbgCreateThreadStateChange,
3744 DbgCreateProcessStateChange,
3745 DbgExitThreadStateChange,
3746 DbgExitProcessStateChange,
3747 DbgExceptionStateChange,
3748 DbgBreakpointStateChange,
3749 DbgSingleStepStateChange,
3750 DbgLoadDllStateChange,
3751 DbgUnloadDllStateChange
3752 } DBG_STATE, *PDBG_STATE;
3754 typedef struct _DBGUI_CREATE_THREAD
3756 HANDLE HandleToThread;
3757 DBGKM_CREATE_THREAD NewThread;
3758 } DBGUI_CREATE_THREAD, *PDBGUI_CREATE_THREAD;
3760 typedef struct _DBGUI_CREATE_PROCESS
3762 HANDLE HandleToProcess;
3763 HANDLE HandleToThread;
3764 DBGKM_CREATE_PROCESS NewProcess;
3765 } DBGUI_CREATE_PROCESS, *PDBGUI_CREATE_PROCESS;
3767 typedef struct _DBGUI_WAIT_STATE_CHANGE
3769 DBG_STATE NewState;
3770 CLIENT_ID AppClientId;
3771 union
3773 DBGKM_EXCEPTION Exception;
3774 DBGUI_CREATE_THREAD CreateThread;
3775 DBGUI_CREATE_PROCESS CreateProcessInfo;
3776 DBGKM_EXIT_THREAD ExitThread;
3777 DBGKM_EXIT_PROCESS ExitProcess;
3778 DBGKM_LOAD_DLL LoadDll;
3779 DBGKM_UNLOAD_DLL UnloadDll;
3780 } StateInfo;
3781 } DBGUI_WAIT_STATE_CHANGE, *PDBGUI_WAIT_STATE_CHANGE;
3783 struct _DEBUG_EVENT;
3785 #define DEBUG_READ_EVENT 0x0001
3786 #define DEBUG_PROCESS_ASSIGN 0x0002
3787 #define DEBUG_SET_INFORMATION 0x0004
3788 #define DEBUG_QUERY_INFORMATION 0x0008
3789 #define DEBUG_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x0f)
3791 #define DEBUG_KILL_ON_CLOSE 0x1
3793 typedef enum _DEBUGOBJECTINFOCLASS
3795 DebugObjectKillProcessOnExitInformation = 1,
3796 MaxDebugObjectInfoClass
3797 } DEBUGOBJECTINFOCLASS, *PDEBUGOBJECTINFOCLASS;
3800 typedef struct _WOW64_CPURESERVED
3802 USHORT Flags;
3803 USHORT Machine;
3804 /* CONTEXT context */
3805 /* CONTEXT_EX *context_ex */
3806 } WOW64_CPURESERVED, *PWOW64_CPURESERVED;
3808 #define WOW64_CPURESERVED_FLAG_RESET_STATE 1
3810 typedef struct _WOW64_CPU_AREA_INFO
3812 void *Context;
3813 void *ContextEx;
3814 void *ContextFlagsLocation;
3815 WOW64_CPURESERVED *CpuReserved;
3816 ULONG ContextFlag;
3817 USHORT Machine;
3818 } WOW64_CPU_AREA_INFO, *PWOW64_CPU_AREA_INFO;
3820 #ifdef __WINESRC__
3821 /* undocumented layout of LdrSystemDllInitBlock */
3822 /* this varies across Windows version; we are using the win10-2004 layout */
3823 typedef struct
3825 ULONG version;
3826 ULONG unknown1[3];
3827 ULONG64 unknown2;
3828 ULONG64 pLdrInitializeThunk;
3829 ULONG64 pKiUserExceptionDispatcher;
3830 ULONG64 pKiUserApcDispatcher;
3831 ULONG64 pKiUserCallbackDispatcher;
3832 ULONG64 pRtlUserThreadStart;
3833 ULONG64 pRtlpQueryProcessDebugInformationRemote;
3834 ULONG64 ntdll_handle;
3835 ULONG64 pLdrSystemDllInitBlock;
3836 ULONG64 pRtlpFreezeTimeBias;
3837 } SYSTEM_DLL_INIT_BLOCK;
3838 #endif
3840 typedef struct
3842 ULONG_PTR *ServiceTable;
3843 ULONG_PTR *CounterTable;
3844 ULONG_PTR ServiceLimit;
3845 BYTE *ArgumentTable;
3846 } SYSTEM_SERVICE_TABLE;
3848 /* ApiSet structures (format for version 6) */
3850 typedef struct _API_SET_NAMESPACE
3852 ULONG Version;
3853 ULONG Size;
3854 ULONG Flags;
3855 ULONG Count;
3856 ULONG EntryOffset;
3857 ULONG HashOffset;
3858 ULONG HashFactor;
3859 } API_SET_NAMESPACE;
3861 typedef struct _API_SET_HASH_ENTRY
3863 ULONG Hash;
3864 ULONG Index;
3865 } API_SET_HASH_ENTRY;
3867 typedef struct _API_SET_NAMESPACE_ENTRY
3869 ULONG Flags;
3870 ULONG NameOffset;
3871 ULONG NameLength;
3872 ULONG HashedLength;
3873 ULONG ValueOffset;
3874 ULONG ValueCount;
3875 } API_SET_NAMESPACE_ENTRY;
3877 typedef struct _API_SET_VALUE_ENTRY
3879 ULONG Flags;
3880 ULONG NameOffset;
3881 ULONG NameLength;
3882 ULONG ValueOffset;
3883 ULONG ValueLength;
3884 } API_SET_VALUE_ENTRY;
3886 /***********************************************************************
3887 * Function declarations
3890 NTSYSAPI NTSTATUS WINAPI ApiSetQueryApiSetPresence(const UNICODE_STRING*,BOOLEAN*);
3891 NTSYSAPI NTSTATUS WINAPI ApiSetQueryApiSetPresenceEx(const UNICODE_STRING*,BOOLEAN*,BOOLEAN*);
3892 NTSYSAPI void WINAPI DbgBreakPoint(void);
3893 NTSYSAPI NTSTATUS WINAPIV DbgPrint(LPCSTR fmt, ...);
3894 NTSYSAPI NTSTATUS WINAPIV DbgPrintEx(ULONG iComponentId, ULONG Level, LPCSTR fmt, ...);
3895 NTSYSAPI NTSTATUS WINAPI DbgUiConnectToDbg(void);
3896 NTSYSAPI NTSTATUS WINAPI DbgUiContinue(CLIENT_ID*,NTSTATUS);
3897 NTSYSAPI NTSTATUS WINAPI DbgUiConvertStateChangeStructure(DBGUI_WAIT_STATE_CHANGE*,struct _DEBUG_EVENT*);
3898 NTSYSAPI NTSTATUS WINAPI DbgUiDebugActiveProcess(HANDLE);
3899 NTSYSAPI HANDLE WINAPI DbgUiGetThreadDebugObject(void);
3900 NTSYSAPI NTSTATUS WINAPI DbgUiIssueRemoteBreakin(HANDLE);
3901 NTSYSAPI void WINAPI DbgUiRemoteBreakin(void*);
3902 NTSYSAPI void WINAPI DbgUiSetThreadDebugObject(HANDLE);
3903 NTSYSAPI NTSTATUS WINAPI DbgUiStopDebugging(HANDLE);
3904 NTSYSAPI NTSTATUS WINAPI DbgUiWaitStateChange(DBGUI_WAIT_STATE_CHANGE*,LARGE_INTEGER*);
3905 NTSYSAPI void WINAPI DbgUserBreakPoint(void);
3906 NTSYSAPI NTSTATUS WINAPI LdrAccessResource(HMODULE,const IMAGE_RESOURCE_DATA_ENTRY*,void**,PULONG);
3907 NTSYSAPI NTSTATUS WINAPI LdrAddDllDirectory(const UNICODE_STRING*,void**);
3908 NTSYSAPI NTSTATUS WINAPI LdrAddRefDll(ULONG,HMODULE);
3909 NTSYSAPI NTSTATUS WINAPI LdrDisableThreadCalloutsForDll(HMODULE);
3910 NTSYSAPI NTSTATUS WINAPI LdrFindEntryForAddress(const void*, PLDR_DATA_TABLE_ENTRY*);
3911 NTSYSAPI NTSTATUS WINAPI LdrFindResourceDirectory_U(HMODULE,const LDR_RESOURCE_INFO*,ULONG,const IMAGE_RESOURCE_DIRECTORY**);
3912 NTSYSAPI NTSTATUS WINAPI LdrFindResource_U(HMODULE,const LDR_RESOURCE_INFO*,ULONG,const IMAGE_RESOURCE_DATA_ENTRY**);
3913 NTSYSAPI NTSTATUS WINAPI LdrGetDllDirectory(UNICODE_STRING*);
3914 NTSYSAPI NTSTATUS WINAPI LdrGetDllHandle(LPCWSTR, ULONG, const UNICODE_STRING*, HMODULE*);
3915 NTSYSAPI NTSTATUS WINAPI LdrGetDllHandleEx(ULONG, LPCWSTR, ULONG *, const UNICODE_STRING*, HMODULE*);
3916 NTSYSAPI NTSTATUS WINAPI LdrGetDllPath(PCWSTR,ULONG,PWSTR*,PWSTR*);
3917 NTSYSAPI NTSTATUS WINAPI LdrGetDllFullName(HMODULE, UNICODE_STRING*);
3918 NTSYSAPI NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE, const ANSI_STRING*, ULONG, void**);
3919 NTSYSAPI NTSTATUS WINAPI LdrLoadDll(LPCWSTR, DWORD, const UNICODE_STRING*, HMODULE*);
3920 NTSYSAPI NTSTATUS WINAPI LdrLockLoaderLock(ULONG,ULONG*,ULONG_PTR*);
3921 IMAGE_BASE_RELOCATION * WINAPI LdrProcessRelocationBlock(void*,UINT,USHORT*,INT_PTR);
3922 NTSYSAPI NTSTATUS WINAPI LdrQueryImageFileExecutionOptions(const UNICODE_STRING*,LPCWSTR,ULONG,void*,ULONG,ULONG*);
3923 NTSYSAPI NTSTATUS WINAPI LdrQueryProcessModuleInformation(RTL_PROCESS_MODULES*, ULONG, ULONG*);
3924 NTSYSAPI NTSTATUS WINAPI LdrRegisterDllNotification(ULONG,PLDR_DLL_NOTIFICATION_FUNCTION,void*,void**);
3925 NTSYSAPI NTSTATUS WINAPI LdrRemoveDllDirectory(void*);
3926 NTSYSAPI NTSTATUS WINAPI LdrSetDefaultDllDirectories(ULONG);
3927 NTSYSAPI NTSTATUS WINAPI LdrSetDllDirectory(const UNICODE_STRING*);
3928 NTSYSAPI void WINAPI LdrShutdownProcess(void);
3929 NTSYSAPI void WINAPI LdrShutdownThread(void);
3930 NTSYSAPI NTSTATUS WINAPI LdrUnloadDll(HMODULE);
3931 NTSYSAPI NTSTATUS WINAPI LdrUnlockLoaderLock(ULONG,ULONG_PTR);
3932 NTSYSAPI NTSTATUS WINAPI LdrUnregisterDllNotification(void*);
3933 NTSYSAPI NTSTATUS WINAPI NtAcceptConnectPort(PHANDLE,ULONG,PLPC_MESSAGE,BOOLEAN,PLPC_SECTION_WRITE,PLPC_SECTION_READ);
3934 NTSYSAPI NTSTATUS WINAPI NtAccessCheck(PSECURITY_DESCRIPTOR,HANDLE,ACCESS_MASK,PGENERIC_MAPPING,PPRIVILEGE_SET,PULONG,PULONG,NTSTATUS*);
3935 NTSYSAPI NTSTATUS WINAPI NtAccessCheckAndAuditAlarm(PUNICODE_STRING,HANDLE,PUNICODE_STRING,PUNICODE_STRING,PSECURITY_DESCRIPTOR,ACCESS_MASK,PGENERIC_MAPPING,BOOLEAN,PACCESS_MASK,PBOOLEAN,PBOOLEAN);
3936 NTSYSAPI NTSTATUS WINAPI NtAddAtom(const WCHAR*,ULONG,RTL_ATOM*);
3937 NTSYSAPI NTSTATUS WINAPI NtAdjustGroupsToken(HANDLE,BOOLEAN,PTOKEN_GROUPS,ULONG,PTOKEN_GROUPS,PULONG);
3938 NTSYSAPI NTSTATUS WINAPI NtAdjustPrivilegesToken(HANDLE,BOOLEAN,PTOKEN_PRIVILEGES,DWORD,PTOKEN_PRIVILEGES,PDWORD);
3939 NTSYSAPI NTSTATUS WINAPI NtAlertResumeThread(HANDLE,PULONG);
3940 NTSYSAPI NTSTATUS WINAPI NtAlertThread(HANDLE ThreadHandle);
3941 NTSYSAPI NTSTATUS WINAPI NtAlertThreadByThreadId(HANDLE);
3942 NTSYSAPI NTSTATUS WINAPI NtAllocateLocallyUniqueId(PLUID lpLuid);
3943 NTSYSAPI NTSTATUS WINAPI NtAllocateUuids(PULARGE_INTEGER,PULONG,PULONG,PUCHAR);
3944 NTSYSAPI NTSTATUS WINAPI NtAllocateVirtualMemory(HANDLE,PVOID*,ULONG_PTR,SIZE_T*,ULONG,ULONG);
3945 NTSYSAPI NTSTATUS WINAPI NtAllocateVirtualMemoryEx(HANDLE,PVOID*,SIZE_T*,ULONG,ULONG,MEM_EXTENDED_PARAMETER*,ULONG);
3946 NTSYSAPI NTSTATUS WINAPI NtAreMappedFilesTheSame(PVOID,PVOID);
3947 NTSYSAPI NTSTATUS WINAPI NtAssignProcessToJobObject(HANDLE,HANDLE);
3948 NTSYSAPI NTSTATUS WINAPI NtCallbackReturn(PVOID,ULONG,NTSTATUS);
3949 NTSYSAPI NTSTATUS WINAPI NtCancelIoFile(HANDLE,PIO_STATUS_BLOCK);
3950 NTSYSAPI NTSTATUS WINAPI NtCancelIoFileEx(HANDLE,PIO_STATUS_BLOCK,PIO_STATUS_BLOCK);
3951 NTSYSAPI NTSTATUS WINAPI NtCancelTimer(HANDLE, BOOLEAN*);
3952 NTSYSAPI NTSTATUS WINAPI NtClearEvent(HANDLE);
3953 NTSYSAPI NTSTATUS WINAPI NtClose(HANDLE);
3954 NTSYSAPI NTSTATUS WINAPI NtCloseObjectAuditAlarm(PUNICODE_STRING,HANDLE,BOOLEAN);
3955 NTSYSAPI NTSTATUS WINAPI NtCompareObjects(HANDLE,HANDLE);
3956 NTSYSAPI NTSTATUS WINAPI NtCompleteConnectPort(HANDLE);
3957 NTSYSAPI NTSTATUS WINAPI NtConnectPort(PHANDLE,PUNICODE_STRING,PSECURITY_QUALITY_OF_SERVICE,PLPC_SECTION_WRITE,PLPC_SECTION_READ,PULONG,PVOID,PULONG);
3958 NTSYSAPI NTSTATUS WINAPI NtContinue(PCONTEXT,BOOLEAN);
3959 NTSYSAPI NTSTATUS WINAPI NtCreateDebugObject(HANDLE*,ACCESS_MASK,OBJECT_ATTRIBUTES*,ULONG);
3960 NTSYSAPI NTSTATUS WINAPI NtCreateDirectoryObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
3961 NTSYSAPI NTSTATUS WINAPI NtCreateEvent(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *,EVENT_TYPE,BOOLEAN);
3962 NTSYSAPI NTSTATUS WINAPI NtCreateEventPair(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
3963 NTSYSAPI NTSTATUS WINAPI NtCreateFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,PLARGE_INTEGER,ULONG,ULONG,ULONG,ULONG,PVOID,ULONG);
3964 NTSYSAPI NTSTATUS WINAPI NtCreateIoCompletion(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,ULONG);
3965 NTSYSAPI NTSTATUS WINAPI NtCreateJobObject(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
3966 NTSYSAPI NTSTATUS WINAPI NtCreateKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,PULONG);
3967 NTSYSAPI NTSTATUS WINAPI NtCreateKeyTransacted(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,HANDLE,ULONG*);
3968 NTSYSAPI NTSTATUS WINAPI NtCreateKeyedEvent(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG);
3969 NTSYSAPI NTSTATUS WINAPI NtCreateLowBoxToken(HANDLE*,HANDLE,ACCESS_MASK,OBJECT_ATTRIBUTES*,SID*,ULONG,SID_AND_ATTRIBUTES*,ULONG,HANDLE*);
3970 NTSYSAPI NTSTATUS WINAPI NtCreateMailslotFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG,ULONG,PLARGE_INTEGER);
3971 NTSYSAPI NTSTATUS WINAPI NtCreateMutant(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,BOOLEAN);
3972 NTSYSAPI NTSTATUS WINAPI NtCreateNamedPipeFile(PHANDLE,ULONG,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,PLARGE_INTEGER);
3973 NTSYSAPI NTSTATUS WINAPI NtCreatePagingFile(PUNICODE_STRING,PLARGE_INTEGER,PLARGE_INTEGER,PLARGE_INTEGER);
3974 NTSYSAPI NTSTATUS WINAPI NtCreatePort(PHANDLE,POBJECT_ATTRIBUTES,ULONG,ULONG,PULONG);
3975 NTSYSAPI NTSTATUS WINAPI NtCreateProcess(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,HANDLE,BOOLEAN,HANDLE,HANDLE,HANDLE);
3976 NTSYSAPI NTSTATUS WINAPI NtCreateProfile(PHANDLE,HANDLE,PVOID,ULONG,ULONG,PVOID,ULONG,KPROFILE_SOURCE,KAFFINITY);
3977 NTSYSAPI NTSTATUS WINAPI NtCreateSection(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const LARGE_INTEGER*,ULONG,ULONG,HANDLE);
3978 NTSYSAPI NTSTATUS WINAPI NtCreateSemaphore(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,LONG,LONG);
3979 NTSYSAPI NTSTATUS WINAPI NtCreateSymbolicLinkObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PUNICODE_STRING);
3980 NTSYSAPI NTSTATUS WINAPI NtCreateThread(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,HANDLE,PCLIENT_ID,PCONTEXT,PINITIAL_TEB,BOOLEAN);
3981 NTSYSAPI NTSTATUS WINAPI NtCreateThreadEx(HANDLE*,ACCESS_MASK,OBJECT_ATTRIBUTES*,HANDLE,PRTL_THREAD_START_ROUTINE,void*,ULONG,ULONG_PTR,SIZE_T,SIZE_T,PS_ATTRIBUTE_LIST*);
3982 NTSYSAPI NTSTATUS WINAPI NtCreateTimer(HANDLE*, ACCESS_MASK, const OBJECT_ATTRIBUTES*, TIMER_TYPE);
3983 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);
3984 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*);
3985 NTSYSAPI NTSTATUS WINAPI NtDebugActiveProcess(HANDLE,HANDLE);
3986 NTSYSAPI NTSTATUS WINAPI NtDebugContinue(HANDLE,CLIENT_ID*,NTSTATUS);
3987 NTSYSAPI NTSTATUS WINAPI NtDelayExecution(BOOLEAN,const LARGE_INTEGER*);
3988 NTSYSAPI NTSTATUS WINAPI NtDeleteAtom(RTL_ATOM);
3989 NTSYSAPI NTSTATUS WINAPI NtDeleteFile(POBJECT_ATTRIBUTES);
3990 NTSYSAPI NTSTATUS WINAPI NtDeleteKey(HANDLE);
3991 NTSYSAPI NTSTATUS WINAPI NtDeleteValueKey(HANDLE,const UNICODE_STRING *);
3992 NTSYSAPI NTSTATUS WINAPI NtDeviceIoControlFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,PVOID,ULONG,PVOID,ULONG);
3993 NTSYSAPI NTSTATUS WINAPI NtDisplayString(PUNICODE_STRING);
3994 NTSYSAPI NTSTATUS WINAPI NtDuplicateObject(HANDLE,HANDLE,HANDLE,PHANDLE,ACCESS_MASK,ULONG,ULONG);
3995 NTSYSAPI NTSTATUS WINAPI NtDuplicateToken(HANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,SECURITY_IMPERSONATION_LEVEL,TOKEN_TYPE,PHANDLE);
3996 NTSYSAPI NTSTATUS WINAPI NtEnumerateKey(HANDLE,ULONG,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *);
3997 NTSYSAPI NTSTATUS WINAPI NtEnumerateValueKey(HANDLE,ULONG,KEY_VALUE_INFORMATION_CLASS,PVOID,ULONG,PULONG);
3998 NTSYSAPI NTSTATUS WINAPI NtExtendSection(HANDLE,PLARGE_INTEGER);
3999 NTSYSAPI NTSTATUS WINAPI NtFilterToken(HANDLE,ULONG,TOKEN_GROUPS*,TOKEN_PRIVILEGES*,TOKEN_GROUPS*,HANDLE*);
4000 NTSYSAPI NTSTATUS WINAPI NtFindAtom(const WCHAR*,ULONG,RTL_ATOM*);
4001 NTSYSAPI NTSTATUS WINAPI NtFlushBuffersFile(HANDLE,IO_STATUS_BLOCK*);
4002 NTSYSAPI NTSTATUS WINAPI NtFlushInstructionCache(HANDLE,LPCVOID,SIZE_T);
4003 NTSYSAPI NTSTATUS WINAPI NtFlushKey(HANDLE);
4004 NTSYSAPI void WINAPI NtFlushProcessWriteBuffers(void);
4005 NTSYSAPI NTSTATUS WINAPI NtFlushVirtualMemory(HANDLE,LPCVOID*,SIZE_T*,ULONG);
4006 NTSYSAPI NTSTATUS WINAPI NtFlushWriteBuffer(VOID);
4007 NTSYSAPI NTSTATUS WINAPI NtFreeVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
4008 NTSYSAPI NTSTATUS WINAPI NtFsControlFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,PVOID,ULONG,PVOID,ULONG);
4009 NTSYSAPI NTSTATUS WINAPI NtGetContextThread(HANDLE,CONTEXT*);
4010 NTSYSAPI ULONG WINAPI NtGetCurrentProcessorNumber(void);
4011 NTSYSAPI NTSTATUS WINAPI NtGetNextThread(HANDLE,HANDLE,ACCESS_MASK,ULONG,ULONG,HANDLE*);
4012 NTSYSAPI NTSTATUS WINAPI NtGetNlsSectionPtr(ULONG,ULONG,void*,void**,SIZE_T*);
4013 NTSYSAPI NTSTATUS WINAPI NtGetPlugPlayEvent(ULONG,ULONG,PVOID,ULONG);
4014 NTSYSAPI ULONG WINAPI NtGetTickCount(VOID);
4015 NTSYSAPI NTSTATUS WINAPI NtGetWriteWatch(HANDLE,ULONG,PVOID,SIZE_T,PVOID*,ULONG_PTR*,ULONG*);
4016 NTSYSAPI NTSTATUS WINAPI NtImpersonateAnonymousToken(HANDLE);
4017 NTSYSAPI NTSTATUS WINAPI NtImpersonateClientOfPort(HANDLE,PPORT_MESSAGE);
4018 NTSYSAPI NTSTATUS WINAPI NtImpersonateThread(HANDLE,HANDLE,PSECURITY_QUALITY_OF_SERVICE);
4019 NTSYSAPI NTSTATUS WINAPI NtInitializeNlsFiles(void**,LCID*,LARGE_INTEGER*);
4020 NTSYSAPI NTSTATUS WINAPI NtInitializeRegistry(BOOLEAN);
4021 NTSYSAPI NTSTATUS WINAPI NtInitiatePowerAction(POWER_ACTION,SYSTEM_POWER_STATE,ULONG,BOOLEAN);
4022 NTSYSAPI NTSTATUS WINAPI NtIsProcessInJob(HANDLE,HANDLE);
4023 NTSYSAPI NTSTATUS WINAPI NtListenPort(HANDLE,PLPC_MESSAGE);
4024 NTSYSAPI NTSTATUS WINAPI NtLoadDriver(const UNICODE_STRING *);
4025 NTSYSAPI NTSTATUS WINAPI NtLoadKey(const OBJECT_ATTRIBUTES *,OBJECT_ATTRIBUTES *);
4026 NTSYSAPI NTSTATUS WINAPI NtLoadKey2(const OBJECT_ATTRIBUTES *,OBJECT_ATTRIBUTES *,ULONG);
4027 NTSYSAPI NTSTATUS WINAPI NtLoadKeyEx(const OBJECT_ATTRIBUTES *,OBJECT_ATTRIBUTES *,ULONG,HANDLE,HANDLE,ACCESS_MASK,HANDLE *,IO_STATUS_BLOCK *);
4028 NTSYSAPI NTSTATUS WINAPI NtLockFile(HANDLE,HANDLE,PIO_APC_ROUTINE,void*,PIO_STATUS_BLOCK,PLARGE_INTEGER,PLARGE_INTEGER,ULONG*,BOOLEAN,BOOLEAN);
4029 NTSYSAPI NTSTATUS WINAPI NtLockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
4030 NTSYSAPI NTSTATUS WINAPI NtMakeTemporaryObject(HANDLE);
4031 NTSYSAPI NTSTATUS WINAPI NtMapViewOfSection(HANDLE,HANDLE,PVOID*,ULONG_PTR,SIZE_T,const LARGE_INTEGER*,SIZE_T*,SECTION_INHERIT,ULONG,ULONG);
4032 NTSYSAPI NTSTATUS WINAPI NtMapViewOfSectionEx(HANDLE,HANDLE,PVOID*,const LARGE_INTEGER*,SIZE_T*,ULONG,ULONG,MEM_EXTENDED_PARAMETER*,ULONG);
4033 NTSYSAPI NTSTATUS WINAPI NtNotifyChangeDirectoryFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,ULONG,BOOLEAN);
4034 NTSYSAPI NTSTATUS WINAPI NtNotifyChangeKey(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,BOOLEAN,PVOID,ULONG,BOOLEAN);
4035 NTSYSAPI NTSTATUS WINAPI NtNotifyChangeMultipleKeys(HANDLE,ULONG,OBJECT_ATTRIBUTES*,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,BOOLEAN,PVOID,ULONG,BOOLEAN);
4036 NTSYSAPI NTSTATUS WINAPI NtOpenDirectoryObject(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
4037 NTSYSAPI NTSTATUS WINAPI NtOpenEvent(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *);
4038 NTSYSAPI NTSTATUS WINAPI NtOpenEventPair(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
4039 NTSYSAPI NTSTATUS WINAPI NtOpenFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG);
4040 NTSYSAPI NTSTATUS WINAPI NtOpenIoCompletion(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
4041 NTSYSAPI NTSTATUS WINAPI NtOpenJobObject(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
4042 NTSYSAPI NTSTATUS WINAPI NtOpenKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *);
4043 NTSYSAPI NTSTATUS WINAPI NtOpenKeyEx(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG);
4044 NTSYSAPI NTSTATUS WINAPI NtOpenKeyTransacted(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,HANDLE);
4045 NTSYSAPI NTSTATUS WINAPI NtOpenKeyTransactedEx(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,HANDLE);
4046 NTSYSAPI NTSTATUS WINAPI NtOpenKeyedEvent(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
4047 NTSYSAPI NTSTATUS WINAPI NtOpenMutant(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
4048 NTSYSAPI NTSTATUS WINAPI NtOpenObjectAuditAlarm(PUNICODE_STRING,PHANDLE,PUNICODE_STRING,PUNICODE_STRING,PSECURITY_DESCRIPTOR,HANDLE,ACCESS_MASK,ACCESS_MASK,PPRIVILEGE_SET,BOOLEAN,BOOLEAN,PBOOLEAN);
4049 NTSYSAPI NTSTATUS WINAPI NtOpenProcess(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const CLIENT_ID*);
4050 NTSYSAPI NTSTATUS WINAPI NtOpenProcessToken(HANDLE,DWORD,HANDLE *);
4051 NTSYSAPI NTSTATUS WINAPI NtOpenProcessTokenEx(HANDLE,DWORD,DWORD,HANDLE *);
4052 NTSYSAPI NTSTATUS WINAPI NtOpenSection(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
4053 NTSYSAPI NTSTATUS WINAPI NtOpenSemaphore(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
4054 NTSYSAPI NTSTATUS WINAPI NtOpenSymbolicLinkObject(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
4055 NTSYSAPI NTSTATUS WINAPI NtOpenThread(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const CLIENT_ID*);
4056 NTSYSAPI NTSTATUS WINAPI NtOpenThreadToken(HANDLE,DWORD,BOOLEAN,HANDLE *);
4057 NTSYSAPI NTSTATUS WINAPI NtOpenThreadTokenEx(HANDLE,DWORD,BOOLEAN,DWORD,HANDLE *);
4058 NTSYSAPI NTSTATUS WINAPI NtOpenTimer(HANDLE*, ACCESS_MASK, const OBJECT_ATTRIBUTES*);
4059 NTSYSAPI NTSTATUS WINAPI NtPowerInformation(POWER_INFORMATION_LEVEL,PVOID,ULONG,PVOID,ULONG);
4060 NTSYSAPI NTSTATUS WINAPI NtPrivilegeCheck(HANDLE,PPRIVILEGE_SET,PBOOLEAN);
4061 NTSYSAPI NTSTATUS WINAPI NtPrivilegeObjectAuditAlarm(PUNICODE_STRING,HANDLE,HANDLE,ULONG,PPRIVILEGE_SET,BOOLEAN);
4062 NTSYSAPI NTSTATUS WINAPI NtPrivilegedServiceAuditAlarm(PUNICODE_STRING,PUNICODE_STRING,HANDLE,PPRIVILEGE_SET,BOOLEAN);
4063 NTSYSAPI NTSTATUS WINAPI NtProtectVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG,ULONG*);
4064 NTSYSAPI NTSTATUS WINAPI NtPulseEvent(HANDLE,LONG*);
4065 NTSYSAPI NTSTATUS WINAPI NtQueueApcThread(HANDLE,PNTAPCFUNC,ULONG_PTR,ULONG_PTR,ULONG_PTR);
4066 NTSYSAPI NTSTATUS WINAPI NtQueryAttributesFile(const OBJECT_ATTRIBUTES*,FILE_BASIC_INFORMATION*);
4067 NTSYSAPI NTSTATUS WINAPI NtQueryDefaultLocale(BOOLEAN,LCID*);
4068 NTSYSAPI NTSTATUS WINAPI NtQueryDefaultUILanguage(LANGID*);
4069 NTSYSAPI NTSTATUS WINAPI NtQueryDirectoryFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,FILE_INFORMATION_CLASS,BOOLEAN,PUNICODE_STRING,BOOLEAN);
4070 NTSYSAPI NTSTATUS WINAPI NtQueryDirectoryObject(HANDLE,PDIRECTORY_BASIC_INFORMATION,ULONG,BOOLEAN,BOOLEAN,PULONG,PULONG);
4071 NTSYSAPI NTSTATUS WINAPI NtQueryEaFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,BOOLEAN,PVOID,ULONG,PULONG,BOOLEAN);
4072 NTSYSAPI NTSTATUS WINAPI NtQueryEvent(HANDLE,EVENT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
4073 NTSYSAPI NTSTATUS WINAPI NtQueryFullAttributesFile(const OBJECT_ATTRIBUTES*,FILE_NETWORK_OPEN_INFORMATION*);
4074 NTSYSAPI NTSTATUS WINAPI NtQueryInformationAtom(RTL_ATOM,ATOM_INFORMATION_CLASS,PVOID,ULONG,ULONG*);
4075 NTSYSAPI NTSTATUS WINAPI NtQueryInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FILE_INFORMATION_CLASS);
4076 NTSYSAPI NTSTATUS WINAPI NtQueryInformationJobObject(HANDLE,JOBOBJECTINFOCLASS,PVOID,ULONG,PULONG);
4077 NTSYSAPI NTSTATUS WINAPI NtQueryInformationPort(HANDLE,PORT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
4078 NTSYSAPI NTSTATUS WINAPI NtQueryInformationProcess(HANDLE,PROCESSINFOCLASS,PVOID,ULONG,PULONG);
4079 NTSYSAPI NTSTATUS WINAPI NtQueryInformationThread(HANDLE,THREADINFOCLASS,PVOID,ULONG,PULONG);
4080 NTSYSAPI NTSTATUS WINAPI NtQueryInformationToken(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,ULONG,PULONG);
4081 NTSYSAPI NTSTATUS WINAPI NtQueryInstallUILanguage(LANGID*);
4082 NTSYSAPI NTSTATUS WINAPI NtQueryIntervalProfile(KPROFILE_SOURCE,PULONG);
4083 NTSYSAPI NTSTATUS WINAPI NtQueryIoCompletion(HANDLE,IO_COMPLETION_INFORMATION_CLASS,PVOID,ULONG,PULONG);
4084 NTSYSAPI NTSTATUS WINAPI NtQueryKey(HANDLE,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *);
4085 NTSYSAPI NTSTATUS WINAPI NtQueryMultipleValueKey(HANDLE,PKEY_MULTIPLE_VALUE_INFORMATION,ULONG,PVOID,ULONG,PULONG);
4086 NTSYSAPI NTSTATUS WINAPI NtQueryMutant(HANDLE,MUTANT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
4087 NTSYSAPI NTSTATUS WINAPI NtQueryObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG, PULONG);
4088 NTSYSAPI NTSTATUS WINAPI NtQueryOpenSubKeys(POBJECT_ATTRIBUTES,PULONG);
4089 NTSYSAPI NTSTATUS WINAPI NtQueryPerformanceCounter(PLARGE_INTEGER, PLARGE_INTEGER);
4090 NTSYSAPI NTSTATUS WINAPI NtQuerySecurityObject(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,ULONG,PULONG);
4091 NTSYSAPI NTSTATUS WINAPI NtQuerySection(HANDLE,SECTION_INFORMATION_CLASS,PVOID,SIZE_T,SIZE_T*);
4092 NTSYSAPI NTSTATUS WINAPI NtQuerySemaphore(HANDLE,SEMAPHORE_INFORMATION_CLASS,PVOID,ULONG,PULONG);
4093 NTSYSAPI NTSTATUS WINAPI NtQuerySymbolicLinkObject(HANDLE,PUNICODE_STRING,PULONG);
4094 NTSYSAPI NTSTATUS WINAPI NtQuerySystemEnvironmentValue(PUNICODE_STRING,PWCHAR,ULONG,PULONG);
4095 NTSYSAPI NTSTATUS WINAPI NtQuerySystemEnvironmentValueEx(PUNICODE_STRING,GUID*,void*,ULONG*,ULONG*);
4096 NTSYSAPI NTSTATUS WINAPI NtQuerySystemInformation(SYSTEM_INFORMATION_CLASS,PVOID,ULONG,PULONG);
4097 NTSYSAPI NTSTATUS WINAPI NtQuerySystemInformationEx(SYSTEM_INFORMATION_CLASS,void*,ULONG,void*,ULONG,ULONG*);
4098 NTSYSAPI NTSTATUS WINAPI NtQuerySystemTime(PLARGE_INTEGER);
4099 NTSYSAPI NTSTATUS WINAPI NtQueryTimer(HANDLE,TIMER_INFORMATION_CLASS,PVOID,ULONG,PULONG);
4100 NTSYSAPI NTSTATUS WINAPI NtQueryTimerResolution(PULONG,PULONG,PULONG);
4101 NTSYSAPI NTSTATUS WINAPI NtQueryValueKey(HANDLE,const UNICODE_STRING *,KEY_VALUE_INFORMATION_CLASS,void *,DWORD,DWORD *);
4102 NTSYSAPI NTSTATUS WINAPI NtQueryLicenseValue(const UNICODE_STRING *,ULONG *,PVOID,ULONG,ULONG *);
4103 NTSYSAPI NTSTATUS WINAPI NtQueryVirtualMemory(HANDLE,LPCVOID,MEMORY_INFORMATION_CLASS,PVOID,SIZE_T,SIZE_T*);
4104 NTSYSAPI NTSTATUS WINAPI NtQueryVolumeInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS);
4105 NTSYSAPI NTSTATUS WINAPI NtRaiseException(PEXCEPTION_RECORD,PCONTEXT,BOOL);
4106 NTSYSAPI NTSTATUS WINAPI NtRaiseHardError(NTSTATUS,ULONG,PUNICODE_STRING,PVOID*,HARDERROR_RESPONSE_OPTION,PHARDERROR_RESPONSE);
4107 NTSYSAPI NTSTATUS WINAPI NtReadFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,PLARGE_INTEGER,PULONG);
4108 NTSYSAPI NTSTATUS WINAPI NtReadFileScatter(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,FILE_SEGMENT_ELEMENT*,ULONG,PLARGE_INTEGER,PULONG);
4109 NTSYSAPI NTSTATUS WINAPI NtReadRequestData(HANDLE,PLPC_MESSAGE,ULONG,PVOID,ULONG,PULONG);
4110 NTSYSAPI NTSTATUS WINAPI NtReadVirtualMemory(HANDLE,const void*,void*,SIZE_T,SIZE_T*);
4111 NTSYSAPI NTSTATUS WINAPI NtRegisterThreadTerminatePort(HANDLE);
4112 NTSYSAPI NTSTATUS WINAPI NtReleaseKeyedEvent(HANDLE,const void*,BOOLEAN,const LARGE_INTEGER*);
4113 NTSYSAPI NTSTATUS WINAPI NtReleaseMutant(HANDLE,PLONG);
4114 NTSYSAPI NTSTATUS WINAPI NtReleaseSemaphore(HANDLE,ULONG,PULONG);
4115 NTSYSAPI NTSTATUS WINAPI NtRemoveIoCompletion(HANDLE,PULONG_PTR,PULONG_PTR,PIO_STATUS_BLOCK,PLARGE_INTEGER);
4116 NTSYSAPI NTSTATUS WINAPI NtRemoveIoCompletionEx(HANDLE,FILE_IO_COMPLETION_INFORMATION*,ULONG,ULONG*,LARGE_INTEGER*,BOOLEAN);
4117 NTSYSAPI NTSTATUS WINAPI NtRemoveProcessDebug(HANDLE,HANDLE);
4118 NTSYSAPI NTSTATUS WINAPI NtRenameKey(HANDLE,UNICODE_STRING*);
4119 NTSYSAPI NTSTATUS WINAPI NtReplaceKey(POBJECT_ATTRIBUTES,HANDLE,POBJECT_ATTRIBUTES);
4120 NTSYSAPI NTSTATUS WINAPI NtReplyPort(HANDLE,PLPC_MESSAGE);
4121 NTSYSAPI NTSTATUS WINAPI NtReplyWaitReceivePort(HANDLE,PULONG,PLPC_MESSAGE,PLPC_MESSAGE);
4122 NTSYSAPI NTSTATUS WINAPI NtReplyWaitReceivePortEx(HANDLE,PVOID*,PPORT_MESSAGE,PPORT_MESSAGE,PLARGE_INTEGER);
4123 NTSYSAPI NTSTATUS WINAPI NtReplyWaitReplyPort(HANDLE,PLPC_MESSAGE);
4124 NTSYSAPI NTSTATUS WINAPI NtRequestPort(HANDLE,PLPC_MESSAGE);
4125 NTSYSAPI NTSTATUS WINAPI NtRequestWaitReplyPort(HANDLE,PLPC_MESSAGE,PLPC_MESSAGE);
4126 NTSYSAPI NTSTATUS WINAPI NtResetEvent(HANDLE,LONG*);
4127 NTSYSAPI NTSTATUS WINAPI NtResetWriteWatch(HANDLE,PVOID,SIZE_T);
4128 NTSYSAPI NTSTATUS WINAPI NtRestoreKey(HANDLE,HANDLE,ULONG);
4129 NTSYSAPI NTSTATUS WINAPI NtResumeProcess(HANDLE);
4130 NTSYSAPI NTSTATUS WINAPI NtResumeThread(HANDLE,PULONG);
4131 NTSYSAPI NTSTATUS WINAPI NtSaveKey(HANDLE,HANDLE);
4132 NTSYSAPI NTSTATUS WINAPI NtSecureConnectPort(PHANDLE,PUNICODE_STRING,PSECURITY_QUALITY_OF_SERVICE,PLPC_SECTION_WRITE,PSID,PLPC_SECTION_READ,PULONG,PVOID,PULONG);
4133 NTSYSAPI NTSTATUS WINAPI NtSetContextThread(HANDLE,const CONTEXT*);
4134 NTSYSAPI NTSTATUS WINAPI NtSetDebugFilterState(ULONG,ULONG,BOOLEAN);
4135 NTSYSAPI NTSTATUS WINAPI NtSetDefaultHardErrorPort(HANDLE);
4136 NTSYSAPI NTSTATUS WINAPI NtSetDefaultLocale(BOOLEAN,LCID);
4137 NTSYSAPI NTSTATUS WINAPI NtSetDefaultUILanguage(LANGID);
4138 NTSYSAPI NTSTATUS WINAPI NtSetEaFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG);
4139 NTSYSAPI NTSTATUS WINAPI NtSetEvent(HANDLE,LONG*);
4140 NTSYSAPI NTSTATUS WINAPI NtSetHighEventPair(HANDLE);
4141 NTSYSAPI NTSTATUS WINAPI NtSetHighWaitLowEventPair(HANDLE);
4142 NTSYSAPI NTSTATUS WINAPI NtSetHighWaitLowThread(VOID);
4143 NTSYSAPI NTSTATUS WINAPI NtSetInformationDebugObject(HANDLE,DEBUGOBJECTINFOCLASS,PVOID,ULONG,ULONG*);
4144 NTSYSAPI NTSTATUS WINAPI NtSetInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FILE_INFORMATION_CLASS);
4145 NTSYSAPI NTSTATUS WINAPI NtSetInformationJobObject(HANDLE,JOBOBJECTINFOCLASS,PVOID,ULONG);
4146 NTSYSAPI NTSTATUS WINAPI NtSetInformationKey(HANDLE,const int,PVOID,ULONG);
4147 NTSYSAPI NTSTATUS WINAPI NtSetInformationObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG);
4148 NTSYSAPI NTSTATUS WINAPI NtSetInformationProcess(HANDLE,PROCESS_INFORMATION_CLASS,PVOID,ULONG);
4149 NTSYSAPI NTSTATUS WINAPI NtSetInformationThread(HANDLE,THREADINFOCLASS,LPCVOID,ULONG);
4150 NTSYSAPI NTSTATUS WINAPI NtSetInformationToken(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,ULONG);
4151 NTSYSAPI NTSTATUS WINAPI NtSetInformationVirtualMemory(HANDLE,VIRTUAL_MEMORY_INFORMATION_CLASS,ULONG_PTR,PMEMORY_RANGE_ENTRY,PVOID,ULONG);
4152 NTSYSAPI NTSTATUS WINAPI NtSetIntervalProfile(ULONG,KPROFILE_SOURCE);
4153 NTSYSAPI NTSTATUS WINAPI NtSetIoCompletion(HANDLE,ULONG_PTR,ULONG_PTR,NTSTATUS,SIZE_T);
4154 NTSYSAPI NTSTATUS WINAPI NtSetLdtEntries(ULONG,LDT_ENTRY,ULONG,LDT_ENTRY);
4155 NTSYSAPI NTSTATUS WINAPI NtSetLowEventPair(HANDLE);
4156 NTSYSAPI NTSTATUS WINAPI NtSetLowWaitHighEventPair(HANDLE);
4157 NTSYSAPI NTSTATUS WINAPI NtSetLowWaitHighThread(VOID);
4158 NTSYSAPI NTSTATUS WINAPI NtSetSecurityObject(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
4159 NTSYSAPI NTSTATUS WINAPI NtSetSystemEnvironmentValue(PUNICODE_STRING,PUNICODE_STRING);
4160 NTSYSAPI NTSTATUS WINAPI NtSetSystemInformation(SYSTEM_INFORMATION_CLASS,PVOID,ULONG);
4161 NTSYSAPI NTSTATUS WINAPI NtSetSystemPowerState(POWER_ACTION,SYSTEM_POWER_STATE,ULONG);
4162 NTSYSAPI NTSTATUS WINAPI NtSetSystemTime(const LARGE_INTEGER*,LARGE_INTEGER*);
4163 NTSYSAPI NTSTATUS WINAPI NtSetThreadExecutionState(EXECUTION_STATE,EXECUTION_STATE*);
4164 NTSYSAPI NTSTATUS WINAPI NtSetTimer(HANDLE, const LARGE_INTEGER*, PTIMER_APC_ROUTINE, PVOID, BOOLEAN, ULONG, BOOLEAN*);
4165 NTSYSAPI NTSTATUS WINAPI NtSetTimerResolution(ULONG,BOOLEAN,PULONG);
4166 NTSYSAPI NTSTATUS WINAPI NtSetValueKey(HANDLE,const UNICODE_STRING *,ULONG,ULONG,const void *,ULONG);
4167 NTSYSAPI NTSTATUS WINAPI NtSetVolumeInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS);
4168 NTSYSAPI NTSTATUS WINAPI NtSignalAndWaitForSingleObject(HANDLE,HANDLE,BOOLEAN,const LARGE_INTEGER*);
4169 NTSYSAPI NTSTATUS WINAPI NtShutdownSystem(SHUTDOWN_ACTION);
4170 NTSYSAPI NTSTATUS WINAPI NtStartProfile(HANDLE);
4171 NTSYSAPI NTSTATUS WINAPI NtStopProfile(HANDLE);
4172 NTSYSAPI NTSTATUS WINAPI NtSuspendProcess(HANDLE);
4173 NTSYSAPI NTSTATUS WINAPI NtSuspendThread(HANDLE,PULONG);
4174 NTSYSAPI NTSTATUS WINAPI NtSystemDebugControl(SYSDBG_COMMAND,PVOID,ULONG,PVOID,ULONG,PULONG);
4175 NTSYSAPI NTSTATUS WINAPI NtTerminateJobObject(HANDLE,NTSTATUS);
4176 NTSYSAPI NTSTATUS WINAPI NtTerminateProcess(HANDLE,LONG);
4177 NTSYSAPI NTSTATUS WINAPI NtTerminateThread(HANDLE,LONG);
4178 NTSYSAPI NTSTATUS WINAPI NtTestAlert(VOID);
4179 NTSYSAPI NTSTATUS WINAPI NtTraceControl(ULONG,void*,ULONG,void*,ULONG,ULONG*);
4180 NTSYSAPI NTSTATUS WINAPI NtUnloadDriver(const UNICODE_STRING *);
4181 NTSYSAPI NTSTATUS WINAPI NtUnloadKey(POBJECT_ATTRIBUTES);
4182 NTSYSAPI NTSTATUS WINAPI NtUnloadKeyEx(POBJECT_ATTRIBUTES,HANDLE);
4183 NTSYSAPI NTSTATUS WINAPI NtUnlockFile(HANDLE,PIO_STATUS_BLOCK,PLARGE_INTEGER,PLARGE_INTEGER,PULONG);
4184 NTSYSAPI NTSTATUS WINAPI NtUnlockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
4185 NTSYSAPI NTSTATUS WINAPI NtUnmapViewOfSection(HANDLE,PVOID);
4186 NTSYSAPI NTSTATUS WINAPI NtUnmapViewOfSectionEx(HANDLE,PVOID,ULONG);
4187 NTSYSAPI NTSTATUS WINAPI NtVdmControl(ULONG,PVOID);
4188 NTSYSAPI NTSTATUS WINAPI NtWaitForAlertByThreadId(const void*,const LARGE_INTEGER*);
4189 NTSYSAPI NTSTATUS WINAPI NtWaitForDebugEvent(HANDLE,BOOLEAN,LARGE_INTEGER*,DBGUI_WAIT_STATE_CHANGE*);
4190 NTSYSAPI NTSTATUS WINAPI NtWaitForKeyedEvent(HANDLE,const void*,BOOLEAN,const LARGE_INTEGER*);
4191 NTSYSAPI NTSTATUS WINAPI NtWaitForSingleObject(HANDLE,BOOLEAN,const LARGE_INTEGER*);
4192 NTSYSAPI NTSTATUS WINAPI NtWaitForMultipleObjects(ULONG,const HANDLE*,BOOLEAN,BOOLEAN,const LARGE_INTEGER*);
4193 NTSYSAPI NTSTATUS WINAPI NtWaitHighEventPair(HANDLE);
4194 NTSYSAPI NTSTATUS WINAPI NtWaitLowEventPair(HANDLE);
4195 NTSYSAPI NTSTATUS WINAPI NtWriteFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,const void*,ULONG,PLARGE_INTEGER,PULONG);
4196 NTSYSAPI NTSTATUS WINAPI NtWriteFileGather(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,FILE_SEGMENT_ELEMENT*,ULONG,PLARGE_INTEGER,PULONG);
4197 NTSYSAPI NTSTATUS WINAPI NtWriteRequestData(HANDLE,PLPC_MESSAGE,ULONG,PVOID,ULONG,PULONG);
4198 NTSYSAPI NTSTATUS WINAPI NtWriteVirtualMemory(HANDLE,void*,const void*,SIZE_T,SIZE_T*);
4199 NTSYSAPI NTSTATUS WINAPI NtYieldExecution(void);
4201 NTSYSAPI NTSTATUS WINAPI RtlAbsoluteToSelfRelativeSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PULONG);
4202 NTSYSAPI void WINAPI RtlAcquirePebLock(void);
4203 NTSYSAPI BYTE WINAPI RtlAcquireResourceExclusive(LPRTL_RWLOCK,BYTE);
4204 NTSYSAPI BYTE WINAPI RtlAcquireResourceShared(LPRTL_RWLOCK,BYTE);
4205 NTSYSAPI void WINAPI RtlAcquireSRWLockExclusive(RTL_SRWLOCK*);
4206 NTSYSAPI void WINAPI RtlAcquireSRWLockShared(RTL_SRWLOCK*);
4207 NTSYSAPI NTSTATUS WINAPI RtlActivateActivationContext(DWORD,HANDLE,ULONG_PTR*);
4208 NTSYSAPI NTSTATUS WINAPI RtlActivateActivationContextEx(ULONG,TEB*,HANDLE,ULONG_PTR*);
4209 NTSYSAPI NTSTATUS WINAPI RtlAddAce(PACL,DWORD,DWORD,PACE_HEADER,DWORD);
4210 NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedAce(PACL,DWORD,DWORD,PSID);
4211 NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
4212 NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedObjectAce(PACL,DWORD,DWORD,DWORD,GUID*,GUID*,PSID);
4213 NTSYSAPI NTSTATUS WINAPI RtlAddAccessDeniedAce(PACL,DWORD,DWORD,PSID);
4214 NTSYSAPI NTSTATUS WINAPI RtlAddAccessDeniedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
4215 NTSYSAPI NTSTATUS WINAPI RtlAddAccessDeniedObjectAce(PACL,DWORD,DWORD,DWORD,GUID*,GUID*,PSID);
4216 NTSYSAPI NTSTATUS WINAPI RtlAddAtomToAtomTable(RTL_ATOM_TABLE,const WCHAR*,RTL_ATOM*);
4217 NTSYSAPI NTSTATUS WINAPI RtlAddAuditAccessAce(PACL,DWORD,DWORD,PSID,BOOL,BOOL);
4218 NTSYSAPI NTSTATUS WINAPI RtlAddAuditAccessAceEx(PACL,DWORD,DWORD,DWORD,PSID,BOOL,BOOL);
4219 NTSYSAPI NTSTATUS WINAPI RtlAddAuditAccessObjectAce(PACL,DWORD,DWORD,DWORD,GUID*,GUID*,PSID,BOOL,BOOL);
4220 NTSYSAPI NTSTATUS WINAPI RtlAddMandatoryAce(PACL,DWORD,DWORD,DWORD,DWORD,PSID);
4221 NTSYSAPI void WINAPI RtlAddRefActivationContext(HANDLE);
4222 NTSYSAPI PVOID WINAPI RtlAddVectoredExceptionHandler(ULONG,PVECTORED_EXCEPTION_HANDLER);
4223 NTSYSAPI NTSTATUS WINAPI RtlAdjustPrivilege(ULONG,BOOLEAN,BOOLEAN,PBOOLEAN);
4224 NTSYSAPI NTSTATUS WINAPI RtlAllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY,BYTE,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,PSID *);
4225 NTSYSAPI RTL_HANDLE * WINAPI RtlAllocateHandle(RTL_HANDLE_TABLE *,ULONG *);
4226 NTSYSAPI BOOLEAN WINAPI RtlFreeHeap(HANDLE,ULONG,PVOID);
4227 NTSYSAPI PVOID WINAPI RtlAllocateHeap(HANDLE,ULONG,SIZE_T) __WINE_ALLOC_SIZE(3) __WINE_DEALLOC(RtlFreeHeap,3) __WINE_MALLOC;
4228 NTSYSAPI WCHAR WINAPI RtlAnsiCharToUnicodeChar(LPSTR *);
4229 NTSYSAPI DWORD WINAPI RtlAnsiStringToUnicodeSize(const STRING *);
4230 NTSYSAPI NTSTATUS WINAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING,PCANSI_STRING,BOOLEAN);
4231 NTSYSAPI NTSTATUS WINAPI RtlAppendAsciizToString(STRING *,LPCSTR);
4232 NTSYSAPI NTSTATUS WINAPI RtlAppendStringToString(STRING *,const STRING *);
4233 NTSYSAPI NTSTATUS WINAPI RtlAppendUnicodeStringToString(UNICODE_STRING *,const UNICODE_STRING *);
4234 NTSYSAPI NTSTATUS WINAPI RtlAppendUnicodeToString(UNICODE_STRING *,LPCWSTR);
4235 NTSYSAPI BOOLEAN WINAPI RtlAreAllAccessesGranted(ACCESS_MASK,ACCESS_MASK);
4236 NTSYSAPI BOOLEAN WINAPI RtlAreAnyAccessesGranted(ACCESS_MASK,ACCESS_MASK);
4237 NTSYSAPI BOOLEAN WINAPI RtlAreBitsSet(PCRTL_BITMAP,ULONG,ULONG);
4238 NTSYSAPI BOOLEAN WINAPI RtlAreBitsClear(PCRTL_BITMAP,ULONG,ULONG);
4239 NTSYSAPI NTSTATUS WINAPI RtlCharToInteger(PCSZ,ULONG,PULONG);
4240 NTSYSAPI NTSTATUS WINAPI RtlCheckRegistryKey(ULONG, PWSTR);
4241 NTSYSAPI void WINAPI RtlClearAllBits(PRTL_BITMAP);
4242 NTSYSAPI void WINAPI RtlClearBits(PRTL_BITMAP,ULONG,ULONG);
4243 NTSYSAPI NTSTATUS WINAPI RtlCreateActivationContext(HANDLE*,const void*);
4244 NTSYSAPI PDEBUG_BUFFER WINAPI RtlCreateQueryDebugBuffer(ULONG,BOOLEAN);
4245 NTSYSAPI NTSTATUS WINAPI RtlCreateRegistryKey(ULONG,PWSTR);
4246 NTSYSAPI ULONG WINAPI RtlCompactHeap(HANDLE,ULONG);
4247 NTSYSAPI LONG WINAPI RtlCompareString(const STRING*,const STRING*,BOOLEAN);
4248 NTSYSAPI LONG WINAPI RtlCompareUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
4249 NTSYSAPI LONG WINAPI RtlCompareUnicodeStrings(const WCHAR*,SIZE_T,const WCHAR*,SIZE_T,BOOLEAN);
4250 NTSYSAPI NTSTATUS WINAPI RtlCompressBuffer(USHORT,PUCHAR,ULONG,PUCHAR,ULONG,ULONG,PULONG,PVOID);
4251 NTSYSAPI DWORD WINAPI RtlComputeCrc32(DWORD,const BYTE*,INT);
4252 NTSYSAPI NTSTATUS WINAPI RtlConvertSidToUnicodeString(PUNICODE_STRING,PSID,BOOLEAN);
4253 NTSYSAPI NTSTATUS WINAPI RtlConvertToAutoInheritSecurityObject(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR*,GUID*,BOOL,PGENERIC_MAPPING);
4254 NTSYSAPI NTSTATUS WINAPI RtlCopyContext(CONTEXT*,DWORD,CONTEXT*);
4255 NTSYSAPI NTSTATUS WINAPI RtlCopyExtendedContext(CONTEXT_EX*,ULONG,CONTEXT_EX*);
4256 NTSYSAPI void WINAPI RtlCopyLuid(PLUID,const LUID*);
4257 NTSYSAPI void WINAPI RtlCopyLuidAndAttributesArray(ULONG,const LUID_AND_ATTRIBUTES*,PLUID_AND_ATTRIBUTES);
4258 NTSYSAPI BOOLEAN WINAPI RtlCopySid(DWORD,PSID,PSID);
4259 NTSYSAPI NTSTATUS WINAPI RtlCopySecurityDescriptor(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR);
4260 NTSYSAPI void WINAPI RtlCopyString(STRING*,const STRING*);
4261 NTSYSAPI void WINAPI RtlCopyUnicodeString(UNICODE_STRING*,const UNICODE_STRING*);
4262 NTSYSAPI NTSTATUS WINAPI RtlCreateAcl(PACL,DWORD,DWORD);
4263 NTSYSAPI NTSTATUS WINAPI RtlCreateAtomTable(ULONG,RTL_ATOM_TABLE*);
4264 NTSYSAPI NTSTATUS WINAPI RtlCreateEnvironment(BOOLEAN, PWSTR*);
4265 NTSYSAPI HANDLE WINAPI RtlCreateHeap(ULONG,PVOID,SIZE_T,SIZE_T,PVOID,PRTL_HEAP_DEFINITION);
4266 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*);
4267 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);
4268 NTSYSAPI NTSTATUS WINAPI RtlCreateSecurityDescriptor(PSECURITY_DESCRIPTOR,DWORD);
4269 NTSYSAPI NTSTATUS WINAPI RtlCreateTimerQueue(PHANDLE);
4270 NTSYSAPI NTSTATUS WINAPI RtlCreateTimer(HANDLE,HANDLE*,RTL_WAITORTIMERCALLBACKFUNC, PVOID, DWORD, DWORD, ULONG);
4271 NTSYSAPI BOOLEAN WINAPI RtlCreateUnicodeString(PUNICODE_STRING,LPCWSTR);
4272 NTSYSAPI BOOLEAN WINAPI RtlCreateUnicodeStringFromAsciiz(PUNICODE_STRING,LPCSTR);
4273 NTSYSAPI NTSTATUS WINAPI RtlCreateUserProcess(UNICODE_STRING*,ULONG,RTL_USER_PROCESS_PARAMETERS*,SECURITY_DESCRIPTOR*,SECURITY_DESCRIPTOR*,HANDLE,BOOLEAN,HANDLE,HANDLE,RTL_USER_PROCESS_INFORMATION*);
4274 NTSYSAPI NTSTATUS WINAPI RtlCreateUserThread(HANDLE,SECURITY_DESCRIPTOR*,BOOLEAN,ULONG,SIZE_T,SIZE_T,PRTL_THREAD_START_ROUTINE,void*,HANDLE*,CLIENT_ID*);
4275 NTSYSAPI NTSTATUS WINAPI RtlCreateUserStack(SIZE_T,SIZE_T,ULONG,SIZE_T,SIZE_T,INITIAL_TEB*);
4276 NTSYSAPI NTSTATUS WINAPI RtlCustomCPToUnicodeN(CPTABLEINFO*,WCHAR*,DWORD,DWORD*,const char*,DWORD);
4277 NTSYSAPI void WINAPI RtlDeactivateActivationContext(DWORD,ULONG_PTR);
4278 NTSYSAPI PVOID WINAPI RtlDecodePointer(PVOID);
4279 NTSYSAPI NTSTATUS WINAPI RtlDecompressBuffer(USHORT,PUCHAR,ULONG,PUCHAR,ULONG,PULONG);
4280 NTSYSAPI NTSTATUS WINAPI RtlDecompressFragment(USHORT,PUCHAR,ULONG,PUCHAR,ULONG,ULONG,PULONG,PVOID);
4281 NTSYSAPI NTSTATUS WINAPI RtlDeleteAce(PACL,DWORD);
4282 NTSYSAPI NTSTATUS WINAPI RtlDeleteAtomFromAtomTable(RTL_ATOM_TABLE,RTL_ATOM);
4283 NTSYSAPI NTSTATUS WINAPI RtlDeleteCriticalSection(RTL_CRITICAL_SECTION *);
4284 NTSYSAPI NTSTATUS WINAPI RtlDeleteRegistryValue(ULONG, PCWSTR, PCWSTR);
4285 NTSYSAPI void WINAPI RtlDeleteResource(LPRTL_RWLOCK);
4286 NTSYSAPI NTSTATUS WINAPI RtlDeleteSecurityObject(PSECURITY_DESCRIPTOR*);
4287 NTSYSAPI NTSTATUS WINAPI RtlDeleteTimer(HANDLE, HANDLE, HANDLE);
4288 NTSYSAPI NTSTATUS WINAPI RtlDeleteTimerQueueEx(HANDLE, HANDLE);
4289 NTSYSAPI PRTL_USER_PROCESS_PARAMETERS WINAPI RtlDeNormalizeProcessParams(RTL_USER_PROCESS_PARAMETERS*);
4290 NTSYSAPI NTSTATUS WINAPI RtlDeregisterWait(HANDLE);
4291 NTSYSAPI NTSTATUS WINAPI RtlDeregisterWaitEx(HANDLE,HANDLE);
4292 NTSYSAPI NTSTATUS WINAPI RtlDestroyAtomTable(RTL_ATOM_TABLE);
4293 NTSYSAPI NTSTATUS WINAPI RtlDestroyEnvironment(PWSTR);
4294 NTSYSAPI NTSTATUS WINAPI RtlDestroyHandleTable(RTL_HANDLE_TABLE *);
4295 NTSYSAPI HANDLE WINAPI RtlDestroyHeap(HANDLE);
4296 NTSYSAPI void WINAPI RtlDestroyProcessParameters(RTL_USER_PROCESS_PARAMETERS*);
4297 NTSYSAPI NTSTATUS WINAPI RtlDestroyQueryDebugBuffer(PDEBUG_BUFFER);
4298 NTSYSAPI DOS_PATHNAME_TYPE WINAPI RtlDetermineDosPathNameType_U(PCWSTR);
4299 NTSYSAPI BOOLEAN WINAPI RtlDllShutdownInProgress(void);
4300 NTSYSAPI BOOLEAN WINAPI RtlDoesFileExists_U(LPCWSTR);
4301 NTSYSAPI BOOLEAN WINAPI RtlDosPathNameToNtPathName_U(PCWSTR,PUNICODE_STRING,PWSTR*,CURDIR*);
4302 NTSYSAPI NTSTATUS WINAPI RtlDosPathNameToNtPathName_U_WithStatus(PCWSTR,PUNICODE_STRING,PWSTR*,CURDIR*);
4303 NTSYSAPI ULONG WINAPI RtlDosSearchPath_U(LPCWSTR, LPCWSTR, LPCWSTR, ULONG, LPWSTR, LPWSTR*);
4304 NTSYSAPI WCHAR WINAPI RtlDowncaseUnicodeChar(WCHAR);
4305 NTSYSAPI NTSTATUS WINAPI RtlDowncaseUnicodeString(UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
4306 NTSYSAPI void WINAPI RtlDumpResource(LPRTL_RWLOCK);
4307 NTSYSAPI NTSTATUS WINAPI RtlDuplicateUnicodeString(int,const UNICODE_STRING*,UNICODE_STRING*);
4308 NTSYSAPI NTSTATUS WINAPI RtlEmptyAtomTable(RTL_ATOM_TABLE,BOOLEAN);
4309 NTSYSAPI PVOID WINAPI RtlEncodePointer(PVOID);
4310 NTSYSAPI NTSTATUS WINAPI RtlEnterCriticalSection(RTL_CRITICAL_SECTION *);
4311 NTSYSAPI void WINAPI RtlEraseUnicodeString(UNICODE_STRING*);
4312 NTSYSAPI NTSTATUS WINAPI RtlEqualComputerName(const UNICODE_STRING*,const UNICODE_STRING*);
4313 NTSYSAPI NTSTATUS WINAPI RtlEqualDomainName(const UNICODE_STRING*,const UNICODE_STRING*);
4314 NTSYSAPI BOOLEAN WINAPI RtlEqualLuid(const LUID*,const LUID*);
4315 NTSYSAPI BOOL WINAPI RtlEqualPrefixSid(PSID,PSID);
4316 NTSYSAPI BOOL WINAPI RtlEqualSid(PSID,PSID);
4317 NTSYSAPI BOOLEAN WINAPI RtlEqualString(const STRING*,const STRING*,BOOLEAN);
4318 NTSYSAPI BOOLEAN WINAPI RtlEqualUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
4319 NTSYSAPI void DECLSPEC_NORETURN WINAPI RtlExitUserProcess(ULONG);
4320 NTSYSAPI void DECLSPEC_NORETURN WINAPI RtlExitUserThread(ULONG);
4321 NTSYSAPI NTSTATUS WINAPI RtlExpandEnvironmentStrings(const WCHAR*,WCHAR*,SIZE_T,WCHAR*,SIZE_T,SIZE_T*);
4322 NTSYSAPI NTSTATUS WINAPI RtlExpandEnvironmentStrings_U(PCWSTR, const UNICODE_STRING*, UNICODE_STRING*, ULONG*);
4323 NTSYSAPI NTSTATUS WINAPI RtlFindActivationContextSectionString(ULONG,const GUID*,ULONG,const UNICODE_STRING*,PVOID);
4324 NTSYSAPI NTSTATUS WINAPI RtlFindActivationContextSectionGuid(ULONG,const GUID*,ULONG,const GUID*,PVOID);
4325 NTSYSAPI NTSTATUS WINAPI RtlFindCharInUnicodeString(int,const UNICODE_STRING*,const UNICODE_STRING*,USHORT*);
4326 NTSYSAPI ULONG WINAPI RtlFindClearBits(PCRTL_BITMAP,ULONG,ULONG);
4327 NTSYSAPI ULONG WINAPI RtlFindClearBitsAndSet(PRTL_BITMAP,ULONG,ULONG);
4328 NTSYSAPI ULONG WINAPI RtlFindClearRuns(PCRTL_BITMAP,PRTL_BITMAP_RUN,ULONG,BOOLEAN);
4329 NTSYSAPI void * WINAPI RtlFindExportedRoutineByName(HMODULE,const char*);
4330 NTSYSAPI ULONG WINAPI RtlFindLastBackwardRunSet(PCRTL_BITMAP,ULONG,PULONG);
4331 NTSYSAPI ULONG WINAPI RtlFindLastBackwardRunClear(PCRTL_BITMAP,ULONG,PULONG);
4332 NTSYSAPI CCHAR WINAPI RtlFindLeastSignificantBit(ULONGLONG);
4333 NTSYSAPI ULONG WINAPI RtlFindLongestRunSet(PCRTL_BITMAP,PULONG);
4334 NTSYSAPI ULONG WINAPI RtlFindLongestRunClear(PCRTL_BITMAP,PULONG);
4335 NTSYSAPI NTSTATUS WINAPI RtlFindMessage(HMODULE,ULONG,ULONG,ULONG,const MESSAGE_RESOURCE_ENTRY**);
4336 NTSYSAPI CCHAR WINAPI RtlFindMostSignificantBit(ULONGLONG);
4337 NTSYSAPI ULONG WINAPI RtlFindNextForwardRunSet(PCRTL_BITMAP,ULONG,PULONG);
4338 NTSYSAPI ULONG WINAPI RtlFindNextForwardRunClear(PCRTL_BITMAP,ULONG,PULONG);
4339 NTSYSAPI ULONG WINAPI RtlFindSetBits(PCRTL_BITMAP,ULONG,ULONG);
4340 NTSYSAPI ULONG WINAPI RtlFindSetBitsAndClear(PRTL_BITMAP,ULONG,ULONG);
4341 NTSYSAPI ULONG WINAPI RtlFindSetRuns(PCRTL_BITMAP,PRTL_BITMAP_RUN,ULONG,BOOLEAN);
4342 NTSYSAPI BOOLEAN WINAPI RtlFirstFreeAce(PACL,PACE_HEADER *);
4343 NTSYSAPI NTSTATUS WINAPI RtlFlsAlloc(PFLS_CALLBACK_FUNCTION,ULONG *);
4344 NTSYSAPI NTSTATUS WINAPI RtlFlsFree(ULONG);
4345 NTSYSAPI NTSTATUS WINAPI RtlFlsGetValue(ULONG,void **);
4346 NTSYSAPI NTSTATUS WINAPI RtlFlsSetValue(ULONG,void *);
4347 NTSYSAPI NTSTATUS WINAPI RtlFormatCurrentUserKeyPath(PUNICODE_STRING);
4348 NTSYSAPI NTSTATUS WINAPI RtlFormatMessage(LPCWSTR,ULONG,BOOLEAN,BOOLEAN,BOOLEAN,__ms_va_list *,LPWSTR,ULONG,ULONG*);
4349 NTSYSAPI NTSTATUS WINAPI RtlFormatMessageEx(LPCWSTR,ULONG,BOOLEAN,BOOLEAN,BOOLEAN,__ms_va_list *,LPWSTR,ULONG,ULONG*,ULONG);
4350 NTSYSAPI void WINAPI RtlFreeAnsiString(PANSI_STRING);
4351 NTSYSAPI BOOLEAN WINAPI RtlFreeHandle(RTL_HANDLE_TABLE *,RTL_HANDLE *);
4352 NTSYSAPI BOOLEAN WINAPI RtlFreeHeap(HANDLE,ULONG,PVOID);
4353 NTSYSAPI void WINAPI RtlFreeOemString(POEM_STRING);
4354 NTSYSAPI DWORD WINAPI RtlFreeSid(PSID);
4355 NTSYSAPI void WINAPI RtlFreeThreadActivationContextStack(void);
4356 NTSYSAPI void WINAPI RtlFreeUnicodeString(PUNICODE_STRING);
4357 NTSYSAPI void WINAPI RtlFreeUserStack(void*);
4358 NTSYSAPI NTSTATUS WINAPI RtlGetAce(PACL,DWORD,LPVOID *);
4359 NTSYSAPI NTSTATUS WINAPI RtlGetActiveActivationContext(HANDLE*);
4360 NTSYSAPI NTSTATUS WINAPI RtlGetCompressionWorkSpaceSize(USHORT,PULONG,PULONG);
4361 NTSYSAPI NTSTATUS WINAPI RtlGetControlSecurityDescriptor(PSECURITY_DESCRIPTOR, PSECURITY_DESCRIPTOR_CONTROL,LPDWORD);
4362 NTSYSAPI ULONG WINAPI RtlGetCurrentDirectory_U(ULONG, LPWSTR);
4363 NTSYSAPI PEB * WINAPI RtlGetCurrentPeb(void);
4364 NTSYSAPI NTSTATUS WINAPI RtlGetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR,PBOOLEAN,PACL *,PBOOLEAN);
4365 NTSYSAPI ULONG64 WINAPI RtlGetEnabledExtendedFeatures(ULONG64);
4366 NTSYSAPI NTSTATUS WINAPI RtlGetExePath(PCWSTR,PWSTR*);
4367 NTSYSAPI NTSTATUS WINAPI RtlGetExtendedContextLength(ULONG,ULONG*);
4368 NTSYSAPI NTSTATUS WINAPI RtlGetExtendedContextLength2(ULONG,ULONG*,ULONG64);
4369 NTSYSAPI ULONG64 WINAPI RtlGetExtendedFeaturesMask(CONTEXT_EX*);
4370 NTSYSAPI TEB_ACTIVE_FRAME * WINAPI RtlGetFrame(void);
4371 NTSYSAPI ULONG WINAPI RtlGetFullPathName_U(PCWSTR,ULONG,PWSTR,PWSTR*);
4372 NTSYSAPI NTSTATUS WINAPI RtlGetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID *,PBOOLEAN);
4373 NTSYSAPI NTSTATUS WINAPI RtlGetLastNtStatus(void);
4374 NTSYSAPI DWORD WINAPI RtlGetLastWin32Error(void);
4375 NTSYSAPI NTSTATUS WINAPI RtlGetLocaleFileMappingAddress(void**,LCID*,LARGE_INTEGER*);
4376 NTSYSAPI DWORD WINAPI RtlGetLongestNtPathLength(void);
4377 NTSYSAPI ULONG WINAPI RtlGetNtGlobalFlags(void);
4378 NTSYSAPI BOOLEAN WINAPI RtlGetNtProductType(LPDWORD);
4379 NTSYSAPI NTSTATUS WINAPI RtlGetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID *,PBOOLEAN);
4380 NTSYSAPI ULONG WINAPI RtlGetProcessHeaps(ULONG,HANDLE*);
4381 NTSYSAPI NTSTATUS WINAPI RtlGetProcessPreferredUILanguages(DWORD,ULONG*,WCHAR*,ULONG*);
4382 NTSYSAPI NTSTATUS WINAPI RtlGetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR,PBOOLEAN,PACL *,PBOOLEAN);
4383 NTSYSAPI NTSTATUS WINAPI RtlGetSearchPath(PWSTR*);
4384 NTSYSAPI NTSTATUS WINAPI RtlGetSystemPreferredUILanguages(DWORD,ULONG,ULONG*,WCHAR*,ULONG*);
4385 NTSYSAPI LONGLONG WINAPI RtlGetSystemTimePrecise(void);
4386 NTSYSAPI DWORD WINAPI RtlGetThreadErrorMode(void);
4387 NTSYSAPI NTSTATUS WINAPI RtlGetThreadPreferredUILanguages(DWORD,ULONG*,WCHAR*,ULONG*);
4388 NTSYSAPI NTSTATUS WINAPI RtlGetUserPreferredUILanguages(DWORD,ULONG,ULONG*,WCHAR*,ULONG*);
4389 NTSYSAPI NTSTATUS WINAPI RtlGetVersion(RTL_OSVERSIONINFOEXW*);
4390 NTSYSAPI NTSTATUS WINAPI RtlGUIDFromString(PUNICODE_STRING,GUID*);
4391 NTSYSAPI PSID_IDENTIFIER_AUTHORITY WINAPI RtlIdentifierAuthoritySid(PSID);
4392 NTSYSAPI NTSTATUS WINAPI RtlIdnToAscii(DWORD,const WCHAR*,INT,WCHAR*,INT*);
4393 NTSYSAPI NTSTATUS WINAPI RtlIdnToNameprepUnicode(DWORD,const WCHAR*,INT,WCHAR*,INT*);
4394 NTSYSAPI NTSTATUS WINAPI RtlIdnToUnicode(DWORD,const WCHAR*,INT,WCHAR*,INT*);
4395 NTSYSAPI PVOID WINAPI RtlImageDirectoryEntryToData(HMODULE,BOOL,WORD,ULONG *);
4396 NTSYSAPI PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE);
4397 NTSYSAPI PIMAGE_SECTION_HEADER WINAPI RtlImageRvaToSection(const IMAGE_NT_HEADERS *,HMODULE,DWORD);
4398 NTSYSAPI PVOID WINAPI RtlImageRvaToVa(const IMAGE_NT_HEADERS *,HMODULE,DWORD,IMAGE_SECTION_HEADER **);
4399 NTSYSAPI NTSTATUS WINAPI RtlImpersonateSelf(SECURITY_IMPERSONATION_LEVEL);
4400 NTSYSAPI void WINAPI RtlInitString(PSTRING,PCSZ);
4401 NTSYSAPI void WINAPI RtlInitAnsiString(PANSI_STRING,PCSZ);
4402 NTSYSAPI NTSTATUS WINAPI RtlInitAnsiStringEx(PANSI_STRING,PCSZ);
4403 NTSYSAPI void WINAPI RtlInitCodePageTable(USHORT*,CPTABLEINFO*);
4404 NTSYSAPI void WINAPI RtlInitNlsTables(USHORT*,USHORT*,USHORT*,NLSTABLEINFO*);
4405 NTSYSAPI void WINAPI RtlInitUnicodeString(PUNICODE_STRING,PCWSTR);
4406 NTSYSAPI NTSTATUS WINAPI RtlInitUnicodeStringEx(PUNICODE_STRING,PCWSTR);
4407 NTSYSAPI void WINAPI RtlInitializeBitMap(PRTL_BITMAP,PULONG,ULONG);
4408 NTSYSAPI void WINAPI RtlInitializeConditionVariable(RTL_CONDITION_VARIABLE *);
4409 NTSYSAPI NTSTATUS WINAPI RtlInitializeCriticalSection(RTL_CRITICAL_SECTION *);
4410 NTSYSAPI NTSTATUS WINAPI RtlInitializeCriticalSectionAndSpinCount(RTL_CRITICAL_SECTION *,ULONG);
4411 NTSYSAPI NTSTATUS WINAPI RtlInitializeCriticalSectionEx(RTL_CRITICAL_SECTION *,ULONG,ULONG);
4412 NTSYSAPI NTSTATUS WINAPI RtlInitializeExtendedContext(void*,ULONG,CONTEXT_EX**);
4413 NTSYSAPI NTSTATUS WINAPI RtlInitializeExtendedContext2(void*,ULONG,CONTEXT_EX**,ULONG64);
4414 NTSYSAPI void WINAPI RtlInitializeHandleTable(ULONG,ULONG,RTL_HANDLE_TABLE *);
4415 NTSYSAPI void WINAPI RtlInitializeResource(LPRTL_RWLOCK);
4416 NTSYSAPI void WINAPI RtlInitializeSRWLock(RTL_SRWLOCK*);
4417 NTSYSAPI BOOL WINAPI RtlInitializeSid(PSID,PSID_IDENTIFIER_AUTHORITY,BYTE);
4418 NTSYSAPI NTSTATUS WINAPI RtlInt64ToUnicodeString(ULONGLONG,ULONG,UNICODE_STRING *);
4419 NTSYSAPI NTSTATUS WINAPI RtlIntegerToChar(ULONG,ULONG,ULONG,PCHAR);
4420 NTSYSAPI NTSTATUS WINAPI RtlIntegerToUnicodeString(ULONG,ULONG,UNICODE_STRING *);
4421 NTSYSAPI BOOLEAN WINAPI RtlIsActivationContextActive(HANDLE);
4422 NTSYSAPI BOOL WINAPI RtlIsCriticalSectionLocked(RTL_CRITICAL_SECTION *);
4423 NTSYSAPI BOOL WINAPI RtlIsCriticalSectionLockedByThread(RTL_CRITICAL_SECTION *);
4424 NTSYSAPI ULONG WINAPI RtlIsDosDeviceName_U(PCWSTR);
4425 NTSYSAPI BOOLEAN WINAPI RtlIsNameLegalDOS8Dot3(const UNICODE_STRING*,POEM_STRING,PBOOLEAN);
4426 NTSYSAPI NTSTATUS WINAPI RtlIsNormalizedString(ULONG,const WCHAR*,INT,BOOLEAN*);
4427 NTSYSAPI BOOLEAN WINAPI RtlIsProcessorFeaturePresent(UINT);
4428 NTSYSAPI BOOLEAN WINAPI RtlIsTextUnicode(LPCVOID,INT,INT *);
4429 NTSYSAPI BOOLEAN WINAPI RtlIsValidHandle(const RTL_HANDLE_TABLE *, const RTL_HANDLE *);
4430 NTSYSAPI BOOLEAN WINAPI RtlIsValidIndexHandle(const RTL_HANDLE_TABLE *, ULONG Index, RTL_HANDLE **);
4431 NTSYSAPI BOOLEAN WINAPI RtlIsValidLocaleName(const WCHAR*,ULONG);
4432 NTSYSAPI NTSTATUS WINAPI RtlLcidToLocaleName(LCID,UNICODE_STRING*,ULONG,BOOLEAN);
4433 NTSYSAPI NTSTATUS WINAPI RtlLeaveCriticalSection(RTL_CRITICAL_SECTION *);
4434 NTSYSAPI DWORD WINAPI RtlLengthRequiredSid(DWORD);
4435 NTSYSAPI ULONG WINAPI RtlLengthSecurityDescriptor(PSECURITY_DESCRIPTOR);
4436 NTSYSAPI DWORD WINAPI RtlLengthSid(PSID);
4437 NTSYSAPI NTSTATUS WINAPI RtlLocalTimeToSystemTime(const LARGE_INTEGER*,PLARGE_INTEGER);
4438 NTSYSAPI NTSTATUS WINAPI RtlLocaleNameToLcid(const WCHAR*,LCID*,ULONG);
4439 NTSYSAPI void * WINAPI RtlLocateExtendedFeature(CONTEXT_EX*,ULONG,ULONG*);
4440 NTSYSAPI void * WINAPI RtlLocateExtendedFeature2(CONTEXT_EX*,ULONG,XSTATE_CONFIGURATION*,ULONG*);
4441 NTSYSAPI void * WINAPI RtlLocateLegacyContext(CONTEXT_EX*,ULONG*);
4442 NTSYSAPI BOOLEAN WINAPI RtlLockHeap(HANDLE);
4443 NTSYSAPI NTSTATUS WINAPI RtlLookupAtomInAtomTable(RTL_ATOM_TABLE,const WCHAR*,RTL_ATOM*);
4444 NTSYSAPI NTSTATUS WINAPI RtlMakeSelfRelativeSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,LPDWORD);
4445 NTSYSAPI void WINAPI RtlMapGenericMask(PACCESS_MASK,const GENERIC_MAPPING*);
4446 NTSYSAPI NTSTATUS WINAPI RtlMultiByteToUnicodeN(LPWSTR,DWORD,LPDWORD,LPCSTR,DWORD);
4447 NTSYSAPI NTSTATUS WINAPI RtlMultiByteToUnicodeSize(DWORD*,LPCSTR,ULONG);
4448 NTSYSAPI NTSTATUS WINAPI RtlNewSecurityObject(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR*,BOOLEAN,HANDLE,PGENERIC_MAPPING);
4449 NTSYSAPI PRTL_USER_PROCESS_PARAMETERS WINAPI RtlNormalizeProcessParams(RTL_USER_PROCESS_PARAMETERS*);
4450 NTSYSAPI NTSTATUS WINAPI RtlNormalizeString(ULONG,const WCHAR*,INT,WCHAR*,INT*);
4451 NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS);
4452 NTSYSAPI ULONG WINAPI RtlNtStatusToDosErrorNoTeb(NTSTATUS);
4453 NTSYSAPI ULONG WINAPI RtlNumberOfSetBits(PCRTL_BITMAP);
4454 NTSYSAPI ULONG WINAPI RtlNumberOfClearBits(PCRTL_BITMAP);
4455 NTSYSAPI ULONG WINAPI RtlOemStringToUnicodeSize(const STRING*);
4456 NTSYSAPI NTSTATUS WINAPI RtlOemStringToUnicodeString(UNICODE_STRING*,const STRING*,BOOLEAN);
4457 NTSYSAPI NTSTATUS WINAPI RtlOemToUnicodeN(LPWSTR,DWORD,LPDWORD,LPCSTR,DWORD);
4458 NTSYSAPI NTSTATUS WINAPI RtlOpenCurrentUser(ACCESS_MASK,PHANDLE);
4459 NTSYSAPI PVOID WINAPI RtlPcToFileHeader(PVOID,PVOID*);
4460 NTSYSAPI NTSTATUS WINAPI RtlPinAtomInAtomTable(RTL_ATOM_TABLE,RTL_ATOM);
4461 NTSYSAPI void WINAPI RtlPopFrame(TEB_ACTIVE_FRAME*);
4462 NTSYSAPI BOOLEAN WINAPI RtlPrefixString(const STRING*,const STRING*,BOOLEAN);
4463 NTSYSAPI BOOLEAN WINAPI RtlPrefixUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
4464 NTSYSAPI void WINAPI RtlProcessFlsData(void*,ULONG);
4465 NTSYSAPI void WINAPI RtlPushFrame(TEB_ACTIVE_FRAME*);
4466 NTSYSAPI NTSTATUS WINAPI RtlQueryActivationContextApplicationSettings(DWORD,HANDLE,const WCHAR*,const WCHAR*,WCHAR*,SIZE_T,SIZE_T*);
4467 NTSYSAPI NTSTATUS WINAPI RtlQueryAtomInAtomTable(RTL_ATOM_TABLE,RTL_ATOM,ULONG*,ULONG*,WCHAR*,ULONG*);
4468 NTSYSAPI NTSTATUS WINAPI RtlQueryDynamicTimeZoneInformation(RTL_DYNAMIC_TIME_ZONE_INFORMATION*);
4469 NTSYSAPI NTSTATUS WINAPI RtlQueryEnvironmentVariable(WCHAR*,const WCHAR*,SIZE_T,WCHAR*,SIZE_T,SIZE_T*);
4470 NTSYSAPI NTSTATUS WINAPI RtlQueryEnvironmentVariable_U(PWSTR,PUNICODE_STRING,PUNICODE_STRING);
4471 NTSYSAPI NTSTATUS WINAPI RtlQueryHeapInformation(HANDLE,HEAP_INFORMATION_CLASS,PVOID,SIZE_T,PSIZE_T);
4472 NTSYSAPI NTSTATUS WINAPI RtlQueryInformationAcl(PACL,LPVOID,DWORD,ACL_INFORMATION_CLASS);
4473 NTSYSAPI NTSTATUS WINAPI RtlQueryInformationActivationContext(ULONG,HANDLE,PVOID,ULONG,PVOID,SIZE_T,SIZE_T*);
4474 NTSYSAPI BOOL WINAPI RtlQueryPerformanceCounter(LARGE_INTEGER*);
4475 NTSYSAPI BOOL WINAPI RtlQueryPerformanceFrequency(LARGE_INTEGER*);
4476 NTSYSAPI NTSTATUS WINAPI RtlQueryProcessDebugInformation(ULONG,ULONG,PDEBUG_BUFFER);
4477 NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID);
4478 NTSYSAPI NTSTATUS WINAPI RtlQueryTimeZoneInformation(RTL_TIME_ZONE_INFORMATION*);
4479 NTSYSAPI BOOL WINAPI RtlQueryUnbiasedInterruptTime(ULONGLONG*);
4480 NTSYSAPI NTSTATUS WINAPI RtlQueueWorkItem(PRTL_WORK_ITEM_ROUTINE,PVOID,ULONG);
4481 NTSYSAPI void WINAPI RtlRaiseException(PEXCEPTION_RECORD);
4482 NTSYSAPI void WINAPI RtlRaiseStatus(NTSTATUS);
4483 NTSYSAPI ULONG WINAPI RtlRandom(PULONG);
4484 NTSYSAPI PVOID WINAPI RtlReAllocateHeap(HANDLE,ULONG,PVOID,SIZE_T) __WINE_ALLOC_SIZE(4) __WINE_DEALLOC(RtlFreeHeap,3);
4485 NTSYSAPI NTSTATUS WINAPI RtlRegisterWait(PHANDLE,HANDLE,RTL_WAITORTIMERCALLBACKFUNC,PVOID,ULONG,ULONG);
4486 NTSYSAPI void WINAPI RtlReleaseActivationContext(HANDLE);
4487 NTSYSAPI void WINAPI RtlReleasePath(PWSTR);
4488 NTSYSAPI void WINAPI RtlReleasePebLock(void);
4489 NTSYSAPI void WINAPI RtlReleaseResource(LPRTL_RWLOCK);
4490 NTSYSAPI void WINAPI RtlReleaseSRWLockExclusive(RTL_SRWLOCK*);
4491 NTSYSAPI void WINAPI RtlReleaseSRWLockShared(RTL_SRWLOCK*);
4492 NTSYSAPI ULONG WINAPI RtlRemoveVectoredExceptionHandler(PVOID);
4493 NTSYSAPI void WINAPI RtlResetRtlTranslations(const NLSTABLEINFO*);
4494 NTSYSAPI void WINAPI RtlRestoreLastWin32Error(DWORD);
4495 NTSYSAPI void WINAPI RtlSecondsSince1970ToTime(DWORD,LARGE_INTEGER *);
4496 NTSYSAPI void WINAPI RtlSecondsSince1980ToTime(DWORD,LARGE_INTEGER *);
4497 NTSYSAPI NTSTATUS WINAPI RtlSelfRelativeToAbsoluteSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PDWORD,PACL,PDWORD,PACL,PDWORD,PSID,PDWORD,PSID,PDWORD);
4498 NTSYSAPI void WINAPI RtlSetAllBits(PRTL_BITMAP);
4499 NTSYSAPI void WINAPI RtlSetBits(PRTL_BITMAP,ULONG,ULONG);
4500 NTSYSAPI ULONG WINAPI RtlSetCriticalSectionSpinCount(RTL_CRITICAL_SECTION*,ULONG);
4501 NTSYSAPI NTSTATUS WINAPI RtlSetControlSecurityDescriptor(PSECURITY_DESCRIPTOR,SECURITY_DESCRIPTOR_CONTROL,SECURITY_DESCRIPTOR_CONTROL);
4502 NTSYSAPI NTSTATUS WINAPI RtlSetCurrentDirectory_U(const UNICODE_STRING*);
4503 NTSYSAPI void WINAPI RtlSetCurrentEnvironment(PWSTR, PWSTR*);
4504 NTSYSAPI NTSTATUS WINAPI RtlSetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR,BOOLEAN,PACL,BOOLEAN);
4505 NTSYSAPI NTSTATUS WINAPI RtlSetEnvironmentVariable(PWSTR*,PUNICODE_STRING,PUNICODE_STRING);
4506 NTSYSAPI void WINAPI RtlSetExtendedFeaturesMask(CONTEXT_EX*,ULONG64);
4507 NTSYSAPI NTSTATUS WINAPI RtlSetHeapInformation(HANDLE,HEAP_INFORMATION_CLASS,PVOID,SIZE_T);
4508 NTSYSAPI NTSTATUS WINAPI RtlSetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID,BOOLEAN);
4509 NTSYSAPI NTSTATUS WINAPI RtlSetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID,BOOLEAN);
4510 NTSYSAPI NTSTATUS WINAPI RtlSetIoCompletionCallback(HANDLE,PRTL_OVERLAPPED_COMPLETION_ROUTINE,ULONG);
4511 NTSYSAPI void WINAPI RtlSetLastWin32Error(DWORD);
4512 NTSYSAPI void WINAPI RtlSetLastWin32ErrorAndNtStatusFromNtStatus(NTSTATUS);
4513 NTSYSAPI NTSTATUS WINAPI RtlSetProcessPreferredUILanguages(DWORD,PCZZWSTR,ULONG*);
4514 NTSYSAPI NTSTATUS WINAPI RtlSetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR,BOOLEAN,PACL,BOOLEAN);
4515 NTSYSAPI NTSTATUS WINAPI RtlSetSearchPathMode(ULONG);
4516 NTSYSAPI NTSTATUS WINAPI RtlSetThreadErrorMode(DWORD,LPDWORD);
4517 NTSYSAPI NTSTATUS WINAPI RtlSetThreadPreferredUILanguages(DWORD,PCZZWSTR,ULONG*);
4518 NTSYSAPI NTSTATUS WINAPI RtlSetTimeZoneInformation(const RTL_TIME_ZONE_INFORMATION*);
4519 NTSYSAPI void WINAPI RtlSetUnhandledExceptionFilter(PRTL_EXCEPTION_FILTER);
4520 NTSYSAPI SIZE_T WINAPI RtlSizeHeap(HANDLE,ULONG,const void*);
4521 NTSYSAPI NTSTATUS WINAPI RtlSleepConditionVariableCS(RTL_CONDITION_VARIABLE*,RTL_CRITICAL_SECTION*,const LARGE_INTEGER*);
4522 NTSYSAPI NTSTATUS WINAPI RtlSleepConditionVariableSRW(RTL_CONDITION_VARIABLE*,RTL_SRWLOCK*,const LARGE_INTEGER*,ULONG);
4523 NTSYSAPI NTSTATUS WINAPI RtlStringFromGUID(REFGUID,PUNICODE_STRING);
4524 NTSYSAPI LPDWORD WINAPI RtlSubAuthoritySid(PSID,DWORD);
4525 NTSYSAPI LPBYTE WINAPI RtlSubAuthorityCountSid(PSID);
4526 NTSYSAPI NTSTATUS WINAPI RtlSystemTimeToLocalTime(const LARGE_INTEGER*,PLARGE_INTEGER);
4527 NTSYSAPI void WINAPI RtlTimeToTimeFields(const LARGE_INTEGER*,PTIME_FIELDS);
4528 NTSYSAPI BOOLEAN WINAPI RtlTimeFieldsToTime(PTIME_FIELDS,PLARGE_INTEGER);
4529 NTSYSAPI void WINAPI RtlTimeToElapsedTimeFields(const LARGE_INTEGER *,PTIME_FIELDS);
4530 NTSYSAPI BOOLEAN WINAPI RtlTimeToSecondsSince1970(const LARGE_INTEGER *,LPDWORD);
4531 NTSYSAPI BOOLEAN WINAPI RtlTimeToSecondsSince1980(const LARGE_INTEGER *,LPDWORD);
4532 NTSYSAPI BOOLEAN WINAPI RtlTryAcquireSRWLockExclusive(RTL_SRWLOCK *);
4533 NTSYSAPI BOOLEAN WINAPI RtlTryAcquireSRWLockShared(RTL_SRWLOCK *);
4534 NTSYSAPI BOOL WINAPI RtlTryEnterCriticalSection(RTL_CRITICAL_SECTION *);
4535 NTSYSAPI NTSTATUS WINAPI RtlUTF8ToUnicodeN(WCHAR*,DWORD,DWORD*,const char*,DWORD);
4536 NTSYSAPI ULONGLONG __cdecl RtlUlonglongByteSwap(ULONGLONG);
4537 NTSYSAPI DWORD WINAPI RtlUnicodeStringToAnsiSize(const UNICODE_STRING*);
4538 NTSYSAPI NTSTATUS WINAPI RtlUnicodeStringToAnsiString(PANSI_STRING,PCUNICODE_STRING,BOOLEAN);
4539 NTSYSAPI NTSTATUS WINAPI RtlUnicodeStringToInteger(const UNICODE_STRING *,ULONG,ULONG *);
4540 NTSYSAPI DWORD WINAPI RtlUnicodeStringToOemSize(const UNICODE_STRING*);
4541 NTSYSAPI NTSTATUS WINAPI RtlUnicodeStringToOemString(POEM_STRING,PCUNICODE_STRING,BOOLEAN);
4542 NTSYSAPI NTSTATUS WINAPI RtlUnicodeToCustomCPN(CPTABLEINFO*,char*,DWORD,DWORD*,const WCHAR*,DWORD);
4543 NTSYSAPI NTSTATUS WINAPI RtlUnicodeToMultiByteN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
4544 NTSYSAPI NTSTATUS WINAPI RtlUnicodeToMultiByteSize(PULONG,PCWSTR,ULONG);
4545 NTSYSAPI NTSTATUS WINAPI RtlUnicodeToOemN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
4546 NTSYSAPI NTSTATUS WINAPI RtlUnicodeToUTF8N(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
4547 NTSYSAPI ULONG WINAPI RtlUniform(PULONG);
4548 NTSYSAPI BOOLEAN WINAPI RtlUnlockHeap(HANDLE);
4549 NTSYSAPI void WINAPI RtlUnwind(PVOID,PVOID,PEXCEPTION_RECORD,PVOID);
4550 NTSYSAPI WCHAR WINAPI RtlUpcaseUnicodeChar(WCHAR);
4551 NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeString(UNICODE_STRING*,const UNICODE_STRING *,BOOLEAN);
4552 NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeStringToAnsiString(STRING*,const UNICODE_STRING*,BOOLEAN);
4553 NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeStringToCountedOemString(STRING*,const UNICODE_STRING*,BOOLEAN);
4554 NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeStringToOemString(STRING*,const UNICODE_STRING*,BOOLEAN);
4555 NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeToCustomCPN(CPTABLEINFO*,char*,DWORD,DWORD*,const WCHAR*,DWORD);
4556 NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeToMultiByteN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
4557 NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeToOemN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
4558 NTSYSAPI NTSTATUS WINAPI RtlUpdateTimer(HANDLE, HANDLE, DWORD, DWORD);
4559 NTSYSAPI CHAR WINAPI RtlUpperChar(CHAR);
4560 NTSYSAPI void WINAPI RtlUpperString(STRING *,const STRING *);
4561 NTSYSAPI void WINAPI RtlUserThreadStart(PRTL_THREAD_START_ROUTINE,void*);
4562 NTSYSAPI NTSTATUS WINAPI RtlValidSecurityDescriptor(PSECURITY_DESCRIPTOR);
4563 NTSYSAPI BOOLEAN WINAPI RtlValidRelativeSecurityDescriptor(PSECURITY_DESCRIPTOR,ULONG,SECURITY_INFORMATION);
4564 NTSYSAPI BOOLEAN WINAPI RtlValidAcl(PACL);
4565 NTSYSAPI BOOLEAN WINAPI RtlValidSid(PSID);
4566 NTSYSAPI BOOLEAN WINAPI RtlValidateHeap(HANDLE,ULONG,LPCVOID);
4567 NTSYSAPI NTSTATUS WINAPI RtlVerifyVersionInfo(const RTL_OSVERSIONINFOEXW*,DWORD,DWORDLONG);
4568 NTSYSAPI NTSTATUS WINAPI RtlWaitOnAddress(const void *,const void *,SIZE_T,const LARGE_INTEGER *);
4569 NTSYSAPI void WINAPI RtlWakeAddressAll(const void *);
4570 NTSYSAPI void WINAPI RtlWakeAddressSingle(const void *);
4571 NTSYSAPI void WINAPI RtlWakeAllConditionVariable(RTL_CONDITION_VARIABLE *);
4572 NTSYSAPI void WINAPI RtlWakeConditionVariable(RTL_CONDITION_VARIABLE *);
4573 NTSYSAPI NTSTATUS WINAPI RtlWalkHeap(HANDLE,PVOID);
4574 NTSYSAPI NTSTATUS WINAPI RtlWow64EnableFsRedirection(BOOLEAN);
4575 NTSYSAPI NTSTATUS WINAPI RtlWow64EnableFsRedirectionEx(ULONG,ULONG*);
4576 NTSYSAPI USHORT WINAPI RtlWow64GetCurrentMachine(void);
4577 NTSYSAPI NTSTATUS WINAPI RtlWow64GetProcessMachines(HANDLE,USHORT*,USHORT*);
4578 NTSYSAPI NTSTATUS WINAPI RtlWow64IsWowGuestMachineSupported(USHORT,BOOLEAN*);
4579 NTSYSAPI NTSTATUS WINAPI RtlWriteRegistryValue(ULONG,PCWSTR,PCWSTR,ULONG,PVOID,ULONG);
4580 NTSYSAPI NTSTATUS WINAPI RtlZombifyActivationContext(HANDLE);
4581 NTSYSAPI NTSTATUS WINAPI RtlpNtCreateKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,PULONG);
4582 NTSYSAPI NTSTATUS WINAPI RtlpNtEnumerateSubKey(HANDLE,UNICODE_STRING *, ULONG);
4583 NTSYSAPI NTSTATUS WINAPI RtlpWaitForCriticalSection(RTL_CRITICAL_SECTION *);
4584 NTSYSAPI NTSTATUS WINAPI RtlpUnWaitCriticalSection(RTL_CRITICAL_SECTION *);
4585 NTSYSAPI NTSTATUS WINAPI vDbgPrintEx(ULONG,ULONG,LPCSTR,__ms_va_list);
4586 NTSYSAPI NTSTATUS WINAPI vDbgPrintExWithPrefix(LPCSTR,ULONG,ULONG,LPCSTR,__ms_va_list);
4588 #ifndef __WINE_USE_MSVCRT
4589 NTSYSAPI int __cdecl _strnicmp(LPCSTR,LPCSTR,size_t);
4590 #endif
4592 /* 32-bit or 64-bit only functions */
4594 #ifdef _WIN64
4595 NTSYSAPI NTSTATUS WINAPI RtlWow64GetCpuAreaInfo(WOW64_CPURESERVED*,ULONG,WOW64_CPU_AREA_INFO*);
4596 NTSYSAPI NTSTATUS WINAPI RtlWow64GetCurrentCpuArea(USHORT*,void**,void**);
4597 NTSYSAPI NTSTATUS WINAPI RtlWow64GetThreadContext(HANDLE,WOW64_CONTEXT*);
4598 NTSYSAPI NTSTATUS WINAPI RtlWow64GetThreadSelectorEntry(HANDLE,THREAD_DESCRIPTOR_INFORMATION*,ULONG,ULONG*);
4599 NTSYSAPI NTSTATUS WINAPI RtlWow64SetThreadContext(HANDLE,const WOW64_CONTEXT*);
4600 #else
4601 NTSYSAPI NTSTATUS WINAPI NtWow64AllocateVirtualMemory64(HANDLE,ULONG64*,ULONG64,ULONG64*,ULONG,ULONG);
4602 NTSYSAPI NTSTATUS WINAPI NtWow64GetNativeSystemInformation(SYSTEM_INFORMATION_CLASS,void*,ULONG,ULONG*);
4603 NTSYSAPI NTSTATUS WINAPI NtWow64ReadVirtualMemory64(HANDLE,ULONG64,void*,ULONG64,ULONG64*);
4604 NTSYSAPI NTSTATUS WINAPI NtWow64WriteVirtualMemory64(HANDLE,ULONG64,const void*,ULONG64,ULONG64*);
4605 NTSYSAPI LONGLONG WINAPI RtlConvertLongToLargeInteger(LONG);
4606 NTSYSAPI ULONGLONG WINAPI RtlConvertUlongToLargeInteger(ULONG);
4607 NTSYSAPI LONGLONG WINAPI RtlEnlargedIntegerMultiply(INT,INT);
4608 NTSYSAPI ULONGLONG WINAPI RtlEnlargedUnsignedMultiply(UINT,UINT);
4609 NTSYSAPI UINT WINAPI RtlEnlargedUnsignedDivide(ULONGLONG,UINT,UINT *);
4610 NTSYSAPI LONGLONG WINAPI RtlExtendedMagicDivide(LONGLONG,LONGLONG,INT);
4611 NTSYSAPI LONGLONG WINAPI RtlExtendedIntegerMultiply(LONGLONG,INT);
4612 NTSYSAPI LONGLONG WINAPI RtlExtendedLargeIntegerDivide(LONGLONG,INT,INT *);
4613 NTSYSAPI LONGLONG WINAPI RtlInterlockedCompareExchange64(LONGLONG*,LONGLONG,LONGLONG);
4614 NTSYSAPI LONGLONG WINAPI RtlLargeIntegerAdd(LONGLONG,LONGLONG);
4615 NTSYSAPI LONGLONG WINAPI RtlLargeIntegerArithmeticShift(LONGLONG,INT);
4616 NTSYSAPI ULONGLONG WINAPI RtlLargeIntegerDivide( ULONGLONG,ULONGLONG,ULONGLONG *);
4617 NTSYSAPI LONGLONG WINAPI RtlLargeIntegerNegate(LONGLONG);
4618 NTSYSAPI LONGLONG WINAPI RtlLargeIntegerShiftLeft(LONGLONG,INT);
4619 NTSYSAPI LONGLONG WINAPI RtlLargeIntegerShiftRight(LONGLONG,INT);
4620 NTSYSAPI LONGLONG WINAPI RtlLargeIntegerSubtract(LONGLONG,LONGLONG);
4621 NTSYSAPI NTSTATUS WINAPI RtlLargeIntegerToChar(const ULONGLONG *,ULONG,ULONG,PCHAR);
4622 #endif
4624 /* Threadpool functions */
4626 NTSYSAPI NTSTATUS WINAPI TpAllocCleanupGroup(TP_CLEANUP_GROUP **);
4627 NTSYSAPI NTSTATUS WINAPI TpAllocIoCompletion(TP_IO **,HANDLE,PTP_IO_CALLBACK,void *,TP_CALLBACK_ENVIRON *);
4628 NTSYSAPI NTSTATUS WINAPI TpAllocPool(TP_POOL **,PVOID);
4629 NTSYSAPI NTSTATUS WINAPI TpAllocTimer(TP_TIMER **,PTP_TIMER_CALLBACK,PVOID,TP_CALLBACK_ENVIRON *);
4630 NTSYSAPI NTSTATUS WINAPI TpAllocWait(TP_WAIT **,PTP_WAIT_CALLBACK,PVOID,TP_CALLBACK_ENVIRON *);
4631 NTSYSAPI NTSTATUS WINAPI TpAllocWork(TP_WORK **,PTP_WORK_CALLBACK,PVOID,TP_CALLBACK_ENVIRON *);
4632 NTSYSAPI void WINAPI TpCallbackLeaveCriticalSectionOnCompletion(TP_CALLBACK_INSTANCE *,RTL_CRITICAL_SECTION *);
4633 NTSYSAPI NTSTATUS WINAPI TpCallbackMayRunLong(TP_CALLBACK_INSTANCE *);
4634 NTSYSAPI void WINAPI TpCallbackReleaseMutexOnCompletion(TP_CALLBACK_INSTANCE *,HANDLE);
4635 NTSYSAPI void WINAPI TpCallbackReleaseSemaphoreOnCompletion(TP_CALLBACK_INSTANCE *,HANDLE,DWORD);
4636 NTSYSAPI void WINAPI TpCallbackSetEventOnCompletion(TP_CALLBACK_INSTANCE *,HANDLE);
4637 NTSYSAPI void WINAPI TpCallbackUnloadDllOnCompletion(TP_CALLBACK_INSTANCE *,HMODULE);
4638 NTSYSAPI void WINAPI TpCancelAsyncIoOperation(TP_IO *);
4639 NTSYSAPI void WINAPI TpDisassociateCallback(TP_CALLBACK_INSTANCE *);
4640 NTSYSAPI BOOL WINAPI TpIsTimerSet(TP_TIMER *);
4641 NTSYSAPI void WINAPI TpPostWork(TP_WORK *);
4642 NTSYSAPI NTSTATUS WINAPI TpQueryPoolStackInformation(TP_POOL *, TP_POOL_STACK_INFORMATION *stack_info);
4643 NTSYSAPI void WINAPI TpReleaseCleanupGroup(TP_CLEANUP_GROUP *);
4644 NTSYSAPI void WINAPI TpReleaseCleanupGroupMembers(TP_CLEANUP_GROUP *,BOOL,PVOID);
4645 NTSYSAPI void WINAPI TpReleaseIoCompletion(TP_IO *);
4646 NTSYSAPI void WINAPI TpReleasePool(TP_POOL *);
4647 NTSYSAPI void WINAPI TpReleaseTimer(TP_TIMER *);
4648 NTSYSAPI void WINAPI TpReleaseWait(TP_WAIT *);
4649 NTSYSAPI void WINAPI TpReleaseWork(TP_WORK *);
4650 NTSYSAPI void WINAPI TpSetPoolMaxThreads(TP_POOL *,DWORD);
4651 NTSYSAPI BOOL WINAPI TpSetPoolMinThreads(TP_POOL *,DWORD);
4652 NTSYSAPI NTSTATUS WINAPI TpSetPoolStackInformation(TP_POOL *, TP_POOL_STACK_INFORMATION *stack_info);
4653 NTSYSAPI void WINAPI TpSetTimer(TP_TIMER *, LARGE_INTEGER *,LONG,LONG);
4654 NTSYSAPI void WINAPI TpSetWait(TP_WAIT *,HANDLE,LARGE_INTEGER *);
4655 NTSYSAPI NTSTATUS WINAPI TpSimpleTryPost(PTP_SIMPLE_CALLBACK,PVOID,TP_CALLBACK_ENVIRON *);
4656 NTSYSAPI void WINAPI TpStartAsyncIoOperation(TP_IO *);
4657 NTSYSAPI void WINAPI TpWaitForIoCompletion(TP_IO *,BOOL);
4658 NTSYSAPI void WINAPI TpWaitForTimer(TP_TIMER *,BOOL);
4659 NTSYSAPI void WINAPI TpWaitForWait(TP_WAIT *,BOOL);
4660 NTSYSAPI void WINAPI TpWaitForWork(TP_WORK *,BOOL);
4662 /* Wine internal functions */
4664 NTSYSAPI NTSTATUS WINAPI wine_nt_to_unix_file_name( const OBJECT_ATTRIBUTES *attr, char *nameA, ULONG *size,
4665 UINT disposition );
4666 NTSYSAPI NTSTATUS WINAPI wine_unix_to_nt_file_name( const char *name, WCHAR *buffer, ULONG *size );
4669 /***********************************************************************
4670 * Inline functions
4673 #define InitializeObjectAttributes(p,n,a,r,s) \
4674 do { \
4675 (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
4676 (p)->RootDirectory = r; \
4677 (p)->Attributes = a; \
4678 (p)->ObjectName = n; \
4679 (p)->SecurityDescriptor = s; \
4680 (p)->SecurityQualityOfService = NULL; \
4681 } while (0)
4683 #define NtCurrentProcess() ((HANDLE)-1)
4685 #define RtlFillMemory(Destination,Length,Fill) memset((Destination),(Fill),(Length))
4686 #define RtlMoveMemory(Destination,Source,Length) memmove((Destination),(Source),(Length))
4687 #define RtlStoreUlong(p,v) do { ULONG _v = (v); memcpy((p), &_v, sizeof(_v)); } while (0)
4688 #define RtlStoreUlonglong(p,v) do { ULONGLONG _v = (v); memcpy((p), &_v, sizeof(_v)); } while (0)
4689 #define RtlRetrieveUlong(p,s) memcpy((p), (s), sizeof(ULONG))
4690 #define RtlRetrieveUlonglong(p,s) memcpy((p), (s), sizeof(ULONGLONG))
4691 #define RtlZeroMemory(Destination,Length) memset((Destination),0,(Length))
4693 static inline BOOLEAN RtlCheckBit(PCRTL_BITMAP lpBits, ULONG ulBit)
4695 if (lpBits && ulBit < lpBits->SizeOfBitMap &&
4696 lpBits->Buffer[ulBit >> 5] & (1 << (ulBit & 31)))
4697 return TRUE;
4698 return FALSE;
4701 /* These are implemented as __fastcall, so we can't let Winelib apps link with them */
4702 static inline USHORT RtlUshortByteSwap(USHORT s)
4704 return (s >> 8) | (s << 8);
4706 static inline ULONG RtlUlongByteSwap(ULONG i)
4708 #if defined(__i386__) && defined(__GNUC__)
4709 ULONG ret;
4710 __asm__("bswap %0" : "=r" (ret) : "0" (i) );
4711 return ret;
4712 #else
4713 return ((ULONG)RtlUshortByteSwap((USHORT)i) << 16) | RtlUshortByteSwap((USHORT)(i >> 16));
4714 #endif
4717 /* list manipulation macros */
4718 #define InitializeListHead(le) (void)((le)->Flink = (le)->Blink = (le))
4719 #define InsertHeadList(le,e) do { PLIST_ENTRY f = (le)->Flink; (e)->Flink = f; (e)->Blink = (le); f->Blink = (e); (le)->Flink = (e); } while (0)
4720 #define InsertTailList(le,e) do { PLIST_ENTRY b = (le)->Blink; (e)->Flink = (le); (e)->Blink = b; b->Flink = (e); (le)->Blink = (e); } while (0)
4721 #define IsListEmpty(le) ((le)->Flink == (le))
4722 #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)
4723 static inline PLIST_ENTRY RemoveHeadList(PLIST_ENTRY le)
4725 PLIST_ENTRY f, b, e;
4727 e = le->Flink;
4728 f = le->Flink->Flink;
4729 b = le->Flink->Blink;
4730 f->Blink = b;
4731 b->Flink = f;
4733 if (e != le) e->Flink = e->Blink = NULL;
4734 return e;
4736 static inline PLIST_ENTRY RemoveTailList(PLIST_ENTRY le)
4738 PLIST_ENTRY f, b, e;
4740 e = le->Blink;
4741 f = le->Blink->Flink;
4742 b = le->Blink->Blink;
4743 f->Blink = b;
4744 b->Flink = f;
4746 if (e != le) e->Flink = e->Blink = NULL;
4747 return e;
4751 #ifdef __WINESRC__
4753 /* Wine internal functions */
4755 extern NTSTATUS WINAPI __wine_unix_spawnvp( char * const argv[], int wait );
4757 /* The thread information for 16-bit threads */
4758 /* NtCurrentTeb()->SubSystemTib points to this */
4759 typedef struct
4761 void *unknown; /* 00 unknown */
4762 UNICODE_STRING *exe_name; /* 04 exe module name */
4764 /* the following fields do not exist under Windows */
4765 UNICODE_STRING exe_str; /* exe name string pointed to by exe_name */
4766 CURDIR curdir; /* current directory */
4767 WCHAR curdir_buffer[MAX_PATH];
4768 } WIN16_SUBSYSTEM_TIB;
4770 /* Undocumented: layout of the locale data in the locale.nls file */
4772 typedef struct
4774 UINT sname; /* 000 LOCALE_SNAME */
4775 UINT sopentypelanguagetag; /* 004 LOCALE_SOPENTYPELANGUAGETAG */
4776 USHORT ilanguage; /* 008 LOCALE_ILANGUAGE */
4777 USHORT unique_lcid; /* 00a unique id if lcid == 0x1000 */
4778 USHORT idigits; /* 00c LOCALE_IDIGITS */
4779 USHORT inegnumber; /* 00e LOCALE_INEGNUMBER */
4780 USHORT icurrdigits; /* 010 LOCALE_ICURRDIGITS*/
4781 USHORT icurrency; /* 012 LOCALE_ICURRENCY */
4782 USHORT inegcurr; /* 014 LOCALE_INEGCURR */
4783 USHORT ilzero; /* 016 LOCALE_ILZERO */
4784 USHORT inotneutral; /* 018 LOCALE_INEUTRAL (inverted) */
4785 USHORT ifirstdayofweek; /* 01a LOCALE_IFIRSTDAYOFWEEK (monday=0) */
4786 USHORT ifirstweekofyear; /* 01c LOCALE_IFIRSTWEEKOFYEAR */
4787 USHORT icountry; /* 01e LOCALE_ICOUNTRY */
4788 USHORT imeasure; /* 020 LOCALE_IMEASURE */
4789 USHORT idigitsubstitution; /* 022 LOCALE_IDIGITSUBSTITUTION */
4790 UINT sgrouping; /* 024 LOCALE_SGROUPING (as binary string) */
4791 UINT smongrouping; /* 028 LOCALE_SMONGROUPING (as binary string) */
4792 UINT slist; /* 02c LOCALE_SLIST */
4793 UINT sdecimal; /* 030 LOCALE_SDECIMAL */
4794 UINT sthousand; /* 034 LOCALE_STHOUSAND */
4795 UINT scurrency; /* 038 LOCALE_SCURRENCY */
4796 UINT smondecimalsep; /* 03c LOCALE_SMONDECIMALSEP */
4797 UINT smonthousandsep; /* 040 LOCALE_SMONTHOUSANDSEP */
4798 UINT spositivesign; /* 044 LOCALE_SPOSITIVESIGN */
4799 UINT snegativesign; /* 048 LOCALE_SNEGATIVESIGN */
4800 UINT s1159; /* 04c LOCALE_S1159 */
4801 UINT s2359; /* 050 LOCALE_S2359 */
4802 UINT snativedigits; /* 054 LOCALE_SNATIVEDIGITS (array of single digits) */
4803 UINT stimeformat; /* 058 LOCALE_STIMEFORMAT (array of formats) */
4804 UINT sshortdate; /* 05c LOCALE_SSHORTDATE (array of formats) */
4805 UINT slongdate; /* 060 LOCALE_SLONGDATE (array of formats) */
4806 UINT syearmonth; /* 064 LOCALE_SYEARMONTH (array of formats) */
4807 UINT sduration; /* 068 LOCALE_SDURATION (array of formats) */
4808 USHORT idefaultlanguage; /* 06c LOCALE_IDEFAULTLANGUAGE */
4809 USHORT idefaultansicodepage; /* 06e LOCALE_IDEFAULTANSICODEPAGE */
4810 USHORT idefaultcodepage; /* 070 LOCALE_IDEFAULTCODEPAGE */
4811 USHORT idefaultmaccodepage; /* 072 LOCALE_IDEFAULTMACCODEPAGE */
4812 USHORT idefaultebcdiccodepage; /* 074 LOCALE_IDEFAULTEBCDICCODEPAGE */
4813 USHORT old_geoid; /* 076 LOCALE_IGEOID (older version?) */
4814 USHORT ipapersize; /* 078 LOCALE_IPAPERSIZE */
4815 BYTE islamic_cal[2]; /* 07a calendar id for islamic calendars (?) */
4816 UINT scalendartype; /* 07c string, first char is LOCALE_ICALENDARTYPE, next chars are LOCALE_IOPTIONALCALENDAR */
4817 UINT sabbrevlangname; /* 080 LOCALE_SABBREVLANGNAME */
4818 UINT siso639langname; /* 084 LOCALE_SISO639LANGNAME */
4819 UINT senglanguage; /* 088 LOCALE_SENGLANGUAGE */
4820 UINT snativelangname; /* 08c LOCALE_SNATIVELANGNAME */
4821 UINT sengcountry; /* 090 LOCALE_SENGCOUNTRY */
4822 UINT snativectryname; /* 094 LOCALE_SNATIVECTRYNAME */
4823 UINT sabbrevctryname; /* 098 LOCALE_SABBREVCTRYNAME */
4824 UINT siso3166ctryname; /* 09c LOCALE_SISO3166CTRYNAME */
4825 UINT sintlsymbol; /* 0a0 LOCALE_SINTLSYMBOL */
4826 UINT sengcurrname; /* 0a4 LOCALE_SENGCURRNAME */
4827 UINT snativecurrname; /* 0a8 LOCALE_SNATIVECURRNAME */
4828 UINT fontsignature; /* 0ac LOCALE_FONTSIGNATURE (binary string) */
4829 UINT siso639langname2; /* 0b0 LOCALE_SISO639LANGNAME2 */
4830 UINT siso3166ctryname2; /* 0b4 LOCALE_SISO3166CTRYNAME2 */
4831 UINT sparent; /* 0b8 LOCALE_SPARENT */
4832 UINT sdayname; /* 0bc LOCALE_SDAYNAME1 (array of days 1..7) */
4833 UINT sabbrevdayname; /* 0c0 LOCALE_SABBREVDAYNAME1 (array of days 1..7) */
4834 UINT smonthname; /* 0c4 LOCALE_SMONTHNAME1 (array of months 1..13) */
4835 UINT sabbrevmonthname; /* 0c8 LOCALE_SABBREVMONTHNAME1 (array of months 1..13) */
4836 UINT sgenitivemonth; /* 0cc equivalent of LOCALE_SMONTHNAME1 for genitive months */
4837 UINT sabbrevgenitivemonth; /* 0d0 equivalent of LOCALE_SABBREVMONTHNAME1 for genitive months */
4838 UINT calnames; /* 0d4 array of calendar names */
4839 UINT customsorts; /* 0d8 array of custom sort names */
4840 USHORT inegativepercent; /* 0dc LOCALE_INEGATIVEPERCENT */
4841 USHORT ipositivepercent; /* 0de LOCALE_IPOSITIVEPERCENT */
4842 USHORT unknown1; /* 0e0 */
4843 USHORT ireadinglayout; /* 0e2 LOCALE_IREADINGLAYOUT */
4844 USHORT unknown2[2]; /* 0e4 */
4845 UINT unused1; /* 0e8 unused? */
4846 UINT sengdisplayname; /* 0ec LOCALE_SENGLISHDISPLAYNAME */
4847 UINT snativedisplayname; /* 0f0 LOCALE_SNATIVEDISPLAYNAME */
4848 UINT spercent; /* 0f4 LOCALE_SPERCENT */
4849 UINT snan; /* 0f8 LOCALE_SNAN */
4850 UINT sposinfinity; /* 0fc LOCALE_SPOSINFINITY */
4851 UINT sneginfinity; /* 100 LOCALE_SNEGINFINITY */
4852 UINT unused2; /* 104 unused? */
4853 UINT serastring; /* 108 CAL_SERASTRING */
4854 UINT sabbreverastring; /* 10c CAL_SABBREVERASTRING */
4855 UINT unused3; /* 110 unused? */
4856 UINT sconsolefallbackname; /* 114 LOCALE_SCONSOLEFALLBACKNAME */
4857 UINT sshorttime; /* 118 LOCALE_SSHORTTIME (array of formats) */
4858 UINT sshortestdayname; /* 11c LOCALE_SSHORTESTDAYNAME1 (array of days 1..7) */
4859 UINT unused4; /* 120 unused? */
4860 UINT ssortlocale; /* 124 LOCALE_SSORTLOCALE */
4861 UINT skeyboardstoinstall; /* 128 LOCALE_SKEYBOARDSTOINSTALL */
4862 UINT sscripts; /* 12c LOCALE_SSCRIPTS */
4863 UINT srelativelongdate; /* 130 LOCALE_SRELATIVELONGDATE */
4864 UINT igeoid; /* 134 LOCALE_IGEOID */
4865 UINT sshortestam; /* 138 LOCALE_SSHORTESTAM */
4866 UINT sshortestpm; /* 13c LOCALE_SSHORTESTPM */
4867 UINT smonthday; /* 140 LOCALE_SMONTHDAY (array of formats) */
4868 UINT keyboard_layout; /* 144 keyboard layouts */
4869 } NLS_LOCALE_DATA;
4871 typedef struct
4873 UINT id; /* 00 lcid */
4874 USHORT idx; /* 04 index in locales array */
4875 USHORT name; /* 06 locale name */
4876 } NLS_LOCALE_LCID_INDEX;
4878 typedef struct
4880 USHORT name; /* 00 locale name */
4881 USHORT idx; /* 02 index in locales array */
4882 UINT id; /* 04 lcid */
4883 } NLS_LOCALE_LCNAME_INDEX;
4885 typedef struct
4887 UINT offset; /* 00 offset to version, always 8? */
4888 UINT unknown1; /* 04 */
4889 UINT version; /* 08 file format version */
4890 UINT magic; /* 0c magic 'NSDS' */
4891 UINT unknown2[3]; /* 10 */
4892 USHORT header_size; /* 1c size of this header (?) */
4893 USHORT nb_lcids; /* 1e number of lcids in index */
4894 USHORT nb_locales; /* 20 number of locales in array */
4895 USHORT locale_size; /* 22 size of NLS_LOCALE_DATA structure */
4896 UINT locales_offset; /* 24 offset of locales array */
4897 USHORT nb_lcnames; /* 28 number of lcnames in index */
4898 USHORT pad; /* 2a */
4899 UINT lcids_offset; /* 2c offset of lcids index */
4900 UINT lcnames_offset; /* 30 offset of lcnames index */
4901 UINT unknown3; /* 34 */
4902 USHORT nb_calendars; /* 38 number of calendars in array */
4903 USHORT calendar_size; /* 3a size of calendar structure */
4904 UINT calendars_offset; /* 3c offset of calendars array */
4905 UINT strings_offset; /* 40 offset of strings data */
4906 USHORT unknown4[4]; /* 44 */
4907 } NLS_LOCALE_HEADER;
4909 #endif /* __WINESRC__ */
4911 #ifdef __cplusplus
4912 } /* extern "C" */
4913 #endif /* defined(__cplusplus) */
4915 #endif /* __WINE_WINTERNL_H */