regedit: Remove custom filter from open/save dialogs.
[wine/multimedia.git] / include / winternl.h
blob193e02a9272d5b4c026905033a73ad24248c3127
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 <windef.h>
26 #ifdef __cplusplus
27 extern "C" {
28 #endif /* defined(__cplusplus) */
31 /**********************************************************************
32 * Fundamental types and data structures
35 #ifndef WINE_NTSTATUS_DECLARED
36 #define WINE_NTSTATUS_DECLARED
37 typedef LONG NTSTATUS;
38 #endif
40 typedef CONST char *PCSZ;
42 typedef short CSHORT;
43 typedef CSHORT *PCSHORT;
45 typedef struct _STRING {
46 USHORT Length;
47 USHORT MaximumLength;
48 PCHAR Buffer;
49 } STRING, *PSTRING;
51 typedef STRING ANSI_STRING;
52 typedef PSTRING PANSI_STRING;
53 typedef const STRING *PCANSI_STRING;
55 typedef STRING OEM_STRING;
56 typedef PSTRING POEM_STRING;
57 typedef const STRING *PCOEM_STRING;
59 typedef struct _UNICODE_STRING {
60 USHORT Length; /* bytes */
61 USHORT MaximumLength; /* bytes */
62 PWSTR Buffer;
63 } UNICODE_STRING, *PUNICODE_STRING;
65 typedef const UNICODE_STRING *PCUNICODE_STRING;
67 #ifndef _FILETIME_
68 #define _FILETIME_
69 /* 64 bit number of 100 nanoseconds intervals since January 1, 1601 */
70 typedef struct _FILETIME
72 #ifdef WORDS_BIGENDIAN
73 DWORD dwHighDateTime;
74 DWORD dwLowDateTime;
75 #else
76 DWORD dwLowDateTime;
77 DWORD dwHighDateTime;
78 #endif
79 } FILETIME, *PFILETIME, *LPFILETIME;
80 #endif /* _FILETIME_ */
83 * RTL_SYSTEM_TIME and RTL_TIME_ZONE_INFORMATION are the same as
84 * the SYSTEMTIME and TIME_ZONE_INFORMATION structures defined
85 * in winbase.h, however we need to define them seperately so
86 * winternl.h doesn't depend on winbase.h. They are used by
87 * RtlQueryTimeZoneInformation and RtlSetTimeZoneInformation.
88 * The names are guessed; if anybody knows the real names, let me know.
90 typedef struct _RTL_SYSTEM_TIME {
91 WORD wYear;
92 WORD wMonth;
93 WORD wDayOfWeek;
94 WORD wDay;
95 WORD wHour;
96 WORD wMinute;
97 WORD wSecond;
98 WORD wMilliseconds;
99 } RTL_SYSTEM_TIME, *PRTL_SYSTEM_TIME;
101 typedef struct _RTL_TIME_ZONE_INFORMATION {
102 LONG Bias;
103 WCHAR StandardName[32];
104 RTL_SYSTEM_TIME StandardDate;
105 LONG StandardBias;
106 WCHAR DaylightName[32];
107 RTL_SYSTEM_TIME DaylightDate;
108 LONG DaylightBias;
109 } RTL_TIME_ZONE_INFORMATION, *PRTL_TIME_ZONE_INFORMATION;
111 typedef struct _CLIENT_ID
113 HANDLE UniqueProcess;
114 HANDLE UniqueThread;
115 } CLIENT_ID, *PCLIENT_ID;
117 typedef struct _CURDIR
119 UNICODE_STRING DosPath;
120 PVOID Handle;
121 } CURDIR, *PCURDIR;
123 typedef struct RTL_DRIVE_LETTER_CURDIR
125 USHORT Flags;
126 USHORT Length;
127 ULONG TimeStamp;
128 UNICODE_STRING DosPath;
129 } RTL_DRIVE_LETTER_CURDIR, *PRTL_DRIVE_LETTER_CURDIR;
131 typedef struct tagRTL_BITMAP {
132 ULONG SizeOfBitMap; /* Number of bits in the bitmap */
133 PULONG Buffer; /* Bitmap data, assumed sized to a DWORD boundary */
134 } RTL_BITMAP, *PRTL_BITMAP;
136 typedef const RTL_BITMAP *PCRTL_BITMAP;
138 typedef struct tagRTL_BITMAP_RUN {
139 ULONG StartingIndex; /* Bit position at which run starts */
140 ULONG NumberOfBits; /* Size of the run in bits */
141 } RTL_BITMAP_RUN, *PRTL_BITMAP_RUN;
143 typedef const RTL_BITMAP_RUN *PCRTL_BITMAP_RUN;
145 typedef struct _RTL_USER_PROCESS_PARAMETERS
147 ULONG AllocationSize;
148 ULONG Size;
149 ULONG Flags;
150 ULONG DebugFlags;
151 HANDLE ConsoleHandle;
152 ULONG ConsoleFlags;
153 HANDLE hStdInput;
154 HANDLE hStdOutput;
155 HANDLE hStdError;
156 CURDIR CurrentDirectory;
157 UNICODE_STRING DllPath;
158 UNICODE_STRING ImagePathName;
159 UNICODE_STRING CommandLine;
160 PWSTR Environment;
161 ULONG dwX;
162 ULONG dwY;
163 ULONG dwXSize;
164 ULONG dwYSize;
165 ULONG dwXCountChars;
166 ULONG dwYCountChars;
167 ULONG dwFillAttribute;
168 ULONG dwFlags;
169 ULONG wShowWindow;
170 UNICODE_STRING WindowTitle;
171 UNICODE_STRING Desktop;
172 UNICODE_STRING ShellInfo;
173 UNICODE_STRING RuntimeInfo;
174 RTL_DRIVE_LETTER_CURDIR DLCurrentDirectory[0x20];
175 } RTL_USER_PROCESS_PARAMETERS, *PRTL_USER_PROCESS_PARAMETERS;
177 /* value for Flags field (FIXME: not the correct name) */
178 #define PROCESS_PARAMS_FLAG_NORMALIZED 1
180 typedef struct _PEB_LDR_DATA
182 ULONG Length;
183 BOOLEAN Initialized;
184 PVOID SsHandle;
185 LIST_ENTRY InLoadOrderModuleList;
186 LIST_ENTRY InMemoryOrderModuleList;
187 LIST_ENTRY InInitializationOrderModuleList;
188 } PEB_LDR_DATA, *PPEB_LDR_DATA;
190 typedef struct _GDI_TEB_BATCH
192 ULONG Offset;
193 HANDLE HDC;
194 ULONG Buffer[0x136];
195 } GDI_TEB_BATCH;
197 /***********************************************************************
198 * PEB data structure
200 typedef struct _PEB
202 BOOLEAN InheritedAddressSpace; /* 00 */
203 BOOLEAN ReadImageFileExecOptions; /* 01 */
204 BOOLEAN BeingDebugged; /* 02 */
205 BOOLEAN SpareBool; /* 03 */
206 HANDLE Mutant; /* 04 */
207 HMODULE ImageBaseAddress; /* 08 */
208 PPEB_LDR_DATA LdrData; /* 0c */
209 RTL_USER_PROCESS_PARAMETERS *ProcessParameters; /* 10 */
210 PVOID SubSystemData; /* 14 */
211 HANDLE ProcessHeap; /* 18 */
212 PRTL_CRITICAL_SECTION FastPebLock; /* 1c */
213 PVOID /*PPEBLOCKROUTINE*/ FastPebLockRoutine; /* 20 */
214 PVOID /*PPEBLOCKROUTINE*/ FastPebUnlockRoutine; /* 24 */
215 ULONG EnvironmentUpdateCount; /* 28 */
216 PVOID KernelCallbackTable; /* 2c */
217 PVOID EventLogSection; /* 30 */
218 PVOID EventLog; /* 34 */
219 PVOID /*PPEB_FREE_BLOCK*/ FreeList; /* 38 */
220 ULONG TlsExpansionCounter; /* 3c */
221 PRTL_BITMAP TlsBitmap; /* 40 */
222 ULONG TlsBitmapBits[2]; /* 44 */
223 PVOID ReadOnlySharedMemoryBase; /* 4c */
224 PVOID ReadOnlySharedMemoryHeap; /* 50 */
225 PVOID *ReadOnlyStaticServerData; /* 54 */
226 PVOID AnsiCodePageData; /* 58 */
227 PVOID OemCodePageData; /* 5c */
228 PVOID UnicodeCaseTableData; /* 60 */
229 ULONG NumberOfProcessors; /* 64 */
230 ULONG NtGlobalFlag; /* 68 */
231 BYTE Spare2[4]; /* 6c */
232 LARGE_INTEGER CriticalSectionTimeout; /* 70 */
233 ULONG HeapSegmentReserve; /* 78 */
234 ULONG HeapSegmentCommit; /* 7c */
235 ULONG HeapDeCommitTotalFreeThreshold; /* 80 */
236 ULONG HeapDeCommitFreeBlockThreshold; /* 84 */
237 ULONG NumberOfHeaps; /* 88 */
238 ULONG MaximumNumberOfHeaps; /* 8c */
239 PVOID *ProcessHeaps; /* 90 */
240 PVOID GdiSharedHandleTable; /* 94 */
241 PVOID ProcessStarterHelper; /* 98 */
242 PVOID GdiDCAttributeList; /* 9c */
243 PVOID LoaderLock; /* a0 */
244 ULONG OSMajorVersion; /* a4 */
245 ULONG OSMinorVersion; /* a8 */
246 ULONG OSBuildNumber; /* ac */
247 ULONG OSPlatformId; /* b0 */
248 ULONG ImageSubSystem; /* b4 */
249 ULONG ImageSubSystemMajorVersion; /* b8 */
250 ULONG ImageSubSystemMinorVersion; /* bc */
251 ULONG ImageProcessAffinityMask; /* c0 */
252 ULONG GdiHandleBuffer[34]; /* c4 */
253 ULONG PostProcessInitRoutine; /* 14c */
254 PRTL_BITMAP TlsExpansionBitmap; /* 150 */
255 ULONG TlsExpansionBitmapBits[32]; /* 154 */
256 ULONG SessionId; /* 1d4 */
257 } PEB, *PPEB;
260 /***********************************************************************
261 * TEB data structure
263 #ifndef WINE_NO_TEB /* don't define TEB if included from thread.h */
264 # ifndef WINE_TEB_DEFINED
265 # define WINE_TEB_DEFINED
266 typedef struct _TEB
268 NT_TIB Tib; /* 000 */
269 PVOID EnvironmentPointer; /* 01c */
270 CLIENT_ID ClientId; /* 020 */
271 PVOID ActiveRpcHandle; /* 028 */
272 PVOID ThreadLocalStoragePointer; /* 02c */
273 PPEB Peb; /* 030 */
274 ULONG LastErrorValue; /* 034 */
275 ULONG CountOfOwnedCriticalSections;/* 038 */
276 PVOID CsrClientThread; /* 03c */
277 PVOID Win32ThreadInfo; /* 040 */
278 ULONG Win32ClientInfo[31]; /* 044 used for user32 private data in Wine */
279 PVOID WOW32Reserved; /* 0c0 */
280 ULONG CurrentLocale; /* 0c4 */
281 ULONG FpSoftwareStatusRegister; /* 0c8 */
282 PVOID SystemReserved1[54]; /* 0cc used for kernel32 private data in Wine */
283 PVOID Spare1; /* 1a4 */
284 LONG ExceptionCode; /* 1a8 */
285 BYTE SpareBytes1[40]; /* 1ac used for ntdll private data in Wine */
286 PVOID SystemReserved2[10]; /* 1d4 used for ntdll private data in Wine */
287 GDI_TEB_BATCH GdiTebBatch; /* 1fc */
288 ULONG gdiRgn; /* 6dc */
289 ULONG gdiPen; /* 6e0 */
290 ULONG gdiBrush; /* 6e4 */
291 CLIENT_ID RealClientId; /* 6e8 */
292 HANDLE GdiCachedProcessHandle; /* 6f0 */
293 ULONG GdiClientPID; /* 6f4 */
294 ULONG GdiClientTID; /* 6f8 */
295 PVOID GdiThreadLocaleInfo; /* 6fc */
296 PVOID UserReserved[5]; /* 700 */
297 PVOID glDispachTable[280]; /* 714 */
298 ULONG glReserved1[26]; /* b74 */
299 PVOID glReserved2; /* bdc */
300 PVOID glSectionInfo; /* be0 */
301 PVOID glSection; /* be4 */
302 PVOID glTable; /* be8 */
303 PVOID glCurrentRC; /* bec */
304 PVOID glContext; /* bf0 */
305 ULONG LastStatusValue; /* bf4 */
306 UNICODE_STRING StaticUnicodeString; /* bf8 used by advapi32 */
307 WCHAR StaticUnicodeBuffer[261]; /* c00 used by advapi32 */
308 PVOID DeallocationStack; /* e0c */
309 PVOID TlsSlots[64]; /* e10 */
310 LIST_ENTRY TlsLinks; /* f10 */
311 PVOID Vdm; /* f18 */
312 PVOID ReservedForNtRpc; /* f1c */
313 PVOID DbgSsReserved[2]; /* f20 */
314 ULONG HardErrorDisabled; /* f28 */
315 PVOID Instrumentation[16]; /* f2c */
316 PVOID WinSockData; /* f6c */
317 ULONG GdiBatchCount; /* f70 */
318 ULONG Spare2; /* f74 */
319 ULONG Spare3; /* f78 */
320 ULONG Spare4; /* f7c */
321 PVOID ReservedForOle; /* f80 */
322 ULONG WaitingOnLoaderLock; /* f84 */
323 PVOID Reserved5[3]; /* f88 */
324 PVOID *TlsExpansionSlots; /* f94 */
325 } TEB, *PTEB;
326 # endif /* WINE_TEB_DEFINED */
327 #endif /* WINE_NO_TEB */
329 /***********************************************************************
330 * Enums
333 typedef enum _FILE_INFORMATION_CLASS {
334 FileDirectoryInformation = 1,
335 FileFullDirectoryInformation,
336 FileBothDirectoryInformation,
337 FileBasicInformation,
338 FileStandardInformation,
339 FileInternalInformation,
340 FileEaInformation,
341 FileAccessInformation,
342 FileNameInformation,
343 FileRenameInformation,
344 FileLinkInformation,
345 FileNamesInformation,
346 FileDispositionInformation,
347 FilePositionInformation,
348 FileFullEaInformation,
349 FileModeInformation,
350 FileAlignmentInformation,
351 FileAllInformation,
352 FileAllocationInformation,
353 FileEndOfFileInformation,
354 FileAlternateNameInformation,
355 FileStreamInformation,
356 FilePipeInformation,
357 FilePipeLocalInformation,
358 FilePipeRemoteInformation,
359 FileMailslotQueryInformation,
360 FileMailslotSetInformation,
361 FileCompressionInformation,
362 FileObjectIdInformation,
363 FileCompletionInformation,
364 FileMoveClusterInformation,
365 FileQuotaInformation,
366 FileReparsePointInformation,
367 FileNetworkOpenInformation,
368 FileAttributeTagInformation,
369 FileTrackingInformation,
370 FileMaximumInformation
371 } FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS;
373 typedef struct _FILE_DIRECTORY_INFORMATION {
374 ULONG NextEntryOffset;
375 ULONG FileIndex;
376 LARGE_INTEGER CreationTime;
377 LARGE_INTEGER LastAccessTime;
378 LARGE_INTEGER LastWriteTime;
379 LARGE_INTEGER ChangeTime;
380 LARGE_INTEGER EndOfFile;
381 LARGE_INTEGER AllocationSize;
382 ULONG FileAttributes;
383 ULONG FileNameLength;
384 WCHAR FileName[ANYSIZE_ARRAY];
385 } FILE_DIRECTORY_INFORMATION, *PFILE_DIRECTORY_INFORMATION;
387 typedef struct _FILE_FULL_DIRECTORY_INFORMATION {
388 ULONG NextEntryOffset;
389 ULONG FileIndex;
390 LARGE_INTEGER CreationTime;
391 LARGE_INTEGER LastAccessTime;
392 LARGE_INTEGER LastWriteTime;
393 LARGE_INTEGER ChangeTime;
394 LARGE_INTEGER EndOfFile;
395 LARGE_INTEGER AllocationSize;
396 ULONG FileAttributes;
397 ULONG FileNameLength;
398 ULONG EaSize;
399 WCHAR FileName[ANYSIZE_ARRAY];
400 } FILE_FULL_DIRECTORY_INFORMATION, *PFILE_FULL_DIRECTORY_INFORMATION,
401 FILE_FULL_DIR_INFORMATION, *PFILE_FULL_DIR_INFORMATION;
403 typedef struct _FILE_BOTH_DIRECTORY_INFORMATION {
404 ULONG NextEntryOffset;
405 ULONG FileIndex;
406 LARGE_INTEGER CreationTime;
407 LARGE_INTEGER LastAccessTime;
408 LARGE_INTEGER LastWriteTime;
409 LARGE_INTEGER ChangeTime;
410 LARGE_INTEGER EndOfFile;
411 LARGE_INTEGER AllocationSize;
412 ULONG FileAttributes;
413 ULONG FileNameLength;
414 ULONG EaSize;
415 CHAR ShortNameLength;
416 WCHAR ShortName[12];
417 WCHAR FileName[ANYSIZE_ARRAY];
418 } FILE_BOTH_DIRECTORY_INFORMATION, *PFILE_BOTH_DIRECTORY_INFORMATION,
419 FILE_BOTH_DIR_INFORMATION, *PFILE_BOTH_DIR_INFORMATION;
421 typedef struct _FILE_BASIC_INFORMATION {
422 LARGE_INTEGER CreationTime;
423 LARGE_INTEGER LastAccessTime;
424 LARGE_INTEGER LastWriteTime;
425 LARGE_INTEGER ChangeTime;
426 ULONG FileAttributes;
427 } FILE_BASIC_INFORMATION, *PFILE_BASIC_INFORMATION;
429 typedef struct _FILE_STANDARD_INFORMATION {
430 LARGE_INTEGER AllocationSize;
431 LARGE_INTEGER EndOfFile;
432 ULONG NumberOfLinks;
433 BOOLEAN DeletePending;
434 BOOLEAN Directory;
435 } FILE_STANDARD_INFORMATION, *PFILE_STANDARD_INFORMATION;
437 typedef struct _FILE_INTERNAL_INFORMATION {
438 LARGE_INTEGER IndexNumber;
439 } FILE_INTERNAL_INFORMATION, *PFILE_INTERNAL_INFORMATION;
441 typedef struct _FILE_EA_INFORMATION {
442 ULONG EaSize;
443 } FILE_EA_INFORMATION, *PFILE_EA_INFORMATION;
445 typedef struct _FILE_ACCESS_INFORMATION {
446 ACCESS_MASK AccessFlags;
447 } FILE_ACCESS_INFORMATION, *PFILE_ACCESS_INFORMATION;
449 typedef struct _FILE_NAME_INFORMATION {
450 ULONG FileNameLength;
451 WCHAR FileName[1];
452 } FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION;
454 typedef struct _FILE_RENAME_INFORMATION {
455 BOOLEAN Replace;
456 HANDLE RootDir;
457 ULONG FileNameLength;
458 WCHAR FileName[1];
459 } FILE_RENAME_INFORMATION, *PFILE_RENAME_INFORMATION;
461 typedef struct _FILE_NAMES_INFORMATION {
462 ULONG NextEntryOffset;
463 ULONG FileIndex;
464 ULONG FileNameLength;
465 WCHAR FileName[1];
466 } FILE_NAMES_INFORMATION, *PFILE_NAMES_INFORMATION;
468 typedef struct _FILE_DISPOSITION_INFORMATION {
469 BOOLEAN DoDeleteFile;
470 } FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION;
472 typedef struct _FILE_POSITION_INFORMATION {
473 LARGE_INTEGER CurrentByteOffset;
474 } FILE_POSITION_INFORMATION, *PFILE_POSITION_INFORMATION;
476 typedef struct _FILE_ALIGNMENT_INFORMATION {
477 ULONG AlignmentRequirement;
478 } FILE_ALIGNMENT_INFORMATION, *PFILE_ALIGNMENT_INFORMATION;
480 typedef struct _FILE_ALLOCATION_INFORMATION {
481 LARGE_INTEGER AllocationSize;
482 } FILE_ALLOCATION_INFORMATION, *PFILE_ALLOCATION_INFORMATION;
484 typedef struct _FILE_END_OF_FILE_INFORMATION {
485 LARGE_INTEGER EndOfFile;
486 } FILE_END_OF_FILE_INFORMATION, *PFILE_END_OF_FILE_INFORMATION;
488 typedef struct _FILE_NETWORK_OPEN_INFORMATION {
489 LARGE_INTEGER CreationTime;
490 LARGE_INTEGER LastAccessTime;
491 LARGE_INTEGER LastWriteTime;
492 LARGE_INTEGER ChangeTime;
493 LARGE_INTEGER AllocationSize;
494 LARGE_INTEGER EndOfFile;
495 ULONG FileAttributes;
496 } FILE_NETWORK_OPEN_INFORMATION, *PFILE_NETWORK_OPEN_INFORMATION;
498 typedef struct _FILE_FULL_EA_INFORMATION {
499 ULONG NextEntryOffset;
500 UCHAR Flags;
501 UCHAR EaNameLength;
502 USHORT EaValueLength;
503 CHAR EaName[1];
504 } FILE_FULL_EA_INFORMATION, *PFILE_FULL_EA_INFORMATION;
506 typedef struct _FILE_MODE_INFORMATION {
507 ULONG Mode;
508 } FILE_MODE_INFORMATION, *PFILE_MODE_INFORMATION;
510 typedef struct _FILE_STREAM_INFORMATION
512 ULONG NextEntryOffset;
513 ULONG StreamNameLength;
514 LARGE_INTEGER StreamSize;
515 LARGE_INTEGER StreamAllocationSize;
516 WCHAR StreamName[1];
517 } FILE_STREAM_INFORMATION, *PFILE_STREAM_INFORMATION;
519 typedef struct _FILE_ATTRIBUTE_TAG_INFORMATION
521 ULONG FileAttributes;
522 ULONG ReparseTag;
523 } FILE_ATTRIBUTE_TAG_INFORMATION, *PFILE_ATTRIBUTE_TAG_INFORMATION;
525 typedef struct _FILE_MAILSLOT_QUERY_INFORMATION {
526 ULONG MaximumMessageSize;
527 ULONG MailslotQuota;
528 ULONG NextMessageSize;
529 ULONG MessagesAvailable;
530 LARGE_INTEGER ReadTimeout;
531 } FILE_MAILSLOT_QUERY_INFORMATION, *PFILE_MAILSLOT_QUERY_INFORMATION;
533 typedef struct _FILE_MAILSLOT_SET_INFORMATION {
534 LARGE_INTEGER ReadTimeout;
535 } FILE_MAILSLOT_SET_INFORMATION, *PFILE_MAILSLOT_SET_INFORMATION;
537 typedef struct _FILE_PIPE_LOCAL_INFORMATION {
538 ULONG NamedPipeType;
539 ULONG NamedPipeConfiguration;
540 ULONG MaximumInstances;
541 ULONG CurrentInstances;
542 ULONG InboundQuota;
543 ULONG ReadDataAvailable;
544 ULONG OutboundQuota;
545 ULONG WriteQuotaAvailable;
546 ULONG NamedPipeState;
547 ULONG NamedPipeEnd;
548 } FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION;
550 typedef struct _FILE_ALL_INFORMATION {
551 FILE_BASIC_INFORMATION BasicInformation;
552 FILE_STANDARD_INFORMATION StandardInformation;
553 FILE_INTERNAL_INFORMATION InternalInformation;
554 FILE_EA_INFORMATION EaInformation;
555 FILE_ACCESS_INFORMATION AccessInformation;
556 FILE_POSITION_INFORMATION PositionInformation;
557 FILE_MODE_INFORMATION ModeInformation;
558 FILE_ALIGNMENT_INFORMATION AlignmentInformation;
559 FILE_NAME_INFORMATION NameInformation;
560 } FILE_ALL_INFORMATION, *PFILE_ALL_INFORMATION;
562 typedef enum _FSINFOCLASS {
563 FileFsVolumeInformation = 1,
564 FileFsLabelInformation,
565 FileFsSizeInformation,
566 FileFsDeviceInformation,
567 FileFsAttributeInformation,
568 FileFsControlInformation,
569 FileFsFullSizeInformation,
570 FileFsObjectIdInformation,
571 FileFsMaximumInformation
572 } FS_INFORMATION_CLASS, *PFS_INFORMATION_CLASS;
574 typedef enum _KEY_INFORMATION_CLASS {
575 KeyBasicInformation,
576 KeyNodeInformation,
577 KeyFullInformation
578 } KEY_INFORMATION_CLASS;
580 typedef enum _KEY_VALUE_INFORMATION_CLASS {
581 KeyValueBasicInformation,
582 KeyValueFullInformation,
583 KeyValuePartialInformation,
584 KeyValueFullInformationAlign64,
585 KeyValuePartialInformationAlign64
586 } KEY_VALUE_INFORMATION_CLASS;
588 typedef enum _OBJECT_INFORMATION_CLASS {
589 ObjectBasicInformation,
590 ObjectNameInformation,
591 ObjectTypeInformation,
592 ObjectAllInformation,
593 ObjectDataInformation
594 } OBJECT_INFORMATION_CLASS, *POBJECT_INFORMATION_CLASS;
596 typedef enum _PROCESSINFOCLASS {
597 ProcessBasicInformation = 0,
598 ProcessQuotaLimits = 1,
599 ProcessIoCounters = 2,
600 ProcessVmCounters = 3,
601 ProcessTimes = 4,
602 ProcessBasePriority = 5,
603 ProcessRaisePriority = 6,
604 ProcessDebugPort = 7,
605 ProcessExceptionPort = 8,
606 ProcessAccessToken = 9,
607 ProcessLdtInformation = 10,
608 ProcessLdtSize = 11,
609 ProcessDefaultHardErrorMode = 12,
610 ProcessIoPortHandlers = 13,
611 ProcessPooledUsageAndLimits = 14,
612 ProcessWorkingSetWatch = 15,
613 ProcessUserModeIOPL = 16,
614 ProcessEnableAlignmentFaultFixup = 17,
615 ProcessPriorityClass = 18,
616 ProcessWx86Information = 19,
617 ProcessHandleCount = 20,
618 ProcessAffinityMask = 21,
619 ProcessPriorityBoost = 22,
620 ProcessDeviceMap = 23,
621 ProcessSessionInformation = 24,
622 ProcessForegroundInformation = 25,
623 ProcessWow64Information = 26,
624 ProcessImageFileName = 27,
625 ProcessLUIDDeviceMapsEnabled = 28,
626 ProcessBreakOnTermination = 29,
627 ProcessDebugObjectHandle = 30,
628 ProcessDebugFlags = 31,
629 ProcessHandleTracing = 32,
630 MaxProcessInfoClass
631 } PROCESSINFOCLASS, PROCESS_INFORMATION_CLASS;
633 typedef enum _SECTION_INHERIT {
634 ViewShare = 1,
635 ViewUnmap = 2
636 } SECTION_INHERIT;
638 typedef enum _SYSTEM_INFORMATION_CLASS {
639 SystemBasicInformation = 0,
640 SystemCpuInformation = 1,
641 SystemPerformanceInformation = 2,
642 SystemTimeOfDayInformation = 3, /* was SystemTimeInformation */
643 Unknown4,
644 SystemProcessInformation = 5,
645 Unknown6,
646 Unknown7,
647 SystemProcessorPerformanceInformation = 8,
648 Unknown9,
649 Unknown10,
650 SystemModuleInformation = 11,
651 Unknown12,
652 Unknown13,
653 Unknown14,
654 Unknown15,
655 SystemHandleInformation = 16,
656 Unknown17,
657 SystemPageFileInformation = 18,
658 Unknown19,
659 Unknown20,
660 SystemCacheInformation = 21,
661 Unknown22,
662 SystemInterruptInformation = 23,
663 SystemDpcBehaviourInformation = 24,
664 SystemFullMemoryInformation = 25,
665 SystemNotImplemented6 = 25,
666 SystemLoadImage = 26,
667 SystemUnloadImage = 27,
668 SystemTimeAdjustmentInformation = 28,
669 SystemTimeAdjustment = 28,
670 SystemSummaryMemoryInformation = 29,
671 SystemNotImplemented7 = 29,
672 SystemNextEventIdInformation = 30,
673 SystemNotImplemented8 = 30,
674 SystemEventIdsInformation = 31,
675 SystemCrashDumpInformation = 32,
676 SystemExceptionInformation = 33,
677 SystemCrashDumpStateInformation = 34,
678 SystemKernelDebuggerInformation = 35,
679 SystemContextSwitchInformation = 36,
680 SystemRegistryQuotaInformation = 37,
681 SystemCurrentTimeZoneInformation = 44,
682 SystemTimeZoneInformation = 44,
683 SystemLookasideInformation = 45,
684 SystemSetTimeSlipEvent = 46,
685 SystemCreateSession = 47,
686 SystemDeleteSession = 48,
687 SystemInvalidInfoClass4 = 49,
688 SystemRangeStartInformation = 50,
689 SystemVerifierInformation = 51,
690 SystemAddVerifier = 52,
691 SystemSessionProcessesInformation = 53,
692 SystemInformationClassMax
693 } SYSTEM_INFORMATION_CLASS, *PSYSTEM_INFORMATION_CLASS;
695 typedef enum _TIMER_TYPE {
696 NotificationTimer,
697 SynchronizationTimer
698 } TIMER_TYPE;
700 typedef enum _THREADINFOCLASS {
701 ThreadBasicInformation,
702 ThreadTimes,
703 ThreadPriority,
704 ThreadBasePriority,
705 ThreadAffinityMask,
706 ThreadImpersonationToken,
707 ThreadDescriptorTableEntry,
708 ThreadEnableAlignmentFaultFixup,
709 ThreadEventPair_Reusable,
710 ThreadQuerySetWin32StartAddress,
711 ThreadZeroTlsCell,
712 ThreadPerformanceCount,
713 ThreadAmILastThread,
714 ThreadIdealProcessor,
715 ThreadPriorityBoost,
716 ThreadSetTlsArrayAddress,
717 ThreadIsIoPending,
718 MaxThreadInfoClass
719 } THREADINFOCLASS;
721 typedef struct _THREAD_BASIC_INFORMATION
723 NTSTATUS ExitStatus;
724 PVOID TebBaseAddress;
725 CLIENT_ID ClientId;
726 ULONG AffinityMask;
727 LONG Priority;
728 LONG BasePriority;
729 } THREAD_BASIC_INFORMATION, *PTHREAD_BASIC_INFORMATION;
731 typedef struct _THREAD_DESCRIPTOR_INFORMATION
733 DWORD Selector;
734 LDT_ENTRY Entry;
735 } THREAD_DESCRIPTOR_INFORMATION, *PTHREAD_DESCRIPTOR_INFORMATION;
737 typedef struct _KERNEL_USER_TIMES {
738 LARGE_INTEGER CreateTime;
739 LARGE_INTEGER ExitTime;
740 LARGE_INTEGER KernelTime;
741 LARGE_INTEGER UserTime;
742 } KERNEL_USER_TIMES, *PKERNEL_USER_TIMES;
744 typedef enum _WINSTATIONINFOCLASS {
745 WinStationInformation = 8
746 } WINSTATIONINFOCLASS;
748 typedef enum _MEMORY_INFORMATION_CLASS {
749 MemoryBasicInformation,
750 MemoryWorkingSetList,
751 MemorySectionName,
752 MemoryBasicVlmInformation
753 } MEMORY_INFORMATION_CLASS;
755 typedef enum _MUTANT_INFORMATION_CLASS
757 MutantBasicInformation
758 } MUTANT_INFORMATION_CLASS, *PMUTANT_INFORMATION_CLASS;
760 typedef struct _MUTANT_BASIC_INFORMATION {
761 LONG CurrentCount;
762 BOOLEAN OwnedByCaller;
763 BOOLEAN AbandonedState;
764 } MUTANT_BASIC_INFORMATION, *PMUTANT_BASIC_INFORMATION;
766 typedef enum _TIMER_INFORMATION_CLASS
768 TimerBasicInformation = 0
769 } TIMER_INFORMATION_CLASS;
771 typedef struct _TIMER_BASIC_INFORMATION
773 LARGE_INTEGER RemainingTime;
774 BOOLEAN TimerState;
775 } TIMER_BASIC_INFORMATION, *PTIMER_BASIC_INFORMATION;
778 /* return type of RtlDetermineDosPathNameType_U (FIXME: not the correct names) */
779 typedef enum
781 INVALID_PATH = 0,
782 UNC_PATH, /* "//foo" */
783 ABSOLUTE_DRIVE_PATH, /* "c:/foo" */
784 RELATIVE_DRIVE_PATH, /* "c:foo" */
785 ABSOLUTE_PATH, /* "/foo" */
786 RELATIVE_PATH, /* "foo" */
787 DEVICE_PATH, /* "//./foo" */
788 UNC_DOT_PATH /* "//." */
789 } DOS_PATHNAME_TYPE;
791 /***********************************************************************
792 * IA64 specific types and data structures
795 #ifdef __ia64__
797 typedef struct _FRAME_POINTERS {
798 ULONGLONG MemoryStackFp;
799 ULONGLONG BackingStoreFp;
800 } FRAME_POINTERS, *PFRAME_POINTERS;
802 #define UNWIND_HISTORY_TABLE_SIZE 12
804 typedef struct _RUNTIME_FUNCTION {
805 ULONG BeginAddress;
806 ULONG EndAddress;
807 ULONG UnwindInfoAddress;
808 } RUNTIME_FUNCTION, *PRUNTIME_FUNCTION;
810 typedef struct _UNWIND_HISTORY_TABLE_ENTRY {
811 ULONG64 ImageBase;
812 ULONG64 Gp;
813 PRUNTIME_FUNCTION FunctionEntry;
814 } UNWIND_HISTORY_TABLE_ENTRY, *PUNWIND_HISTORY_TABLE_ENTRY;
816 typedef struct _UNWIND_HISTORY_TABLE {
817 ULONG Count;
818 UCHAR Search;
819 ULONG64 LowAddress;
820 ULONG64 HighAddress;
821 UNWIND_HISTORY_TABLE_ENTRY Entry[UNWIND_HISTORY_TABLE_SIZE];
822 } UNWIND_HISTORY_TABLE, *PUNWIND_HISTORY_TABLE;
824 #endif /* defined(__ia64__) */
826 /***********************************************************************
827 * Types and data structures
830 /* This is used by NtQuerySystemInformation */
831 typedef struct _SYSTEM_THREAD_INFORMATION{
832 FILETIME ftKernelTime;
833 FILETIME ftUserTime;
834 FILETIME ftCreateTime;
835 DWORD dwTickCount;
836 DWORD dwStartAddress;
837 DWORD dwOwningPID;
838 DWORD dwThreadID;
839 DWORD dwCurrentPriority;
840 DWORD dwBasePriority;
841 DWORD dwContextSwitches;
842 DWORD dwThreadState;
843 DWORD dwWaitReason;
844 DWORD dwUnknown;
845 } SYSTEM_THREAD_INFORMATION, *PSYSTEM_THREAD_INFORMATION;
847 typedef struct _IO_STATUS_BLOCK {
848 union {
849 NTSTATUS Status;
850 PVOID Pointer;
851 } DUMMYUNIONNAME;
853 ULONG_PTR Information;
854 } IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
856 typedef void (WINAPI * PIO_APC_ROUTINE)(PVOID,PIO_STATUS_BLOCK,ULONG);
858 typedef struct _KEY_BASIC_INFORMATION {
859 LARGE_INTEGER LastWriteTime;
860 ULONG TitleIndex;
861 ULONG NameLength;
862 WCHAR Name[1];
863 } KEY_BASIC_INFORMATION, *PKEY_BASIC_INFORMATION;
865 typedef struct _KEY_NODE_INFORMATION
867 LARGE_INTEGER LastWriteTime;
868 ULONG TitleIndex;
869 ULONG ClassOffset;
870 ULONG ClassLength;
871 ULONG NameLength;
872 WCHAR Name[1];
873 /* Class[1]; */
874 } KEY_NODE_INFORMATION, *PKEY_NODE_INFORMATION;
876 typedef struct _KEY_FULL_INFORMATION
878 LARGE_INTEGER LastWriteTime;
879 ULONG TitleIndex;
880 ULONG ClassOffset;
881 ULONG ClassLength;
882 ULONG SubKeys;
883 ULONG MaxNameLen;
884 ULONG MaxClassLen;
885 ULONG Values;
886 ULONG MaxValueNameLen;
887 ULONG MaxValueDataLen;
888 WCHAR Class[1];
889 } KEY_FULL_INFORMATION, *PKEY_FULL_INFORMATION;
891 typedef struct _KEY_VALUE_ENTRY
893 PUNICODE_STRING ValueName;
894 ULONG DataLength;
895 ULONG DataOffset;
896 ULONG Type;
897 } KEY_VALUE_ENTRY, *PKEY_VALUE_ENTRY;
899 typedef struct _KEY_VALUE_BASIC_INFORMATION {
900 ULONG TitleIndex;
901 ULONG Type;
902 ULONG NameLength;
903 WCHAR Name[1];
904 } KEY_VALUE_BASIC_INFORMATION, *PKEY_VALUE_BASIC_INFORMATION;
906 typedef struct _KEY_VALUE_FULL_INFORMATION {
907 ULONG TitleIndex;
908 ULONG Type;
909 ULONG DataOffset;
910 ULONG DataLength;
911 ULONG NameLength;
912 WCHAR Name[1];
913 } KEY_VALUE_FULL_INFORMATION, *PKEY_VALUE_FULL_INFORMATION;
915 typedef struct _KEY_VALUE_PARTIAL_INFORMATION {
916 ULONG TitleIndex;
917 ULONG Type;
918 ULONG DataLength;
919 UCHAR Data[1];
920 } KEY_VALUE_PARTIAL_INFORMATION, *PKEY_VALUE_PARTIAL_INFORMATION;
922 typedef struct _OBJECT_ATTRIBUTES {
923 ULONG Length;
924 HANDLE RootDirectory;
925 PUNICODE_STRING ObjectName;
926 ULONG Attributes;
927 PVOID SecurityDescriptor; /* type SECURITY_DESCRIPTOR */
928 PVOID SecurityQualityOfService; /* type SECURITY_QUALITY_OF_SERVICE */
929 } OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
931 typedef struct _OBJECT_DATA_INFORMATION {
932 BOOLEAN InheritHandle;
933 BOOLEAN ProtectFromClose;
934 } OBJECT_DATA_INFORMATION, *POBJECT_DATA_INFORMATION;
936 typedef struct _OBJECT_BASIC_INFORMATION {
937 ULONG Attributes;
938 ACCESS_MASK GrantedAccess;
939 ULONG HandleCount;
940 ULONG PointerCount;
941 ULONG PagedPoolUsage;
942 ULONG NonPagedPoolUsage;
943 ULONG Reserved[3];
944 ULONG NameInformationLength;
945 ULONG TypeInformationLength;
946 ULONG SecurityDescriptorLength;
947 LARGE_INTEGER CreateTime;
948 } OBJECT_BASIC_INFORMATION, *POBJECT_BASIC_INFORMATION;
950 typedef struct _PROCESS_BASIC_INFORMATION {
951 #ifdef __WINESRC__
952 DWORD ExitStatus;
953 DWORD PebBaseAddress;
954 DWORD AffinityMask;
955 DWORD BasePriority;
956 ULONG UniqueProcessId;
957 ULONG InheritedFromUniqueProcessId;
958 #else
959 PVOID Reserved1;
960 PPEB PebBaseAddress;
961 PVOID Reserved2[2];
962 ULONG_PTR UniqueProcessId;
963 PVOID Reserved3;
964 #endif
965 } PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION;
967 #define PROCESS_PRIOCLASS_IDLE 1
968 #define PROCESS_PRIOCLASS_NORMAL 2
969 #define PROCESS_PRIOCLASS_HIGH 3
970 #define PROCESS_PRIOCLASS_REALTIME 4
971 #define PROCESS_PRIOCLASS_BELOW_NORMAL 5
972 #define PROCESS_PRIOCLASS_ABOVE_NORMAL 6
974 typedef struct _PROCESS_PRIORITY_CLASS {
975 BOOLEAN Foreground;
976 UCHAR PriorityClass;
977 } PROCESS_PRIORITY_CLASS, *PPROCESS_PRIORITY_CLASS;
979 typedef struct _RTL_HEAP_DEFINITION {
980 ULONG Length; /* = sizeof(RTL_HEAP_DEFINITION) */
982 ULONG Unknown[11];
983 } RTL_HEAP_DEFINITION, *PRTL_HEAP_DEFINITION;
985 typedef struct _RTL_RWLOCK {
986 RTL_CRITICAL_SECTION rtlCS;
988 HANDLE hSharedReleaseSemaphore;
989 UINT uSharedWaiters;
991 HANDLE hExclusiveReleaseSemaphore;
992 UINT uExclusiveWaiters;
994 INT iNumberActive;
995 HANDLE hOwningThreadId;
996 DWORD dwTimeoutBoost;
997 PVOID pDebugInfo;
998 } RTL_RWLOCK, *LPRTL_RWLOCK;
1000 /* System Information Class 0x00 */
1002 typedef struct _SYSTEM_BASIC_INFORMATION {
1003 #ifdef __WINESRC__
1004 DWORD dwUnknown1;
1005 ULONG uKeMaximumIncrement;
1006 ULONG uPageSize;
1007 ULONG uMmNumberOfPhysicalPages;
1008 ULONG uMmLowestPhysicalPage;
1009 ULONG uMmHighestPhysicalPage;
1010 ULONG uAllocationGranularity;
1011 PVOID pLowestUserAddress;
1012 PVOID pMmHighestUserAddress;
1013 ULONG uKeActiveProcessors;
1014 BYTE bKeNumberProcessors;
1015 BYTE bUnknown2;
1016 WORD wUnknown3;
1017 #else
1018 BYTE Reserved1[24];
1019 PVOID Reserved2[4];
1020 CCHAR NumberOfProcessors;
1021 #endif
1022 } SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
1024 /* System Information Class 0x01 */
1026 typedef struct _SYSTEM_CPU_INFORMATION {
1027 WORD Architecture;
1028 WORD Level;
1029 WORD Revision; /* combination of CPU model and stepping */
1030 WORD Reserved; /* always zero */
1031 DWORD FeatureSet; /* see bit flags below */
1032 } SYSTEM_CPU_INFORMATION, *PSYSTEM_CPU_INFORMATION;
1034 /* definitions of bits in the Feature set for the x86 processors */
1035 #define CPU_FEATURE_VME 0x00000005 /* Virtual 86 Mode Extensions */
1036 #define CPU_FEATURE_TSC 0x00000002 /* Time Stamp Counter available */
1037 #define CPU_FEATURE_CMOV 0x00000008 /* Conditional Move instruction*/
1038 #define CPU_FEATURE_PGE 0x00000014 /* Page table Entry Global bit */
1039 #define CPU_FEATURE_PSE 0x00000024 /* Page Size Extension */
1040 #define CPU_FEATURE_MTRR 0x00000040 /* Memory Type Range Registers */
1041 #define CPU_FEATURE_CX8 0x00000080 /* Compare and eXchange 8 byte instr. */
1042 #define CPU_FEATURE_MMX 0x00000100 /* Multi Media eXtensions */
1043 #define CPU_FEATURE_X86 0x00000200 /* seems to be alway ON, on the '86 */
1044 #define CPU_FEATURE_PAT 0x00000400 /* Page Attribute Table */
1045 #define CPU_FEATURE_FXSR 0x00000800 /* FXSAVE and FXSTORE instructions */
1046 #define CPU_FEATURE_SEP 0x00001000 /* SYSENTER and SYSEXIT instructions */
1047 #define CPU_FEATURE_SSE 0x00002000 /* SSE extenstions (ext. MMX) */
1048 #define CPU_FEATURE_3DNOW 0x00008000 /* 3DNOW instructions available
1049 (FIXME: needs to be confirmed) */
1050 #define CPU_FEATURE_SSE2 0x00010000 /* SSE2 extensions (XMMI64) */
1051 #define CPU_FEATURE_DS 0x00020000 /* Debug Store */
1052 #define CPU_FEATURE_HTT 0x00040000 /* Hyper Threading Technology */
1054 /* System Information Class 0x02 */
1056 typedef struct _SYSTEM_PERFORMANCE_INFORMATION {
1057 BYTE Reserved1[312];
1058 } SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION;
1060 /* System Information Class 0x03 */
1062 typedef struct _SYSTEM_TIMEOFDAY_INFORMATION {
1063 #ifdef __WINESRC__
1064 LARGE_INTEGER liKeBootTime;
1065 LARGE_INTEGER liKeSystemTime;
1066 LARGE_INTEGER liExpTimeZoneBias;
1067 ULONG uCurrentTimeZoneId;
1068 DWORD dwUnknown1[5];
1069 #else
1070 BYTE Reserved1[48];
1071 #endif
1072 } SYSTEM_TIMEOFDAY_INFORMATION, *PSYSTEM_TIMEOFDAY_INFORMATION; /* was SYSTEM_TIME_INFORMATION */
1074 /* System Information Class 0x08 */
1076 typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION {
1077 #ifdef __WINESRC__
1078 LARGE_INTEGER liIdleTime;
1079 LARGE_INTEGER liKernelTime;
1080 LARGE_INTEGER liUserTime;
1081 DWORD dwSpare[5];
1082 #else
1083 LARGE_INTEGER IdleTime;
1084 LARGE_INTEGER KernelTime;
1085 LARGE_INTEGER UserTime;
1086 LARGE_INTEGER Reserved1[2];
1087 ULONG Reserved2;
1088 #endif
1089 } SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION, *PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION;
1091 /* System Information Class 0x0b */
1093 typedef struct _SYSTEM_DRIVER_INFORMATION {
1094 PVOID pvAddress;
1095 DWORD dwUnknown1;
1096 DWORD dwUnknown2;
1097 DWORD dwEntryIndex;
1098 DWORD dwUnknown3;
1099 char szName[MAX_PATH + 1];
1100 } SYSTEM_DRIVER_INFORMATION, *PSYSTEM_DRIVER_INFORMATION;
1102 /* System Information Class 0x10 */
1104 typedef struct _SYSTEM_HANDLE_ENTRY {
1105 ULONG OwnerPid;
1106 BYTE ObjectType;
1107 BYTE HandleFlags;
1108 USHORT HandleValue;
1109 PVOID ObjectPointer;
1110 ULONG AccessMask;
1111 } SYSTEM_HANDLE_ENTRY, *PSYSTEM_HANDLE_ENTRY;
1113 typedef struct _SYSTEM_HANDLE_INFORMATION {
1114 ULONG Count;
1115 SYSTEM_HANDLE_ENTRY Handle[1];
1116 } SYSTEM_HANDLE_INFORMATION, *PSYSTEM_HANDLE_INFORMATION;
1118 /* System Information Class 0x15 */
1120 typedef struct _SYSTEM_CACHE_INFORMATION {
1121 ULONG CurrentSize;
1122 ULONG PeakSize;
1123 ULONG PageFaultCount;
1124 ULONG MinimumWorkingSet;
1125 ULONG MaximumWorkingSet;
1126 ULONG unused[4];
1127 } SYSTEM_CACHE_INFORMATION, *PSYSTEM_CACHE_INFORMATION;
1129 /* System Information Class 0x17 */
1131 typedef struct _SYSTEM_INTERRUPT_INFORMATION {
1132 BYTE Reserved1[24];
1133 } SYSTEM_INTERRUPT_INFORMATION, *PSYSTEM_INTERRUPT_INFORMATION;
1135 typedef struct _SYSTEM_CONFIGURATION_INFO {
1136 union {
1137 ULONG OemId;
1138 struct {
1139 WORD ProcessorArchitecture;
1140 WORD Reserved;
1141 } tag1;
1142 } tag2;
1143 ULONG PageSize;
1144 PVOID MinimumApplicationAddress;
1145 PVOID MaximumApplicationAddress;
1146 ULONG ActiveProcessorMask;
1147 ULONG NumberOfProcessors;
1148 ULONG ProcessorType;
1149 ULONG AllocationGranularity;
1150 WORD ProcessorLevel;
1151 WORD ProcessorRevision;
1152 } SYSTEM_CONFIGURATION_INFO, *PSYSTEM_CONFIGURATION_INFO;
1154 typedef struct _SYSTEM_EXCEPTION_INFORMATION {
1155 BYTE Reserved1[16];
1156 } SYSTEM_EXCEPTION_INFORMATION, *PSYSTEM_EXCEPTION_INFORMATION;
1158 typedef struct _SYSTEM_LOOKASIDE_INFORMATION {
1159 BYTE Reserved1[32];
1160 } SYSTEM_LOOKASIDE_INFORMATION, *PSYSTEM_LOOKASIDE_INFORMATION;
1162 typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION {
1163 BOOLEAN DebuggerEnabled;
1164 BOOLEAN DebuggerNotPresent;
1165 } SYSTEM_KERNEL_DEBUGGER_INFORMATION, *PSYSTEM_KERNEL_DEBUGGER_INFORMATION;
1167 /* System Information Class 0x05 */
1169 typedef struct _VM_COUNTERS_ {
1170 SIZE_T PeakVirtualSize;
1171 SIZE_T VirtualSize;
1172 ULONG PageFaultCount;
1173 SIZE_T PeakWorkingSetSize;
1174 SIZE_T WorkingSetSize;
1175 SIZE_T QuotaPeakPagedPoolUsage;
1176 SIZE_T QuotaPagedPoolUsage;
1177 SIZE_T QuotaPeakNonPagedPoolUsage;
1178 SIZE_T QuotaNonPagedPoolUsage;
1179 SIZE_T PagefileUsage;
1180 SIZE_T PeakPagefileUsage;
1181 } VM_COUNTERS, *PVM_COUNTERS;
1183 typedef struct _SYSTEM_PROCESS_INFORMATION {
1184 #ifdef __WINESRC__
1185 DWORD dwOffset;
1186 DWORD dwThreadCount;
1187 DWORD dwUnknown1[6];
1188 FILETIME ftCreationTime;
1189 FILETIME ftUserTime;
1190 FILETIME ftKernelTime;
1191 UNICODE_STRING ProcessName;
1192 DWORD dwBasePriority;
1193 DWORD dwProcessID;
1194 DWORD dwParentProcessID;
1195 DWORD dwHandleCount;
1196 DWORD dwUnknown3;
1197 DWORD dwUnknown4;
1198 VM_COUNTERS vmCounters;
1199 IO_COUNTERS ioCounters;
1200 SYSTEM_THREAD_INFORMATION ti[1];
1201 #else
1202 ULONG NextEntryOffset;
1203 BYTE Reserved1[52];
1204 PVOID Reserved2[3];
1205 HANDLE UniqueProcessId;
1206 PVOID Reserved3;
1207 ULONG HandleCount;
1208 BYTE Reserved4[4];
1209 PVOID Reserved5[11];
1210 SIZE_T PeakPagefileUsage;
1211 SIZE_T PrivatePageCount;
1212 LARGE_INTEGER Reserved6[6];
1213 #endif
1214 } SYSTEM_PROCESS_INFORMATION, *PSYSTEM_PROCESS_INFORMATION;
1216 typedef struct _SYSTEM_REGISTRY_QUOTA_INFORMATION {
1217 ULONG RegistryQuotaAllowed;
1218 ULONG RegistryQuotaUsed;
1219 PVOID Reserved1;
1220 } SYSTEM_REGISTRY_QUOTA_INFORMATION, *PSYSTEM_REGISTRY_QUOTA_INFORMATION;
1222 typedef struct _SYSTEM_TIME_ADJUSTMENT {
1223 ULONG TimeAdjustment;
1224 BOOLEAN TimeAdjustmentDisabled;
1225 } SYSTEM_TIME_ADJUSTMENT, *PSYSTEM_TIME_ADJUSTMENT;
1227 typedef struct _TIME_FIELDS
1228 { CSHORT Year;
1229 CSHORT Month;
1230 CSHORT Day;
1231 CSHORT Hour;
1232 CSHORT Minute;
1233 CSHORT Second;
1234 CSHORT Milliseconds;
1235 CSHORT Weekday;
1236 } TIME_FIELDS, *PTIME_FIELDS;
1238 typedef struct _WINSTATIONINFORMATIONW {
1239 BYTE Reserved2[70];
1240 ULONG LogonId;
1241 BYTE Reserved3[1140];
1242 } WINSTATIONINFORMATIONW, *PWINSTATIONINFORMATIONW;
1244 typedef BOOLEAN (WINAPI * PWINSTATIONQUERYINFORMATIONW)(HANDLE,ULONG,WINSTATIONINFOCLASS,PVOID,ULONG,PULONG);
1246 typedef struct _LDR_RESOURCE_INFO
1248 ULONG_PTR Type;
1249 ULONG_PTR Name;
1250 ULONG Language;
1251 } LDR_RESOURCE_INFO, *PLDR_RESOURCE_INFO;
1254 /* debug buffer definitions */
1256 typedef struct _DEBUG_BUFFER {
1257 HANDLE SectionHandle;
1258 PVOID SectionBase;
1259 PVOID RemoteSectionBase;
1260 ULONG SectionBaseDelta;
1261 HANDLE EventPairHandle;
1262 ULONG Unknown[2];
1263 HANDLE RemoteThreadHandle;
1264 ULONG InfoClassMask;
1265 ULONG SizeOfInfo;
1266 ULONG AllocatedSize;
1267 ULONG SectionSize;
1268 PVOID ModuleInformation;
1269 PVOID BackTraceInformation;
1270 PVOID HeapInformation;
1271 PVOID LockInformation;
1272 PVOID Reserved[8];
1273 } DEBUG_BUFFER, *PDEBUG_BUFFER;
1275 #define PDI_MODULES 0x01
1276 #define PDI_BACKTRACE 0x02
1277 #define PDI_HEAPS 0x04
1278 #define PDI_HEAP_TAGS 0x08
1279 #define PDI_HEAP_BLOCKS 0x10
1280 #define PDI_LOCKS 0x20
1282 typedef struct _DEBUG_MODULE_INFORMATION {
1283 ULONG Reserved[2];
1284 ULONG Base;
1285 ULONG Size;
1286 ULONG Flags;
1287 USHORT Index;
1288 USHORT Unknown;
1289 USHORT LoadCount;
1290 USHORT ModuleNameOffset;
1291 CHAR ImageName[256];
1292 } DEBUG_MODULE_INFORMATION, *PDEBUG_MODULE_INFORMATION;
1294 typedef struct _DEBUG_HEAP_INFORMATION {
1295 ULONG Base;
1296 ULONG Flags;
1297 USHORT Granularity;
1298 USHORT Unknown;
1299 ULONG Allocated;
1300 ULONG Committed;
1301 ULONG TagCount;
1302 ULONG BlockCount;
1303 ULONG Reserved[7];
1304 PVOID Tags;
1305 PVOID Blocks;
1306 } DEBUG_HEAP_INFORMATION, *PDEBUG_HEAP_INFORMATION;
1308 typedef struct _DEBUG_LOCK_INFORMATION {
1309 PVOID Address;
1310 USHORT Type;
1311 USHORT CreatorBackTraceIndex;
1312 ULONG OwnerThreadId;
1313 ULONG ActiveCount;
1314 ULONG ContentionCount;
1315 ULONG EntryCount;
1316 ULONG RecursionCount;
1317 ULONG NumberOfSharedWaiters;
1318 ULONG NumberOfExclusiveWaiters;
1319 } DEBUG_LOCK_INFORMATION, *PDEBUG_LOCK_INFORMATION;
1321 typedef struct _PORT_MESSAGE_HEADER {
1322 USHORT DataSize;
1323 USHORT MessageSize;
1324 USHORT MessageType;
1325 USHORT VirtualRangesOffset;
1326 CLIENT_ID ClientId;
1327 ULONG MessageId;
1328 ULONG SectionSize;
1329 } PORT_MESSAGE_HEADER, *PPORT_MESSAGE_HEADER, PORT_MESSAGE, *PPORT_MESSAGE;
1331 typedef unsigned short RTL_ATOM, *PRTL_ATOM;
1333 /* Wine doesn't implement atom table as NT does:
1334 * - in NT, atom tables are user space tables, which ntdll directly accesses
1335 * - on Wine, (even local) atom tables are wineserver object, hence a HANDLE
1337 typedef struct atom_table *RTL_ATOM_TABLE, **PRTL_ATOM_TABLE;
1339 typedef enum _ATOM_INFORMATION_CLASS {
1340 AtomBasicInformation = 0,
1341 AtomTableInformation = 1,
1342 } ATOM_INFORMATION_CLASS;
1344 typedef struct _ATOM_BASIC_INFORMATION {
1345 USHORT ReferenceCount;
1346 USHORT Pinned;
1347 USHORT NameLength;
1348 WCHAR Name[1];
1349 } ATOM_BASIC_INFORMATION, *PATOM_BASIC_INFORMATION;
1351 /* FIXME: names probably not correct */
1352 typedef struct _RTL_HANDLE
1354 struct _RTL_HANDLE * Next;
1355 } RTL_HANDLE;
1357 /* FIXME: names probably not correct */
1358 typedef struct _RTL_HANDLE_TABLE
1360 ULONG MaxHandleCount; /* 0x00 */
1361 ULONG HandleSize; /* 0x04 */
1362 ULONG Unused[2]; /* 0x08-0x0c */
1363 PVOID NextFree; /* 0x10 */
1364 PVOID FirstHandle; /* 0x14 */
1365 PVOID ReservedMemory; /* 0x18 */
1366 PVOID MaxHandle; /* 0x1c */
1367 } RTL_HANDLE_TABLE;
1369 /***********************************************************************
1370 * Defines
1373 /* flags for NtCreateFile and NtOpenFile */
1374 #define FILE_DIRECTORY_FILE 0x00000001
1375 #define FILE_WRITE_THROUGH 0x00000002
1376 #define FILE_SEQUENTIAL_ONLY 0x00000004
1377 #define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008
1378 #define FILE_SYNCHRONOUS_IO_ALERT 0x00000010
1379 #define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020
1380 #define FILE_NON_DIRECTORY_FILE 0x00000040
1381 #define FILE_CREATE_TREE_CONNECTION 0x00000080
1382 #define FILE_COMPLETE_IF_OPLOCKED 0x00000100
1383 #define FILE_NO_EA_KNOWLEDGE 0x00000200
1384 #define FILE_OPEN_FOR_RECOVERY 0x00000400
1385 #define FILE_RANDOM_ACCESS 0x00000800
1386 #define FILE_DELETE_ON_CLOSE 0x00001000
1387 #define FILE_OPEN_BY_FILE_ID 0x00002000
1388 #define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000
1389 #define FILE_NO_COMPRESSION 0x00008000
1390 #define FILE_RESERVE_OPFILTER 0x00100000
1391 #define FILE_TRANSACTED_MODE 0x00200000
1392 #define FILE_OPEN_OFFLINE_FILE 0x00400000
1393 #define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000
1395 #define FILE_ATTRIBUTE_VALID_FLAGS 0x00007fb7
1396 #define FILE_ATTRIBUTE_VALID_SET_FLAGS 0x000031a7
1398 /* status for NtCreateFile or NtOpenFile */
1399 #define FILE_SUPERSEDED 0
1400 #define FILE_OPENED 1
1401 #define FILE_CREATED 2
1402 #define FILE_OVERWRITTEN 3
1403 #define FILE_EXISTS 4
1404 #define FILE_DOES_NOT_EXIST 5
1406 /* disposition for NtCreateFile */
1407 #define FILE_SUPERSEDE 0
1408 #define FILE_OPEN 1
1409 #define FILE_CREATE 2
1410 #define FILE_OPEN_IF 3
1411 #define FILE_OVERWRITE 4
1412 #define FILE_OVERWRITE_IF 5
1413 #define FILE_MAXIMUM_DISPOSITION 5
1415 /* Characteristics of a File System */
1416 #define FILE_REMOVABLE_MEDIA 0x00000001
1417 #define FILE_READ_ONLY_DEVICE 0x00000002
1418 #define FILE_FLOPPY_DISKETTE 0x00000004
1419 #define FILE_WRITE_ONE_MEDIA 0x00000008
1420 #define FILE_REMOTE_DEVICE 0x00000010
1421 #define FILE_DEVICE_IS_MOUNTED 0x00000020
1422 #define FILE_VIRTUAL_VOLUME 0x00000040
1423 #define FILE_AUTOGENERATED_DEVICE_NAME 0x00000080
1424 #define FILE_DEVICE_SECURE_OPEN 0x00000100
1426 /* options for NtCreateNamedPipeFile */
1427 #define FILE_PIPE_INBOUND 0x00000000
1428 #define FILE_PIPE_OUTBOUND 0x00000001
1429 #define FILE_PIPE_FULL_DUPLEX 0x00000002
1431 /* options for pipe's type */
1432 #define FILE_PIPE_TYPE_MESSAGE 0x00000001
1433 #define FILE_PIPE_TYPE_BYTE 0x00000000
1434 /* and client / server end */
1435 #define FILE_PIPE_SERVER_END 0x00000001
1436 #define FILE_PIPE_CLIENT_END 0x00000000
1438 #if (_WIN32_WINNT >= 0x0501)
1439 #define INTERNAL_TS_ACTIVE_CONSOLE_ID ( *((volatile ULONG*)(0x7ffe02d8)) )
1440 #endif /* (_WIN32_WINNT >= 0x0501) */
1442 #define LOGONID_CURRENT ((ULONG)-1)
1444 #define OBJ_INHERIT 0x00000002L
1445 #define OBJ_PERMANENT 0x00000010L
1446 #define OBJ_EXCLUSIVE 0x00000020L
1447 #define OBJ_CASE_INSENSITIVE 0x00000040L
1448 #define OBJ_OPENIF 0x00000080L
1449 #define OBJ_OPENLINK 0x00000100L
1450 #define OBJ_KERNEL_HANDLE 0x00000200L
1451 #define OBJ_VALID_ATTRIBUTES 0x000003F2L
1453 #define SERVERNAME_CURRENT ((HANDLE)NULL)
1455 typedef void (CALLBACK *PNTAPCFUNC)(ULONG_PTR,ULONG_PTR,ULONG_PTR); /* FIXME: not the right name */
1456 typedef void (CALLBACK *PRTL_THREAD_START_ROUTINE)(LPVOID); /* FIXME: not the right name */
1457 typedef DWORD (CALLBACK *PRTL_WORK_ITEM_ROUTINE)(LPVOID); /* FIXME: not the right name */
1460 /* DbgPrintEx default levels */
1461 #define DPFLTR_ERROR_LEVEL 0
1462 #define DPFLTR_WARNING_LEVEL 1
1463 #define DPFLTR_TRACE_LEVEL 2
1464 #define DPFLTR_INFO_LEVEL 3
1465 #define DPFLTR_MASK 0x8000000
1467 /* Well-known LUID values */
1468 #define SE_MIN_WELL_KNOWN_PRIVILEGE 2L
1469 #define SE_CREATE_TOKEN_PRIVILEGE 2L
1470 #define SE_ASSIGNPRIMARYTOKEN_PRIVILEGE 3L
1471 #define SE_LOCK_MEMORY_PRIVILEGE 4L
1472 #define SE_INCREASE_QUOTA_PRIVILEGE 5L
1473 #define SE_UNSOLICITED_INPUT_PRIVILEGE 6L /* obsolete */
1474 #define SE_MACHINE_ACCOUNT_PRIVILEGE 6L
1475 #define SE_TCB_PRIVILEGE 7L
1476 #define SE_SECURITY_PRIVILEGE 8L
1477 #define SE_TAKE_OWNERSHIP_PRIVILEGE 9L
1478 #define SE_LOAD_DRIVER_PRIVILEGE 10L
1479 #define SE_SYSTEM_PROFILE_PRIVILEGE 11L
1480 #define SE_SYSTEMTIME_PRIVILEGE 12L
1481 #define SE_PROF_SINGLE_PROCESS_PRIVILEGE 13L
1482 #define SE_INC_BASE_PRIORITY_PRIVILEGE 14L
1483 #define SE_CREATE_PAGEFILE_PRIVILEGE 15L
1484 #define SE_CREATE_PERMANENT_PRIVILEGE 16L
1485 #define SE_BACKUP_PRIVILEGE 17L
1486 #define SE_RESTORE_PRIVILEGE 18L
1487 #define SE_SHUTDOWN_PRIVILEGE 19L
1488 #define SE_DEBUG_PRIVILEGE 20L
1489 #define SE_AUDIT_PRIVILEGE 21L
1490 #define SE_SYSTEM_ENVIRONMENT_PRIVILEGE 22L
1491 #define SE_CHANGE_NOTIFY_PRIVILLEGE 23L
1492 #define SE_REMOTE_SHUTDOWN_PRIVILEGE 24L
1493 #define SE_UNDOCK_PRIVILEGE 25L
1494 #define SE_SYNC_AGENT_PRIVILEGE 26L
1495 #define SE_ENABLE_DELEGATION_PRIVILEGE 27L
1496 #define SE_MANAGE_VOLUME_PRIVILEGE 28L
1497 #define SE_IMPERSONATE_PRIVILEGE 29L
1498 #define SE_CREATE_GLOBAL_PRIVILEGE 30L
1499 #define SE_MAX_WELL_KNOWN_PRIVILEGE SE_CREATE_GLOBAL_PRIVILEGE
1502 /* Rtl*Registry* functions structs and defines */
1503 #define RTL_REGISTRY_ABSOLUTE 0
1504 #define RTL_REGISTRY_SERVICES 1
1505 #define RTL_REGISTRY_CONTROL 2
1506 #define RTL_REGISTRY_WINDOWS_NT 3
1507 #define RTL_REGISTRY_DEVICEMAP 4
1508 #define RTL_REGISTRY_USER 5
1510 #define RTL_REGISTRY_HANDLE 0x40000000
1511 #define RTL_REGISTRY_OPTIONAL 0x80000000
1513 #define RTL_QUERY_REGISTRY_SUBKEY 0x00000001
1514 #define RTL_QUERY_REGISTRY_TOPKEY 0x00000002
1515 #define RTL_QUERY_REGISTRY_REQUIRED 0x00000004
1516 #define RTL_QUERY_REGISTRY_NOVALUE 0x00000008
1517 #define RTL_QUERY_REGISTRY_NOEXPAND 0x00000010
1518 #define RTL_QUERY_REGISTRY_DIRECT 0x00000020
1519 #define RTL_QUERY_REGISTRY_DELETE 0x00000040
1521 typedef NTSTATUS (WINAPI *PRTL_QUERY_REGISTRY_ROUTINE)( PCWSTR ValueName,
1522 ULONG ValueType,
1523 PVOID ValueData,
1524 ULONG ValueLength,
1525 PVOID Context,
1526 PVOID EntryContext);
1528 typedef struct _RTL_QUERY_REGISTRY_TABLE
1530 PRTL_QUERY_REGISTRY_ROUTINE QueryRoutine;
1531 ULONG Flags;
1532 PWSTR Name;
1533 PVOID EntryContext;
1534 ULONG DefaultType;
1535 PVOID DefaultData;
1536 ULONG DefaultLength;
1537 } RTL_QUERY_REGISTRY_TABLE, *PRTL_QUERY_REGISTRY_TABLE;
1539 typedef struct _KEY_MULTIPLE_VALUE_INFORMATION
1541 PUNICODE_STRING ValueName;
1542 ULONG DataLength;
1543 ULONG DataOffset;
1544 ULONG Type;
1545 } KEY_MULTIPLE_VALUE_INFORMATION, *PKEY_MULTIPLE_VALUE_INFORMATION;
1547 typedef VOID (*PTIMER_APC_ROUTINE) ( PVOID, ULONG, LONG );
1549 typedef enum _EVENT_TYPE {
1550 NotificationEvent,
1551 SynchronizationEvent
1552 } EVENT_TYPE, *PEVENT_TYPE;
1554 typedef enum _EVENT_INFORMATION_CLASS {
1555 EventBasicInformation
1556 } EVENT_INFORMATION_CLASS, *PEVENT_INFORMATION_CLASS;
1558 typedef struct _EVENT_BASIC_INFORMATION {
1559 EVENT_TYPE EventType;
1560 LONG EventState;
1561 } EVENT_BASIC_INFORMATION, *PEVENT_BASIC_INFORMATION;
1563 typedef enum _SEMAPHORE_INFORMATION_CLASS {
1564 SemaphoreBasicInformation
1565 } SEMAPHORE_INFORMATION_CLASS, *PSEMAPHORE_INFORMATION_CLASS;
1567 typedef struct _SEMAPHORE_BASIC_INFORMATION {
1568 ULONG CurrentCount;
1569 ULONG MaximumCount;
1570 } SEMAPHORE_BASIC_INFORMATION, *PSEMAPHORE_BASIC_INFORMATION;
1572 typedef enum _SECTION_INFORMATION_CLASS
1574 SectionBasicInformation,
1575 SectionImageInformation,
1576 } SECTION_INFORMATION_CLASS;
1578 typedef struct _SECTION_BASIC_INFORMATION {
1579 ULONG BaseAddress;
1580 ULONG Attributes;
1581 LARGE_INTEGER Size;
1582 } SECTION_BASIC_INFORMATION, *PSECTION_BASIC_INFORMATION;
1584 typedef struct _SECTION_IMAGE_INFORMATION {
1585 PVOID EntryPoint;
1586 ULONG StackZeroBits;
1587 ULONG StackReserved;
1588 ULONG StackCommit;
1589 ULONG ImageSubsystem;
1590 WORD SubsystemVersionLow;
1591 WORD SubsystemVersionHigh;
1592 ULONG Unknown1;
1593 ULONG ImageCharacteristics;
1594 ULONG ImageMachineType;
1595 ULONG Unknown2[3];
1596 } SECTION_IMAGE_INFORMATION, *PSECTION_IMAGE_INFORMATION;
1598 typedef struct _LPC_SECTION_WRITE {
1599 ULONG Length;
1600 HANDLE SectionHandle;
1601 ULONG SectionOffset;
1602 ULONG ViewSize;
1603 PVOID ViewBase;
1604 PVOID TargetViewBase;
1605 } LPC_SECTION_WRITE, *PLPC_SECTION_WRITE;
1607 typedef struct _LPC_SECTION_READ {
1608 ULONG Length;
1609 ULONG ViewSize;
1610 PVOID ViewBase;
1611 } LPC_SECTION_READ, *PLPC_SECTION_READ;
1613 typedef struct _LPC_MESSAGE {
1614 USHORT DataSize;
1615 USHORT MessageSize;
1616 USHORT MessageType;
1617 USHORT VirtualRangesOffset;
1618 CLIENT_ID ClientId;
1619 ULONG MessageId;
1620 ULONG SectionSize;
1621 UCHAR Data[ANYSIZE_ARRAY];
1622 } LPC_MESSAGE, *PLPC_MESSAGE;
1624 typedef enum _SHUTDOWN_ACTION {
1625 ShutdownNoReboot,
1626 ShutdownReboot,
1627 ShutdownPowerOff
1628 } SHUTDOWN_ACTION, *PSHUTDOWN_ACTION;
1630 typedef enum _KPROFILE_SOURCE {
1631 ProfileTime,
1632 ProfileAlignmentFixup,
1633 ProfileTotalIssues,
1634 ProfilePipelineDry,
1635 ProfileLoadInstructions,
1636 ProfilePipelineFrozen,
1637 ProfileBranchInstructions,
1638 ProfileTotalNonissues,
1639 ProfileDcacheMisses,
1640 ProfileIcacheMisses,
1641 ProfileCacheMisses,
1642 ProfileBranchMispredictions,
1643 ProfileStoreInstructions,
1644 ProfileFpInstructions,
1645 ProfileIntegerInstructions,
1646 Profile2Issue,
1647 Profile3Issue,
1648 Profile4Issue,
1649 ProfileSpecialInstructions,
1650 ProfileTotalCycles,
1651 ProfileIcacheIssues,
1652 ProfileDcacheAccesses,
1653 ProfileMemoryBarrierCycles,
1654 ProfileLoadLinkedIssues,
1655 ProfileMaximum
1656 } KPROFILE_SOURCE, *PKPROFILE_SOURCE;
1658 typedef struct _DIRECTORY_BASIC_INFORMATION {
1659 UNICODE_STRING ObjectName;
1660 UNICODE_STRING ObjectTypeName;
1661 } DIRECTORY_BASIC_INFORMATION, *PDIRECTORY_BASIC_INFORMATION;
1663 typedef struct _INITIAL_TEB {
1664 PVOID StackBase;
1665 PVOID StackLimit;
1666 PVOID StackCommit;
1667 PVOID StackCommitMax;
1668 PVOID StackReserved;
1669 } INITIAL_TEB, *PINITIAL_TEB;
1671 typedef enum _PORT_INFORMATION_CLASS {
1672 PortNoInformation
1673 } PORT_INFORMATION_CLASS, *PPORT_INFORMATION_CLASS;
1675 typedef enum _IO_COMPLETION_INFORMATION_CLASS {
1676 IoCompletionBasicInformation
1677 } IO_COMPLETION_INFORMATION_CLASS, *PIO_COMPLETION_INFORMATION_CLASS;
1679 typedef enum _HARDERROR_RESPONSE_OPTION {
1680 OptionAbortRetryIgnore,
1681 OptionOk,
1682 OptionOkCancel,
1683 OptionRetryCancel,
1684 OptionYesNo,
1685 OptionYesNoCancel,
1686 OptionShutdownSystem
1687 } HARDERROR_RESPONSE_OPTION, *PHARDERROR_RESPONSE_OPTION;
1689 typedef enum _HARDERROR_RESPONSE {
1690 ResponseReturnToCaller,
1691 ResponseNotHandled,
1692 ResponseAbort,
1693 ResponseCancel,
1694 ResponseIgnore,
1695 ResponseNo,
1696 ResponseOk,
1697 ResponseRetry,
1698 ResponseYes
1699 } HARDERROR_RESPONSE, *PHARDERROR_RESPONSE;
1701 typedef enum _SYSDBG_COMMAND {
1702 SysDbgQueryModuleInformation,
1703 SysDbgQueryTraceInformation,
1704 SysDbgSetTracepoint,
1705 SysDbgSetSpecialCall,
1706 SysDbgClearSpecialCalls,
1707 SysDbgQuerySpecialCalls
1708 } SYSDBG_COMMAND, *PSYSDBG_COMMAND;
1710 /***********************************************************************
1711 * Function declarations
1714 #if defined(__i386__) && defined(__GNUC__)
1715 static inline void WINAPI DbgBreakPoint(void) { __asm__ __volatile__("int3"); }
1716 static inline void WINAPI DbgUserBreakPoint(void) { __asm__ __volatile__("int3"); }
1717 #else /* __i386__ && __GNUC__ */
1718 void WINAPI DbgBreakPoint(void);
1719 void WINAPI DbgUserBreakPoint(void);
1720 #endif /* __i386__ && __GNUC__ */
1721 NTSTATUS WINAPIV DbgPrint(LPCSTR fmt, ...);
1722 NTSTATUS WINAPIV DbgPrintEx(ULONG iComponentId, ULONG Level, LPCSTR fmt, ...);
1724 NTSTATUS WINAPI LdrAccessResource(HMODULE,const IMAGE_RESOURCE_DATA_ENTRY*,void**,PULONG);
1725 NTSTATUS WINAPI LdrFindResourceDirectory_U(HMODULE,const LDR_RESOURCE_INFO*,ULONG,const IMAGE_RESOURCE_DIRECTORY**);
1726 NTSTATUS WINAPI LdrFindResource_U(HMODULE,const LDR_RESOURCE_INFO*,ULONG,const IMAGE_RESOURCE_DATA_ENTRY**);
1727 NTSTATUS WINAPI LdrGetDllHandle(ULONG, ULONG, const UNICODE_STRING*, HMODULE*);
1728 NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE, const ANSI_STRING*, ULONG, void**);
1729 void WINAPI LdrInitializeThunk(ULONG,ULONG,ULONG,ULONG);
1730 NTSTATUS WINAPI LdrLoadDll(LPCWSTR, DWORD, const UNICODE_STRING*, HMODULE*);
1731 void WINAPI LdrShutdownProcess(void);
1732 void WINAPI LdrShutdownThread(void);
1733 NTSTATUS WINAPI NtAcceptConnectPort(PHANDLE,ULONG,PLPC_MESSAGE,BOOLEAN,PLPC_SECTION_WRITE,PLPC_SECTION_READ);
1734 NTSTATUS WINAPI NtAccessCheck(PSECURITY_DESCRIPTOR,HANDLE,ACCESS_MASK,PGENERIC_MAPPING,PPRIVILEGE_SET,PULONG,PULONG,NTSTATUS*);
1735 NTSTATUS WINAPI NtAccessCheckAndAuditAlarm(PUNICODE_STRING,HANDLE,PUNICODE_STRING,PUNICODE_STRING,PSECURITY_DESCRIPTOR,ACCESS_MASK,PGENERIC_MAPPING,BOOLEAN,PACCESS_MASK,PBOOLEAN,PBOOLEAN);
1736 NTSTATUS WINAPI NtAddAtom(const WCHAR*,ULONG,RTL_ATOM*);
1737 NTSTATUS WINAPI NtAdjustGroupsToken(HANDLE,BOOLEAN,PTOKEN_GROUPS,ULONG,PTOKEN_GROUPS,PULONG);
1738 NTSTATUS WINAPI NtAdjustPrivilegesToken(HANDLE,BOOLEAN,PTOKEN_PRIVILEGES,DWORD,PTOKEN_PRIVILEGES,PDWORD);
1739 NTSTATUS WINAPI NtAlertResumeThread(HANDLE,PULONG);
1740 NTSTATUS WINAPI NtAlertThread(HANDLE ThreadHandle);
1741 NTSTATUS WINAPI NtAllocateLocallyUniqueId(PLUID lpLuid);
1742 NTSTATUS WINAPI NtAllocateUuids(PULARGE_INTEGER,PULONG,PULONG);
1743 NTSTATUS WINAPI NtAllocateVirtualMemory(HANDLE,PVOID*,ULONG,SIZE_T*,ULONG,ULONG);
1744 NTSTATUS WINAPI NtCallbackReturn(PVOID,ULONG,NTSTATUS);
1745 NTSTATUS WINAPI NtCancelIoFile(HANDLE,PIO_STATUS_BLOCK);
1746 NTSTATUS WINAPI NtCancelTimer(HANDLE, BOOLEAN*);
1747 NTSTATUS WINAPI NtClearEvent(HANDLE);
1748 NTSTATUS WINAPI NtClose(HANDLE);
1749 NTSTATUS WINAPI NtCloseObjectAuditAlarm(PUNICODE_STRING,HANDLE,BOOLEAN);
1750 NTSTATUS WINAPI NtCompleteConnectPort(HANDLE);
1751 NTSTATUS WINAPI NtConnectPort(PHANDLE,PUNICODE_STRING,PSECURITY_QUALITY_OF_SERVICE,PLPC_SECTION_WRITE,PLPC_SECTION_READ,PULONG,PVOID,PULONG);
1752 NTSTATUS WINAPI NtContinue(PCONTEXT,BOOLEAN);
1753 NTSTATUS WINAPI NtCreateDirectoryObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
1754 NTSTATUS WINAPI NtCreateEvent(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *,BOOLEAN,BOOLEAN);
1755 NTSTATUS WINAPI NtCreateEventPair(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
1756 NTSTATUS WINAPI NtCreateFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,PLARGE_INTEGER,ULONG,ULONG,ULONG,ULONG,PVOID,ULONG);
1757 NTSTATUS WINAPI NtCreateIoCompletion(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,ULONG);
1758 NTSTATUS WINAPI NtCreateKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,PULONG);
1759 NTSTATUS WINAPI NtCreateMailslotFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG,ULONG,PLARGE_INTEGER);
1760 NTSTATUS WINAPI NtCreateMutant(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,BOOLEAN);
1761 NTSTATUS WINAPI NtCreateNamedPipeFile(PHANDLE,ULONG,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,PLARGE_INTEGER);
1762 NTSTATUS WINAPI NtCreatePagingFile(PUNICODE_STRING,PLARGE_INTEGER,PLARGE_INTEGER,PLARGE_INTEGER);
1763 NTSTATUS WINAPI NtCreatePort(PHANDLE,POBJECT_ATTRIBUTES,ULONG,ULONG,PULONG);
1764 NTSTATUS WINAPI NtCreateProcess(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,HANDLE,BOOLEAN,HANDLE,HANDLE,HANDLE);
1765 NTSTATUS WINAPI NtCreateProfile(PHANDLE,HANDLE,PVOID,ULONG,ULONG,PVOID,ULONG,KPROFILE_SOURCE,KAFFINITY);
1766 NTSTATUS WINAPI NtCreateSection(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const LARGE_INTEGER*,ULONG,ULONG,HANDLE);
1767 NTSTATUS WINAPI NtCreateSemaphore(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,LONG,LONG);
1768 NTSTATUS WINAPI NtCreateSymbolicLinkObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PUNICODE_STRING);
1769 NTSTATUS WINAPI NtCreateThread(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,HANDLE,PCLIENT_ID,PCONTEXT,PINITIAL_TEB,BOOLEAN);
1770 NTSTATUS WINAPI NtCreateTimer(HANDLE*, ACCESS_MASK, const OBJECT_ATTRIBUTES*, TIMER_TYPE);
1771 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);
1772 NTSTATUS WINAPI NtDelayExecution(BOOLEAN,const LARGE_INTEGER*);
1773 NTSTATUS WINAPI NtDeleteAtom(RTL_ATOM);
1774 NTSTATUS WINAPI NtDeleteFile(POBJECT_ATTRIBUTES);
1775 NTSTATUS WINAPI NtDeleteKey(HANDLE);
1776 NTSTATUS WINAPI NtDeleteValueKey(HANDLE,const UNICODE_STRING *);
1777 NTSTATUS WINAPI NtDeviceIoControlFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,PVOID,ULONG,PVOID,ULONG);
1778 NTSTATUS WINAPI NtDisplayString(PUNICODE_STRING);
1779 NTSTATUS WINAPI NtDuplicateObject(HANDLE,HANDLE,HANDLE,PHANDLE,ACCESS_MASK,ULONG,ULONG);
1780 NTSTATUS WINAPI NtDuplicateToken(HANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,SECURITY_IMPERSONATION_LEVEL,TOKEN_TYPE,PHANDLE);
1781 NTSTATUS WINAPI NtEnumerateKey(HANDLE,ULONG,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *);
1782 NTSTATUS WINAPI NtEnumerateValueKey(HANDLE,ULONG,KEY_VALUE_INFORMATION_CLASS,PVOID,ULONG,PULONG);
1783 NTSTATUS WINAPI NtExtendSection(HANDLE,PLARGE_INTEGER);
1784 NTSTATUS WINAPI NtFindAtom(const WCHAR*,ULONG,RTL_ATOM*);
1785 NTSTATUS WINAPI NtFlushBuffersFile(HANDLE,IO_STATUS_BLOCK*);
1786 NTSTATUS WINAPI NtFlushInstructionCache(HANDLE,LPCVOID,SIZE_T);
1787 NTSTATUS WINAPI NtFlushKey(HANDLE);
1788 NTSTATUS WINAPI NtFlushVirtualMemory(HANDLE,LPCVOID*,SIZE_T*,ULONG);
1789 NTSTATUS WINAPI NtFlushWriteBuffer(VOID);
1790 NTSTATUS WINAPI NtFreeVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
1791 NTSTATUS WINAPI NtFsControlFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,PVOID,ULONG,PVOID,ULONG);
1792 NTSTATUS WINAPI NtGetContextThread(HANDLE,CONTEXT*);
1793 NTSTATUS WINAPI NtGetPlugPlayEvent(ULONG,ULONG,PVOID,ULONG);
1794 ULONG WINAPI NtGetTickCount(VOID);
1795 NTSTATUS WINAPI NtImpersonateAnonymousToken(HANDLE);
1796 NTSTATUS WINAPI NtImpersonateClientOfPort(HANDLE,PPORT_MESSAGE);
1797 NTSTATUS WINAPI NtImpersonateThread(HANDLE,HANDLE,PSECURITY_QUALITY_OF_SERVICE);
1798 NTSTATUS WINAPI NtInitializeRegistry(BOOLEAN);
1799 NTSTATUS WINAPI NtInitiatePowerAction(POWER_ACTION,SYSTEM_POWER_STATE,ULONG,BOOLEAN);
1800 NTSTATUS WINAPI NtListenPort(HANDLE,PLPC_MESSAGE);
1801 NTSTATUS WINAPI NtLoadDriver(const UNICODE_STRING *);
1802 NTSTATUS WINAPI NtLoadKey(const OBJECT_ATTRIBUTES *,OBJECT_ATTRIBUTES *);
1803 NTSTATUS WINAPI NtLockFile(HANDLE,HANDLE,PIO_APC_ROUTINE,void*,PIO_STATUS_BLOCK,PLARGE_INTEGER,PLARGE_INTEGER,ULONG*,BOOLEAN,BOOLEAN);
1804 NTSTATUS WINAPI NtLockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
1805 NTSTATUS WINAPI NtMakeTemporaryObject(HANDLE);
1806 NTSTATUS WINAPI NtMapViewOfSection(HANDLE,HANDLE,PVOID*,ULONG,SIZE_T,const LARGE_INTEGER*,SIZE_T*,SECTION_INHERIT,ULONG,ULONG);
1807 NTSTATUS WINAPI NtNotifyChangeDirectoryFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,ULONG,BOOLEAN);
1808 NTSTATUS WINAPI NtNotifyChangeKey(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,BOOLEAN,PVOID,ULONG,BOOLEAN);
1809 NTSTATUS WINAPI NtOpenDirectoryObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
1810 NTSTATUS WINAPI NtOpenEvent(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *);
1811 NTSTATUS WINAPI NtOpenEventPair(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
1812 NTSTATUS WINAPI NtOpenFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG);
1813 NTSTATUS WINAPI NtOpenIoCompletion(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
1814 NTSTATUS WINAPI NtOpenKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *);
1815 NTSTATUS WINAPI NtOpenMutant(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
1816 NTSTATUS WINAPI NtOpenObjectAuditAlarm(PUNICODE_STRING,PHANDLE,PUNICODE_STRING,PUNICODE_STRING,PSECURITY_DESCRIPTOR,HANDLE,ACCESS_MASK,ACCESS_MASK,PPRIVILEGE_SET,BOOLEAN,BOOLEAN,PBOOLEAN);
1817 NTSTATUS WINAPI NtOpenProcess(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const CLIENT_ID*);
1818 NTSTATUS WINAPI NtOpenProcessToken(HANDLE,DWORD,HANDLE *);
1819 NTSTATUS WINAPI NtOpenSection(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
1820 NTSTATUS WINAPI NtOpenSemaphore(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
1821 NTSTATUS WINAPI NtOpenSymbolicLinkObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
1822 NTSTATUS WINAPI NtOpenThread(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const CLIENT_ID*);
1823 NTSTATUS WINAPI NtOpenThreadToken(HANDLE,DWORD,BOOLEAN,HANDLE *);
1824 NTSTATUS WINAPI NtOpenTimer(HANDLE*, ACCESS_MASK, const OBJECT_ATTRIBUTES*);
1825 NTSTATUS WINAPI NtPowerInformation(POWER_INFORMATION_LEVEL,PVOID,ULONG,PVOID,ULONG);
1826 NTSTATUS WINAPI NtPrivilegeCheck(HANDLE,PPRIVILEGE_SET,PBOOLEAN);
1827 NTSTATUS WINAPI NtPrivilegeObjectAuditAlarm(PUNICODE_STRING,HANDLE,HANDLE,ULONG,PPRIVILEGE_SET,BOOLEAN);
1828 NTSTATUS WINAPI NtPrivilegedServiceAuditAlarm(PUNICODE_STRING,PUNICODE_STRING,HANDLE,PPRIVILEGE_SET,BOOLEAN);
1829 NTSTATUS WINAPI NtProtectVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG,ULONG*);
1830 NTSTATUS WINAPI NtPulseEvent(HANDLE,PULONG);
1831 NTSTATUS WINAPI NtQueueApcThread(HANDLE,PNTAPCFUNC,ULONG_PTR,ULONG_PTR,ULONG_PTR);
1832 NTSTATUS WINAPI NtQueryAttributesFile(const OBJECT_ATTRIBUTES*,FILE_BASIC_INFORMATION*);
1833 NTSTATUS WINAPI NtQueryDefaultLocale(BOOLEAN,LCID*);
1834 NTSTATUS WINAPI NtQueryDefaultUILanguage(LANGID*);
1835 NTSTATUS WINAPI NtQueryDirectoryFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,FILE_INFORMATION_CLASS,BOOLEAN,PUNICODE_STRING,BOOLEAN);
1836 NTSTATUS WINAPI NtQueryDirectoryObject(HANDLE,PDIRECTORY_BASIC_INFORMATION,ULONG,BOOLEAN,BOOLEAN,PULONG,PULONG);
1837 NTSTATUS WINAPI NtQueryEaFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,BOOLEAN,PVOID,ULONG,PVOID,BOOLEAN);
1838 NTSTATUS WINAPI NtQueryEvent(HANDLE,EVENT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
1839 NTSTATUS WINAPI NtQueryFullAttributesFile(const OBJECT_ATTRIBUTES*,FILE_NETWORK_OPEN_INFORMATION*);
1840 NTSTATUS WINAPI NtQueryInformationAtom(RTL_ATOM,ATOM_INFORMATION_CLASS,PVOID,ULONG,ULONG*);
1841 NTSTATUS WINAPI NtQueryInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,LONG,FILE_INFORMATION_CLASS);
1842 NTSTATUS WINAPI NtQueryInformationPort(HANDLE,PORT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
1843 NTSTATUS WINAPI NtQueryInformationProcess(HANDLE,PROCESSINFOCLASS,PVOID,ULONG,PULONG);
1844 NTSTATUS WINAPI NtQueryInformationThread(HANDLE,THREADINFOCLASS,PVOID,ULONG,PULONG);
1845 NTSTATUS WINAPI NtQueryInformationToken(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,ULONG,PULONG);
1846 NTSTATUS WINAPI NtQueryInstallUILanguage(LANGID*);
1847 NTSTATUS WINAPI NtQueryIntervalProfile(KPROFILE_SOURCE,PULONG);
1848 NTSTATUS WINAPI NtQueryIoCompletion(HANDLE,IO_COMPLETION_INFORMATION_CLASS,PVOID,ULONG,PULONG);
1849 NTSTATUS WINAPI NtQueryKey(HANDLE,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *);
1850 NTSTATUS WINAPI NtQueryMultipleValueKey(HANDLE,PKEY_MULTIPLE_VALUE_INFORMATION,ULONG,PVOID,ULONG,PULONG);
1851 NTSTATUS WINAPI NtQueryMutant(HANDLE,MUTANT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
1852 NTSTATUS WINAPI NtQueryObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG, PULONG);
1853 NTSTATUS WINAPI NtQueryOpenSubKeys(POBJECT_ATTRIBUTES,PULONG);
1854 NTSTATUS WINAPI NtQueryPerformanceCounter(PLARGE_INTEGER, PLARGE_INTEGER);
1855 NTSTATUS WINAPI NtQuerySecurityObject(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,ULONG,PULONG);
1856 NTSTATUS WINAPI NtQuerySection(HANDLE,SECTION_INFORMATION_CLASS,PVOID,ULONG,PULONG);
1857 NTSTATUS WINAPI NtQuerySemaphore(HANDLE,SEMAPHORE_INFORMATION_CLASS,PVOID,ULONG,PULONG);
1858 NTSTATUS WINAPI NtQuerySymbolicLinkObject(HANDLE,PUNICODE_STRING,PULONG);
1859 NTSTATUS WINAPI NtQuerySystemEnvironmentValue(PUNICODE_STRING,PWCHAR,ULONG,PULONG);
1860 NTSTATUS WINAPI NtQuerySystemInformation(SYSTEM_INFORMATION_CLASS,PVOID,ULONG,PULONG);
1861 NTSTATUS WINAPI NtQuerySystemTime(PLARGE_INTEGER);
1862 NTSTATUS WINAPI NtQueryTimer(HANDLE,TIMER_INFORMATION_CLASS,PVOID,ULONG,PULONG);
1863 NTSTATUS WINAPI NtQueryTimerResolution(PULONG,PULONG,PULONG);
1864 NTSTATUS WINAPI NtQueryValueKey(HANDLE,const UNICODE_STRING *,KEY_VALUE_INFORMATION_CLASS,void *,DWORD,DWORD *);
1865 NTSTATUS WINAPI NtQueryVirtualMemory(HANDLE,LPCVOID,MEMORY_INFORMATION_CLASS,PVOID,SIZE_T,SIZE_T*);
1866 NTSTATUS WINAPI NtQueryVolumeInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS);
1867 NTSTATUS WINAPI NtRaiseException(PEXCEPTION_RECORD,PCONTEXT,BOOL);
1868 NTSTATUS WINAPI NtRaiseHardError(NTSTATUS,ULONG,PUNICODE_STRING,PVOID*,HARDERROR_RESPONSE_OPTION,PHARDERROR_RESPONSE);
1869 NTSTATUS WINAPI NtReadFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,PLARGE_INTEGER,PULONG);
1870 NTSTATUS WINAPI NtReadFileScatter(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,FILE_SEGMENT_ELEMENT,ULONG,PLARGE_INTEGER,PULONG);
1871 NTSTATUS WINAPI NtReadRequestData(HANDLE,PLPC_MESSAGE,ULONG,PVOID,ULONG,PULONG);
1872 NTSTATUS WINAPI NtReadVirtualMemory(HANDLE,const void*,void*,SIZE_T,SIZE_T*);
1873 NTSTATUS WINAPI NtRegisterThreadTerminatePort(HANDLE);
1874 NTSTATUS WINAPI NtReleaseMutant(HANDLE,PLONG);
1875 NTSTATUS WINAPI NtReleaseSemaphore(HANDLE,ULONG,PULONG);
1876 NTSTATUS WINAPI NtRemoveIoCompletion(HANDLE,PULONG_PTR,PIO_STATUS_BLOCK,PULONG,PLARGE_INTEGER);
1877 NTSTATUS WINAPI NtReplaceKey(POBJECT_ATTRIBUTES,HANDLE,POBJECT_ATTRIBUTES);
1878 NTSTATUS WINAPI NtReplyPort(HANDLE,PLPC_MESSAGE);
1879 NTSTATUS WINAPI NtReplyWaitReceivePort(HANDLE,PULONG,PLPC_MESSAGE,PLPC_MESSAGE);
1880 NTSTATUS WINAPI NtReplyWaitReceivePortEx(HANDLE,PVOID*,PPORT_MESSAGE,PPORT_MESSAGE,PLARGE_INTEGER);
1881 NTSTATUS WINAPI NtReplyWaitReplyPort(HANDLE,PLPC_MESSAGE);
1882 NTSTATUS WINAPI NtRequestPort(HANDLE,PLPC_MESSAGE);
1883 NTSTATUS WINAPI NtRequestWaitReplyPort(HANDLE,PLPC_MESSAGE,PLPC_MESSAGE);
1884 NTSTATUS WINAPI NtResetEvent(HANDLE,PULONG);
1885 NTSTATUS WINAPI NtRestoreKey(HANDLE,HANDLE,ULONG);
1886 NTSTATUS WINAPI NtResumeThread(HANDLE,PULONG);
1887 NTSTATUS WINAPI NtSaveKey(HANDLE,HANDLE);
1888 NTSTATUS WINAPI NtSecureConnectPort(PHANDLE,PUNICODE_STRING,PSECURITY_QUALITY_OF_SERVICE,PLPC_SECTION_WRITE,PSID,PLPC_SECTION_READ,PULONG,PVOID,PULONG);
1889 NTSTATUS WINAPI NtSetContextThread(HANDLE,const CONTEXT*);
1890 NTSTATUS WINAPI NtSetDefaultHardErrorPort(HANDLE);
1891 NTSTATUS WINAPI NtSetDefaultLocale(BOOLEAN,LCID);
1892 NTSTATUS WINAPI NtSetDefaultUILanguage(LANGID);
1893 NTSTATUS WINAPI NtSetEaFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG);
1894 NTSTATUS WINAPI NtSetEvent(HANDLE,PULONG);
1895 NTSTATUS WINAPI NtSetHighEventPair(HANDLE);
1896 NTSTATUS WINAPI NtSetHighWaitLowEventPair(HANDLE);
1897 NTSTATUS WINAPI NtSetHighWaitLowThread(VOID);
1898 NTSTATUS WINAPI NtSetInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FILE_INFORMATION_CLASS);
1899 NTSTATUS WINAPI NtSetInformationKey(HANDLE,const int,PVOID,ULONG);
1900 NTSTATUS WINAPI NtSetInformationObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG);
1901 NTSTATUS WINAPI NtSetInformationProcess(HANDLE,PROCESS_INFORMATION_CLASS,PVOID,ULONG);
1902 NTSTATUS WINAPI NtSetInformationThread(HANDLE,THREADINFOCLASS,LPCVOID,ULONG);
1903 NTSTATUS WINAPI NtSetInformationToken(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,ULONG);
1904 NTSTATUS WINAPI NtSetIntervalProfile(ULONG,KPROFILE_SOURCE);
1905 NTSTATUS WINAPI NtSetIoCompletion(HANDLE,ULONG_PTR,PIO_STATUS_BLOCK,ULONG,ULONG);
1906 NTSTATUS WINAPI NtSetLdtEntries(ULONG,LDT_ENTRY,ULONG,LDT_ENTRY);
1907 NTSTATUS WINAPI NtSetLowEventPair(HANDLE);
1908 NTSTATUS WINAPI NtSetLowWaitHighEventPair(HANDLE);
1909 NTSTATUS WINAPI NtSetLowWaitHighThread(VOID);
1910 NTSTATUS WINAPI NtSetSecurityObject(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
1911 NTSTATUS WINAPI NtSetSystemEnvironmentValue(PUNICODE_STRING,PUNICODE_STRING);
1912 NTSTATUS WINAPI NtSetSystemInformation(SYSTEM_INFORMATION_CLASS,PVOID,ULONG);
1913 NTSTATUS WINAPI NtSetSystemPowerState(POWER_ACTION,SYSTEM_POWER_STATE,ULONG);
1914 NTSTATUS WINAPI NtSetSystemTime(const LARGE_INTEGER*,LARGE_INTEGER*);
1915 NTSTATUS WINAPI NtSetTimer(HANDLE, const LARGE_INTEGER*, PTIMER_APC_ROUTINE, PVOID, BOOLEAN, ULONG, BOOLEAN*);
1916 NTSTATUS WINAPI NtSetTimerResolution(ULONG,BOOLEAN,PULONG);
1917 NTSTATUS WINAPI NtSetValueKey(HANDLE,const UNICODE_STRING *,ULONG,ULONG,const void *,ULONG);
1918 NTSTATUS WINAPI NtSetVolumeInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS);
1919 NTSTATUS WINAPI NtSignalAndWaitForSingleObject(HANDLE,HANDLE,BOOLEAN,const LARGE_INTEGER*);
1920 NTSTATUS WINAPI NtShutdownSystem(SHUTDOWN_ACTION);
1921 NTSTATUS WINAPI NtStartProfile(HANDLE);
1922 NTSTATUS WINAPI NtStopProfile(HANDLE);
1923 NTSTATUS WINAPI NtSuspendThread(HANDLE,PULONG);
1924 NTSTATUS WINAPI NtSystemDebugControl(SYSDBG_COMMAND,PVOID,ULONG,PVOID,ULONG,PULONG);
1925 NTSTATUS WINAPI NtTerminateProcess(HANDLE,LONG);
1926 NTSTATUS WINAPI NtTerminateThread(HANDLE,LONG);
1927 NTSTATUS WINAPI NtTestAlert(VOID);
1928 NTSTATUS WINAPI NtUnloadDriver(const UNICODE_STRING *);
1929 NTSTATUS WINAPI NtUnloadKey(HANDLE);
1930 NTSTATUS WINAPI NtUnloadKeyEx(POBJECT_ATTRIBUTES,HANDLE);
1931 NTSTATUS WINAPI NtUnlockFile(HANDLE,PIO_STATUS_BLOCK,PLARGE_INTEGER,PLARGE_INTEGER,PULONG);
1932 NTSTATUS WINAPI NtUnlockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
1933 NTSTATUS WINAPI NtUnmapViewOfSection(HANDLE,PVOID);
1934 NTSTATUS WINAPI NtVdmControl(ULONG,PVOID);
1935 NTSTATUS WINAPI NtWaitForSingleObject(HANDLE,BOOLEAN,const LARGE_INTEGER*);
1936 NTSTATUS WINAPI NtWaitForMultipleObjects(ULONG,const HANDLE*,BOOLEAN,BOOLEAN,const LARGE_INTEGER*);
1937 NTSTATUS WINAPI NtWaitHighEventPair(HANDLE);
1938 NTSTATUS WINAPI NtWaitLowEventPair(HANDLE);
1939 NTSTATUS WINAPI NtWriteFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,const void*,ULONG,PLARGE_INTEGER,PULONG);
1940 NTSTATUS WINAPI NtWriteFileGather(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,FILE_SEGMENT_ELEMENT,ULONG,PLARGE_INTEGER,PULONG);
1941 NTSTATUS WINAPI NtWriteRequestData(HANDLE,PLPC_MESSAGE,ULONG,PVOID,ULONG,PULONG);
1942 NTSTATUS WINAPI NtWriteVirtualMemory(HANDLE,void*,const void*,SIZE_T,SIZE_T*);
1943 NTSTATUS WINAPI NtYieldExecution(void);
1945 void WINAPI RtlAcquirePebLock(void);
1946 BYTE WINAPI RtlAcquireResourceExclusive(LPRTL_RWLOCK,BYTE);
1947 BYTE WINAPI RtlAcquireResourceShared(LPRTL_RWLOCK,BYTE);
1948 NTSTATUS WINAPI RtlAddAce(PACL,DWORD,DWORD,PACE_HEADER,DWORD);
1949 NTSTATUS WINAPI RtlAddAccessAllowedAce(PACL,DWORD,DWORD,PSID);
1950 NTSTATUS WINAPI RtlAddAccessAllowedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
1951 NTSTATUS WINAPI RtlAddAccessDeniedAce(PACL,DWORD,DWORD,PSID);
1952 NTSTATUS WINAPI RtlAddAccessDeniedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
1953 NTSTATUS WINAPI RtlAddAtomToAtomTable(RTL_ATOM_TABLE,const WCHAR*,RTL_ATOM*);
1954 NTSTATUS WINAPI RtlAddAuditAccessAce(PACL,DWORD,DWORD,PSID,BOOL,BOOL);
1955 PVOID WINAPI RtlAddVectoredExceptionHandler(ULONG,PVECTORED_EXCEPTION_HANDLER);
1956 NTSTATUS WINAPI RtlAdjustPrivilege(ULONG,BOOLEAN,BOOLEAN,PBOOLEAN);
1957 NTSTATUS WINAPI RtlAllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY,BYTE,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,PSID *);
1958 RTL_HANDLE * WINAPI RtlAllocateHandle(RTL_HANDLE_TABLE *,ULONG *);
1959 PVOID WINAPI RtlAllocateHeap(HANDLE,ULONG,SIZE_T);
1960 WCHAR WINAPI RtlAnsiCharToUnicodeChar(LPSTR *);
1961 DWORD WINAPI RtlAnsiStringToUnicodeSize(const STRING *);
1962 NTSTATUS WINAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING,PCANSI_STRING,BOOLEAN);
1963 NTSTATUS WINAPI RtlAppendAsciizToString(STRING *,LPCSTR);
1964 NTSTATUS WINAPI RtlAppendStringToString(STRING *,const STRING *);
1965 NTSTATUS WINAPI RtlAppendUnicodeStringToString(UNICODE_STRING *,const UNICODE_STRING *);
1966 NTSTATUS WINAPI RtlAppendUnicodeToString(UNICODE_STRING *,LPCWSTR);
1967 BOOLEAN WINAPI RtlAreAllAccessesGranted(ACCESS_MASK,ACCESS_MASK);
1968 BOOLEAN WINAPI RtlAreAnyAccessesGranted(ACCESS_MASK,ACCESS_MASK);
1969 BOOLEAN WINAPI RtlAreBitsSet(PCRTL_BITMAP,ULONG,ULONG);
1970 BOOLEAN WINAPI RtlAreBitsClear(PCRTL_BITMAP,ULONG,ULONG);
1972 NTSTATUS WINAPI RtlCharToInteger(PCSZ,ULONG,PULONG);
1973 NTSTATUS WINAPI RtlCheckRegistryKey(ULONG, PWSTR);
1974 void WINAPI RtlClearAllBits(PRTL_BITMAP);
1975 void WINAPI RtlClearBits(PRTL_BITMAP,ULONG,ULONG);
1976 PDEBUG_BUFFER WINAPI RtlCreateQueryDebugBuffer(ULONG,BOOLEAN);
1977 ULONG WINAPI RtlCompactHeap(HANDLE,ULONG);
1978 LONG WINAPI RtlCompareString(const STRING*,const STRING*,BOOLEAN);
1979 LONG WINAPI RtlCompareUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
1980 DWORD WINAPI RtlComputeCrc32(DWORD,PBYTE,INT);
1981 NTSTATUS WINAPI RtlConvertSidToUnicodeString(PUNICODE_STRING,PSID,BOOLEAN);
1982 LONGLONG WINAPI RtlConvertLongToLargeInteger(LONG);
1983 ULONGLONG WINAPI RtlConvertUlongToLargeInteger(ULONG);
1984 void WINAPI RtlCopyLuid(PLUID,const LUID*);
1985 void WINAPI RtlCopyLuidAndAttributesArray(ULONG,const LUID_AND_ATTRIBUTES*,PLUID_AND_ATTRIBUTES);
1986 BOOLEAN WINAPI RtlCopySid(DWORD,PSID,PSID);
1987 NTSTATUS WINAPI RtlCopySecurityDescriptor(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR);
1988 void WINAPI RtlCopyString(STRING*,const STRING*);
1989 void WINAPI RtlCopyUnicodeString(UNICODE_STRING*,const UNICODE_STRING*);
1990 NTSTATUS WINAPI RtlCreateAcl(PACL,DWORD,DWORD);
1991 NTSTATUS WINAPI RtlCreateAtomTable(ULONG,RTL_ATOM_TABLE*);
1992 NTSTATUS WINAPI RtlCreateEnvironment(BOOLEAN, PWSTR*);
1993 HANDLE WINAPI RtlCreateHeap(ULONG,PVOID,SIZE_T,SIZE_T,PVOID,PRTL_HEAP_DEFINITION);
1994 NTSTATUS WINAPI RtlCreateProcessParameters(RTL_USER_PROCESS_PARAMETERS**,const UNICODE_STRING*,
1995 const UNICODE_STRING*,const UNICODE_STRING*,
1996 const UNICODE_STRING*,PWSTR,const UNICODE_STRING*,
1997 const UNICODE_STRING*,const UNICODE_STRING*,
1998 const UNICODE_STRING*);
1999 NTSTATUS WINAPI RtlCreateSecurityDescriptor(PSECURITY_DESCRIPTOR,DWORD);
2000 BOOLEAN WINAPI RtlCreateUnicodeString(PUNICODE_STRING,LPCWSTR);
2001 BOOLEAN WINAPI RtlCreateUnicodeStringFromAsciiz(PUNICODE_STRING,LPCSTR);
2002 NTSTATUS WINAPI RtlCreateUserThread(HANDLE,const SECURITY_DESCRIPTOR*,BOOLEAN,PVOID,SIZE_T,SIZE_T,PRTL_THREAD_START_ROUTINE,void*,HANDLE*,CLIENT_ID*);
2004 NTSTATUS WINAPI RtlDeleteAce(PACL,DWORD);
2005 NTSTATUS WINAPI RtlDeleteAtomFromAtomTable(RTL_ATOM_TABLE,RTL_ATOM);
2006 NTSTATUS WINAPI RtlDeleteCriticalSection(RTL_CRITICAL_SECTION *);
2007 NTSTATUS WINAPI RtlDeleteRegistryValue(ULONG, PCWSTR, PCWSTR);
2008 void WINAPI RtlDeleteResource(LPRTL_RWLOCK);
2009 NTSTATUS WINAPI RtlDeleteSecurityObject(PSECURITY_DESCRIPTOR*);
2010 PRTL_USER_PROCESS_PARAMETERS WINAPI RtlDeNormalizeProcessParams(RTL_USER_PROCESS_PARAMETERS*);
2011 NTSTATUS WINAPI RtlDestroyAtomTable(RTL_ATOM_TABLE);
2012 NTSTATUS WINAPI RtlDestroyEnvironment(PWSTR);
2013 NTSTATUS WINAPI RtlDestroyHandleTable(RTL_HANDLE_TABLE *);
2014 HANDLE WINAPI RtlDestroyHeap(HANDLE);
2015 void WINAPI RtlDestroyProcessParameters(RTL_USER_PROCESS_PARAMETERS*);
2016 NTSTATUS WINAPI RtlDestroyQueryDebugBuffer(PDEBUG_BUFFER);
2017 DOS_PATHNAME_TYPE WINAPI RtlDetermineDosPathNameType_U(PCWSTR);
2018 BOOLEAN WINAPI RtlDoesFileExists_U(LPCWSTR);
2019 BOOLEAN WINAPI RtlDosPathNameToNtPathName_U(PCWSTR,PUNICODE_STRING,PWSTR*,CURDIR*);
2020 ULONG WINAPI RtlDosSearchPath_U(LPCWSTR, LPCWSTR, LPCWSTR, ULONG, LPWSTR, LPWSTR*);
2021 WCHAR WINAPI RtlDowncaseUnicodeChar(WCHAR);
2022 NTSTATUS WINAPI RtlDowncaseUnicodeString(UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
2023 void WINAPI RtlDumpResource(LPRTL_RWLOCK);
2024 NTSTATUS WINAPI RtlDuplicateUnicodeString(int,const UNICODE_STRING*,UNICODE_STRING*);
2026 NTSTATUS WINAPI RtlEmptyAtomTable(RTL_ATOM_TABLE,BOOLEAN);
2027 LONGLONG WINAPI RtlEnlargedIntegerMultiply(INT,INT);
2028 ULONGLONG WINAPI RtlEnlargedUnsignedMultiply(UINT,UINT);
2029 UINT WINAPI RtlEnlargedUnsignedDivide(ULONGLONG,UINT,UINT *);
2030 NTSTATUS WINAPI RtlEnterCriticalSection(RTL_CRITICAL_SECTION *);
2031 void WINAPI RtlEraseUnicodeString(UNICODE_STRING*);
2032 NTSTATUS WINAPI RtlEqualComputerName(const UNICODE_STRING*,const UNICODE_STRING*);
2033 NTSTATUS WINAPI RtlEqualDomainName(const UNICODE_STRING*,const UNICODE_STRING*);
2034 BOOLEAN WINAPI RtlEqualLuid(const LUID*,const LUID*);
2035 BOOL WINAPI RtlEqualPrefixSid(PSID,PSID);
2036 BOOL WINAPI RtlEqualSid(PSID,PSID);
2037 BOOLEAN WINAPI RtlEqualString(const STRING*,const STRING*,BOOLEAN);
2038 BOOLEAN WINAPI RtlEqualUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
2039 void DECLSPEC_NORETURN WINAPI RtlExitUserThread(ULONG);
2040 NTSTATUS WINAPI RtlExpandEnvironmentStrings_U(PWSTR, const UNICODE_STRING*, UNICODE_STRING*, ULONG*);
2041 LONGLONG WINAPI RtlExtendedMagicDivide(LONGLONG,LONGLONG,INT);
2042 LONGLONG WINAPI RtlExtendedIntegerMultiply(LONGLONG,INT);
2043 LONGLONG WINAPI RtlExtendedLargeIntegerDivide(LONGLONG,INT,INT *);
2045 NTSTATUS WINAPI RtlFindCharInUnicodeString(int,const UNICODE_STRING*,const UNICODE_STRING*,USHORT*);
2046 ULONG WINAPI RtlFindClearBits(PCRTL_BITMAP,ULONG,ULONG);
2047 ULONG WINAPI RtlFindClearBitsAndSet(PRTL_BITMAP,ULONG,ULONG);
2048 ULONG WINAPI RtlFindClearRuns(PCRTL_BITMAP,PRTL_BITMAP_RUN,ULONG,BOOLEAN);
2049 ULONG WINAPI RtlFindLastBackwardRunSet(PCRTL_BITMAP,ULONG,PULONG);
2050 ULONG WINAPI RtlFindLastBackwardRunClear(PCRTL_BITMAP,ULONG,PULONG);
2051 CCHAR WINAPI RtlFindLeastSignificantBit(ULONGLONG);
2052 ULONG WINAPI RtlFindLongestRunSet(PCRTL_BITMAP,PULONG);
2053 ULONG WINAPI RtlFindLongestRunClear(PCRTL_BITMAP,PULONG);
2054 NTSTATUS WINAPI RtlFindMessage(HMODULE,ULONG,ULONG,ULONG,const MESSAGE_RESOURCE_ENTRY**);
2055 CCHAR WINAPI RtlFindMostSignificantBit(ULONGLONG);
2056 ULONG WINAPI RtlFindNextForwardRunSet(PCRTL_BITMAP,ULONG,PULONG);
2057 ULONG WINAPI RtlFindNextForwardRunClear(PCRTL_BITMAP,ULONG,PULONG);
2058 ULONG WINAPI RtlFindSetBits(PCRTL_BITMAP,ULONG,ULONG);
2059 ULONG WINAPI RtlFindSetBitsAndClear(PRTL_BITMAP,ULONG,ULONG);
2060 ULONG WINAPI RtlFindSetRuns(PCRTL_BITMAP,PRTL_BITMAP_RUN,ULONG,BOOLEAN);
2061 BOOLEAN WINAPI RtlFirstFreeAce(PACL,PACE_HEADER *);
2062 NTSTATUS WINAPI RtlFormatCurrentUserKeyPath(PUNICODE_STRING);
2063 NTSTATUS WINAPI RtlFormatMessage(LPWSTR,UCHAR,BOOLEAN,BOOLEAN,BOOLEAN,va_list *,LPWSTR,ULONG);
2064 void WINAPI RtlFreeAnsiString(PANSI_STRING);
2065 BOOLEAN WINAPI RtlFreeHandle(RTL_HANDLE_TABLE *,RTL_HANDLE *);
2066 BOOLEAN WINAPI RtlFreeHeap(HANDLE,ULONG,PVOID);
2067 void WINAPI RtlFreeOemString(POEM_STRING);
2068 DWORD WINAPI RtlFreeSid(PSID);
2069 void WINAPI RtlFreeUnicodeString(PUNICODE_STRING);
2071 NTSTATUS WINAPI RtlGetAce(PACL,DWORD,LPVOID *);
2072 NTSTATUS WINAPI RtlGetControlSecurityDescriptor(PSECURITY_DESCRIPTOR, PSECURITY_DESCRIPTOR_CONTROL,LPDWORD);
2073 NTSTATUS WINAPI RtlGetCurrentDirectory_U(ULONG, LPWSTR);
2074 PEB * WINAPI RtlGetCurrentPeb(void);
2075 NTSTATUS WINAPI RtlGetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR,PBOOLEAN,PACL *,PBOOLEAN);
2076 ULONG WINAPI RtlGetFullPathName_U(PCWSTR,ULONG,PWSTR,PWSTR*);
2077 NTSTATUS WINAPI RtlGetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID *,PBOOLEAN);
2078 NTSTATUS WINAPI RtlGetLastNtStatus(void);
2079 DWORD WINAPI RtlGetLastWin32Error(void);
2080 DWORD WINAPI RtlGetLongestNtPathLength(void);
2081 BOOLEAN WINAPI RtlGetNtProductType(LPDWORD);
2082 NTSTATUS WINAPI RtlGetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID *,PBOOLEAN);
2083 ULONG WINAPI RtlGetProcessHeaps(ULONG,HANDLE*);
2084 NTSTATUS WINAPI RtlGetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR,PBOOLEAN,PACL *,PBOOLEAN);
2085 NTSTATUS WINAPI RtlGetVersion(RTL_OSVERSIONINFOEXW*);
2086 NTSTATUS WINAPI RtlGUIDFromString(PUNICODE_STRING,GUID*);
2088 PSID_IDENTIFIER_AUTHORITY WINAPI RtlIdentifierAuthoritySid(PSID);
2089 PVOID WINAPI RtlImageDirectoryEntryToData(HMODULE,BOOL,WORD,ULONG *);
2090 PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE);
2091 PIMAGE_SECTION_HEADER WINAPI RtlImageRvaToSection(const IMAGE_NT_HEADERS *,HMODULE,DWORD);
2092 PVOID WINAPI RtlImageRvaToVa(const IMAGE_NT_HEADERS *,HMODULE,DWORD,IMAGE_SECTION_HEADER **);
2093 NTSTATUS WINAPI RtlImpersonateSelf(SECURITY_IMPERSONATION_LEVEL);
2094 void WINAPI RtlInitString(PSTRING,PCSZ);
2095 void WINAPI RtlInitAnsiString(PANSI_STRING,PCSZ);
2096 NTSTATUS WINAPI RtlInitAnsiStringEx(PANSI_STRING,PCSZ);
2097 void WINAPI RtlInitUnicodeString(PUNICODE_STRING,PCWSTR);
2098 NTSTATUS WINAPI RtlInitUnicodeStringEx(PUNICODE_STRING,PCWSTR);
2099 NTSTATUS WINAPI RtlInitializeCriticalSection(RTL_CRITICAL_SECTION *);
2100 NTSTATUS WINAPI RtlInitializeCriticalSectionAndSpinCount(RTL_CRITICAL_SECTION *,DWORD);
2101 void WINAPI RtlInitializeBitMap(PRTL_BITMAP,PULONG,ULONG);
2102 void WINAPI RtlInitializeHandleTable(ULONG,ULONG,RTL_HANDLE_TABLE *);
2103 void WINAPI RtlInitializeResource(LPRTL_RWLOCK);
2104 BOOL WINAPI RtlInitializeSid(PSID,PSID_IDENTIFIER_AUTHORITY,BYTE);
2106 NTSTATUS WINAPI RtlInt64ToUnicodeString(ULONGLONG,ULONG,UNICODE_STRING *);
2107 NTSTATUS WINAPI RtlIntegerToChar(ULONG,ULONG,ULONG,PCHAR);
2108 NTSTATUS WINAPI RtlIntegerToUnicodeString(ULONG,ULONG,UNICODE_STRING *);
2109 ULONG WINAPI RtlIsDosDeviceName_U(PCWSTR);
2110 BOOLEAN WINAPI RtlIsNameLegalDOS8Dot3(const UNICODE_STRING*,POEM_STRING,PBOOLEAN);
2111 BOOLEAN WINAPI RtlIsTextUnicode(LPCVOID,INT,INT *);
2112 BOOLEAN WINAPI RtlIsValidHandle(const RTL_HANDLE_TABLE *, const RTL_HANDLE *);
2113 BOOLEAN WINAPI RtlIsValidIndexHandle(const RTL_HANDLE_TABLE *, ULONG Index, RTL_HANDLE **);
2115 LONGLONG WINAPI RtlLargeIntegerAdd(LONGLONG,LONGLONG);
2116 LONGLONG WINAPI RtlLargeIntegerArithmeticShift(LONGLONG,INT);
2117 ULONGLONG WINAPI RtlLargeIntegerDivide( ULONGLONG,ULONGLONG,ULONGLONG *);
2118 LONGLONG WINAPI RtlLargeIntegerNegate(LONGLONG);
2119 LONGLONG WINAPI RtlLargeIntegerShiftLeft(LONGLONG,INT);
2120 LONGLONG WINAPI RtlLargeIntegerShiftRight(LONGLONG,INT);
2121 LONGLONG WINAPI RtlLargeIntegerSubtract(LONGLONG,LONGLONG);
2122 NTSTATUS WINAPI RtlLargeIntegerToChar(const ULONGLONG *,ULONG,ULONG,PCHAR);
2123 NTSTATUS WINAPI RtlLeaveCriticalSection(RTL_CRITICAL_SECTION *);
2124 DWORD WINAPI RtlLengthRequiredSid(DWORD);
2125 ULONG WINAPI RtlLengthSecurityDescriptor(PSECURITY_DESCRIPTOR);
2126 DWORD WINAPI RtlLengthSid(PSID);
2127 NTSTATUS WINAPI RtlLocalTimeToSystemTime(const LARGE_INTEGER*,PLARGE_INTEGER);
2128 BOOLEAN WINAPI RtlLockHeap(HANDLE);
2129 NTSTATUS WINAPI RtlLookupAtomInAtomTable(RTL_ATOM_TABLE,const WCHAR*,RTL_ATOM*);
2131 NTSTATUS WINAPI RtlMakeSelfRelativeSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,LPDWORD);
2132 void WINAPI RtlMapGenericMask(PACCESS_MASK,const GENERIC_MAPPING*);
2133 NTSTATUS WINAPI RtlMultiByteToUnicodeN(LPWSTR,DWORD,LPDWORD,LPCSTR,DWORD);
2134 NTSTATUS WINAPI RtlMultiByteToUnicodeSize(DWORD*,LPCSTR,UINT);
2136 NTSTATUS WINAPI RtlNewSecurityObject(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR*,BOOLEAN,HANDLE,PGENERIC_MAPPING);
2137 PRTL_USER_PROCESS_PARAMETERS WINAPI RtlNormalizeProcessParams(RTL_USER_PROCESS_PARAMETERS*);
2138 ULONG WINAPI RtlNtStatusToDosError(NTSTATUS);
2139 ULONG WINAPI RtlNtStatusToDosErrorNoTeb(NTSTATUS);
2140 ULONG WINAPI RtlNumberOfSetBits(PCRTL_BITMAP);
2141 ULONG WINAPI RtlNumberOfClearBits(PCRTL_BITMAP);
2143 UINT WINAPI RtlOemStringToUnicodeSize(const STRING*);
2144 NTSTATUS WINAPI RtlOemStringToUnicodeString(UNICODE_STRING*,const STRING*,BOOLEAN);
2145 NTSTATUS WINAPI RtlOemToUnicodeN(LPWSTR,DWORD,LPDWORD,LPCSTR,DWORD);
2146 NTSTATUS WINAPI RtlOpenCurrentUser(ACCESS_MASK,PHANDLE);
2148 PVOID WINAPI RtlPcToFileHeader(PVOID,PVOID*);
2149 NTSTATUS WINAPI RtlPinAtomInAtomTable(RTL_ATOM_TABLE,RTL_ATOM);
2150 BOOLEAN WINAPI RtlPrefixString(const STRING*,const STRING*,BOOLEAN);
2151 BOOLEAN WINAPI RtlPrefixUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
2153 NTSTATUS WINAPI RtlQueryAtomInAtomTable(RTL_ATOM_TABLE,RTL_ATOM,ULONG*,ULONG*,WCHAR*,ULONG*);
2154 NTSTATUS WINAPI RtlQueryEnvironmentVariable_U(PWSTR,PUNICODE_STRING,PUNICODE_STRING);
2155 NTSTATUS WINAPI RtlQueryInformationAcl(PACL,LPVOID,DWORD,ACL_INFORMATION_CLASS);
2156 NTSTATUS WINAPI RtlQueryProcessDebugInformation(ULONG,ULONG,PDEBUG_BUFFER);
2157 NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID);
2158 NTSTATUS WINAPI RtlQueryTimeZoneInformation(RTL_TIME_ZONE_INFORMATION*);
2159 NTSTATUS WINAPI RtlQueueWorkItem(PRTL_WORK_ITEM_ROUTINE,PVOID,ULONG);
2160 void WINAPI RtlRaiseException(PEXCEPTION_RECORD);
2161 void WINAPI RtlRaiseStatus(NTSTATUS);
2162 ULONG WINAPI RtlRandom(PULONG);
2163 PVOID WINAPI RtlReAllocateHeap(HANDLE,ULONG,PVOID,SIZE_T);
2164 void WINAPI RtlReleasePebLock(void);
2165 void WINAPI RtlReleaseResource(LPRTL_RWLOCK);
2166 ULONG WINAPI RtlRemoveVectoredExceptionHandler(PVOID);
2167 void WINAPI RtlRestoreLastWin32Error(DWORD);
2169 void WINAPI RtlSecondsSince1970ToTime(DWORD,LARGE_INTEGER *);
2170 void WINAPI RtlSecondsSince1980ToTime(DWORD,LARGE_INTEGER *);
2171 NTSTATUS WINAPI RtlSelfRelativeToAbsoluteSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,
2172 PDWORD,PACL,PDWORD,PACL,PDWORD,PSID,PDWORD,PSID,PDWORD);
2173 void WINAPI RtlSetAllBits(PRTL_BITMAP);
2174 void WINAPI RtlSetBits(PRTL_BITMAP,ULONG,ULONG);
2175 ULONG WINAPI RtlSetCriticalSectionSpinCount(RTL_CRITICAL_SECTION*,ULONG);
2176 NTSTATUS WINAPI RtlSetCurrentDirectory_U(const UNICODE_STRING*);
2177 void WINAPI RtlSetCurrentEnvironment(PWSTR, PWSTR*);
2178 NTSTATUS WINAPI RtlSetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR,BOOLEAN,PACL,BOOLEAN);
2179 NTSTATUS WINAPI RtlSetEnvironmentVariable(PWSTR*,PUNICODE_STRING,PUNICODE_STRING);
2180 NTSTATUS WINAPI RtlSetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID,BOOLEAN);
2181 NTSTATUS WINAPI RtlSetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID,BOOLEAN);
2182 void WINAPI RtlSetLastWin32Error(DWORD);
2183 void WINAPI RtlSetLastWin32ErrorAndNtStatusFromNtStatus(NTSTATUS);
2184 NTSTATUS WINAPI RtlSetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR,BOOLEAN,PACL,BOOLEAN);
2185 NTSTATUS WINAPI RtlSetTimeZoneInformation(const RTL_TIME_ZONE_INFORMATION*);
2186 SIZE_T WINAPI RtlSizeHeap(HANDLE,ULONG,PVOID);
2187 NTSTATUS WINAPI RtlStringFromGUID(REFGUID,PUNICODE_STRING);
2188 LPDWORD WINAPI RtlSubAuthoritySid(PSID,DWORD);
2189 LPBYTE WINAPI RtlSubAuthorityCountSid(PSID);
2190 NTSTATUS WINAPI RtlSystemTimeToLocalTime(const LARGE_INTEGER*,PLARGE_INTEGER);
2192 void WINAPI RtlTimeToTimeFields(const LARGE_INTEGER*,PTIME_FIELDS);
2193 BOOLEAN WINAPI RtlTimeFieldsToTime(PTIME_FIELDS,PLARGE_INTEGER);
2194 void WINAPI RtlTimeToElapsedTimeFields(const LARGE_INTEGER *,PTIME_FIELDS);
2195 BOOLEAN WINAPI RtlTimeToSecondsSince1970(const LARGE_INTEGER *,LPDWORD);
2196 BOOLEAN WINAPI RtlTimeToSecondsSince1980(const LARGE_INTEGER *,LPDWORD);
2197 BOOL WINAPI RtlTryEnterCriticalSection(RTL_CRITICAL_SECTION *);
2199 ULONGLONG __cdecl RtlUlonglongByteSwap(ULONGLONG);
2200 DWORD WINAPI RtlUnicodeStringToAnsiSize(const UNICODE_STRING*);
2201 NTSTATUS WINAPI RtlUnicodeStringToAnsiString(PANSI_STRING,PCUNICODE_STRING,BOOLEAN);
2202 NTSTATUS WINAPI RtlUnicodeStringToInteger(const UNICODE_STRING *,ULONG,ULONG *);
2203 DWORD WINAPI RtlUnicodeStringToOemSize(const UNICODE_STRING*);
2204 NTSTATUS WINAPI RtlUnicodeStringToOemString(POEM_STRING,PCUNICODE_STRING,BOOLEAN);
2205 NTSTATUS WINAPI RtlUnicodeToMultiByteN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
2206 NTSTATUS WINAPI RtlUnicodeToMultiByteSize(PULONG,PCWSTR,ULONG);
2207 NTSTATUS WINAPI RtlUnicodeToOemN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
2208 ULONG WINAPI RtlUniform(PULONG);
2209 BOOLEAN WINAPI RtlUnlockHeap(HANDLE);
2210 void WINAPI RtlUnwind(PVOID,PVOID,PEXCEPTION_RECORD,PVOID);
2211 #ifdef __ia64__
2212 void WINAPI RtlUnwind2(FRAME_POINTERS,PVOID,PEXCEPTION_RECORD,PVOID,PCONTEXT);
2213 void WINAPI RtlUnwindEx(FRAME_POINTERS,PVOID,PEXCEPTION_RECORD,PVOID,PCONTEXT,PUNWIND_HISTORY_TABLE);
2214 #endif
2215 WCHAR WINAPI RtlUpcaseUnicodeChar(WCHAR);
2216 NTSTATUS WINAPI RtlUpcaseUnicodeString(UNICODE_STRING*,const UNICODE_STRING *,BOOLEAN);
2217 NTSTATUS WINAPI RtlUpcaseUnicodeStringToAnsiString(STRING*,const UNICODE_STRING*,BOOLEAN);
2218 NTSTATUS WINAPI RtlUpcaseUnicodeStringToCountedOemString(STRING*,const UNICODE_STRING*,BOOLEAN);
2219 NTSTATUS WINAPI RtlUpcaseUnicodeStringToOemString(STRING*,const UNICODE_STRING*,BOOLEAN);
2220 NTSTATUS WINAPI RtlUpcaseUnicodeToMultiByteN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
2221 NTSTATUS WINAPI RtlUpcaseUnicodeToOemN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
2222 CHAR WINAPI RtlUpperChar(CHAR);
2223 void WINAPI RtlUpperString(STRING *,const STRING *);
2225 NTSTATUS WINAPI RtlValidSecurityDescriptor(PSECURITY_DESCRIPTOR);
2226 BOOLEAN WINAPI RtlValidAcl(PACL);
2227 BOOLEAN WINAPI RtlValidSid(PSID);
2228 BOOLEAN WINAPI RtlValidateHeap(HANDLE,ULONG,LPCVOID);
2229 NTSTATUS WINAPI RtlVerifyVersionInfo(const RTL_OSVERSIONINFOEXW*,DWORD,DWORDLONG);
2231 NTSTATUS WINAPI RtlWalkHeap(HANDLE,PVOID);
2233 NTSTATUS WINAPI RtlpNtCreateKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,PULONG);
2234 NTSTATUS WINAPI RtlpWaitForCriticalSection(RTL_CRITICAL_SECTION *);
2235 NTSTATUS WINAPI RtlpUnWaitCriticalSection(RTL_CRITICAL_SECTION *);
2237 NTSTATUS WINAPI vDbgPrintEx(ULONG,ULONG,LPCSTR,va_list);
2238 NTSTATUS WINAPI vDbgPrintExWithPrefix(LPCSTR,ULONG,ULONG,LPCSTR,va_list);
2240 /* Wine internal functions */
2242 extern NTSTATUS wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRING *unix_name_ret,
2243 UINT disposition, BOOLEAN check_case );
2244 extern NTSTATUS wine_unix_to_nt_file_name( const ANSI_STRING *name, UNICODE_STRING *nt );
2247 /***********************************************************************
2248 * Inline functions
2251 #define InitializeObjectAttributes(p,n,a,r,s) \
2252 do { \
2253 (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
2254 (p)->RootDirectory = r; \
2255 (p)->Attributes = a; \
2256 (p)->ObjectName = n; \
2257 (p)->SecurityDescriptor = s; \
2258 (p)->SecurityQualityOfService = NULL; \
2259 } while (0)
2261 #define NtCurrentProcess() ((HANDLE)-1)
2263 #define RtlFillMemory(Destination,Length,Fill) memset((Destination),(Fill),(Length))
2264 #define RtlMoveMemory(Destination,Source,Length) memmove((Destination),(Source),(Length))
2265 #define RtlStoreUlong(p,v) do { ULONG _v = (v); memcpy((p), &_v, sizeof(_v)); } while (0)
2266 #define RtlStoreUlonglong(p,v) do { ULONGLONG _v = (v); memcpy((p), &_v, sizeof(_v)); } while (0)
2267 #define RtlRetrieveUlong(p,s) memcpy((p), (s), sizeof(ULONG))
2268 #define RtlRetrieveUlonglong(p,s) memcpy((p), (s), sizeof(ULONGLONG))
2269 #define RtlZeroMemory(Destination,Length) memset((Destination),0,(Length))
2271 inline static BOOLEAN RtlCheckBit(PCRTL_BITMAP lpBits, ULONG ulBit)
2273 if (lpBits && ulBit < lpBits->SizeOfBitMap &&
2274 lpBits->Buffer[ulBit >> 5] & (1 << (ulBit & 31)))
2275 return TRUE;
2276 return FALSE;
2279 /* These are implemented as __fastcall, so we can't let Winelib apps link with them */
2280 inline static USHORT RtlUshortByteSwap(USHORT s)
2282 return (s >> 8) | (s << 8);
2284 inline static ULONG RtlUlongByteSwap(ULONG i)
2286 #if defined(__i386__) && defined(__GNUC__)
2287 ULONG ret;
2288 __asm__("bswap %0" : "=r" (ret) : "0" (i) );
2289 return ret;
2290 #else
2291 return ((ULONG)RtlUshortByteSwap((USHORT)i) << 16) | RtlUshortByteSwap((USHORT)(i >> 16));
2292 #endif
2295 /*************************************************************************
2296 * Loader functions and structures.
2298 * Those are not part of standard Winternl.h
2300 typedef struct _LDR_MODULE
2302 LIST_ENTRY InLoadOrderModuleList;
2303 LIST_ENTRY InMemoryOrderModuleList;
2304 LIST_ENTRY InInitializationOrderModuleList;
2305 void* BaseAddress;
2306 void* EntryPoint;
2307 ULONG SizeOfImage;
2308 UNICODE_STRING FullDllName;
2309 UNICODE_STRING BaseDllName;
2310 ULONG Flags;
2311 SHORT LoadCount;
2312 SHORT TlsIndex;
2313 HANDLE SectionHandle;
2314 ULONG CheckSum;
2315 ULONG TimeDateStamp;
2316 } LDR_MODULE, *PLDR_MODULE;
2318 /* those defines are (some of the) regular LDR_MODULE.Flags values */
2319 #define LDR_IMAGE_IS_DLL 0x00000004
2320 #define LDR_LOAD_IN_PROGRESS 0x00001000
2321 #define LDR_UNLOAD_IN_PROGRESS 0x00002000
2322 #define LDR_NO_DLL_CALLS 0x00040000
2323 #define LDR_PROCESS_ATTACHED 0x00080000
2324 #define LDR_MODULE_REBASED 0x00200000
2326 /* these ones is Wine specific */
2327 #define LDR_DONT_RESOLVE_REFS 0x40000000
2328 #define LDR_WINE_INTERNAL 0x80000000
2330 /* FIXME: to be checked */
2331 #define MAXIMUM_FILENAME_LENGTH 256
2333 typedef struct _SYSTEM_MODULE
2335 ULONG Reserved1;
2336 ULONG Reserved2;
2337 PVOID ImageBaseAddress;
2338 ULONG ImageSize;
2339 ULONG Flags;
2340 WORD Id;
2341 WORD Rank;
2342 WORD Unknown;
2343 WORD NameOffset;
2344 BYTE Name[MAXIMUM_FILENAME_LENGTH];
2345 } SYSTEM_MODULE, *PSYSTEM_MODULE;
2347 typedef struct _SYSTEM_MODULE_INFORMATION
2349 ULONG ModulesCount;
2350 SYSTEM_MODULE Modules[1]; /* FIXME: should be Modules[0] */
2351 } SYSTEM_MODULE_INFORMATION, *PSYSTEM_MODULE_INFORMATION;
2353 NTSTATUS WINAPI LdrDisableThreadCalloutsForDll(HMODULE);
2354 NTSTATUS WINAPI LdrFindEntryForAddress(const void*, PLDR_MODULE*);
2355 NTSTATUS WINAPI LdrLockLoaderLock(ULONG,ULONG*,ULONG*);
2356 NTSTATUS WINAPI LdrQueryProcessModuleInformation(SYSTEM_MODULE_INFORMATION*, ULONG, ULONG*);
2357 NTSTATUS WINAPI LdrUnloadDll(HMODULE);
2358 NTSTATUS WINAPI LdrUnlockLoaderLock(ULONG,ULONG);
2360 typedef struct _FILE_COMPLETION_INFORMATION {
2361 HANDLE CompletionPort;
2362 ULONG_PTR CompletionKey;
2363 } FILE_COMPLETION_INFORMATION;
2364 typedef FILE_COMPLETION_INFORMATION *PFILE_COMPLETION_INFORMATION;
2366 /* list manipulation macros */
2367 #define InitializeListHead(le) (void)((le)->Flink = (le)->Blink = (le))
2368 #define InsertHeadList(le,e) do { PLIST_ENTRY f = (le)->Flink; (e)->Flink = f; (e)->Blink = (le); f->Blink = (e); (le)->Flink = (e); } while (0)
2369 #define InsertTailList(le,e) do { PLIST_ENTRY b = (le)->Blink; (e)->Flink = (le); (e)->Blink = b; b->Flink = (e); (le)->Blink = (e); } while (0)
2370 #define IsListEmpty(le) ((le)->Flink == (le))
2371 #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)
2372 static inline PLIST_ENTRY RemoveHeadList(PLIST_ENTRY le)
2374 PLIST_ENTRY f, b, e;
2376 e = le->Flink;
2377 f = le->Flink->Flink;
2378 b = le->Flink->Blink;
2379 f->Blink = b;
2380 b->Flink = f;
2382 if (e != le) e->Flink = e->Blink = NULL;
2383 return e;
2385 static inline PLIST_ENTRY RemoveTailList(PLIST_ENTRY le)
2387 PLIST_ENTRY f, b, e;
2389 e = le->Blink;
2390 f = le->Blink->Flink;
2391 b = le->Blink->Blink;
2392 f->Blink = b;
2393 b->Flink = f;
2395 if (e != le) e->Flink = e->Blink = NULL;
2396 return e;
2399 #ifdef __cplusplus
2400 } /* extern "C" */
2401 #endif /* defined(__cplusplus) */
2403 #endif /* __WINE_WINTERNL_H */