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