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