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