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
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;
40 typedef CONST char *PCSZ;
43 typedef CSHORT *PCSHORT;
45 #ifndef __STRING_DEFINED__
46 #define __STRING_DEFINED__
47 typedef struct _STRING {
54 typedef STRING ANSI_STRING;
55 typedef PSTRING PANSI_STRING;
56 typedef const STRING *PCANSI_STRING;
58 typedef STRING OEM_STRING;
59 typedef PSTRING POEM_STRING;
60 typedef const STRING *PCOEM_STRING;
62 #ifndef __UNICODE_STRING_DEFINED__
63 #define __UNICODE_STRING_DEFINED__
64 typedef struct _UNICODE_STRING {
65 USHORT Length; /* bytes */
66 USHORT MaximumLength; /* bytes */
68 } UNICODE_STRING, *PUNICODE_STRING;
71 typedef const UNICODE_STRING *PCUNICODE_STRING;
75 /* 64 bit number of 100 nanoseconds intervals since January 1, 1601 */
76 typedef struct _FILETIME
78 #ifdef WORDS_BIGENDIAN
85 } FILETIME, *PFILETIME, *LPFILETIME;
86 #endif /* _FILETIME_ */
89 * RTL_SYSTEM_TIME and RTL_TIME_ZONE_INFORMATION are the same as
90 * the SYSTEMTIME and TIME_ZONE_INFORMATION structures defined
91 * in winbase.h, however we need to define them separately so
92 * winternl.h doesn't depend on winbase.h. They are used by
93 * RtlQueryTimeZoneInformation and RtlSetTimeZoneInformation.
94 * The names are guessed; if anybody knows the real names, let me know.
96 typedef struct _RTL_SYSTEM_TIME {
105 } RTL_SYSTEM_TIME, *PRTL_SYSTEM_TIME;
107 typedef struct _RTL_TIME_ZONE_INFORMATION {
109 WCHAR StandardName[32];
110 RTL_SYSTEM_TIME StandardDate;
112 WCHAR DaylightName[32];
113 RTL_SYSTEM_TIME DaylightDate;
115 } RTL_TIME_ZONE_INFORMATION, *PRTL_TIME_ZONE_INFORMATION;
117 typedef struct _CLIENT_ID
119 HANDLE UniqueProcess;
121 } CLIENT_ID, *PCLIENT_ID;
123 typedef struct _CURDIR
125 UNICODE_STRING DosPath;
129 typedef struct RTL_DRIVE_LETTER_CURDIR
134 UNICODE_STRING DosPath;
135 } RTL_DRIVE_LETTER_CURDIR, *PRTL_DRIVE_LETTER_CURDIR;
137 typedef struct tagRTL_BITMAP {
138 ULONG SizeOfBitMap; /* Number of bits in the bitmap */
139 PULONG Buffer; /* Bitmap data, assumed sized to a DWORD boundary */
140 } RTL_BITMAP, *PRTL_BITMAP;
142 typedef const RTL_BITMAP *PCRTL_BITMAP;
144 typedef struct tagRTL_BITMAP_RUN {
145 ULONG StartingIndex; /* Bit position at which run starts */
146 ULONG NumberOfBits; /* Size of the run in bits */
147 } RTL_BITMAP_RUN, *PRTL_BITMAP_RUN;
149 typedef const RTL_BITMAP_RUN *PCRTL_BITMAP_RUN;
151 typedef struct _RTL_USER_PROCESS_PARAMETERS
153 ULONG AllocationSize;
157 HANDLE ConsoleHandle;
162 CURDIR CurrentDirectory;
163 UNICODE_STRING DllPath;
164 UNICODE_STRING ImagePathName;
165 UNICODE_STRING CommandLine;
173 ULONG dwFillAttribute;
176 UNICODE_STRING WindowTitle;
177 UNICODE_STRING Desktop;
178 UNICODE_STRING ShellInfo;
179 UNICODE_STRING RuntimeInfo;
180 RTL_DRIVE_LETTER_CURDIR DLCurrentDirectory[0x20];
181 } RTL_USER_PROCESS_PARAMETERS, *PRTL_USER_PROCESS_PARAMETERS;
183 /* value for Flags field (FIXME: not the correct name) */
184 #define PROCESS_PARAMS_FLAG_NORMALIZED 1
186 typedef struct _PEB_LDR_DATA
191 LIST_ENTRY InLoadOrderModuleList;
192 LIST_ENTRY InMemoryOrderModuleList;
193 LIST_ENTRY InInitializationOrderModuleList;
194 } PEB_LDR_DATA, *PPEB_LDR_DATA;
196 typedef struct _GDI_TEB_BATCH
203 typedef struct _RTL_ACTIVATION_CONTEXT_STACK_FRAME
205 struct _RTL_ACTIVATION_CONTEXT_STACK_FRAME *Previous;
206 struct _ACTIVATION_CONTEXT *ActivationContext;
208 } RTL_ACTIVATION_CONTEXT_STACK_FRAME, *PRTL_ACTIVATION_CONTEXT_STACK_FRAME;
210 typedef struct _ACTIVATION_CONTEXT_STACK
213 ULONG NextCookieSequenceNumber;
214 RTL_ACTIVATION_CONTEXT_STACK_FRAME *ActiveFrame;
215 LIST_ENTRY FrameListCache;
216 } ACTIVATION_CONTEXT_STACK, *PACTIVATION_CONTEXT_STACK;
218 /***********************************************************************
223 BOOLEAN InheritedAddressSpace; /* 00 */
224 BOOLEAN ReadImageFileExecOptions; /* 01 */
225 BOOLEAN BeingDebugged; /* 02 */
226 BOOLEAN SpareBool; /* 03 */
227 HANDLE Mutant; /* 04 */
228 HMODULE ImageBaseAddress; /* 08 */
229 PPEB_LDR_DATA LdrData; /* 0c */
230 RTL_USER_PROCESS_PARAMETERS *ProcessParameters; /* 10 */
231 PVOID SubSystemData; /* 14 */
232 HANDLE ProcessHeap; /* 18 */
233 PRTL_CRITICAL_SECTION FastPebLock; /* 1c */
234 PVOID /*PPEBLOCKROUTINE*/ FastPebLockRoutine; /* 20 */
235 PVOID /*PPEBLOCKROUTINE*/ FastPebUnlockRoutine; /* 24 */
236 ULONG EnvironmentUpdateCount; /* 28 */
237 PVOID KernelCallbackTable; /* 2c */
238 PVOID EventLogSection; /* 30 */
239 PVOID EventLog; /* 34 */
240 PVOID /*PPEB_FREE_BLOCK*/ FreeList; /* 38 */
241 ULONG TlsExpansionCounter; /* 3c */
242 PRTL_BITMAP TlsBitmap; /* 40 */
243 ULONG TlsBitmapBits[2]; /* 44 */
244 PVOID ReadOnlySharedMemoryBase; /* 4c */
245 PVOID ReadOnlySharedMemoryHeap; /* 50 */
246 PVOID *ReadOnlyStaticServerData; /* 54 */
247 PVOID AnsiCodePageData; /* 58 */
248 PVOID OemCodePageData; /* 5c */
249 PVOID UnicodeCaseTableData; /* 60 */
250 ULONG NumberOfProcessors; /* 64 */
251 ULONG NtGlobalFlag; /* 68 */
252 BYTE Spare2[4]; /* 6c */
253 LARGE_INTEGER CriticalSectionTimeout; /* 70 */
254 ULONG HeapSegmentReserve; /* 78 */
255 ULONG HeapSegmentCommit; /* 7c */
256 ULONG HeapDeCommitTotalFreeThreshold; /* 80 */
257 ULONG HeapDeCommitFreeBlockThreshold; /* 84 */
258 ULONG NumberOfHeaps; /* 88 */
259 ULONG MaximumNumberOfHeaps; /* 8c */
260 PVOID *ProcessHeaps; /* 90 */
261 PVOID GdiSharedHandleTable; /* 94 */
262 PVOID ProcessStarterHelper; /* 98 */
263 PVOID GdiDCAttributeList; /* 9c */
264 PVOID LoaderLock; /* a0 */
265 ULONG OSMajorVersion; /* a4 */
266 ULONG OSMinorVersion; /* a8 */
267 ULONG OSBuildNumber; /* ac */
268 ULONG OSPlatformId; /* b0 */
269 ULONG ImageSubSystem; /* b4 */
270 ULONG ImageSubSystemMajorVersion; /* b8 */
271 ULONG ImageSubSystemMinorVersion; /* bc */
272 ULONG ImageProcessAffinityMask; /* c0 */
273 ULONG GdiHandleBuffer[34]; /* c4 */
274 ULONG PostProcessInitRoutine; /* 14c */
275 PRTL_BITMAP TlsExpansionBitmap; /* 150 */
276 ULONG TlsExpansionBitmapBits[32]; /* 154 */
277 ULONG SessionId; /* 1d4 */
281 /***********************************************************************
284 #ifndef WINE_NO_TEB /* don't define TEB if included from thread.h */
285 # ifndef WINE_TEB_DEFINED
286 # define WINE_TEB_DEFINED
289 NT_TIB Tib; /* 000 */
290 PVOID EnvironmentPointer; /* 01c */
291 CLIENT_ID ClientId; /* 020 */
292 PVOID ActiveRpcHandle; /* 028 */
293 PVOID ThreadLocalStoragePointer; /* 02c */
295 ULONG LastErrorValue; /* 034 */
296 ULONG CountOfOwnedCriticalSections;/* 038 */
297 PVOID CsrClientThread; /* 03c */
298 PVOID Win32ThreadInfo; /* 040 */
299 ULONG Win32ClientInfo[31]; /* 044 used for user32 private data in Wine */
300 PVOID WOW32Reserved; /* 0c0 */
301 ULONG CurrentLocale; /* 0c4 */
302 ULONG FpSoftwareStatusRegister; /* 0c8 */
303 PVOID SystemReserved1[54]; /* 0cc used for kernel32 private data in Wine */
304 LONG ExceptionCode; /* 1a4 */
305 ACTIVATION_CONTEXT_STACK ActivationContextStack; /* 1a8 */
306 BYTE SpareBytes1[24]; /* 1bc used for ntdll private data in Wine */
307 PVOID SystemReserved2[10]; /* 1d4 used for ntdll private data in Wine */
308 GDI_TEB_BATCH GdiTebBatch; /* 1fc */
309 ULONG gdiRgn; /* 6dc */
310 ULONG gdiPen; /* 6e0 */
311 ULONG gdiBrush; /* 6e4 */
312 CLIENT_ID RealClientId; /* 6e8 */
313 HANDLE GdiCachedProcessHandle; /* 6f0 */
314 ULONG GdiClientPID; /* 6f4 */
315 ULONG GdiClientTID; /* 6f8 */
316 PVOID GdiThreadLocaleInfo; /* 6fc */
317 PVOID UserReserved[5]; /* 700 */
318 PVOID glDispachTable[280]; /* 714 */
319 ULONG glReserved1[26]; /* b74 */
320 PVOID glReserved2; /* bdc */
321 PVOID glSectionInfo; /* be0 */
322 PVOID glSection; /* be4 */
323 PVOID glTable; /* be8 */
324 PVOID glCurrentRC; /* bec */
325 PVOID glContext; /* bf0 */
326 ULONG LastStatusValue; /* bf4 */
327 UNICODE_STRING StaticUnicodeString; /* bf8 used by advapi32 */
328 WCHAR StaticUnicodeBuffer[261]; /* c00 used by advapi32 */
329 PVOID DeallocationStack; /* e0c */
330 PVOID TlsSlots[64]; /* e10 */
331 LIST_ENTRY TlsLinks; /* f10 */
333 PVOID ReservedForNtRpc; /* f1c */
334 PVOID DbgSsReserved[2]; /* f20 */
335 ULONG HardErrorDisabled; /* f28 */
336 PVOID Instrumentation[16]; /* f2c */
337 PVOID WinSockData; /* f6c */
338 ULONG GdiBatchCount; /* f70 */
339 ULONG Spare2; /* f74 */
340 ULONG Spare3; /* f78 */
341 ULONG Spare4; /* f7c */
342 PVOID ReservedForOle; /* f80 */
343 ULONG WaitingOnLoaderLock; /* f84 */
344 PVOID Reserved5[3]; /* f88 */
345 PVOID *TlsExpansionSlots; /* f94 */
347 # endif /* WINE_TEB_DEFINED */
348 #endif /* WINE_NO_TEB */
350 /***********************************************************************
354 typedef enum _FILE_INFORMATION_CLASS {
355 FileDirectoryInformation = 1,
356 FileFullDirectoryInformation,
357 FileBothDirectoryInformation,
358 FileBasicInformation,
359 FileStandardInformation,
360 FileInternalInformation,
362 FileAccessInformation,
364 FileRenameInformation,
366 FileNamesInformation,
367 FileDispositionInformation,
368 FilePositionInformation,
369 FileFullEaInformation,
371 FileAlignmentInformation,
373 FileAllocationInformation,
374 FileEndOfFileInformation,
375 FileAlternateNameInformation,
376 FileStreamInformation,
378 FilePipeLocalInformation,
379 FilePipeRemoteInformation,
380 FileMailslotQueryInformation,
381 FileMailslotSetInformation,
382 FileCompressionInformation,
383 FileObjectIdInformation,
384 FileCompletionInformation,
385 FileMoveClusterInformation,
386 FileQuotaInformation,
387 FileReparsePointInformation,
388 FileNetworkOpenInformation,
389 FileAttributeTagInformation,
390 FileTrackingInformation,
391 FileMaximumInformation
392 } FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS;
394 typedef struct _FILE_DIRECTORY_INFORMATION {
395 ULONG NextEntryOffset;
397 LARGE_INTEGER CreationTime;
398 LARGE_INTEGER LastAccessTime;
399 LARGE_INTEGER LastWriteTime;
400 LARGE_INTEGER ChangeTime;
401 LARGE_INTEGER EndOfFile;
402 LARGE_INTEGER AllocationSize;
403 ULONG FileAttributes;
404 ULONG FileNameLength;
405 WCHAR FileName[ANYSIZE_ARRAY];
406 } FILE_DIRECTORY_INFORMATION, *PFILE_DIRECTORY_INFORMATION;
408 typedef struct _FILE_FULL_DIRECTORY_INFORMATION {
409 ULONG NextEntryOffset;
411 LARGE_INTEGER CreationTime;
412 LARGE_INTEGER LastAccessTime;
413 LARGE_INTEGER LastWriteTime;
414 LARGE_INTEGER ChangeTime;
415 LARGE_INTEGER EndOfFile;
416 LARGE_INTEGER AllocationSize;
417 ULONG FileAttributes;
418 ULONG FileNameLength;
420 WCHAR FileName[ANYSIZE_ARRAY];
421 } FILE_FULL_DIRECTORY_INFORMATION, *PFILE_FULL_DIRECTORY_INFORMATION,
422 FILE_FULL_DIR_INFORMATION, *PFILE_FULL_DIR_INFORMATION;
424 typedef struct _FILE_BOTH_DIRECTORY_INFORMATION {
425 ULONG NextEntryOffset;
427 LARGE_INTEGER CreationTime;
428 LARGE_INTEGER LastAccessTime;
429 LARGE_INTEGER LastWriteTime;
430 LARGE_INTEGER ChangeTime;
431 LARGE_INTEGER EndOfFile;
432 LARGE_INTEGER AllocationSize;
433 ULONG FileAttributes;
434 ULONG FileNameLength;
436 CHAR ShortNameLength;
438 WCHAR FileName[ANYSIZE_ARRAY];
439 } FILE_BOTH_DIRECTORY_INFORMATION, *PFILE_BOTH_DIRECTORY_INFORMATION,
440 FILE_BOTH_DIR_INFORMATION, *PFILE_BOTH_DIR_INFORMATION;
442 typedef struct _FILE_BASIC_INFORMATION {
443 LARGE_INTEGER CreationTime;
444 LARGE_INTEGER LastAccessTime;
445 LARGE_INTEGER LastWriteTime;
446 LARGE_INTEGER ChangeTime;
447 ULONG FileAttributes;
448 } FILE_BASIC_INFORMATION, *PFILE_BASIC_INFORMATION;
450 typedef struct _FILE_STANDARD_INFORMATION {
451 LARGE_INTEGER AllocationSize;
452 LARGE_INTEGER EndOfFile;
454 BOOLEAN DeletePending;
456 } FILE_STANDARD_INFORMATION, *PFILE_STANDARD_INFORMATION;
458 typedef struct _FILE_INTERNAL_INFORMATION {
459 LARGE_INTEGER IndexNumber;
460 } FILE_INTERNAL_INFORMATION, *PFILE_INTERNAL_INFORMATION;
462 typedef struct _FILE_EA_INFORMATION {
464 } FILE_EA_INFORMATION, *PFILE_EA_INFORMATION;
466 typedef struct _FILE_ACCESS_INFORMATION {
467 ACCESS_MASK AccessFlags;
468 } FILE_ACCESS_INFORMATION, *PFILE_ACCESS_INFORMATION;
470 typedef struct _FILE_NAME_INFORMATION {
471 ULONG FileNameLength;
473 } FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION;
475 typedef struct _FILE_RENAME_INFORMATION {
478 ULONG FileNameLength;
480 } FILE_RENAME_INFORMATION, *PFILE_RENAME_INFORMATION;
482 typedef struct _FILE_NAMES_INFORMATION {
483 ULONG NextEntryOffset;
485 ULONG FileNameLength;
487 } FILE_NAMES_INFORMATION, *PFILE_NAMES_INFORMATION;
489 typedef struct _FILE_DISPOSITION_INFORMATION {
490 BOOLEAN DoDeleteFile;
491 } FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION;
493 typedef struct _FILE_POSITION_INFORMATION {
494 LARGE_INTEGER CurrentByteOffset;
495 } FILE_POSITION_INFORMATION, *PFILE_POSITION_INFORMATION;
497 typedef struct _FILE_ALIGNMENT_INFORMATION {
498 ULONG AlignmentRequirement;
499 } FILE_ALIGNMENT_INFORMATION, *PFILE_ALIGNMENT_INFORMATION;
501 typedef struct _FILE_ALLOCATION_INFORMATION {
502 LARGE_INTEGER AllocationSize;
503 } FILE_ALLOCATION_INFORMATION, *PFILE_ALLOCATION_INFORMATION;
505 typedef struct _FILE_END_OF_FILE_INFORMATION {
506 LARGE_INTEGER EndOfFile;
507 } FILE_END_OF_FILE_INFORMATION, *PFILE_END_OF_FILE_INFORMATION;
509 typedef struct _FILE_NETWORK_OPEN_INFORMATION {
510 LARGE_INTEGER CreationTime;
511 LARGE_INTEGER LastAccessTime;
512 LARGE_INTEGER LastWriteTime;
513 LARGE_INTEGER ChangeTime;
514 LARGE_INTEGER AllocationSize;
515 LARGE_INTEGER EndOfFile;
516 ULONG FileAttributes;
517 } FILE_NETWORK_OPEN_INFORMATION, *PFILE_NETWORK_OPEN_INFORMATION;
519 typedef struct _FILE_FULL_EA_INFORMATION {
520 ULONG NextEntryOffset;
523 USHORT EaValueLength;
525 } FILE_FULL_EA_INFORMATION, *PFILE_FULL_EA_INFORMATION;
527 typedef struct _FILE_MODE_INFORMATION {
529 } FILE_MODE_INFORMATION, *PFILE_MODE_INFORMATION;
531 typedef struct _FILE_STREAM_INFORMATION
533 ULONG NextEntryOffset;
534 ULONG StreamNameLength;
535 LARGE_INTEGER StreamSize;
536 LARGE_INTEGER StreamAllocationSize;
538 } FILE_STREAM_INFORMATION, *PFILE_STREAM_INFORMATION;
540 typedef struct _FILE_ATTRIBUTE_TAG_INFORMATION
542 ULONG FileAttributes;
544 } FILE_ATTRIBUTE_TAG_INFORMATION, *PFILE_ATTRIBUTE_TAG_INFORMATION;
546 typedef struct _FILE_MAILSLOT_QUERY_INFORMATION {
547 ULONG MaximumMessageSize;
549 ULONG NextMessageSize;
550 ULONG MessagesAvailable;
551 LARGE_INTEGER ReadTimeout;
552 } FILE_MAILSLOT_QUERY_INFORMATION, *PFILE_MAILSLOT_QUERY_INFORMATION;
554 typedef struct _FILE_MAILSLOT_SET_INFORMATION {
555 LARGE_INTEGER ReadTimeout;
556 } FILE_MAILSLOT_SET_INFORMATION, *PFILE_MAILSLOT_SET_INFORMATION;
558 typedef struct _FILE_PIPE_LOCAL_INFORMATION {
560 ULONG NamedPipeConfiguration;
561 ULONG MaximumInstances;
562 ULONG CurrentInstances;
564 ULONG ReadDataAvailable;
566 ULONG WriteQuotaAvailable;
567 ULONG NamedPipeState;
569 } FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION;
571 typedef struct _FILE_ALL_INFORMATION {
572 FILE_BASIC_INFORMATION BasicInformation;
573 FILE_STANDARD_INFORMATION StandardInformation;
574 FILE_INTERNAL_INFORMATION InternalInformation;
575 FILE_EA_INFORMATION EaInformation;
576 FILE_ACCESS_INFORMATION AccessInformation;
577 FILE_POSITION_INFORMATION PositionInformation;
578 FILE_MODE_INFORMATION ModeInformation;
579 FILE_ALIGNMENT_INFORMATION AlignmentInformation;
580 FILE_NAME_INFORMATION NameInformation;
581 } FILE_ALL_INFORMATION, *PFILE_ALL_INFORMATION;
583 typedef enum _FSINFOCLASS {
584 FileFsVolumeInformation = 1,
585 FileFsLabelInformation,
586 FileFsSizeInformation,
587 FileFsDeviceInformation,
588 FileFsAttributeInformation,
589 FileFsControlInformation,
590 FileFsFullSizeInformation,
591 FileFsObjectIdInformation,
592 FileFsMaximumInformation
593 } FS_INFORMATION_CLASS, *PFS_INFORMATION_CLASS;
595 typedef enum _KEY_INFORMATION_CLASS {
599 } KEY_INFORMATION_CLASS;
601 typedef enum _KEY_VALUE_INFORMATION_CLASS {
602 KeyValueBasicInformation,
603 KeyValueFullInformation,
604 KeyValuePartialInformation,
605 KeyValueFullInformationAlign64,
606 KeyValuePartialInformationAlign64
607 } KEY_VALUE_INFORMATION_CLASS;
609 typedef enum _OBJECT_INFORMATION_CLASS {
610 ObjectBasicInformation,
611 ObjectNameInformation,
612 ObjectTypeInformation,
613 ObjectAllInformation,
614 ObjectDataInformation
615 } OBJECT_INFORMATION_CLASS, *POBJECT_INFORMATION_CLASS;
617 typedef enum _PROCESSINFOCLASS {
618 ProcessBasicInformation = 0,
619 ProcessQuotaLimits = 1,
620 ProcessIoCounters = 2,
621 ProcessVmCounters = 3,
623 ProcessBasePriority = 5,
624 ProcessRaisePriority = 6,
625 ProcessDebugPort = 7,
626 ProcessExceptionPort = 8,
627 ProcessAccessToken = 9,
628 ProcessLdtInformation = 10,
630 ProcessDefaultHardErrorMode = 12,
631 ProcessIoPortHandlers = 13,
632 ProcessPooledUsageAndLimits = 14,
633 ProcessWorkingSetWatch = 15,
634 ProcessUserModeIOPL = 16,
635 ProcessEnableAlignmentFaultFixup = 17,
636 ProcessPriorityClass = 18,
637 ProcessWx86Information = 19,
638 ProcessHandleCount = 20,
639 ProcessAffinityMask = 21,
640 ProcessPriorityBoost = 22,
641 ProcessDeviceMap = 23,
642 ProcessSessionInformation = 24,
643 ProcessForegroundInformation = 25,
644 ProcessWow64Information = 26,
645 ProcessImageFileName = 27,
646 ProcessLUIDDeviceMapsEnabled = 28,
647 ProcessBreakOnTermination = 29,
648 ProcessDebugObjectHandle = 30,
649 ProcessDebugFlags = 31,
650 ProcessHandleTracing = 32,
652 } PROCESSINFOCLASS, PROCESS_INFORMATION_CLASS;
654 typedef enum _SECTION_INHERIT {
659 typedef enum _SYSTEM_INFORMATION_CLASS {
660 SystemBasicInformation = 0,
661 SystemCpuInformation = 1,
662 SystemPerformanceInformation = 2,
663 SystemTimeOfDayInformation = 3, /* was SystemTimeInformation */
665 SystemProcessInformation = 5,
668 SystemProcessorPerformanceInformation = 8,
671 SystemModuleInformation = 11,
676 SystemHandleInformation = 16,
678 SystemPageFileInformation = 18,
681 SystemCacheInformation = 21,
683 SystemInterruptInformation = 23,
684 SystemDpcBehaviourInformation = 24,
685 SystemFullMemoryInformation = 25,
686 SystemNotImplemented6 = 25,
687 SystemLoadImage = 26,
688 SystemUnloadImage = 27,
689 SystemTimeAdjustmentInformation = 28,
690 SystemTimeAdjustment = 28,
691 SystemSummaryMemoryInformation = 29,
692 SystemNotImplemented7 = 29,
693 SystemNextEventIdInformation = 30,
694 SystemNotImplemented8 = 30,
695 SystemEventIdsInformation = 31,
696 SystemCrashDumpInformation = 32,
697 SystemExceptionInformation = 33,
698 SystemCrashDumpStateInformation = 34,
699 SystemKernelDebuggerInformation = 35,
700 SystemContextSwitchInformation = 36,
701 SystemRegistryQuotaInformation = 37,
702 SystemCurrentTimeZoneInformation = 44,
703 SystemTimeZoneInformation = 44,
704 SystemLookasideInformation = 45,
705 SystemSetTimeSlipEvent = 46,
706 SystemCreateSession = 47,
707 SystemDeleteSession = 48,
708 SystemInvalidInfoClass4 = 49,
709 SystemRangeStartInformation = 50,
710 SystemVerifierInformation = 51,
711 SystemAddVerifier = 52,
712 SystemSessionProcessesInformation = 53,
713 SystemInformationClassMax
714 } SYSTEM_INFORMATION_CLASS, *PSYSTEM_INFORMATION_CLASS;
716 typedef enum _TIMER_TYPE {
721 typedef enum _THREADINFOCLASS {
722 ThreadBasicInformation,
727 ThreadImpersonationToken,
728 ThreadDescriptorTableEntry,
729 ThreadEnableAlignmentFaultFixup,
730 ThreadEventPair_Reusable,
731 ThreadQuerySetWin32StartAddress,
733 ThreadPerformanceCount,
735 ThreadIdealProcessor,
737 ThreadSetTlsArrayAddress,
742 typedef struct _THREAD_BASIC_INFORMATION
745 PVOID TebBaseAddress;
747 ULONG_PTR AffinityMask;
750 } THREAD_BASIC_INFORMATION, *PTHREAD_BASIC_INFORMATION;
752 typedef struct _THREAD_DESCRIPTOR_INFORMATION
756 } THREAD_DESCRIPTOR_INFORMATION, *PTHREAD_DESCRIPTOR_INFORMATION;
758 typedef struct _KERNEL_USER_TIMES {
759 LARGE_INTEGER CreateTime;
760 LARGE_INTEGER ExitTime;
761 LARGE_INTEGER KernelTime;
762 LARGE_INTEGER UserTime;
763 } KERNEL_USER_TIMES, *PKERNEL_USER_TIMES;
765 typedef enum _WINSTATIONINFOCLASS {
766 WinStationInformation = 8
767 } WINSTATIONINFOCLASS;
769 typedef enum _MEMORY_INFORMATION_CLASS {
770 MemoryBasicInformation,
771 MemoryWorkingSetList,
773 MemoryBasicVlmInformation
774 } MEMORY_INFORMATION_CLASS;
776 typedef enum _MUTANT_INFORMATION_CLASS
778 MutantBasicInformation
779 } MUTANT_INFORMATION_CLASS, *PMUTANT_INFORMATION_CLASS;
781 typedef struct _MUTANT_BASIC_INFORMATION {
783 BOOLEAN OwnedByCaller;
784 BOOLEAN AbandonedState;
785 } MUTANT_BASIC_INFORMATION, *PMUTANT_BASIC_INFORMATION;
787 typedef enum _TIMER_INFORMATION_CLASS
789 TimerBasicInformation = 0
790 } TIMER_INFORMATION_CLASS;
792 typedef struct _TIMER_BASIC_INFORMATION
794 LARGE_INTEGER RemainingTime;
796 } TIMER_BASIC_INFORMATION, *PTIMER_BASIC_INFORMATION;
799 /* return type of RtlDetermineDosPathNameType_U (FIXME: not the correct names) */
803 UNC_PATH, /* "//foo" */
804 ABSOLUTE_DRIVE_PATH, /* "c:/foo" */
805 RELATIVE_DRIVE_PATH, /* "c:foo" */
806 ABSOLUTE_PATH, /* "/foo" */
807 RELATIVE_PATH, /* "foo" */
808 DEVICE_PATH, /* "//./foo" */
809 UNC_DOT_PATH /* "//." */
812 /***********************************************************************
813 * IA64 specific types and data structures
818 typedef struct _FRAME_POINTERS {
819 ULONGLONG MemoryStackFp;
820 ULONGLONG BackingStoreFp;
821 } FRAME_POINTERS, *PFRAME_POINTERS;
823 #define UNWIND_HISTORY_TABLE_SIZE 12
825 typedef struct _RUNTIME_FUNCTION {
828 ULONG UnwindInfoAddress;
829 } RUNTIME_FUNCTION, *PRUNTIME_FUNCTION;
831 typedef struct _UNWIND_HISTORY_TABLE_ENTRY {
834 PRUNTIME_FUNCTION FunctionEntry;
835 } UNWIND_HISTORY_TABLE_ENTRY, *PUNWIND_HISTORY_TABLE_ENTRY;
837 typedef struct _UNWIND_HISTORY_TABLE {
842 UNWIND_HISTORY_TABLE_ENTRY Entry[UNWIND_HISTORY_TABLE_SIZE];
843 } UNWIND_HISTORY_TABLE, *PUNWIND_HISTORY_TABLE;
845 #endif /* defined(__ia64__) */
847 /***********************************************************************
848 * Types and data structures
851 /* This is used by NtQuerySystemInformation */
852 typedef struct _SYSTEM_THREAD_INFORMATION{
853 FILETIME ftKernelTime;
855 FILETIME ftCreateTime;
857 DWORD dwStartAddress;
860 DWORD dwCurrentPriority;
861 DWORD dwBasePriority;
862 DWORD dwContextSwitches;
866 } SYSTEM_THREAD_INFORMATION, *PSYSTEM_THREAD_INFORMATION;
868 typedef struct _IO_STATUS_BLOCK {
874 ULONG_PTR Information;
875 } IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
877 typedef void (WINAPI * PIO_APC_ROUTINE)(PVOID,PIO_STATUS_BLOCK,ULONG);
879 typedef struct _KEY_BASIC_INFORMATION {
880 LARGE_INTEGER LastWriteTime;
884 } KEY_BASIC_INFORMATION, *PKEY_BASIC_INFORMATION;
886 typedef struct _KEY_NODE_INFORMATION
888 LARGE_INTEGER LastWriteTime;
895 } KEY_NODE_INFORMATION, *PKEY_NODE_INFORMATION;
897 typedef struct _KEY_FULL_INFORMATION
899 LARGE_INTEGER LastWriteTime;
907 ULONG MaxValueNameLen;
908 ULONG MaxValueDataLen;
910 } KEY_FULL_INFORMATION, *PKEY_FULL_INFORMATION;
912 typedef struct _KEY_VALUE_ENTRY
914 PUNICODE_STRING ValueName;
918 } KEY_VALUE_ENTRY, *PKEY_VALUE_ENTRY;
920 typedef struct _KEY_VALUE_BASIC_INFORMATION {
925 } KEY_VALUE_BASIC_INFORMATION, *PKEY_VALUE_BASIC_INFORMATION;
927 typedef struct _KEY_VALUE_FULL_INFORMATION {
934 } KEY_VALUE_FULL_INFORMATION, *PKEY_VALUE_FULL_INFORMATION;
936 typedef struct _KEY_VALUE_PARTIAL_INFORMATION {
941 } KEY_VALUE_PARTIAL_INFORMATION, *PKEY_VALUE_PARTIAL_INFORMATION;
943 #ifndef __OBJECT_ATTRIBUTES_DEFINED__
944 #define __OBJECT_ATTRIBUTES_DEFINED__
945 typedef struct _OBJECT_ATTRIBUTES {
947 HANDLE RootDirectory;
948 PUNICODE_STRING ObjectName;
950 PVOID SecurityDescriptor; /* type SECURITY_DESCRIPTOR */
951 PVOID SecurityQualityOfService; /* type SECURITY_QUALITY_OF_SERVICE */
952 } OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
955 typedef struct _OBJECT_DATA_INFORMATION {
956 BOOLEAN InheritHandle;
957 BOOLEAN ProtectFromClose;
958 } OBJECT_DATA_INFORMATION, *POBJECT_DATA_INFORMATION;
960 typedef struct _OBJECT_BASIC_INFORMATION {
962 ACCESS_MASK GrantedAccess;
965 ULONG PagedPoolUsage;
966 ULONG NonPagedPoolUsage;
968 ULONG NameInformationLength;
969 ULONG TypeInformationLength;
970 ULONG SecurityDescriptorLength;
971 LARGE_INTEGER CreateTime;
972 } OBJECT_BASIC_INFORMATION, *POBJECT_BASIC_INFORMATION;
974 typedef struct _PROCESS_BASIC_INFORMATION {
976 DWORD_PTR ExitStatus;
978 DWORD_PTR AffinityMask;
979 DWORD_PTR BasePriority;
980 ULONG_PTR UniqueProcessId;
981 ULONG_PTR InheritedFromUniqueProcessId;
986 ULONG_PTR UniqueProcessId;
989 } PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION;
991 #define PROCESS_PRIOCLASS_IDLE 1
992 #define PROCESS_PRIOCLASS_NORMAL 2
993 #define PROCESS_PRIOCLASS_HIGH 3
994 #define PROCESS_PRIOCLASS_REALTIME 4
995 #define PROCESS_PRIOCLASS_BELOW_NORMAL 5
996 #define PROCESS_PRIOCLASS_ABOVE_NORMAL 6
998 typedef struct _PROCESS_PRIORITY_CLASS {
1000 UCHAR PriorityClass;
1001 } PROCESS_PRIORITY_CLASS, *PPROCESS_PRIORITY_CLASS;
1003 typedef struct _RTL_HEAP_DEFINITION {
1004 ULONG Length; /* = sizeof(RTL_HEAP_DEFINITION) */
1007 } RTL_HEAP_DEFINITION, *PRTL_HEAP_DEFINITION;
1009 typedef struct _RTL_RWLOCK {
1010 RTL_CRITICAL_SECTION rtlCS;
1012 HANDLE hSharedReleaseSemaphore;
1013 UINT uSharedWaiters;
1015 HANDLE hExclusiveReleaseSemaphore;
1016 UINT uExclusiveWaiters;
1019 HANDLE hOwningThreadId;
1020 DWORD dwTimeoutBoost;
1022 } RTL_RWLOCK, *LPRTL_RWLOCK;
1024 /* System Information Class 0x00 */
1026 typedef struct _SYSTEM_BASIC_INFORMATION {
1029 ULONG uKeMaximumIncrement;
1031 ULONG uMmNumberOfPhysicalPages;
1032 ULONG uMmLowestPhysicalPage;
1033 ULONG uMmHighestPhysicalPage;
1034 ULONG uAllocationGranularity;
1035 PVOID pLowestUserAddress;
1036 PVOID pMmHighestUserAddress;
1037 ULONG uKeActiveProcessors;
1038 BYTE bKeNumberProcessors;
1044 CCHAR NumberOfProcessors;
1046 } SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
1048 /* System Information Class 0x01 */
1050 typedef struct _SYSTEM_CPU_INFORMATION {
1053 WORD Revision; /* combination of CPU model and stepping */
1054 WORD Reserved; /* always zero */
1055 DWORD FeatureSet; /* see bit flags below */
1056 } SYSTEM_CPU_INFORMATION, *PSYSTEM_CPU_INFORMATION;
1058 /* definitions of bits in the Feature set for the x86 processors */
1059 #define CPU_FEATURE_VME 0x00000005 /* Virtual 86 Mode Extensions */
1060 #define CPU_FEATURE_TSC 0x00000002 /* Time Stamp Counter available */
1061 #define CPU_FEATURE_CMOV 0x00000008 /* Conditional Move instruction*/
1062 #define CPU_FEATURE_PGE 0x00000014 /* Page table Entry Global bit */
1063 #define CPU_FEATURE_PSE 0x00000024 /* Page Size Extension */
1064 #define CPU_FEATURE_MTRR 0x00000040 /* Memory Type Range Registers */
1065 #define CPU_FEATURE_CX8 0x00000080 /* Compare and eXchange 8 byte instr. */
1066 #define CPU_FEATURE_MMX 0x00000100 /* Multi Media eXtensions */
1067 #define CPU_FEATURE_X86 0x00000200 /* seems to be alway ON, on the '86 */
1068 #define CPU_FEATURE_PAT 0x00000400 /* Page Attribute Table */
1069 #define CPU_FEATURE_FXSR 0x00000800 /* FXSAVE and FXSTORE instructions */
1070 #define CPU_FEATURE_SEP 0x00001000 /* SYSENTER and SYSEXIT instructions */
1071 #define CPU_FEATURE_SSE 0x00002000 /* SSE extenstions (ext. MMX) */
1072 #define CPU_FEATURE_3DNOW 0x00008000 /* 3DNOW instructions available
1073 (FIXME: needs to be confirmed) */
1074 #define CPU_FEATURE_SSE2 0x00010000 /* SSE2 extensions (XMMI64) */
1075 #define CPU_FEATURE_DS 0x00020000 /* Debug Store */
1076 #define CPU_FEATURE_HTT 0x00040000 /* Hyper Threading Technology */
1078 /* System Information Class 0x02 */
1080 typedef struct _SYSTEM_PERFORMANCE_INFORMATION {
1081 BYTE Reserved1[312];
1082 } SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION;
1084 /* System Information Class 0x03 */
1086 typedef struct _SYSTEM_TIMEOFDAY_INFORMATION {
1088 LARGE_INTEGER liKeBootTime;
1089 LARGE_INTEGER liKeSystemTime;
1090 LARGE_INTEGER liExpTimeZoneBias;
1091 ULONG uCurrentTimeZoneId;
1092 DWORD dwUnknown1[5];
1096 } SYSTEM_TIMEOFDAY_INFORMATION, *PSYSTEM_TIMEOFDAY_INFORMATION; /* was SYSTEM_TIME_INFORMATION */
1098 /* System Information Class 0x08 */
1100 typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION {
1102 LARGE_INTEGER liIdleTime;
1103 LARGE_INTEGER liKernelTime;
1104 LARGE_INTEGER liUserTime;
1107 LARGE_INTEGER IdleTime;
1108 LARGE_INTEGER KernelTime;
1109 LARGE_INTEGER UserTime;
1110 LARGE_INTEGER Reserved1[2];
1113 } SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION, *PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION;
1115 /* System Information Class 0x0b */
1117 typedef struct _SYSTEM_DRIVER_INFORMATION {
1123 char szName[MAX_PATH + 1];
1124 } SYSTEM_DRIVER_INFORMATION, *PSYSTEM_DRIVER_INFORMATION;
1126 /* System Information Class 0x10 */
1128 typedef struct _SYSTEM_HANDLE_ENTRY {
1133 PVOID ObjectPointer;
1135 } SYSTEM_HANDLE_ENTRY, *PSYSTEM_HANDLE_ENTRY;
1137 typedef struct _SYSTEM_HANDLE_INFORMATION {
1139 SYSTEM_HANDLE_ENTRY Handle[1];
1140 } SYSTEM_HANDLE_INFORMATION, *PSYSTEM_HANDLE_INFORMATION;
1142 /* System Information Class 0x15 */
1144 typedef struct _SYSTEM_CACHE_INFORMATION {
1147 ULONG PageFaultCount;
1148 ULONG MinimumWorkingSet;
1149 ULONG MaximumWorkingSet;
1151 } SYSTEM_CACHE_INFORMATION, *PSYSTEM_CACHE_INFORMATION;
1153 /* System Information Class 0x17 */
1155 typedef struct _SYSTEM_INTERRUPT_INFORMATION {
1157 } SYSTEM_INTERRUPT_INFORMATION, *PSYSTEM_INTERRUPT_INFORMATION;
1159 typedef struct _SYSTEM_CONFIGURATION_INFO {
1163 WORD ProcessorArchitecture;
1168 PVOID MinimumApplicationAddress;
1169 PVOID MaximumApplicationAddress;
1170 ULONG ActiveProcessorMask;
1171 ULONG NumberOfProcessors;
1172 ULONG ProcessorType;
1173 ULONG AllocationGranularity;
1174 WORD ProcessorLevel;
1175 WORD ProcessorRevision;
1176 } SYSTEM_CONFIGURATION_INFO, *PSYSTEM_CONFIGURATION_INFO;
1178 typedef struct _SYSTEM_EXCEPTION_INFORMATION {
1180 } SYSTEM_EXCEPTION_INFORMATION, *PSYSTEM_EXCEPTION_INFORMATION;
1182 typedef struct _SYSTEM_LOOKASIDE_INFORMATION {
1184 } SYSTEM_LOOKASIDE_INFORMATION, *PSYSTEM_LOOKASIDE_INFORMATION;
1186 typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION {
1187 BOOLEAN DebuggerEnabled;
1188 BOOLEAN DebuggerNotPresent;
1189 } SYSTEM_KERNEL_DEBUGGER_INFORMATION, *PSYSTEM_KERNEL_DEBUGGER_INFORMATION;
1191 /* System Information Class 0x05 */
1193 typedef struct _VM_COUNTERS_ {
1194 SIZE_T PeakVirtualSize;
1196 ULONG PageFaultCount;
1197 SIZE_T PeakWorkingSetSize;
1198 SIZE_T WorkingSetSize;
1199 SIZE_T QuotaPeakPagedPoolUsage;
1200 SIZE_T QuotaPagedPoolUsage;
1201 SIZE_T QuotaPeakNonPagedPoolUsage;
1202 SIZE_T QuotaNonPagedPoolUsage;
1203 SIZE_T PagefileUsage;
1204 SIZE_T PeakPagefileUsage;
1205 } VM_COUNTERS, *PVM_COUNTERS;
1207 typedef struct _SYSTEM_PROCESS_INFORMATION {
1210 DWORD dwThreadCount;
1211 DWORD dwUnknown1[6];
1212 FILETIME ftCreationTime;
1213 FILETIME ftUserTime;
1214 FILETIME ftKernelTime;
1215 UNICODE_STRING ProcessName;
1216 DWORD dwBasePriority;
1218 DWORD dwParentProcessID;
1219 DWORD dwHandleCount;
1222 VM_COUNTERS vmCounters;
1223 IO_COUNTERS ioCounters;
1224 SYSTEM_THREAD_INFORMATION ti[1];
1226 ULONG NextEntryOffset;
1229 HANDLE UniqueProcessId;
1233 PVOID Reserved5[11];
1234 SIZE_T PeakPagefileUsage;
1235 SIZE_T PrivatePageCount;
1236 LARGE_INTEGER Reserved6[6];
1238 } SYSTEM_PROCESS_INFORMATION, *PSYSTEM_PROCESS_INFORMATION;
1240 typedef struct _SYSTEM_REGISTRY_QUOTA_INFORMATION {
1241 ULONG RegistryQuotaAllowed;
1242 ULONG RegistryQuotaUsed;
1244 } SYSTEM_REGISTRY_QUOTA_INFORMATION, *PSYSTEM_REGISTRY_QUOTA_INFORMATION;
1246 typedef struct _SYSTEM_TIME_ADJUSTMENT {
1247 ULONG TimeAdjustment;
1248 BOOLEAN TimeAdjustmentDisabled;
1249 } SYSTEM_TIME_ADJUSTMENT, *PSYSTEM_TIME_ADJUSTMENT;
1251 typedef struct _TIME_FIELDS
1258 CSHORT Milliseconds;
1260 } TIME_FIELDS, *PTIME_FIELDS;
1262 typedef struct _WINSTATIONINFORMATIONW {
1265 BYTE Reserved3[1140];
1266 } WINSTATIONINFORMATIONW, *PWINSTATIONINFORMATIONW;
1268 typedef BOOLEAN (WINAPI * PWINSTATIONQUERYINFORMATIONW)(HANDLE,ULONG,WINSTATIONINFOCLASS,PVOID,ULONG,PULONG);
1270 typedef struct _LDR_RESOURCE_INFO
1275 } LDR_RESOURCE_INFO, *PLDR_RESOURCE_INFO;
1278 /* debug buffer definitions */
1280 typedef struct _DEBUG_BUFFER {
1281 HANDLE SectionHandle;
1283 PVOID RemoteSectionBase;
1284 ULONG SectionBaseDelta;
1285 HANDLE EventPairHandle;
1287 HANDLE RemoteThreadHandle;
1288 ULONG InfoClassMask;
1290 ULONG AllocatedSize;
1292 PVOID ModuleInformation;
1293 PVOID BackTraceInformation;
1294 PVOID HeapInformation;
1295 PVOID LockInformation;
1297 } DEBUG_BUFFER, *PDEBUG_BUFFER;
1299 #define PDI_MODULES 0x01
1300 #define PDI_BACKTRACE 0x02
1301 #define PDI_HEAPS 0x04
1302 #define PDI_HEAP_TAGS 0x08
1303 #define PDI_HEAP_BLOCKS 0x10
1304 #define PDI_LOCKS 0x20
1306 typedef struct _DEBUG_MODULE_INFORMATION {
1314 USHORT ModuleNameOffset;
1315 CHAR ImageName[256];
1316 } DEBUG_MODULE_INFORMATION, *PDEBUG_MODULE_INFORMATION;
1318 typedef struct _DEBUG_HEAP_INFORMATION {
1330 } DEBUG_HEAP_INFORMATION, *PDEBUG_HEAP_INFORMATION;
1332 typedef struct _DEBUG_LOCK_INFORMATION {
1335 USHORT CreatorBackTraceIndex;
1336 ULONG OwnerThreadId;
1338 ULONG ContentionCount;
1340 ULONG RecursionCount;
1341 ULONG NumberOfSharedWaiters;
1342 ULONG NumberOfExclusiveWaiters;
1343 } DEBUG_LOCK_INFORMATION, *PDEBUG_LOCK_INFORMATION;
1345 typedef struct _PORT_MESSAGE_HEADER {
1349 USHORT VirtualRangesOffset;
1353 } PORT_MESSAGE_HEADER, *PPORT_MESSAGE_HEADER, PORT_MESSAGE, *PPORT_MESSAGE;
1355 typedef unsigned short RTL_ATOM, *PRTL_ATOM;
1357 /* Wine doesn't implement atom table as NT does:
1358 * - in NT, atom tables are user space tables, which ntdll directly accesses
1359 * - on Wine, (even local) atom tables are wineserver objects, hence a HANDLE
1361 typedef struct atom_table *RTL_ATOM_TABLE, **PRTL_ATOM_TABLE;
1363 typedef enum _ATOM_INFORMATION_CLASS {
1364 AtomBasicInformation = 0,
1365 AtomTableInformation = 1,
1366 } ATOM_INFORMATION_CLASS;
1368 typedef struct _ATOM_BASIC_INFORMATION {
1369 USHORT ReferenceCount;
1373 } ATOM_BASIC_INFORMATION, *PATOM_BASIC_INFORMATION;
1375 /* FIXME: names probably not correct */
1376 typedef struct _RTL_HANDLE
1378 struct _RTL_HANDLE * Next;
1381 /* FIXME: names probably not correct */
1382 typedef struct _RTL_HANDLE_TABLE
1384 ULONG MaxHandleCount; /* 0x00 */
1385 ULONG HandleSize; /* 0x04 */
1386 ULONG Unused[2]; /* 0x08-0x0c */
1387 PVOID NextFree; /* 0x10 */
1388 PVOID FirstHandle; /* 0x14 */
1389 PVOID ReservedMemory; /* 0x18 */
1390 PVOID MaxHandle; /* 0x1c */
1393 /***********************************************************************
1397 /* flags for NtCreateFile and NtOpenFile */
1398 #define FILE_DIRECTORY_FILE 0x00000001
1399 #define FILE_WRITE_THROUGH 0x00000002
1400 #define FILE_SEQUENTIAL_ONLY 0x00000004
1401 #define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008
1402 #define FILE_SYNCHRONOUS_IO_ALERT 0x00000010
1403 #define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020
1404 #define FILE_NON_DIRECTORY_FILE 0x00000040
1405 #define FILE_CREATE_TREE_CONNECTION 0x00000080
1406 #define FILE_COMPLETE_IF_OPLOCKED 0x00000100
1407 #define FILE_NO_EA_KNOWLEDGE 0x00000200
1408 #define FILE_OPEN_FOR_RECOVERY 0x00000400
1409 #define FILE_RANDOM_ACCESS 0x00000800
1410 #define FILE_DELETE_ON_CLOSE 0x00001000
1411 #define FILE_OPEN_BY_FILE_ID 0x00002000
1412 #define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000
1413 #define FILE_NO_COMPRESSION 0x00008000
1414 #define FILE_RESERVE_OPFILTER 0x00100000
1415 #define FILE_TRANSACTED_MODE 0x00200000
1416 #define FILE_OPEN_OFFLINE_FILE 0x00400000
1417 #define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000
1419 #define FILE_ATTRIBUTE_VALID_FLAGS 0x00007fb7
1420 #define FILE_ATTRIBUTE_VALID_SET_FLAGS 0x000031a7
1422 /* status for NtCreateFile or NtOpenFile */
1423 #define FILE_SUPERSEDED 0
1424 #define FILE_OPENED 1
1425 #define FILE_CREATED 2
1426 #define FILE_OVERWRITTEN 3
1427 #define FILE_EXISTS 4
1428 #define FILE_DOES_NOT_EXIST 5
1430 /* disposition for NtCreateFile */
1431 #define FILE_SUPERSEDE 0
1433 #define FILE_CREATE 2
1434 #define FILE_OPEN_IF 3
1435 #define FILE_OVERWRITE 4
1436 #define FILE_OVERWRITE_IF 5
1437 #define FILE_MAXIMUM_DISPOSITION 5
1439 /* Characteristics of a File System */
1440 #define FILE_REMOVABLE_MEDIA 0x00000001
1441 #define FILE_READ_ONLY_DEVICE 0x00000002
1442 #define FILE_FLOPPY_DISKETTE 0x00000004
1443 #define FILE_WRITE_ONE_MEDIA 0x00000008
1444 #define FILE_REMOTE_DEVICE 0x00000010
1445 #define FILE_DEVICE_IS_MOUNTED 0x00000020
1446 #define FILE_VIRTUAL_VOLUME 0x00000040
1447 #define FILE_AUTOGENERATED_DEVICE_NAME 0x00000080
1448 #define FILE_DEVICE_SECURE_OPEN 0x00000100
1450 /* options for NtCreateNamedPipeFile */
1451 #define FILE_PIPE_INBOUND 0x00000000
1452 #define FILE_PIPE_OUTBOUND 0x00000001
1453 #define FILE_PIPE_FULL_DUPLEX 0x00000002
1455 /* options for pipe's type */
1456 #define FILE_PIPE_TYPE_MESSAGE 0x00000001
1457 #define FILE_PIPE_TYPE_BYTE 0x00000000
1458 /* and client / server end */
1459 #define FILE_PIPE_SERVER_END 0x00000001
1460 #define FILE_PIPE_CLIENT_END 0x00000000
1462 #if (_WIN32_WINNT >= 0x0501)
1463 #define INTERNAL_TS_ACTIVE_CONSOLE_ID ( *((volatile ULONG*)(0x7ffe02d8)) )
1464 #endif /* (_WIN32_WINNT >= 0x0501) */
1466 #define LOGONID_CURRENT ((ULONG)-1)
1468 #define OBJ_INHERIT 0x00000002L
1469 #define OBJ_PERMANENT 0x00000010L
1470 #define OBJ_EXCLUSIVE 0x00000020L
1471 #define OBJ_CASE_INSENSITIVE 0x00000040L
1472 #define OBJ_OPENIF 0x00000080L
1473 #define OBJ_OPENLINK 0x00000100L
1474 #define OBJ_KERNEL_HANDLE 0x00000200L
1475 #define OBJ_VALID_ATTRIBUTES 0x000003F2L
1477 #define SERVERNAME_CURRENT ((HANDLE)NULL)
1479 typedef void (CALLBACK *PNTAPCFUNC)(ULONG_PTR,ULONG_PTR,ULONG_PTR); /* FIXME: not the right name */
1480 typedef void (CALLBACK *PRTL_THREAD_START_ROUTINE)(LPVOID); /* FIXME: not the right name */
1481 typedef DWORD (CALLBACK *PRTL_WORK_ITEM_ROUTINE)(LPVOID); /* FIXME: not the right name */
1484 /* DbgPrintEx default levels */
1485 #define DPFLTR_ERROR_LEVEL 0
1486 #define DPFLTR_WARNING_LEVEL 1
1487 #define DPFLTR_TRACE_LEVEL 2
1488 #define DPFLTR_INFO_LEVEL 3
1489 #define DPFLTR_MASK 0x8000000
1491 /* Well-known LUID values */
1492 #define SE_MIN_WELL_KNOWN_PRIVILEGE 2L
1493 #define SE_CREATE_TOKEN_PRIVILEGE 2L
1494 #define SE_ASSIGNPRIMARYTOKEN_PRIVILEGE 3L
1495 #define SE_LOCK_MEMORY_PRIVILEGE 4L
1496 #define SE_INCREASE_QUOTA_PRIVILEGE 5L
1497 #define SE_UNSOLICITED_INPUT_PRIVILEGE 6L /* obsolete */
1498 #define SE_MACHINE_ACCOUNT_PRIVILEGE 6L
1499 #define SE_TCB_PRIVILEGE 7L
1500 #define SE_SECURITY_PRIVILEGE 8L
1501 #define SE_TAKE_OWNERSHIP_PRIVILEGE 9L
1502 #define SE_LOAD_DRIVER_PRIVILEGE 10L
1503 #define SE_SYSTEM_PROFILE_PRIVILEGE 11L
1504 #define SE_SYSTEMTIME_PRIVILEGE 12L
1505 #define SE_PROF_SINGLE_PROCESS_PRIVILEGE 13L
1506 #define SE_INC_BASE_PRIORITY_PRIVILEGE 14L
1507 #define SE_CREATE_PAGEFILE_PRIVILEGE 15L
1508 #define SE_CREATE_PERMANENT_PRIVILEGE 16L
1509 #define SE_BACKUP_PRIVILEGE 17L
1510 #define SE_RESTORE_PRIVILEGE 18L
1511 #define SE_SHUTDOWN_PRIVILEGE 19L
1512 #define SE_DEBUG_PRIVILEGE 20L
1513 #define SE_AUDIT_PRIVILEGE 21L
1514 #define SE_SYSTEM_ENVIRONMENT_PRIVILEGE 22L
1515 #define SE_CHANGE_NOTIFY_PRIVILLEGE 23L
1516 #define SE_REMOTE_SHUTDOWN_PRIVILEGE 24L
1517 #define SE_UNDOCK_PRIVILEGE 25L
1518 #define SE_SYNC_AGENT_PRIVILEGE 26L
1519 #define SE_ENABLE_DELEGATION_PRIVILEGE 27L
1520 #define SE_MANAGE_VOLUME_PRIVILEGE 28L
1521 #define SE_IMPERSONATE_PRIVILEGE 29L
1522 #define SE_CREATE_GLOBAL_PRIVILEGE 30L
1523 #define SE_MAX_WELL_KNOWN_PRIVILEGE SE_CREATE_GLOBAL_PRIVILEGE
1526 /* Rtl*Registry* functions structs and defines */
1527 #define RTL_REGISTRY_ABSOLUTE 0
1528 #define RTL_REGISTRY_SERVICES 1
1529 #define RTL_REGISTRY_CONTROL 2
1530 #define RTL_REGISTRY_WINDOWS_NT 3
1531 #define RTL_REGISTRY_DEVICEMAP 4
1532 #define RTL_REGISTRY_USER 5
1534 #define RTL_REGISTRY_HANDLE 0x40000000
1535 #define RTL_REGISTRY_OPTIONAL 0x80000000
1537 #define RTL_QUERY_REGISTRY_SUBKEY 0x00000001
1538 #define RTL_QUERY_REGISTRY_TOPKEY 0x00000002
1539 #define RTL_QUERY_REGISTRY_REQUIRED 0x00000004
1540 #define RTL_QUERY_REGISTRY_NOVALUE 0x00000008
1541 #define RTL_QUERY_REGISTRY_NOEXPAND 0x00000010
1542 #define RTL_QUERY_REGISTRY_DIRECT 0x00000020
1543 #define RTL_QUERY_REGISTRY_DELETE 0x00000040
1545 typedef NTSTATUS (WINAPI *PRTL_QUERY_REGISTRY_ROUTINE)( PCWSTR ValueName,
1550 PVOID EntryContext);
1552 typedef struct _RTL_QUERY_REGISTRY_TABLE
1554 PRTL_QUERY_REGISTRY_ROUTINE QueryRoutine;
1560 ULONG DefaultLength;
1561 } RTL_QUERY_REGISTRY_TABLE, *PRTL_QUERY_REGISTRY_TABLE;
1563 typedef struct _KEY_MULTIPLE_VALUE_INFORMATION
1565 PUNICODE_STRING ValueName;
1569 } KEY_MULTIPLE_VALUE_INFORMATION, *PKEY_MULTIPLE_VALUE_INFORMATION;
1571 typedef VOID (*PTIMER_APC_ROUTINE) ( PVOID, ULONG, LONG );
1573 typedef enum _EVENT_TYPE {
1575 SynchronizationEvent
1576 } EVENT_TYPE, *PEVENT_TYPE;
1578 typedef enum _EVENT_INFORMATION_CLASS {
1579 EventBasicInformation
1580 } EVENT_INFORMATION_CLASS, *PEVENT_INFORMATION_CLASS;
1582 typedef struct _EVENT_BASIC_INFORMATION {
1583 EVENT_TYPE EventType;
1585 } EVENT_BASIC_INFORMATION, *PEVENT_BASIC_INFORMATION;
1587 typedef enum _SEMAPHORE_INFORMATION_CLASS {
1588 SemaphoreBasicInformation
1589 } SEMAPHORE_INFORMATION_CLASS, *PSEMAPHORE_INFORMATION_CLASS;
1591 typedef struct _SEMAPHORE_BASIC_INFORMATION {
1594 } SEMAPHORE_BASIC_INFORMATION, *PSEMAPHORE_BASIC_INFORMATION;
1596 typedef enum _SECTION_INFORMATION_CLASS
1598 SectionBasicInformation,
1599 SectionImageInformation,
1600 } SECTION_INFORMATION_CLASS;
1602 typedef struct _SECTION_BASIC_INFORMATION {
1606 } SECTION_BASIC_INFORMATION, *PSECTION_BASIC_INFORMATION;
1608 typedef struct _SECTION_IMAGE_INFORMATION {
1610 ULONG StackZeroBits;
1611 ULONG StackReserved;
1613 ULONG ImageSubsystem;
1614 WORD SubsystemVersionLow;
1615 WORD SubsystemVersionHigh;
1617 ULONG ImageCharacteristics;
1618 ULONG ImageMachineType;
1620 } SECTION_IMAGE_INFORMATION, *PSECTION_IMAGE_INFORMATION;
1622 typedef struct _LPC_SECTION_WRITE {
1624 HANDLE SectionHandle;
1625 ULONG SectionOffset;
1628 PVOID TargetViewBase;
1629 } LPC_SECTION_WRITE, *PLPC_SECTION_WRITE;
1631 typedef struct _LPC_SECTION_READ {
1635 } LPC_SECTION_READ, *PLPC_SECTION_READ;
1637 typedef struct _LPC_MESSAGE {
1641 USHORT VirtualRangesOffset;
1645 UCHAR Data[ANYSIZE_ARRAY];
1646 } LPC_MESSAGE, *PLPC_MESSAGE;
1648 typedef enum _SHUTDOWN_ACTION {
1652 } SHUTDOWN_ACTION, *PSHUTDOWN_ACTION;
1654 typedef enum _KPROFILE_SOURCE {
1656 ProfileAlignmentFixup,
1659 ProfileLoadInstructions,
1660 ProfilePipelineFrozen,
1661 ProfileBranchInstructions,
1662 ProfileTotalNonissues,
1663 ProfileDcacheMisses,
1664 ProfileIcacheMisses,
1666 ProfileBranchMispredictions,
1667 ProfileStoreInstructions,
1668 ProfileFpInstructions,
1669 ProfileIntegerInstructions,
1673 ProfileSpecialInstructions,
1675 ProfileIcacheIssues,
1676 ProfileDcacheAccesses,
1677 ProfileMemoryBarrierCycles,
1678 ProfileLoadLinkedIssues,
1680 } KPROFILE_SOURCE, *PKPROFILE_SOURCE;
1682 typedef struct _DIRECTORY_BASIC_INFORMATION {
1683 UNICODE_STRING ObjectName;
1684 UNICODE_STRING ObjectTypeName;
1685 } DIRECTORY_BASIC_INFORMATION, *PDIRECTORY_BASIC_INFORMATION;
1687 typedef struct _INITIAL_TEB {
1691 PVOID StackCommitMax;
1692 PVOID StackReserved;
1693 } INITIAL_TEB, *PINITIAL_TEB;
1695 typedef enum _PORT_INFORMATION_CLASS {
1697 } PORT_INFORMATION_CLASS, *PPORT_INFORMATION_CLASS;
1699 typedef enum _IO_COMPLETION_INFORMATION_CLASS {
1700 IoCompletionBasicInformation
1701 } IO_COMPLETION_INFORMATION_CLASS, *PIO_COMPLETION_INFORMATION_CLASS;
1703 typedef struct _FILE_COMPLETION_INFORMATION {
1704 HANDLE CompletionPort;
1705 ULONG_PTR CompletionKey;
1706 } FILE_COMPLETION_INFORMATION, *PFILE_COMPLETION_INFORMATION;
1708 #define IO_COMPLETION_QUERY_STATE 0x0001
1709 #define IO_COMPLETION_MODIFY_STATE 0x0002
1710 #define IO_COMPLETION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
1712 typedef enum _HARDERROR_RESPONSE_OPTION {
1713 OptionAbortRetryIgnore,
1719 OptionShutdownSystem
1720 } HARDERROR_RESPONSE_OPTION, *PHARDERROR_RESPONSE_OPTION;
1722 typedef enum _HARDERROR_RESPONSE {
1723 ResponseReturnToCaller,
1732 } HARDERROR_RESPONSE, *PHARDERROR_RESPONSE;
1734 typedef enum _SYSDBG_COMMAND {
1735 SysDbgQueryModuleInformation,
1736 SysDbgQueryTraceInformation,
1737 SysDbgSetTracepoint,
1738 SysDbgSetSpecialCall,
1739 SysDbgClearSpecialCalls,
1740 SysDbgQuerySpecialCalls
1741 } SYSDBG_COMMAND, *PSYSDBG_COMMAND;
1743 /***********************************************************************
1744 * Function declarations
1747 #if defined(__i386__) && defined(__GNUC__)
1748 static inline void WINAPI DbgBreakPoint(void) { __asm__ __volatile__("int3"); }
1749 static inline void WINAPI DbgUserBreakPoint(void) { __asm__ __volatile__("int3"); }
1750 #else /* __i386__ && __GNUC__ */
1751 void WINAPI DbgBreakPoint(void);
1752 void WINAPI DbgUserBreakPoint(void);
1753 #endif /* __i386__ && __GNUC__ */
1754 NTSTATUS WINAPIV DbgPrint(LPCSTR fmt, ...);
1755 NTSTATUS WINAPIV DbgPrintEx(ULONG iComponentId, ULONG Level, LPCSTR fmt, ...);
1757 NTSTATUS WINAPI LdrAccessResource(HMODULE,const IMAGE_RESOURCE_DATA_ENTRY*,void**,PULONG);
1758 NTSTATUS WINAPI LdrAddRefDll(ULONG,HMODULE);
1759 NTSTATUS WINAPI LdrFindResourceDirectory_U(HMODULE,const LDR_RESOURCE_INFO*,ULONG,const IMAGE_RESOURCE_DIRECTORY**);
1760 NTSTATUS WINAPI LdrFindResource_U(HMODULE,const LDR_RESOURCE_INFO*,ULONG,const IMAGE_RESOURCE_DATA_ENTRY**);
1761 NTSTATUS WINAPI LdrGetDllHandle(LPCWSTR, ULONG, const UNICODE_STRING*, HMODULE*);
1762 NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE, const ANSI_STRING*, ULONG, void**);
1763 void WINAPI LdrInitializeThunk(ULONG,ULONG,ULONG,ULONG);
1764 NTSTATUS WINAPI LdrLoadDll(LPCWSTR, DWORD, const UNICODE_STRING*, HMODULE*);
1765 void WINAPI LdrShutdownProcess(void);
1766 void WINAPI LdrShutdownThread(void);
1767 NTSTATUS WINAPI NtAcceptConnectPort(PHANDLE,ULONG,PLPC_MESSAGE,BOOLEAN,PLPC_SECTION_WRITE,PLPC_SECTION_READ);
1768 NTSTATUS WINAPI NtAccessCheck(PSECURITY_DESCRIPTOR,HANDLE,ACCESS_MASK,PGENERIC_MAPPING,PPRIVILEGE_SET,PULONG,PULONG,NTSTATUS*);
1769 NTSTATUS WINAPI NtAccessCheckAndAuditAlarm(PUNICODE_STRING,HANDLE,PUNICODE_STRING,PUNICODE_STRING,PSECURITY_DESCRIPTOR,ACCESS_MASK,PGENERIC_MAPPING,BOOLEAN,PACCESS_MASK,PBOOLEAN,PBOOLEAN);
1770 NTSTATUS WINAPI NtAddAtom(const WCHAR*,ULONG,RTL_ATOM*);
1771 NTSTATUS WINAPI NtAdjustGroupsToken(HANDLE,BOOLEAN,PTOKEN_GROUPS,ULONG,PTOKEN_GROUPS,PULONG);
1772 NTSTATUS WINAPI NtAdjustPrivilegesToken(HANDLE,BOOLEAN,PTOKEN_PRIVILEGES,DWORD,PTOKEN_PRIVILEGES,PDWORD);
1773 NTSTATUS WINAPI NtAlertResumeThread(HANDLE,PULONG);
1774 NTSTATUS WINAPI NtAlertThread(HANDLE ThreadHandle);
1775 NTSTATUS WINAPI NtAllocateLocallyUniqueId(PLUID lpLuid);
1776 NTSTATUS WINAPI NtAllocateUuids(PULARGE_INTEGER,PULONG,PULONG);
1777 NTSTATUS WINAPI NtAllocateVirtualMemory(HANDLE,PVOID*,ULONG,SIZE_T*,ULONG,ULONG);
1778 NTSTATUS WINAPI NtAreMappedFilesTheSame(PVOID,PVOID);
1779 NTSTATUS WINAPI NtCallbackReturn(PVOID,ULONG,NTSTATUS);
1780 NTSTATUS WINAPI NtCancelIoFile(HANDLE,PIO_STATUS_BLOCK);
1781 NTSTATUS WINAPI NtCancelTimer(HANDLE, BOOLEAN*);
1782 NTSTATUS WINAPI NtClearEvent(HANDLE);
1783 NTSTATUS WINAPI NtClose(HANDLE);
1784 NTSTATUS WINAPI NtCloseObjectAuditAlarm(PUNICODE_STRING,HANDLE,BOOLEAN);
1785 NTSTATUS WINAPI NtCompleteConnectPort(HANDLE);
1786 NTSTATUS WINAPI NtConnectPort(PHANDLE,PUNICODE_STRING,PSECURITY_QUALITY_OF_SERVICE,PLPC_SECTION_WRITE,PLPC_SECTION_READ,PULONG,PVOID,PULONG);
1787 NTSTATUS WINAPI NtContinue(PCONTEXT,BOOLEAN);
1788 NTSTATUS WINAPI NtCreateDirectoryObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
1789 NTSTATUS WINAPI NtCreateEvent(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *,BOOLEAN,BOOLEAN);
1790 NTSTATUS WINAPI NtCreateEventPair(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
1791 NTSTATUS WINAPI NtCreateFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,PLARGE_INTEGER,ULONG,ULONG,ULONG,ULONG,PVOID,ULONG);
1792 NTSTATUS WINAPI NtCreateIoCompletion(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,ULONG);
1793 NTSTATUS WINAPI NtCreateKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,PULONG);
1794 NTSTATUS WINAPI NtCreateMailslotFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG,ULONG,PLARGE_INTEGER);
1795 NTSTATUS WINAPI NtCreateMutant(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,BOOLEAN);
1796 NTSTATUS WINAPI NtCreateNamedPipeFile(PHANDLE,ULONG,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,PLARGE_INTEGER);
1797 NTSTATUS WINAPI NtCreatePagingFile(PUNICODE_STRING,PLARGE_INTEGER,PLARGE_INTEGER,PLARGE_INTEGER);
1798 NTSTATUS WINAPI NtCreatePort(PHANDLE,POBJECT_ATTRIBUTES,ULONG,ULONG,PULONG);
1799 NTSTATUS WINAPI NtCreateProcess(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,HANDLE,BOOLEAN,HANDLE,HANDLE,HANDLE);
1800 NTSTATUS WINAPI NtCreateProfile(PHANDLE,HANDLE,PVOID,ULONG,ULONG,PVOID,ULONG,KPROFILE_SOURCE,KAFFINITY);
1801 NTSTATUS WINAPI NtCreateSection(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const LARGE_INTEGER*,ULONG,ULONG,HANDLE);
1802 NTSTATUS WINAPI NtCreateSemaphore(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,LONG,LONG);
1803 NTSTATUS WINAPI NtCreateSymbolicLinkObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PUNICODE_STRING);
1804 NTSTATUS WINAPI NtCreateThread(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,HANDLE,PCLIENT_ID,PCONTEXT,PINITIAL_TEB,BOOLEAN);
1805 NTSTATUS WINAPI NtCreateTimer(HANDLE*, ACCESS_MASK, const OBJECT_ATTRIBUTES*, TIMER_TYPE);
1806 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);
1807 NTSTATUS WINAPI NtDelayExecution(BOOLEAN,const LARGE_INTEGER*);
1808 NTSTATUS WINAPI NtDeleteAtom(RTL_ATOM);
1809 NTSTATUS WINAPI NtDeleteFile(POBJECT_ATTRIBUTES);
1810 NTSTATUS WINAPI NtDeleteKey(HANDLE);
1811 NTSTATUS WINAPI NtDeleteValueKey(HANDLE,const UNICODE_STRING *);
1812 NTSTATUS WINAPI NtDeviceIoControlFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,PVOID,ULONG,PVOID,ULONG);
1813 NTSTATUS WINAPI NtDisplayString(PUNICODE_STRING);
1814 NTSTATUS WINAPI NtDuplicateObject(HANDLE,HANDLE,HANDLE,PHANDLE,ACCESS_MASK,ULONG,ULONG);
1815 NTSTATUS WINAPI NtDuplicateToken(HANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,SECURITY_IMPERSONATION_LEVEL,TOKEN_TYPE,PHANDLE);
1816 NTSTATUS WINAPI NtEnumerateKey(HANDLE,ULONG,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *);
1817 NTSTATUS WINAPI NtEnumerateValueKey(HANDLE,ULONG,KEY_VALUE_INFORMATION_CLASS,PVOID,ULONG,PULONG);
1818 NTSTATUS WINAPI NtExtendSection(HANDLE,PLARGE_INTEGER);
1819 NTSTATUS WINAPI NtFindAtom(const WCHAR*,ULONG,RTL_ATOM*);
1820 NTSTATUS WINAPI NtFlushBuffersFile(HANDLE,IO_STATUS_BLOCK*);
1821 NTSTATUS WINAPI NtFlushInstructionCache(HANDLE,LPCVOID,SIZE_T);
1822 NTSTATUS WINAPI NtFlushKey(HANDLE);
1823 NTSTATUS WINAPI NtFlushVirtualMemory(HANDLE,LPCVOID*,SIZE_T*,ULONG);
1824 NTSTATUS WINAPI NtFlushWriteBuffer(VOID);
1825 NTSTATUS WINAPI NtFreeVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
1826 NTSTATUS WINAPI NtFsControlFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,PVOID,ULONG,PVOID,ULONG);
1827 NTSTATUS WINAPI NtGetContextThread(HANDLE,CONTEXT*);
1828 NTSTATUS WINAPI NtGetPlugPlayEvent(ULONG,ULONG,PVOID,ULONG);
1829 ULONG WINAPI NtGetTickCount(VOID);
1830 NTSTATUS WINAPI NtImpersonateAnonymousToken(HANDLE);
1831 NTSTATUS WINAPI NtImpersonateClientOfPort(HANDLE,PPORT_MESSAGE);
1832 NTSTATUS WINAPI NtImpersonateThread(HANDLE,HANDLE,PSECURITY_QUALITY_OF_SERVICE);
1833 NTSTATUS WINAPI NtInitializeRegistry(BOOLEAN);
1834 NTSTATUS WINAPI NtInitiatePowerAction(POWER_ACTION,SYSTEM_POWER_STATE,ULONG,BOOLEAN);
1835 NTSTATUS WINAPI NtListenPort(HANDLE,PLPC_MESSAGE);
1836 NTSTATUS WINAPI NtLoadDriver(const UNICODE_STRING *);
1837 NTSTATUS WINAPI NtLoadKey(const OBJECT_ATTRIBUTES *,OBJECT_ATTRIBUTES *);
1838 NTSTATUS WINAPI NtLockFile(HANDLE,HANDLE,PIO_APC_ROUTINE,void*,PIO_STATUS_BLOCK,PLARGE_INTEGER,PLARGE_INTEGER,ULONG*,BOOLEAN,BOOLEAN);
1839 NTSTATUS WINAPI NtLockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
1840 NTSTATUS WINAPI NtMakeTemporaryObject(HANDLE);
1841 NTSTATUS WINAPI NtMapViewOfSection(HANDLE,HANDLE,PVOID*,ULONG,SIZE_T,const LARGE_INTEGER*,SIZE_T*,SECTION_INHERIT,ULONG,ULONG);
1842 NTSTATUS WINAPI NtNotifyChangeDirectoryFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,ULONG,BOOLEAN);
1843 NTSTATUS WINAPI NtNotifyChangeKey(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,BOOLEAN,PVOID,ULONG,BOOLEAN);
1844 NTSTATUS WINAPI NtOpenDirectoryObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
1845 NTSTATUS WINAPI NtOpenEvent(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *);
1846 NTSTATUS WINAPI NtOpenEventPair(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
1847 NTSTATUS WINAPI NtOpenFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG);
1848 NTSTATUS WINAPI NtOpenIoCompletion(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
1849 NTSTATUS WINAPI NtOpenKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *);
1850 NTSTATUS WINAPI NtOpenMutant(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
1851 NTSTATUS WINAPI NtOpenObjectAuditAlarm(PUNICODE_STRING,PHANDLE,PUNICODE_STRING,PUNICODE_STRING,PSECURITY_DESCRIPTOR,HANDLE,ACCESS_MASK,ACCESS_MASK,PPRIVILEGE_SET,BOOLEAN,BOOLEAN,PBOOLEAN);
1852 NTSTATUS WINAPI NtOpenProcess(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const CLIENT_ID*);
1853 NTSTATUS WINAPI NtOpenProcessToken(HANDLE,DWORD,HANDLE *);
1854 NTSTATUS WINAPI NtOpenSection(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
1855 NTSTATUS WINAPI NtOpenSemaphore(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
1856 NTSTATUS WINAPI NtOpenSymbolicLinkObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
1857 NTSTATUS WINAPI NtOpenThread(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const CLIENT_ID*);
1858 NTSTATUS WINAPI NtOpenThreadToken(HANDLE,DWORD,BOOLEAN,HANDLE *);
1859 NTSTATUS WINAPI NtOpenTimer(HANDLE*, ACCESS_MASK, const OBJECT_ATTRIBUTES*);
1860 NTSTATUS WINAPI NtPowerInformation(POWER_INFORMATION_LEVEL,PVOID,ULONG,PVOID,ULONG);
1861 NTSTATUS WINAPI NtPrivilegeCheck(HANDLE,PPRIVILEGE_SET,PBOOLEAN);
1862 NTSTATUS WINAPI NtPrivilegeObjectAuditAlarm(PUNICODE_STRING,HANDLE,HANDLE,ULONG,PPRIVILEGE_SET,BOOLEAN);
1863 NTSTATUS WINAPI NtPrivilegedServiceAuditAlarm(PUNICODE_STRING,PUNICODE_STRING,HANDLE,PPRIVILEGE_SET,BOOLEAN);
1864 NTSTATUS WINAPI NtProtectVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG,ULONG*);
1865 NTSTATUS WINAPI NtPulseEvent(HANDLE,PULONG);
1866 NTSTATUS WINAPI NtQueueApcThread(HANDLE,PNTAPCFUNC,ULONG_PTR,ULONG_PTR,ULONG_PTR);
1867 NTSTATUS WINAPI NtQueryAttributesFile(const OBJECT_ATTRIBUTES*,FILE_BASIC_INFORMATION*);
1868 NTSTATUS WINAPI NtQueryDefaultLocale(BOOLEAN,LCID*);
1869 NTSTATUS WINAPI NtQueryDefaultUILanguage(LANGID*);
1870 NTSTATUS WINAPI NtQueryDirectoryFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,FILE_INFORMATION_CLASS,BOOLEAN,PUNICODE_STRING,BOOLEAN);
1871 NTSTATUS WINAPI NtQueryDirectoryObject(HANDLE,PDIRECTORY_BASIC_INFORMATION,ULONG,BOOLEAN,BOOLEAN,PULONG,PULONG);
1872 NTSTATUS WINAPI NtQueryEaFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,BOOLEAN,PVOID,ULONG,PVOID,BOOLEAN);
1873 NTSTATUS WINAPI NtQueryEvent(HANDLE,EVENT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
1874 NTSTATUS WINAPI NtQueryFullAttributesFile(const OBJECT_ATTRIBUTES*,FILE_NETWORK_OPEN_INFORMATION*);
1875 NTSTATUS WINAPI NtQueryInformationAtom(RTL_ATOM,ATOM_INFORMATION_CLASS,PVOID,ULONG,ULONG*);
1876 NTSTATUS WINAPI NtQueryInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,LONG,FILE_INFORMATION_CLASS);
1877 NTSTATUS WINAPI NtQueryInformationPort(HANDLE,PORT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
1878 NTSTATUS WINAPI NtQueryInformationProcess(HANDLE,PROCESSINFOCLASS,PVOID,ULONG,PULONG);
1879 NTSTATUS WINAPI NtQueryInformationThread(HANDLE,THREADINFOCLASS,PVOID,ULONG,PULONG);
1880 NTSTATUS WINAPI NtQueryInformationToken(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,ULONG,PULONG);
1881 NTSTATUS WINAPI NtQueryInstallUILanguage(LANGID*);
1882 NTSTATUS WINAPI NtQueryIntervalProfile(KPROFILE_SOURCE,PULONG);
1883 NTSTATUS WINAPI NtQueryIoCompletion(HANDLE,IO_COMPLETION_INFORMATION_CLASS,PVOID,ULONG,PULONG);
1884 NTSTATUS WINAPI NtQueryKey(HANDLE,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *);
1885 NTSTATUS WINAPI NtQueryMultipleValueKey(HANDLE,PKEY_MULTIPLE_VALUE_INFORMATION,ULONG,PVOID,ULONG,PULONG);
1886 NTSTATUS WINAPI NtQueryMutant(HANDLE,MUTANT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
1887 NTSTATUS WINAPI NtQueryObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG, PULONG);
1888 NTSTATUS WINAPI NtQueryOpenSubKeys(POBJECT_ATTRIBUTES,PULONG);
1889 NTSTATUS WINAPI NtQueryPerformanceCounter(PLARGE_INTEGER, PLARGE_INTEGER);
1890 NTSTATUS WINAPI NtQuerySecurityObject(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,ULONG,PULONG);
1891 NTSTATUS WINAPI NtQuerySection(HANDLE,SECTION_INFORMATION_CLASS,PVOID,ULONG,PULONG);
1892 NTSTATUS WINAPI NtQuerySemaphore(HANDLE,SEMAPHORE_INFORMATION_CLASS,PVOID,ULONG,PULONG);
1893 NTSTATUS WINAPI NtQuerySymbolicLinkObject(HANDLE,PUNICODE_STRING,PULONG);
1894 NTSTATUS WINAPI NtQuerySystemEnvironmentValue(PUNICODE_STRING,PWCHAR,ULONG,PULONG);
1895 NTSTATUS WINAPI NtQuerySystemInformation(SYSTEM_INFORMATION_CLASS,PVOID,ULONG,PULONG);
1896 NTSTATUS WINAPI NtQuerySystemTime(PLARGE_INTEGER);
1897 NTSTATUS WINAPI NtQueryTimer(HANDLE,TIMER_INFORMATION_CLASS,PVOID,ULONG,PULONG);
1898 NTSTATUS WINAPI NtQueryTimerResolution(PULONG,PULONG,PULONG);
1899 NTSTATUS WINAPI NtQueryValueKey(HANDLE,const UNICODE_STRING *,KEY_VALUE_INFORMATION_CLASS,void *,DWORD,DWORD *);
1900 NTSTATUS WINAPI NtQueryVirtualMemory(HANDLE,LPCVOID,MEMORY_INFORMATION_CLASS,PVOID,SIZE_T,SIZE_T*);
1901 NTSTATUS WINAPI NtQueryVolumeInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS);
1902 NTSTATUS WINAPI NtRaiseException(PEXCEPTION_RECORD,PCONTEXT,BOOL);
1903 NTSTATUS WINAPI NtRaiseHardError(NTSTATUS,ULONG,PUNICODE_STRING,PVOID*,HARDERROR_RESPONSE_OPTION,PHARDERROR_RESPONSE);
1904 NTSTATUS WINAPI NtReadFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,PLARGE_INTEGER,PULONG);
1905 NTSTATUS WINAPI NtReadFileScatter(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,FILE_SEGMENT_ELEMENT,ULONG,PLARGE_INTEGER,PULONG);
1906 NTSTATUS WINAPI NtReadRequestData(HANDLE,PLPC_MESSAGE,ULONG,PVOID,ULONG,PULONG);
1907 NTSTATUS WINAPI NtReadVirtualMemory(HANDLE,const void*,void*,SIZE_T,SIZE_T*);
1908 NTSTATUS WINAPI NtRegisterThreadTerminatePort(HANDLE);
1909 NTSTATUS WINAPI NtReleaseMutant(HANDLE,PLONG);
1910 NTSTATUS WINAPI NtReleaseSemaphore(HANDLE,ULONG,PULONG);
1911 NTSTATUS WINAPI NtRemoveIoCompletion(HANDLE,PULONG_PTR,PULONG_PTR,PIO_STATUS_BLOCK,PLARGE_INTEGER);
1912 NTSTATUS WINAPI NtReplaceKey(POBJECT_ATTRIBUTES,HANDLE,POBJECT_ATTRIBUTES);
1913 NTSTATUS WINAPI NtReplyPort(HANDLE,PLPC_MESSAGE);
1914 NTSTATUS WINAPI NtReplyWaitReceivePort(HANDLE,PULONG,PLPC_MESSAGE,PLPC_MESSAGE);
1915 NTSTATUS WINAPI NtReplyWaitReceivePortEx(HANDLE,PVOID*,PPORT_MESSAGE,PPORT_MESSAGE,PLARGE_INTEGER);
1916 NTSTATUS WINAPI NtReplyWaitReplyPort(HANDLE,PLPC_MESSAGE);
1917 NTSTATUS WINAPI NtRequestPort(HANDLE,PLPC_MESSAGE);
1918 NTSTATUS WINAPI NtRequestWaitReplyPort(HANDLE,PLPC_MESSAGE,PLPC_MESSAGE);
1919 NTSTATUS WINAPI NtResetEvent(HANDLE,PULONG);
1920 NTSTATUS WINAPI NtRestoreKey(HANDLE,HANDLE,ULONG);
1921 NTSTATUS WINAPI NtResumeThread(HANDLE,PULONG);
1922 NTSTATUS WINAPI NtSaveKey(HANDLE,HANDLE);
1923 NTSTATUS WINAPI NtSecureConnectPort(PHANDLE,PUNICODE_STRING,PSECURITY_QUALITY_OF_SERVICE,PLPC_SECTION_WRITE,PSID,PLPC_SECTION_READ,PULONG,PVOID,PULONG);
1924 NTSTATUS WINAPI NtSetContextThread(HANDLE,const CONTEXT*);
1925 NTSTATUS WINAPI NtSetDefaultHardErrorPort(HANDLE);
1926 NTSTATUS WINAPI NtSetDefaultLocale(BOOLEAN,LCID);
1927 NTSTATUS WINAPI NtSetDefaultUILanguage(LANGID);
1928 NTSTATUS WINAPI NtSetEaFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG);
1929 NTSTATUS WINAPI NtSetEvent(HANDLE,PULONG);
1930 NTSTATUS WINAPI NtSetHighEventPair(HANDLE);
1931 NTSTATUS WINAPI NtSetHighWaitLowEventPair(HANDLE);
1932 NTSTATUS WINAPI NtSetHighWaitLowThread(VOID);
1933 NTSTATUS WINAPI NtSetInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FILE_INFORMATION_CLASS);
1934 NTSTATUS WINAPI NtSetInformationKey(HANDLE,const int,PVOID,ULONG);
1935 NTSTATUS WINAPI NtSetInformationObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG);
1936 NTSTATUS WINAPI NtSetInformationProcess(HANDLE,PROCESS_INFORMATION_CLASS,PVOID,ULONG);
1937 NTSTATUS WINAPI NtSetInformationThread(HANDLE,THREADINFOCLASS,LPCVOID,ULONG);
1938 NTSTATUS WINAPI NtSetInformationToken(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,ULONG);
1939 NTSTATUS WINAPI NtSetIntervalProfile(ULONG,KPROFILE_SOURCE);
1940 NTSTATUS WINAPI NtSetIoCompletion(HANDLE,ULONG_PTR,ULONG_PTR,NTSTATUS,ULONG);
1941 NTSTATUS WINAPI NtSetLdtEntries(ULONG,LDT_ENTRY,ULONG,LDT_ENTRY);
1942 NTSTATUS WINAPI NtSetLowEventPair(HANDLE);
1943 NTSTATUS WINAPI NtSetLowWaitHighEventPair(HANDLE);
1944 NTSTATUS WINAPI NtSetLowWaitHighThread(VOID);
1945 NTSTATUS WINAPI NtSetSecurityObject(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
1946 NTSTATUS WINAPI NtSetSystemEnvironmentValue(PUNICODE_STRING,PUNICODE_STRING);
1947 NTSTATUS WINAPI NtSetSystemInformation(SYSTEM_INFORMATION_CLASS,PVOID,ULONG);
1948 NTSTATUS WINAPI NtSetSystemPowerState(POWER_ACTION,SYSTEM_POWER_STATE,ULONG);
1949 NTSTATUS WINAPI NtSetSystemTime(const LARGE_INTEGER*,LARGE_INTEGER*);
1950 NTSTATUS WINAPI NtSetTimer(HANDLE, const LARGE_INTEGER*, PTIMER_APC_ROUTINE, PVOID, BOOLEAN, ULONG, BOOLEAN*);
1951 NTSTATUS WINAPI NtSetTimerResolution(ULONG,BOOLEAN,PULONG);
1952 NTSTATUS WINAPI NtSetValueKey(HANDLE,const UNICODE_STRING *,ULONG,ULONG,const void *,ULONG);
1953 NTSTATUS WINAPI NtSetVolumeInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS);
1954 NTSTATUS WINAPI NtSignalAndWaitForSingleObject(HANDLE,HANDLE,BOOLEAN,const LARGE_INTEGER*);
1955 NTSTATUS WINAPI NtShutdownSystem(SHUTDOWN_ACTION);
1956 NTSTATUS WINAPI NtStartProfile(HANDLE);
1957 NTSTATUS WINAPI NtStopProfile(HANDLE);
1958 NTSTATUS WINAPI NtSuspendThread(HANDLE,PULONG);
1959 NTSTATUS WINAPI NtSystemDebugControl(SYSDBG_COMMAND,PVOID,ULONG,PVOID,ULONG,PULONG);
1960 NTSTATUS WINAPI NtTerminateProcess(HANDLE,LONG);
1961 NTSTATUS WINAPI NtTerminateThread(HANDLE,LONG);
1962 NTSTATUS WINAPI NtTestAlert(VOID);
1963 NTSTATUS WINAPI NtUnloadDriver(const UNICODE_STRING *);
1964 NTSTATUS WINAPI NtUnloadKey(POBJECT_ATTRIBUTES);
1965 NTSTATUS WINAPI NtUnloadKeyEx(POBJECT_ATTRIBUTES,HANDLE);
1966 NTSTATUS WINAPI NtUnlockFile(HANDLE,PIO_STATUS_BLOCK,PLARGE_INTEGER,PLARGE_INTEGER,PULONG);
1967 NTSTATUS WINAPI NtUnlockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
1968 NTSTATUS WINAPI NtUnmapViewOfSection(HANDLE,PVOID);
1969 NTSTATUS WINAPI NtVdmControl(ULONG,PVOID);
1970 NTSTATUS WINAPI NtWaitForSingleObject(HANDLE,BOOLEAN,const LARGE_INTEGER*);
1971 NTSTATUS WINAPI NtWaitForMultipleObjects(ULONG,const HANDLE*,BOOLEAN,BOOLEAN,const LARGE_INTEGER*);
1972 NTSTATUS WINAPI NtWaitHighEventPair(HANDLE);
1973 NTSTATUS WINAPI NtWaitLowEventPair(HANDLE);
1974 NTSTATUS WINAPI NtWriteFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,const void*,ULONG,PLARGE_INTEGER,PULONG);
1975 NTSTATUS WINAPI NtWriteFileGather(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,FILE_SEGMENT_ELEMENT,ULONG,PLARGE_INTEGER,PULONG);
1976 NTSTATUS WINAPI NtWriteRequestData(HANDLE,PLPC_MESSAGE,ULONG,PVOID,ULONG,PULONG);
1977 NTSTATUS WINAPI NtWriteVirtualMemory(HANDLE,void*,const void*,SIZE_T,SIZE_T*);
1978 NTSTATUS WINAPI NtYieldExecution(void);
1980 void WINAPI RtlAcquirePebLock(void);
1981 BYTE WINAPI RtlAcquireResourceExclusive(LPRTL_RWLOCK,BYTE);
1982 BYTE WINAPI RtlAcquireResourceShared(LPRTL_RWLOCK,BYTE);
1983 NTSTATUS WINAPI RtlActivateActivationContext(DWORD,HANDLE,ULONG_PTR*);
1984 NTSTATUS WINAPI RtlAddAce(PACL,DWORD,DWORD,PACE_HEADER,DWORD);
1985 NTSTATUS WINAPI RtlAddAccessAllowedAce(PACL,DWORD,DWORD,PSID);
1986 NTSTATUS WINAPI RtlAddAccessAllowedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
1987 NTSTATUS WINAPI RtlAddAccessDeniedAce(PACL,DWORD,DWORD,PSID);
1988 NTSTATUS WINAPI RtlAddAccessDeniedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
1989 NTSTATUS WINAPI RtlAddAtomToAtomTable(RTL_ATOM_TABLE,const WCHAR*,RTL_ATOM*);
1990 NTSTATUS WINAPI RtlAddAuditAccessAce(PACL,DWORD,DWORD,PSID,BOOL,BOOL);
1991 NTSTATUS WINAPI RtlAddAuditAccessAceEx(PACL,DWORD,DWORD,DWORD,PSID,BOOL,BOOL);
1992 void WINAPI RtlAddRefActivationContext(HANDLE);
1993 PVOID WINAPI RtlAddVectoredExceptionHandler(ULONG,PVECTORED_EXCEPTION_HANDLER);
1994 NTSTATUS WINAPI RtlAdjustPrivilege(ULONG,BOOLEAN,BOOLEAN,PBOOLEAN);
1995 NTSTATUS WINAPI RtlAllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY,BYTE,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,PSID *);
1996 RTL_HANDLE * WINAPI RtlAllocateHandle(RTL_HANDLE_TABLE *,ULONG *);
1997 PVOID WINAPI RtlAllocateHeap(HANDLE,ULONG,SIZE_T);
1998 WCHAR WINAPI RtlAnsiCharToUnicodeChar(LPSTR *);
1999 DWORD WINAPI RtlAnsiStringToUnicodeSize(const STRING *);
2000 NTSTATUS WINAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING,PCANSI_STRING,BOOLEAN);
2001 NTSTATUS WINAPI RtlAppendAsciizToString(STRING *,LPCSTR);
2002 NTSTATUS WINAPI RtlAppendStringToString(STRING *,const STRING *);
2003 NTSTATUS WINAPI RtlAppendUnicodeStringToString(UNICODE_STRING *,const UNICODE_STRING *);
2004 NTSTATUS WINAPI RtlAppendUnicodeToString(UNICODE_STRING *,LPCWSTR);
2005 BOOLEAN WINAPI RtlAreAllAccessesGranted(ACCESS_MASK,ACCESS_MASK);
2006 BOOLEAN WINAPI RtlAreAnyAccessesGranted(ACCESS_MASK,ACCESS_MASK);
2007 BOOLEAN WINAPI RtlAreBitsSet(PCRTL_BITMAP,ULONG,ULONG);
2008 BOOLEAN WINAPI RtlAreBitsClear(PCRTL_BITMAP,ULONG,ULONG);
2010 NTSTATUS WINAPI RtlCharToInteger(PCSZ,ULONG,PULONG);
2011 NTSTATUS WINAPI RtlCheckRegistryKey(ULONG, PWSTR);
2012 void WINAPI RtlClearAllBits(PRTL_BITMAP);
2013 void WINAPI RtlClearBits(PRTL_BITMAP,ULONG,ULONG);
2014 NTSTATUS WINAPI RtlCreateActivationContext(HANDLE*,const void*);
2015 PDEBUG_BUFFER WINAPI RtlCreateQueryDebugBuffer(ULONG,BOOLEAN);
2016 ULONG WINAPI RtlCompactHeap(HANDLE,ULONG);
2017 LONG WINAPI RtlCompareString(const STRING*,const STRING*,BOOLEAN);
2018 LONG WINAPI RtlCompareUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
2019 DWORD WINAPI RtlComputeCrc32(DWORD,const BYTE*,INT);
2020 NTSTATUS WINAPI RtlConvertSidToUnicodeString(PUNICODE_STRING,PSID,BOOLEAN);
2021 LONGLONG WINAPI RtlConvertLongToLargeInteger(LONG);
2022 ULONGLONG WINAPI RtlConvertUlongToLargeInteger(ULONG);
2023 void WINAPI RtlCopyLuid(PLUID,const LUID*);
2024 void WINAPI RtlCopyLuidAndAttributesArray(ULONG,const LUID_AND_ATTRIBUTES*,PLUID_AND_ATTRIBUTES);
2025 BOOLEAN WINAPI RtlCopySid(DWORD,PSID,PSID);
2026 NTSTATUS WINAPI RtlCopySecurityDescriptor(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR);
2027 void WINAPI RtlCopyString(STRING*,const STRING*);
2028 void WINAPI RtlCopyUnicodeString(UNICODE_STRING*,const UNICODE_STRING*);
2029 NTSTATUS WINAPI RtlCreateAcl(PACL,DWORD,DWORD);
2030 NTSTATUS WINAPI RtlCreateAtomTable(ULONG,RTL_ATOM_TABLE*);
2031 NTSTATUS WINAPI RtlCreateEnvironment(BOOLEAN, PWSTR*);
2032 HANDLE WINAPI RtlCreateHeap(ULONG,PVOID,SIZE_T,SIZE_T,PVOID,PRTL_HEAP_DEFINITION);
2033 NTSTATUS WINAPI RtlCreateProcessParameters(RTL_USER_PROCESS_PARAMETERS**,const UNICODE_STRING*,
2034 const UNICODE_STRING*,const UNICODE_STRING*,
2035 const UNICODE_STRING*,PWSTR,const UNICODE_STRING*,
2036 const UNICODE_STRING*,const UNICODE_STRING*,
2037 const UNICODE_STRING*);
2038 NTSTATUS WINAPI RtlCreateSecurityDescriptor(PSECURITY_DESCRIPTOR,DWORD);
2039 BOOLEAN WINAPI RtlCreateUnicodeString(PUNICODE_STRING,LPCWSTR);
2040 BOOLEAN WINAPI RtlCreateUnicodeStringFromAsciiz(PUNICODE_STRING,LPCSTR);
2041 NTSTATUS WINAPI RtlCreateUserThread(HANDLE,const SECURITY_DESCRIPTOR*,BOOLEAN,PVOID,SIZE_T,SIZE_T,PRTL_THREAD_START_ROUTINE,void*,HANDLE*,CLIENT_ID*);
2043 void WINAPI RtlDeactivateActivationContext(DWORD,ULONG_PTR);
2044 NTSTATUS WINAPI RtlDeleteAce(PACL,DWORD);
2045 NTSTATUS WINAPI RtlDeleteAtomFromAtomTable(RTL_ATOM_TABLE,RTL_ATOM);
2046 NTSTATUS WINAPI RtlDeleteCriticalSection(RTL_CRITICAL_SECTION *);
2047 NTSTATUS WINAPI RtlDeleteRegistryValue(ULONG, PCWSTR, PCWSTR);
2048 void WINAPI RtlDeleteResource(LPRTL_RWLOCK);
2049 NTSTATUS WINAPI RtlDeleteSecurityObject(PSECURITY_DESCRIPTOR*);
2050 PRTL_USER_PROCESS_PARAMETERS WINAPI RtlDeNormalizeProcessParams(RTL_USER_PROCESS_PARAMETERS*);
2051 NTSTATUS WINAPI RtlDestroyAtomTable(RTL_ATOM_TABLE);
2052 NTSTATUS WINAPI RtlDestroyEnvironment(PWSTR);
2053 NTSTATUS WINAPI RtlDestroyHandleTable(RTL_HANDLE_TABLE *);
2054 HANDLE WINAPI RtlDestroyHeap(HANDLE);
2055 void WINAPI RtlDestroyProcessParameters(RTL_USER_PROCESS_PARAMETERS*);
2056 NTSTATUS WINAPI RtlDestroyQueryDebugBuffer(PDEBUG_BUFFER);
2057 DOS_PATHNAME_TYPE WINAPI RtlDetermineDosPathNameType_U(PCWSTR);
2058 BOOLEAN WINAPI RtlDllShutdownInProgress(void);
2059 BOOLEAN WINAPI RtlDoesFileExists_U(LPCWSTR);
2060 BOOLEAN WINAPI RtlDosPathNameToNtPathName_U(PCWSTR,PUNICODE_STRING,PWSTR*,CURDIR*);
2061 ULONG WINAPI RtlDosSearchPath_U(LPCWSTR, LPCWSTR, LPCWSTR, ULONG, LPWSTR, LPWSTR*);
2062 WCHAR WINAPI RtlDowncaseUnicodeChar(WCHAR);
2063 NTSTATUS WINAPI RtlDowncaseUnicodeString(UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
2064 void WINAPI RtlDumpResource(LPRTL_RWLOCK);
2065 NTSTATUS WINAPI RtlDuplicateUnicodeString(int,const UNICODE_STRING*,UNICODE_STRING*);
2067 NTSTATUS WINAPI RtlEmptyAtomTable(RTL_ATOM_TABLE,BOOLEAN);
2068 LONGLONG WINAPI RtlEnlargedIntegerMultiply(INT,INT);
2069 ULONGLONG WINAPI RtlEnlargedUnsignedMultiply(UINT,UINT);
2070 UINT WINAPI RtlEnlargedUnsignedDivide(ULONGLONG,UINT,UINT *);
2071 NTSTATUS WINAPI RtlEnterCriticalSection(RTL_CRITICAL_SECTION *);
2072 void WINAPI RtlEraseUnicodeString(UNICODE_STRING*);
2073 NTSTATUS WINAPI RtlEqualComputerName(const UNICODE_STRING*,const UNICODE_STRING*);
2074 NTSTATUS WINAPI RtlEqualDomainName(const UNICODE_STRING*,const UNICODE_STRING*);
2075 BOOLEAN WINAPI RtlEqualLuid(const LUID*,const LUID*);
2076 BOOL WINAPI RtlEqualPrefixSid(PSID,PSID);
2077 BOOL WINAPI RtlEqualSid(PSID,PSID);
2078 BOOLEAN WINAPI RtlEqualString(const STRING*,const STRING*,BOOLEAN);
2079 BOOLEAN WINAPI RtlEqualUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
2080 void DECLSPEC_NORETURN WINAPI RtlExitUserThread(ULONG);
2081 NTSTATUS WINAPI RtlExpandEnvironmentStrings_U(PCWSTR, const UNICODE_STRING*, UNICODE_STRING*, ULONG*);
2082 LONGLONG WINAPI RtlExtendedMagicDivide(LONGLONG,LONGLONG,INT);
2083 LONGLONG WINAPI RtlExtendedIntegerMultiply(LONGLONG,INT);
2084 LONGLONG WINAPI RtlExtendedLargeIntegerDivide(LONGLONG,INT,INT *);
2086 NTSTATUS WINAPI RtlFindActivationContextSectionString(ULONG,const GUID*,ULONG,const UNICODE_STRING*,PVOID);
2087 NTSTATUS WINAPI RtlFindCharInUnicodeString(int,const UNICODE_STRING*,const UNICODE_STRING*,USHORT*);
2088 ULONG WINAPI RtlFindClearBits(PCRTL_BITMAP,ULONG,ULONG);
2089 ULONG WINAPI RtlFindClearBitsAndSet(PRTL_BITMAP,ULONG,ULONG);
2090 ULONG WINAPI RtlFindClearRuns(PCRTL_BITMAP,PRTL_BITMAP_RUN,ULONG,BOOLEAN);
2091 ULONG WINAPI RtlFindLastBackwardRunSet(PCRTL_BITMAP,ULONG,PULONG);
2092 ULONG WINAPI RtlFindLastBackwardRunClear(PCRTL_BITMAP,ULONG,PULONG);
2093 CCHAR WINAPI RtlFindLeastSignificantBit(ULONGLONG);
2094 ULONG WINAPI RtlFindLongestRunSet(PCRTL_BITMAP,PULONG);
2095 ULONG WINAPI RtlFindLongestRunClear(PCRTL_BITMAP,PULONG);
2096 NTSTATUS WINAPI RtlFindMessage(HMODULE,ULONG,ULONG,ULONG,const MESSAGE_RESOURCE_ENTRY**);
2097 CCHAR WINAPI RtlFindMostSignificantBit(ULONGLONG);
2098 ULONG WINAPI RtlFindNextForwardRunSet(PCRTL_BITMAP,ULONG,PULONG);
2099 ULONG WINAPI RtlFindNextForwardRunClear(PCRTL_BITMAP,ULONG,PULONG);
2100 ULONG WINAPI RtlFindSetBits(PCRTL_BITMAP,ULONG,ULONG);
2101 ULONG WINAPI RtlFindSetBitsAndClear(PRTL_BITMAP,ULONG,ULONG);
2102 ULONG WINAPI RtlFindSetRuns(PCRTL_BITMAP,PRTL_BITMAP_RUN,ULONG,BOOLEAN);
2103 BOOLEAN WINAPI RtlFirstFreeAce(PACL,PACE_HEADER *);
2104 NTSTATUS WINAPI RtlFormatCurrentUserKeyPath(PUNICODE_STRING);
2105 NTSTATUS WINAPI RtlFormatMessage(LPWSTR,UCHAR,BOOLEAN,BOOLEAN,BOOLEAN,va_list *,LPWSTR,ULONG);
2106 void WINAPI RtlFreeAnsiString(PANSI_STRING);
2107 BOOLEAN WINAPI RtlFreeHandle(RTL_HANDLE_TABLE *,RTL_HANDLE *);
2108 BOOLEAN WINAPI RtlFreeHeap(HANDLE,ULONG,PVOID);
2109 void WINAPI RtlFreeOemString(POEM_STRING);
2110 DWORD WINAPI RtlFreeSid(PSID);
2111 void WINAPI RtlFreeThreadActivationContextStack(void);
2112 void WINAPI RtlFreeUnicodeString(PUNICODE_STRING);
2114 NTSTATUS WINAPI RtlGetAce(PACL,DWORD,LPVOID *);
2115 NTSTATUS WINAPI RtlGetActiveActivationContext(HANDLE*);
2116 NTSTATUS WINAPI RtlGetControlSecurityDescriptor(PSECURITY_DESCRIPTOR, PSECURITY_DESCRIPTOR_CONTROL,LPDWORD);
2117 NTSTATUS WINAPI RtlGetCurrentDirectory_U(ULONG, LPWSTR);
2118 PEB * WINAPI RtlGetCurrentPeb(void);
2119 NTSTATUS WINAPI RtlGetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR,PBOOLEAN,PACL *,PBOOLEAN);
2120 ULONG WINAPI RtlGetFullPathName_U(PCWSTR,ULONG,PWSTR,PWSTR*);
2121 NTSTATUS WINAPI RtlGetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID *,PBOOLEAN);
2122 NTSTATUS WINAPI RtlGetLastNtStatus(void);
2123 DWORD WINAPI RtlGetLastWin32Error(void);
2124 DWORD WINAPI RtlGetLongestNtPathLength(void);
2125 BOOLEAN WINAPI RtlGetNtProductType(LPDWORD);
2126 NTSTATUS WINAPI RtlGetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID *,PBOOLEAN);
2127 ULONG WINAPI RtlGetProcessHeaps(ULONG,HANDLE*);
2128 NTSTATUS WINAPI RtlGetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR,PBOOLEAN,PACL *,PBOOLEAN);
2129 NTSTATUS WINAPI RtlGetVersion(RTL_OSVERSIONINFOEXW*);
2130 NTSTATUS WINAPI RtlGUIDFromString(PUNICODE_STRING,GUID*);
2132 PSID_IDENTIFIER_AUTHORITY WINAPI RtlIdentifierAuthoritySid(PSID);
2133 PVOID WINAPI RtlImageDirectoryEntryToData(HMODULE,BOOL,WORD,ULONG *);
2134 PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE);
2135 PIMAGE_SECTION_HEADER WINAPI RtlImageRvaToSection(const IMAGE_NT_HEADERS *,HMODULE,DWORD);
2136 PVOID WINAPI RtlImageRvaToVa(const IMAGE_NT_HEADERS *,HMODULE,DWORD,IMAGE_SECTION_HEADER **);
2137 NTSTATUS WINAPI RtlImpersonateSelf(SECURITY_IMPERSONATION_LEVEL);
2138 void WINAPI RtlInitString(PSTRING,PCSZ);
2139 void WINAPI RtlInitAnsiString(PANSI_STRING,PCSZ);
2140 NTSTATUS WINAPI RtlInitAnsiStringEx(PANSI_STRING,PCSZ);
2141 void WINAPI RtlInitUnicodeString(PUNICODE_STRING,PCWSTR);
2142 NTSTATUS WINAPI RtlInitUnicodeStringEx(PUNICODE_STRING,PCWSTR);
2143 NTSTATUS WINAPI RtlInitializeCriticalSection(RTL_CRITICAL_SECTION *);
2144 NTSTATUS WINAPI RtlInitializeCriticalSectionAndSpinCount(RTL_CRITICAL_SECTION *,DWORD);
2145 void WINAPI RtlInitializeBitMap(PRTL_BITMAP,PULONG,ULONG);
2146 void WINAPI RtlInitializeHandleTable(ULONG,ULONG,RTL_HANDLE_TABLE *);
2147 void WINAPI RtlInitializeResource(LPRTL_RWLOCK);
2148 BOOL WINAPI RtlInitializeSid(PSID,PSID_IDENTIFIER_AUTHORITY,BYTE);
2150 NTSTATUS WINAPI RtlInt64ToUnicodeString(ULONGLONG,ULONG,UNICODE_STRING *);
2151 NTSTATUS WINAPI RtlIntegerToChar(ULONG,ULONG,ULONG,PCHAR);
2152 NTSTATUS WINAPI RtlIntegerToUnicodeString(ULONG,ULONG,UNICODE_STRING *);
2153 BOOLEAN WINAPI RtlIsActivationContextActive(HANDLE);
2154 ULONG WINAPI RtlIsDosDeviceName_U(PCWSTR);
2155 BOOLEAN WINAPI RtlIsNameLegalDOS8Dot3(const UNICODE_STRING*,POEM_STRING,PBOOLEAN);
2156 BOOLEAN WINAPI RtlIsTextUnicode(LPCVOID,INT,INT *);
2157 BOOLEAN WINAPI RtlIsValidHandle(const RTL_HANDLE_TABLE *, const RTL_HANDLE *);
2158 BOOLEAN WINAPI RtlIsValidIndexHandle(const RTL_HANDLE_TABLE *, ULONG Index, RTL_HANDLE **);
2160 LONGLONG WINAPI RtlLargeIntegerAdd(LONGLONG,LONGLONG);
2161 LONGLONG WINAPI RtlLargeIntegerArithmeticShift(LONGLONG,INT);
2162 ULONGLONG WINAPI RtlLargeIntegerDivide( ULONGLONG,ULONGLONG,ULONGLONG *);
2163 LONGLONG WINAPI RtlLargeIntegerNegate(LONGLONG);
2164 LONGLONG WINAPI RtlLargeIntegerShiftLeft(LONGLONG,INT);
2165 LONGLONG WINAPI RtlLargeIntegerShiftRight(LONGLONG,INT);
2166 LONGLONG WINAPI RtlLargeIntegerSubtract(LONGLONG,LONGLONG);
2167 NTSTATUS WINAPI RtlLargeIntegerToChar(const ULONGLONG *,ULONG,ULONG,PCHAR);
2168 NTSTATUS WINAPI RtlLeaveCriticalSection(RTL_CRITICAL_SECTION *);
2169 DWORD WINAPI RtlLengthRequiredSid(DWORD);
2170 ULONG WINAPI RtlLengthSecurityDescriptor(PSECURITY_DESCRIPTOR);
2171 DWORD WINAPI RtlLengthSid(PSID);
2172 NTSTATUS WINAPI RtlLocalTimeToSystemTime(const LARGE_INTEGER*,PLARGE_INTEGER);
2173 BOOLEAN WINAPI RtlLockHeap(HANDLE);
2174 NTSTATUS WINAPI RtlLookupAtomInAtomTable(RTL_ATOM_TABLE,const WCHAR*,RTL_ATOM*);
2176 NTSTATUS WINAPI RtlMakeSelfRelativeSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,LPDWORD);
2177 void WINAPI RtlMapGenericMask(PACCESS_MASK,const GENERIC_MAPPING*);
2178 NTSTATUS WINAPI RtlMultiByteToUnicodeN(LPWSTR,DWORD,LPDWORD,LPCSTR,DWORD);
2179 NTSTATUS WINAPI RtlMultiByteToUnicodeSize(DWORD*,LPCSTR,UINT);
2181 NTSTATUS WINAPI RtlNewSecurityObject(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR*,BOOLEAN,HANDLE,PGENERIC_MAPPING);
2182 PRTL_USER_PROCESS_PARAMETERS WINAPI RtlNormalizeProcessParams(RTL_USER_PROCESS_PARAMETERS*);
2183 ULONG WINAPI RtlNtStatusToDosError(NTSTATUS);
2184 ULONG WINAPI RtlNtStatusToDosErrorNoTeb(NTSTATUS);
2185 ULONG WINAPI RtlNumberOfSetBits(PCRTL_BITMAP);
2186 ULONG WINAPI RtlNumberOfClearBits(PCRTL_BITMAP);
2188 UINT WINAPI RtlOemStringToUnicodeSize(const STRING*);
2189 NTSTATUS WINAPI RtlOemStringToUnicodeString(UNICODE_STRING*,const STRING*,BOOLEAN);
2190 NTSTATUS WINAPI RtlOemToUnicodeN(LPWSTR,DWORD,LPDWORD,LPCSTR,DWORD);
2191 NTSTATUS WINAPI RtlOpenCurrentUser(ACCESS_MASK,PHANDLE);
2193 PVOID WINAPI RtlPcToFileHeader(PVOID,PVOID*);
2194 NTSTATUS WINAPI RtlPinAtomInAtomTable(RTL_ATOM_TABLE,RTL_ATOM);
2195 BOOLEAN WINAPI RtlPrefixString(const STRING*,const STRING*,BOOLEAN);
2196 BOOLEAN WINAPI RtlPrefixUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
2198 NTSTATUS WINAPI RtlQueryAtomInAtomTable(RTL_ATOM_TABLE,RTL_ATOM,ULONG*,ULONG*,WCHAR*,ULONG*);
2199 NTSTATUS WINAPI RtlQueryEnvironmentVariable_U(PWSTR,PUNICODE_STRING,PUNICODE_STRING);
2200 NTSTATUS WINAPI RtlQueryInformationAcl(PACL,LPVOID,DWORD,ACL_INFORMATION_CLASS);
2201 NTSTATUS WINAPI RtlQueryInformationActivationContext(ULONG,HANDLE,PVOID,ULONG,PVOID,SIZE_T,SIZE_T*);
2202 NTSTATUS WINAPI RtlQueryProcessDebugInformation(ULONG,ULONG,PDEBUG_BUFFER);
2203 NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID);
2204 NTSTATUS WINAPI RtlQueryTimeZoneInformation(RTL_TIME_ZONE_INFORMATION*);
2205 NTSTATUS WINAPI RtlQueueWorkItem(PRTL_WORK_ITEM_ROUTINE,PVOID,ULONG);
2207 void WINAPI RtlRaiseException(PEXCEPTION_RECORD);
2208 void WINAPI RtlRaiseStatus(NTSTATUS);
2209 ULONG WINAPI RtlRandom(PULONG);
2210 PVOID WINAPI RtlReAllocateHeap(HANDLE,ULONG,PVOID,SIZE_T);
2211 void WINAPI RtlReleaseActivationContext(HANDLE);
2212 void WINAPI RtlReleasePebLock(void);
2213 void WINAPI RtlReleaseResource(LPRTL_RWLOCK);
2214 ULONG WINAPI RtlRemoveVectoredExceptionHandler(PVOID);
2215 void WINAPI RtlRestoreLastWin32Error(DWORD);
2217 void WINAPI RtlSecondsSince1970ToTime(DWORD,LARGE_INTEGER *);
2218 void WINAPI RtlSecondsSince1980ToTime(DWORD,LARGE_INTEGER *);
2219 NTSTATUS WINAPI RtlSelfRelativeToAbsoluteSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,
2220 PDWORD,PACL,PDWORD,PACL,PDWORD,PSID,PDWORD,PSID,PDWORD);
2221 void WINAPI RtlSetAllBits(PRTL_BITMAP);
2222 void WINAPI RtlSetBits(PRTL_BITMAP,ULONG,ULONG);
2223 ULONG WINAPI RtlSetCriticalSectionSpinCount(RTL_CRITICAL_SECTION*,ULONG);
2224 NTSTATUS WINAPI RtlSetControlSecurityDescriptor(PSECURITY_DESCRIPTOR,SECURITY_DESCRIPTOR_CONTROL,SECURITY_DESCRIPTOR_CONTROL);
2225 NTSTATUS WINAPI RtlSetCurrentDirectory_U(const UNICODE_STRING*);
2226 void WINAPI RtlSetCurrentEnvironment(PWSTR, PWSTR*);
2227 NTSTATUS WINAPI RtlSetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR,BOOLEAN,PACL,BOOLEAN);
2228 NTSTATUS WINAPI RtlSetEnvironmentVariable(PWSTR*,PUNICODE_STRING,PUNICODE_STRING);
2229 NTSTATUS WINAPI RtlSetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID,BOOLEAN);
2230 NTSTATUS WINAPI RtlSetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID,BOOLEAN);
2231 void WINAPI RtlSetLastWin32Error(DWORD);
2232 void WINAPI RtlSetLastWin32ErrorAndNtStatusFromNtStatus(NTSTATUS);
2233 NTSTATUS WINAPI RtlSetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR,BOOLEAN,PACL,BOOLEAN);
2234 NTSTATUS WINAPI RtlSetTimeZoneInformation(const RTL_TIME_ZONE_INFORMATION*);
2235 SIZE_T WINAPI RtlSizeHeap(HANDLE,ULONG,const void*);
2236 NTSTATUS WINAPI RtlStringFromGUID(REFGUID,PUNICODE_STRING);
2237 LPDWORD WINAPI RtlSubAuthoritySid(PSID,DWORD);
2238 LPBYTE WINAPI RtlSubAuthorityCountSid(PSID);
2239 NTSTATUS WINAPI RtlSystemTimeToLocalTime(const LARGE_INTEGER*,PLARGE_INTEGER);
2241 void WINAPI RtlTimeToTimeFields(const LARGE_INTEGER*,PTIME_FIELDS);
2242 BOOLEAN WINAPI RtlTimeFieldsToTime(PTIME_FIELDS,PLARGE_INTEGER);
2243 void WINAPI RtlTimeToElapsedTimeFields(const LARGE_INTEGER *,PTIME_FIELDS);
2244 BOOLEAN WINAPI RtlTimeToSecondsSince1970(const LARGE_INTEGER *,LPDWORD);
2245 BOOLEAN WINAPI RtlTimeToSecondsSince1980(const LARGE_INTEGER *,LPDWORD);
2246 BOOL WINAPI RtlTryEnterCriticalSection(RTL_CRITICAL_SECTION *);
2248 ULONGLONG __cdecl RtlUlonglongByteSwap(ULONGLONG);
2249 DWORD WINAPI RtlUnicodeStringToAnsiSize(const UNICODE_STRING*);
2250 NTSTATUS WINAPI RtlUnicodeStringToAnsiString(PANSI_STRING,PCUNICODE_STRING,BOOLEAN);
2251 NTSTATUS WINAPI RtlUnicodeStringToInteger(const UNICODE_STRING *,ULONG,ULONG *);
2252 DWORD WINAPI RtlUnicodeStringToOemSize(const UNICODE_STRING*);
2253 NTSTATUS WINAPI RtlUnicodeStringToOemString(POEM_STRING,PCUNICODE_STRING,BOOLEAN);
2254 NTSTATUS WINAPI RtlUnicodeToMultiByteN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
2255 NTSTATUS WINAPI RtlUnicodeToMultiByteSize(PULONG,PCWSTR,ULONG);
2256 NTSTATUS WINAPI RtlUnicodeToOemN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
2257 ULONG WINAPI RtlUniform(PULONG);
2258 BOOLEAN WINAPI RtlUnlockHeap(HANDLE);
2259 void WINAPI RtlUnwind(PVOID,PVOID,PEXCEPTION_RECORD,PVOID);
2261 void WINAPI RtlUnwind2(FRAME_POINTERS,PVOID,PEXCEPTION_RECORD,PVOID,PCONTEXT);
2262 void WINAPI RtlUnwindEx(FRAME_POINTERS,PVOID,PEXCEPTION_RECORD,PVOID,PCONTEXT,PUNWIND_HISTORY_TABLE);
2264 WCHAR WINAPI RtlUpcaseUnicodeChar(WCHAR);
2265 NTSTATUS WINAPI RtlUpcaseUnicodeString(UNICODE_STRING*,const UNICODE_STRING *,BOOLEAN);
2266 NTSTATUS WINAPI RtlUpcaseUnicodeStringToAnsiString(STRING*,const UNICODE_STRING*,BOOLEAN);
2267 NTSTATUS WINAPI RtlUpcaseUnicodeStringToCountedOemString(STRING*,const UNICODE_STRING*,BOOLEAN);
2268 NTSTATUS WINAPI RtlUpcaseUnicodeStringToOemString(STRING*,const UNICODE_STRING*,BOOLEAN);
2269 NTSTATUS WINAPI RtlUpcaseUnicodeToMultiByteN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
2270 NTSTATUS WINAPI RtlUpcaseUnicodeToOemN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
2271 CHAR WINAPI RtlUpperChar(CHAR);
2272 void WINAPI RtlUpperString(STRING *,const STRING *);
2274 NTSTATUS WINAPI RtlValidSecurityDescriptor(PSECURITY_DESCRIPTOR);
2275 BOOLEAN WINAPI RtlValidAcl(PACL);
2276 BOOLEAN WINAPI RtlValidSid(PSID);
2277 BOOLEAN WINAPI RtlValidateHeap(HANDLE,ULONG,LPCVOID);
2278 NTSTATUS WINAPI RtlVerifyVersionInfo(const RTL_OSVERSIONINFOEXW*,DWORD,DWORDLONG);
2280 NTSTATUS WINAPI RtlWalkHeap(HANDLE,PVOID);
2281 NTSTATUS WINAPI RtlWriteRegistryValue(ULONG,PCWSTR,PCWSTR,ULONG,PVOID,ULONG);
2283 NTSTATUS WINAPI RtlpNtCreateKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,PULONG);
2284 NTSTATUS WINAPI RtlpNtEnumerateSubKey(HANDLE,UNICODE_STRING *, ULONG);
2285 NTSTATUS WINAPI RtlpWaitForCriticalSection(RTL_CRITICAL_SECTION *);
2286 NTSTATUS WINAPI RtlpUnWaitCriticalSection(RTL_CRITICAL_SECTION *);
2288 NTSTATUS WINAPI vDbgPrintEx(ULONG,ULONG,LPCSTR,va_list);
2289 NTSTATUS WINAPI vDbgPrintExWithPrefix(LPCSTR,ULONG,ULONG,LPCSTR,va_list);
2291 /* Wine internal functions */
2293 extern NTSTATUS wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRING *unix_name_ret,
2294 UINT disposition, BOOLEAN check_case );
2295 extern NTSTATUS wine_unix_to_nt_file_name( const ANSI_STRING *name, UNICODE_STRING *nt );
2298 /***********************************************************************
2302 #define InitializeObjectAttributes(p,n,a,r,s) \
2304 (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
2305 (p)->RootDirectory = r; \
2306 (p)->Attributes = a; \
2307 (p)->ObjectName = n; \
2308 (p)->SecurityDescriptor = s; \
2309 (p)->SecurityQualityOfService = NULL; \
2312 #define NtCurrentProcess() ((HANDLE)-1)
2314 #define RtlFillMemory(Destination,Length,Fill) memset((Destination),(Fill),(Length))
2315 #define RtlMoveMemory(Destination,Source,Length) memmove((Destination),(Source),(Length))
2316 #define RtlStoreUlong(p,v) do { ULONG _v = (v); memcpy((p), &_v, sizeof(_v)); } while (0)
2317 #define RtlStoreUlonglong(p,v) do { ULONGLONG _v = (v); memcpy((p), &_v, sizeof(_v)); } while (0)
2318 #define RtlRetrieveUlong(p,s) memcpy((p), (s), sizeof(ULONG))
2319 #define RtlRetrieveUlonglong(p,s) memcpy((p), (s), sizeof(ULONGLONG))
2320 #define RtlZeroMemory(Destination,Length) memset((Destination),0,(Length))
2322 static inline BOOLEAN RtlCheckBit(PCRTL_BITMAP lpBits, ULONG ulBit)
2324 if (lpBits && ulBit < lpBits->SizeOfBitMap &&
2325 lpBits->Buffer[ulBit >> 5] & (1 << (ulBit & 31)))
2330 /* These are implemented as __fastcall, so we can't let Winelib apps link with them */
2331 static inline USHORT RtlUshortByteSwap(USHORT s)
2333 return (s >> 8) | (s << 8);
2335 static inline ULONG RtlUlongByteSwap(ULONG i)
2337 #if defined(__i386__) && defined(__GNUC__)
2339 __asm__("bswap %0" : "=r" (ret) : "0" (i) );
2342 return ((ULONG)RtlUshortByteSwap((USHORT)i) << 16) | RtlUshortByteSwap((USHORT)(i >> 16));
2346 /*************************************************************************
2347 * Loader functions and structures.
2349 * Those are not part of standard Winternl.h
2351 typedef struct _LDR_MODULE
2353 LIST_ENTRY InLoadOrderModuleList;
2354 LIST_ENTRY InMemoryOrderModuleList;
2355 LIST_ENTRY InInitializationOrderModuleList;
2359 UNICODE_STRING FullDllName;
2360 UNICODE_STRING BaseDllName;
2364 HANDLE SectionHandle;
2366 ULONG TimeDateStamp;
2367 HANDLE ActivationContext;
2368 } LDR_MODULE, *PLDR_MODULE;
2370 /* those defines are (some of the) regular LDR_MODULE.Flags values */
2371 #define LDR_IMAGE_IS_DLL 0x00000004
2372 #define LDR_LOAD_IN_PROGRESS 0x00001000
2373 #define LDR_UNLOAD_IN_PROGRESS 0x00002000
2374 #define LDR_NO_DLL_CALLS 0x00040000
2375 #define LDR_PROCESS_ATTACHED 0x00080000
2376 #define LDR_MODULE_REBASED 0x00200000
2378 /* these ones is Wine specific */
2379 #define LDR_DONT_RESOLVE_REFS 0x40000000
2380 #define LDR_WINE_INTERNAL 0x80000000
2382 /* FIXME: to be checked */
2383 #define MAXIMUM_FILENAME_LENGTH 256
2385 typedef struct _SYSTEM_MODULE
2389 PVOID ImageBaseAddress;
2396 BYTE Name[MAXIMUM_FILENAME_LENGTH];
2397 } SYSTEM_MODULE, *PSYSTEM_MODULE;
2399 typedef struct _SYSTEM_MODULE_INFORMATION
2402 SYSTEM_MODULE Modules[1]; /* FIXME: should be Modules[0] */
2403 } SYSTEM_MODULE_INFORMATION, *PSYSTEM_MODULE_INFORMATION;
2405 NTSTATUS WINAPI LdrDisableThreadCalloutsForDll(HMODULE);
2406 NTSTATUS WINAPI LdrFindEntryForAddress(const void*, PLDR_MODULE*);
2407 NTSTATUS WINAPI LdrLockLoaderLock(ULONG,ULONG*,ULONG*);
2408 NTSTATUS WINAPI LdrQueryProcessModuleInformation(SYSTEM_MODULE_INFORMATION*, ULONG, ULONG*);
2409 NTSTATUS WINAPI LdrUnloadDll(HMODULE);
2410 NTSTATUS WINAPI LdrUnlockLoaderLock(ULONG,ULONG);
2412 /* list manipulation macros */
2413 #define InitializeListHead(le) (void)((le)->Flink = (le)->Blink = (le))
2414 #define InsertHeadList(le,e) do { PLIST_ENTRY f = (le)->Flink; (e)->Flink = f; (e)->Blink = (le); f->Blink = (e); (le)->Flink = (e); } while (0)
2415 #define InsertTailList(le,e) do { PLIST_ENTRY b = (le)->Blink; (e)->Flink = (le); (e)->Blink = b; b->Flink = (e); (le)->Blink = (e); } while (0)
2416 #define IsListEmpty(le) ((le)->Flink == (le))
2417 #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)
2418 static inline PLIST_ENTRY RemoveHeadList(PLIST_ENTRY le)
2420 PLIST_ENTRY f, b, e;
2423 f = le->Flink->Flink;
2424 b = le->Flink->Blink;
2428 if (e != le) e->Flink = e->Blink = NULL;
2431 static inline PLIST_ENTRY RemoveTailList(PLIST_ENTRY le)
2433 PLIST_ENTRY f, b, e;
2436 f = le->Blink->Flink;
2437 b = le->Blink->Blink;
2441 if (e != le) e->Flink = e->Blink = NULL;
2447 #endif /* defined(__cplusplus) */
2449 #endif /* __WINE_WINTERNL_H */