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