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 */
278 ULARGE_INTEGER AppCompatFlags; /* 1d8 */
279 ULARGE_INTEGER AppCompatFlagsUser; /* 1e0 */
280 PVOID ShimData; /* 1e8 */
281 PVOID AppCompatInfo; /* 1ec */
282 UNICODE_STRING CSDVersion; /* 1f0 */
283 PVOID ActivationContextData; /* 1f8 */
284 PVOID ProcessAssemblyStorageMap; /* 1fc */
285 PVOID SystemDefaultActivationData; /* 200 */
286 PVOID SystemAssemblyStorageMap; /* 204 */
287 ULONG MinimumStackCommit; /* 208 */
288 PVOID *FlsCallback; /* 20c */
289 LIST_ENTRY FlsListHead; /* 210 */
290 PRTL_BITMAP FlsBitmap; /* 218 */
291 ULONG FlsBitmapBits[4]; /* 21c */
295 /***********************************************************************
300 NT_TIB Tib; /* 000 */
301 PVOID EnvironmentPointer; /* 01c */
302 CLIENT_ID ClientId; /* 020 */
303 PVOID ActiveRpcHandle; /* 028 */
304 PVOID ThreadLocalStoragePointer; /* 02c */
306 ULONG LastErrorValue; /* 034 */
307 ULONG CountOfOwnedCriticalSections;/* 038 */
308 PVOID CsrClientThread; /* 03c */
309 PVOID Win32ThreadInfo; /* 040 */
310 ULONG Win32ClientInfo[31]; /* 044 used for user32 private data in Wine */
311 PVOID WOW32Reserved; /* 0c0 */
312 ULONG CurrentLocale; /* 0c4 */
313 ULONG FpSoftwareStatusRegister; /* 0c8 */
314 PVOID SystemReserved1[54]; /* 0cc used for kernel32 private data in Wine */
315 LONG ExceptionCode; /* 1a4 */
316 ACTIVATION_CONTEXT_STACK ActivationContextStack; /* 1a8 */
317 BYTE SpareBytes1[24]; /* 1bc used for ntdll private data in Wine */
318 PVOID SystemReserved2[10]; /* 1d4 used for ntdll private data in Wine */
319 GDI_TEB_BATCH GdiTebBatch; /* 1fc used for vm86 private data in Wine */
320 ULONG gdiRgn; /* 6dc */
321 ULONG gdiPen; /* 6e0 */
322 ULONG gdiBrush; /* 6e4 */
323 CLIENT_ID RealClientId; /* 6e8 */
324 HANDLE GdiCachedProcessHandle; /* 6f0 */
325 ULONG GdiClientPID; /* 6f4 */
326 ULONG GdiClientTID; /* 6f8 */
327 PVOID GdiThreadLocaleInfo; /* 6fc */
328 PVOID UserReserved[5]; /* 700 */
329 PVOID glDispachTable[280]; /* 714 */
330 ULONG glReserved1[26]; /* b74 */
331 PVOID glReserved2; /* bdc */
332 PVOID glSectionInfo; /* be0 */
333 PVOID glSection; /* be4 */
334 PVOID glTable; /* be8 */
335 PVOID glCurrentRC; /* bec */
336 PVOID glContext; /* bf0 */
337 ULONG LastStatusValue; /* bf4 */
338 UNICODE_STRING StaticUnicodeString; /* bf8 used by advapi32 */
339 WCHAR StaticUnicodeBuffer[261]; /* c00 used by advapi32 */
340 PVOID DeallocationStack; /* e0c */
341 PVOID TlsSlots[64]; /* e10 */
342 LIST_ENTRY TlsLinks; /* f10 */
344 PVOID ReservedForNtRpc; /* f1c */
345 PVOID DbgSsReserved[2]; /* f20 */
346 ULONG HardErrorDisabled; /* f28 */
347 PVOID Instrumentation[16]; /* f2c */
348 PVOID WinSockData; /* f6c */
349 ULONG GdiBatchCount; /* f70 */
350 ULONG Spare2; /* f74 */
351 ULONG Spare3; /* f78 */
352 ULONG Spare4; /* f7c */
353 PVOID ReservedForOle; /* f80 */
354 ULONG WaitingOnLoaderLock; /* f84 */
355 PVOID Reserved5[3]; /* f88 */
356 PVOID *TlsExpansionSlots; /* f94 */
357 ULONG ImpersonationLocale; /* f98 */
358 ULONG IsImpersonating; /* f9c */
359 PVOID NlsCache; /* fa0 */
360 PVOID ShimData; /* fa4 */
361 ULONG HeapVirtualAffinity; /* fa8 */
362 PVOID CurrentTransactionHandle; /* fac */
363 PVOID ActiveFrame; /* fb0 */
364 PVOID *FlsSlots; /* fb4 */
367 /***********************************************************************
371 typedef enum _FILE_INFORMATION_CLASS {
372 FileDirectoryInformation = 1,
373 FileFullDirectoryInformation,
374 FileBothDirectoryInformation,
375 FileBasicInformation,
376 FileStandardInformation,
377 FileInternalInformation,
379 FileAccessInformation,
381 FileRenameInformation,
383 FileNamesInformation,
384 FileDispositionInformation,
385 FilePositionInformation,
386 FileFullEaInformation,
388 FileAlignmentInformation,
390 FileAllocationInformation,
391 FileEndOfFileInformation,
392 FileAlternateNameInformation,
393 FileStreamInformation,
395 FilePipeLocalInformation,
396 FilePipeRemoteInformation,
397 FileMailslotQueryInformation,
398 FileMailslotSetInformation,
399 FileCompressionInformation,
400 FileObjectIdInformation,
401 FileCompletionInformation,
402 FileMoveClusterInformation,
403 FileQuotaInformation,
404 FileReparsePointInformation,
405 FileNetworkOpenInformation,
406 FileAttributeTagInformation,
407 FileTrackingInformation,
408 FileMaximumInformation
409 } FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS;
411 typedef struct _FILE_DIRECTORY_INFORMATION {
412 ULONG NextEntryOffset;
414 LARGE_INTEGER CreationTime;
415 LARGE_INTEGER LastAccessTime;
416 LARGE_INTEGER LastWriteTime;
417 LARGE_INTEGER ChangeTime;
418 LARGE_INTEGER EndOfFile;
419 LARGE_INTEGER AllocationSize;
420 ULONG FileAttributes;
421 ULONG FileNameLength;
422 WCHAR FileName[ANYSIZE_ARRAY];
423 } FILE_DIRECTORY_INFORMATION, *PFILE_DIRECTORY_INFORMATION;
425 typedef struct _FILE_FULL_DIRECTORY_INFORMATION {
426 ULONG NextEntryOffset;
428 LARGE_INTEGER CreationTime;
429 LARGE_INTEGER LastAccessTime;
430 LARGE_INTEGER LastWriteTime;
431 LARGE_INTEGER ChangeTime;
432 LARGE_INTEGER EndOfFile;
433 LARGE_INTEGER AllocationSize;
434 ULONG FileAttributes;
435 ULONG FileNameLength;
437 WCHAR FileName[ANYSIZE_ARRAY];
438 } FILE_FULL_DIRECTORY_INFORMATION, *PFILE_FULL_DIRECTORY_INFORMATION,
439 FILE_FULL_DIR_INFORMATION, *PFILE_FULL_DIR_INFORMATION;
441 typedef struct _FILE_BOTH_DIRECTORY_INFORMATION {
442 ULONG NextEntryOffset;
444 LARGE_INTEGER CreationTime;
445 LARGE_INTEGER LastAccessTime;
446 LARGE_INTEGER LastWriteTime;
447 LARGE_INTEGER ChangeTime;
448 LARGE_INTEGER EndOfFile;
449 LARGE_INTEGER AllocationSize;
450 ULONG FileAttributes;
451 ULONG FileNameLength;
453 CHAR ShortNameLength;
455 WCHAR FileName[ANYSIZE_ARRAY];
456 } FILE_BOTH_DIRECTORY_INFORMATION, *PFILE_BOTH_DIRECTORY_INFORMATION,
457 FILE_BOTH_DIR_INFORMATION, *PFILE_BOTH_DIR_INFORMATION;
459 typedef struct _FILE_BASIC_INFORMATION {
460 LARGE_INTEGER CreationTime;
461 LARGE_INTEGER LastAccessTime;
462 LARGE_INTEGER LastWriteTime;
463 LARGE_INTEGER ChangeTime;
464 ULONG FileAttributes;
465 } FILE_BASIC_INFORMATION, *PFILE_BASIC_INFORMATION;
467 typedef struct _FILE_STANDARD_INFORMATION {
468 LARGE_INTEGER AllocationSize;
469 LARGE_INTEGER EndOfFile;
471 BOOLEAN DeletePending;
473 } FILE_STANDARD_INFORMATION, *PFILE_STANDARD_INFORMATION;
475 typedef struct _FILE_INTERNAL_INFORMATION {
476 LARGE_INTEGER IndexNumber;
477 } FILE_INTERNAL_INFORMATION, *PFILE_INTERNAL_INFORMATION;
479 typedef struct _FILE_EA_INFORMATION {
481 } FILE_EA_INFORMATION, *PFILE_EA_INFORMATION;
483 typedef struct _FILE_ACCESS_INFORMATION {
484 ACCESS_MASK AccessFlags;
485 } FILE_ACCESS_INFORMATION, *PFILE_ACCESS_INFORMATION;
487 typedef struct _FILE_NAME_INFORMATION {
488 ULONG FileNameLength;
490 } FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION;
492 typedef struct _FILE_RENAME_INFORMATION {
495 ULONG FileNameLength;
497 } FILE_RENAME_INFORMATION, *PFILE_RENAME_INFORMATION;
499 typedef struct _FILE_NAMES_INFORMATION {
500 ULONG NextEntryOffset;
502 ULONG FileNameLength;
504 } FILE_NAMES_INFORMATION, *PFILE_NAMES_INFORMATION;
506 typedef struct _FILE_DISPOSITION_INFORMATION {
507 BOOLEAN DoDeleteFile;
508 } FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION;
510 typedef struct _FILE_POSITION_INFORMATION {
511 LARGE_INTEGER CurrentByteOffset;
512 } FILE_POSITION_INFORMATION, *PFILE_POSITION_INFORMATION;
514 typedef struct _FILE_ALIGNMENT_INFORMATION {
515 ULONG AlignmentRequirement;
516 } FILE_ALIGNMENT_INFORMATION, *PFILE_ALIGNMENT_INFORMATION;
518 typedef struct _FILE_ALLOCATION_INFORMATION {
519 LARGE_INTEGER AllocationSize;
520 } FILE_ALLOCATION_INFORMATION, *PFILE_ALLOCATION_INFORMATION;
522 typedef struct _FILE_END_OF_FILE_INFORMATION {
523 LARGE_INTEGER EndOfFile;
524 } FILE_END_OF_FILE_INFORMATION, *PFILE_END_OF_FILE_INFORMATION;
526 typedef struct _FILE_NETWORK_OPEN_INFORMATION {
527 LARGE_INTEGER CreationTime;
528 LARGE_INTEGER LastAccessTime;
529 LARGE_INTEGER LastWriteTime;
530 LARGE_INTEGER ChangeTime;
531 LARGE_INTEGER AllocationSize;
532 LARGE_INTEGER EndOfFile;
533 ULONG FileAttributes;
534 } FILE_NETWORK_OPEN_INFORMATION, *PFILE_NETWORK_OPEN_INFORMATION;
536 typedef struct _FILE_FULL_EA_INFORMATION {
537 ULONG NextEntryOffset;
540 USHORT EaValueLength;
542 } FILE_FULL_EA_INFORMATION, *PFILE_FULL_EA_INFORMATION;
544 typedef struct _FILE_MODE_INFORMATION {
546 } FILE_MODE_INFORMATION, *PFILE_MODE_INFORMATION;
548 typedef struct _FILE_STREAM_INFORMATION
550 ULONG NextEntryOffset;
551 ULONG StreamNameLength;
552 LARGE_INTEGER StreamSize;
553 LARGE_INTEGER StreamAllocationSize;
555 } FILE_STREAM_INFORMATION, *PFILE_STREAM_INFORMATION;
557 typedef struct _FILE_ATTRIBUTE_TAG_INFORMATION
559 ULONG FileAttributes;
561 } FILE_ATTRIBUTE_TAG_INFORMATION, *PFILE_ATTRIBUTE_TAG_INFORMATION;
563 typedef struct _FILE_MAILSLOT_QUERY_INFORMATION {
564 ULONG MaximumMessageSize;
566 ULONG NextMessageSize;
567 ULONG MessagesAvailable;
568 LARGE_INTEGER ReadTimeout;
569 } FILE_MAILSLOT_QUERY_INFORMATION, *PFILE_MAILSLOT_QUERY_INFORMATION;
571 typedef struct _FILE_MAILSLOT_SET_INFORMATION {
572 LARGE_INTEGER ReadTimeout;
573 } FILE_MAILSLOT_SET_INFORMATION, *PFILE_MAILSLOT_SET_INFORMATION;
575 typedef struct _FILE_PIPE_LOCAL_INFORMATION {
577 ULONG NamedPipeConfiguration;
578 ULONG MaximumInstances;
579 ULONG CurrentInstances;
581 ULONG ReadDataAvailable;
583 ULONG WriteQuotaAvailable;
584 ULONG NamedPipeState;
586 } FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION;
588 typedef struct _FILE_ALL_INFORMATION {
589 FILE_BASIC_INFORMATION BasicInformation;
590 FILE_STANDARD_INFORMATION StandardInformation;
591 FILE_INTERNAL_INFORMATION InternalInformation;
592 FILE_EA_INFORMATION EaInformation;
593 FILE_ACCESS_INFORMATION AccessInformation;
594 FILE_POSITION_INFORMATION PositionInformation;
595 FILE_MODE_INFORMATION ModeInformation;
596 FILE_ALIGNMENT_INFORMATION AlignmentInformation;
597 FILE_NAME_INFORMATION NameInformation;
598 } FILE_ALL_INFORMATION, *PFILE_ALL_INFORMATION;
600 typedef enum _FSINFOCLASS {
601 FileFsVolumeInformation = 1,
602 FileFsLabelInformation,
603 FileFsSizeInformation,
604 FileFsDeviceInformation,
605 FileFsAttributeInformation,
606 FileFsControlInformation,
607 FileFsFullSizeInformation,
608 FileFsObjectIdInformation,
609 FileFsMaximumInformation
610 } FS_INFORMATION_CLASS, *PFS_INFORMATION_CLASS;
612 typedef enum _KEY_INFORMATION_CLASS {
616 } KEY_INFORMATION_CLASS;
618 typedef enum _KEY_VALUE_INFORMATION_CLASS {
619 KeyValueBasicInformation,
620 KeyValueFullInformation,
621 KeyValuePartialInformation,
622 KeyValueFullInformationAlign64,
623 KeyValuePartialInformationAlign64
624 } KEY_VALUE_INFORMATION_CLASS;
626 typedef enum _OBJECT_INFORMATION_CLASS {
627 ObjectBasicInformation,
628 ObjectNameInformation,
629 ObjectTypeInformation,
630 ObjectAllInformation,
631 ObjectDataInformation
632 } OBJECT_INFORMATION_CLASS, *POBJECT_INFORMATION_CLASS;
634 typedef enum _PROCESSINFOCLASS {
635 ProcessBasicInformation = 0,
636 ProcessQuotaLimits = 1,
637 ProcessIoCounters = 2,
638 ProcessVmCounters = 3,
640 ProcessBasePriority = 5,
641 ProcessRaisePriority = 6,
642 ProcessDebugPort = 7,
643 ProcessExceptionPort = 8,
644 ProcessAccessToken = 9,
645 ProcessLdtInformation = 10,
647 ProcessDefaultHardErrorMode = 12,
648 ProcessIoPortHandlers = 13,
649 ProcessPooledUsageAndLimits = 14,
650 ProcessWorkingSetWatch = 15,
651 ProcessUserModeIOPL = 16,
652 ProcessEnableAlignmentFaultFixup = 17,
653 ProcessPriorityClass = 18,
654 ProcessWx86Information = 19,
655 ProcessHandleCount = 20,
656 ProcessAffinityMask = 21,
657 ProcessPriorityBoost = 22,
658 ProcessDeviceMap = 23,
659 ProcessSessionInformation = 24,
660 ProcessForegroundInformation = 25,
661 ProcessWow64Information = 26,
662 ProcessImageFileName = 27,
663 ProcessLUIDDeviceMapsEnabled = 28,
664 ProcessBreakOnTermination = 29,
665 ProcessDebugObjectHandle = 30,
666 ProcessDebugFlags = 31,
667 ProcessHandleTracing = 32,
668 ProcessExecuteFlags = 34,
670 } PROCESSINFOCLASS, PROCESS_INFORMATION_CLASS;
672 #define MEM_EXECUTE_OPTION_DISABLE 0x01
673 #define MEM_EXECUTE_OPTION_ENABLE 0x02
674 #define MEM_EXECUTE_OPTION_PERMANENT 0x08
676 typedef enum _SECTION_INHERIT {
681 typedef enum _SYSTEM_INFORMATION_CLASS {
682 SystemBasicInformation = 0,
683 SystemCpuInformation = 1,
684 SystemPerformanceInformation = 2,
685 SystemTimeOfDayInformation = 3, /* was SystemTimeInformation */
687 SystemProcessInformation = 5,
690 SystemProcessorPerformanceInformation = 8,
693 SystemModuleInformation = 11,
698 SystemHandleInformation = 16,
700 SystemPageFileInformation = 18,
703 SystemCacheInformation = 21,
705 SystemInterruptInformation = 23,
706 SystemDpcBehaviourInformation = 24,
707 SystemFullMemoryInformation = 25,
708 SystemNotImplemented6 = 25,
709 SystemLoadImage = 26,
710 SystemUnloadImage = 27,
711 SystemTimeAdjustmentInformation = 28,
712 SystemTimeAdjustment = 28,
713 SystemSummaryMemoryInformation = 29,
714 SystemNotImplemented7 = 29,
715 SystemNextEventIdInformation = 30,
716 SystemNotImplemented8 = 30,
717 SystemEventIdsInformation = 31,
718 SystemCrashDumpInformation = 32,
719 SystemExceptionInformation = 33,
720 SystemCrashDumpStateInformation = 34,
721 SystemKernelDebuggerInformation = 35,
722 SystemContextSwitchInformation = 36,
723 SystemRegistryQuotaInformation = 37,
724 SystemCurrentTimeZoneInformation = 44,
725 SystemTimeZoneInformation = 44,
726 SystemLookasideInformation = 45,
727 SystemSetTimeSlipEvent = 46,
728 SystemCreateSession = 47,
729 SystemDeleteSession = 48,
730 SystemInvalidInfoClass4 = 49,
731 SystemRangeStartInformation = 50,
732 SystemVerifierInformation = 51,
733 SystemAddVerifier = 52,
734 SystemSessionProcessesInformation = 53,
735 SystemInformationClassMax
736 } SYSTEM_INFORMATION_CLASS, *PSYSTEM_INFORMATION_CLASS;
738 typedef enum _TIMER_TYPE {
743 typedef enum _THREADINFOCLASS {
744 ThreadBasicInformation,
749 ThreadImpersonationToken,
750 ThreadDescriptorTableEntry,
751 ThreadEnableAlignmentFaultFixup,
752 ThreadEventPair_Reusable,
753 ThreadQuerySetWin32StartAddress,
755 ThreadPerformanceCount,
757 ThreadIdealProcessor,
759 ThreadSetTlsArrayAddress,
764 typedef struct _THREAD_BASIC_INFORMATION
767 PVOID TebBaseAddress;
769 ULONG_PTR AffinityMask;
772 } THREAD_BASIC_INFORMATION, *PTHREAD_BASIC_INFORMATION;
774 typedef struct _THREAD_DESCRIPTOR_INFORMATION
778 } THREAD_DESCRIPTOR_INFORMATION, *PTHREAD_DESCRIPTOR_INFORMATION;
780 typedef struct _KERNEL_USER_TIMES {
781 LARGE_INTEGER CreateTime;
782 LARGE_INTEGER ExitTime;
783 LARGE_INTEGER KernelTime;
784 LARGE_INTEGER UserTime;
785 } KERNEL_USER_TIMES, *PKERNEL_USER_TIMES;
787 typedef enum _WINSTATIONINFOCLASS {
788 WinStationInformation = 8
789 } WINSTATIONINFOCLASS;
791 typedef enum _MEMORY_INFORMATION_CLASS {
792 MemoryBasicInformation,
793 MemoryWorkingSetList,
795 MemoryBasicVlmInformation
796 } MEMORY_INFORMATION_CLASS;
798 typedef enum _MUTANT_INFORMATION_CLASS
800 MutantBasicInformation
801 } MUTANT_INFORMATION_CLASS, *PMUTANT_INFORMATION_CLASS;
803 typedef struct _MUTANT_BASIC_INFORMATION {
805 BOOLEAN OwnedByCaller;
806 BOOLEAN AbandonedState;
807 } MUTANT_BASIC_INFORMATION, *PMUTANT_BASIC_INFORMATION;
809 typedef enum _TIMER_INFORMATION_CLASS
811 TimerBasicInformation = 0
812 } TIMER_INFORMATION_CLASS;
814 typedef struct _TIMER_BASIC_INFORMATION
816 LARGE_INTEGER RemainingTime;
818 } TIMER_BASIC_INFORMATION, *PTIMER_BASIC_INFORMATION;
821 /* return type of RtlDetermineDosPathNameType_U (FIXME: not the correct names) */
825 UNC_PATH, /* "//foo" */
826 ABSOLUTE_DRIVE_PATH, /* "c:/foo" */
827 RELATIVE_DRIVE_PATH, /* "c:foo" */
828 ABSOLUTE_PATH, /* "/foo" */
829 RELATIVE_PATH, /* "foo" */
830 DEVICE_PATH, /* "//./foo" */
831 UNC_DOT_PATH /* "//." */
834 /***********************************************************************
835 * IA64 specific types and data structures
840 typedef struct _FRAME_POINTERS {
841 ULONGLONG MemoryStackFp;
842 ULONGLONG BackingStoreFp;
843 } FRAME_POINTERS, *PFRAME_POINTERS;
845 #define UNWIND_HISTORY_TABLE_SIZE 12
847 typedef struct _UNWIND_HISTORY_TABLE_ENTRY {
850 PRUNTIME_FUNCTION FunctionEntry;
851 } UNWIND_HISTORY_TABLE_ENTRY, *PUNWIND_HISTORY_TABLE_ENTRY;
853 typedef struct _UNWIND_HISTORY_TABLE {
858 UNWIND_HISTORY_TABLE_ENTRY Entry[UNWIND_HISTORY_TABLE_SIZE];
859 } UNWIND_HISTORY_TABLE, *PUNWIND_HISTORY_TABLE;
861 typedef struct _KNONVOLATILE_CONTEXT_POINTERS
867 PFLOAT128 HighFloatingContext[10];
909 } KNONVOLATILE_CONTEXT_POINTERS, *PKNONVOLATILE_CONTEXT_POINTERS;
911 ULONGLONG WINAPI RtlVirtualUnwind(ULONGLONG,ULONGLONG,RUNTIME_FUNCTION*,CONTEXT*,BOOLEAN*,FRAME_POINTERS*,KNONVOLATILE_CONTEXT_POINTERS*);
913 #endif /* defined(__ia64__) */
915 /***********************************************************************
916 * x86-64 specific types and data structures
921 #define UNWIND_HISTORY_TABLE_SIZE 12
923 typedef struct _UNWIND_HISTORY_TABLE_ENTRY
926 PRUNTIME_FUNCTION FunctionEntry;
927 } UNWIND_HISTORY_TABLE_ENTRY, *PUNWIND_HISTORY_TABLE_ENTRY;
929 #define UNWIND_HISTORY_TABLE_NONE 0
930 #define UNWIND_HISTORY_TABLE_GLOBAL 1
931 #define UNWIND_HISTORY_TABLE_LOCAL 2
933 typedef struct _UNWIND_HISTORY_TABLE
939 UNWIND_HISTORY_TABLE_ENTRY Entry[UNWIND_HISTORY_TABLE_SIZE];
940 } UNWIND_HISTORY_TABLE, *PUNWIND_HISTORY_TABLE;
942 typedef struct _KNONVOLATILE_CONTEXT_POINTERS
946 PM128A FloatingContext[16];
970 PULONG64 IntegerContext[16];
991 } KNONVOLATILE_CONTEXT_POINTERS, *PKNONVOLATILE_CONTEXT_POINTERS;
993 PVOID WINAPI RtlVirtualUnwind(ULONG,ULONG64,ULONG64,RUNTIME_FUNCTION*,CONTEXT*,PVOID*,ULONG64*,KNONVOLATILE_CONTEXT_POINTERS*);
995 #endif /* __x86_64 */
998 /***********************************************************************
999 * Types and data structures
1002 /* This is used by NtQuerySystemInformation */
1003 typedef struct _SYSTEM_THREAD_INFORMATION{
1004 FILETIME ftKernelTime;
1005 FILETIME ftUserTime;
1006 FILETIME ftCreateTime;
1008 DWORD dwStartAddress;
1011 DWORD dwCurrentPriority;
1012 DWORD dwBasePriority;
1013 DWORD dwContextSwitches;
1014 DWORD dwThreadState;
1017 } SYSTEM_THREAD_INFORMATION, *PSYSTEM_THREAD_INFORMATION;
1019 typedef struct _IO_STATUS_BLOCK {
1025 ULONG_PTR Information;
1026 } IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
1028 typedef void (WINAPI * PIO_APC_ROUTINE)(PVOID,PIO_STATUS_BLOCK,ULONG);
1030 typedef struct _KEY_BASIC_INFORMATION {
1031 LARGE_INTEGER LastWriteTime;
1035 } KEY_BASIC_INFORMATION, *PKEY_BASIC_INFORMATION;
1037 typedef struct _KEY_NODE_INFORMATION
1039 LARGE_INTEGER LastWriteTime;
1046 } KEY_NODE_INFORMATION, *PKEY_NODE_INFORMATION;
1048 typedef struct _KEY_FULL_INFORMATION
1050 LARGE_INTEGER LastWriteTime;
1058 ULONG MaxValueNameLen;
1059 ULONG MaxValueDataLen;
1061 } KEY_FULL_INFORMATION, *PKEY_FULL_INFORMATION;
1063 typedef struct _KEY_VALUE_ENTRY
1065 PUNICODE_STRING ValueName;
1069 } KEY_VALUE_ENTRY, *PKEY_VALUE_ENTRY;
1071 typedef struct _KEY_VALUE_BASIC_INFORMATION {
1076 } KEY_VALUE_BASIC_INFORMATION, *PKEY_VALUE_BASIC_INFORMATION;
1078 typedef struct _KEY_VALUE_FULL_INFORMATION {
1085 } KEY_VALUE_FULL_INFORMATION, *PKEY_VALUE_FULL_INFORMATION;
1087 typedef struct _KEY_VALUE_PARTIAL_INFORMATION {
1092 } KEY_VALUE_PARTIAL_INFORMATION, *PKEY_VALUE_PARTIAL_INFORMATION;
1094 #ifndef __OBJECT_ATTRIBUTES_DEFINED__
1095 #define __OBJECT_ATTRIBUTES_DEFINED__
1096 typedef struct _OBJECT_ATTRIBUTES {
1098 HANDLE RootDirectory;
1099 PUNICODE_STRING ObjectName;
1101 PVOID SecurityDescriptor; /* type SECURITY_DESCRIPTOR */
1102 PVOID SecurityQualityOfService; /* type SECURITY_QUALITY_OF_SERVICE */
1103 } OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
1106 typedef struct _OBJECT_DATA_INFORMATION {
1107 BOOLEAN InheritHandle;
1108 BOOLEAN ProtectFromClose;
1109 } OBJECT_DATA_INFORMATION, *POBJECT_DATA_INFORMATION;
1111 typedef struct _OBJECT_BASIC_INFORMATION {
1113 ACCESS_MASK GrantedAccess;
1116 ULONG PagedPoolUsage;
1117 ULONG NonPagedPoolUsage;
1119 ULONG NameInformationLength;
1120 ULONG TypeInformationLength;
1121 ULONG SecurityDescriptorLength;
1122 LARGE_INTEGER CreateTime;
1123 } OBJECT_BASIC_INFORMATION, *POBJECT_BASIC_INFORMATION;
1125 typedef struct _PROCESS_BASIC_INFORMATION {
1127 DWORD_PTR ExitStatus;
1128 PPEB PebBaseAddress;
1129 DWORD_PTR AffinityMask;
1130 DWORD_PTR BasePriority;
1131 ULONG_PTR UniqueProcessId;
1132 ULONG_PTR InheritedFromUniqueProcessId;
1135 PPEB PebBaseAddress;
1137 ULONG_PTR UniqueProcessId;
1140 } PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION;
1142 #define PROCESS_PRIOCLASS_IDLE 1
1143 #define PROCESS_PRIOCLASS_NORMAL 2
1144 #define PROCESS_PRIOCLASS_HIGH 3
1145 #define PROCESS_PRIOCLASS_REALTIME 4
1146 #define PROCESS_PRIOCLASS_BELOW_NORMAL 5
1147 #define PROCESS_PRIOCLASS_ABOVE_NORMAL 6
1149 typedef struct _PROCESS_PRIORITY_CLASS {
1151 UCHAR PriorityClass;
1152 } PROCESS_PRIORITY_CLASS, *PPROCESS_PRIORITY_CLASS;
1154 typedef struct _RTL_HEAP_DEFINITION {
1155 ULONG Length; /* = sizeof(RTL_HEAP_DEFINITION) */
1158 } RTL_HEAP_DEFINITION, *PRTL_HEAP_DEFINITION;
1160 typedef struct _RTL_RWLOCK {
1161 RTL_CRITICAL_SECTION rtlCS;
1163 HANDLE hSharedReleaseSemaphore;
1164 UINT uSharedWaiters;
1166 HANDLE hExclusiveReleaseSemaphore;
1167 UINT uExclusiveWaiters;
1170 HANDLE hOwningThreadId;
1171 DWORD dwTimeoutBoost;
1173 } RTL_RWLOCK, *LPRTL_RWLOCK;
1175 /* System Information Class 0x00 */
1177 typedef struct _SYSTEM_BASIC_INFORMATION {
1180 ULONG uKeMaximumIncrement;
1182 ULONG uMmNumberOfPhysicalPages;
1183 ULONG uMmLowestPhysicalPage;
1184 ULONG uMmHighestPhysicalPage;
1185 ULONG uAllocationGranularity;
1186 PVOID pLowestUserAddress;
1187 PVOID pMmHighestUserAddress;
1188 ULONG uKeActiveProcessors;
1189 BYTE bKeNumberProcessors;
1195 CCHAR NumberOfProcessors;
1197 } SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
1199 /* System Information Class 0x01 */
1201 typedef struct _SYSTEM_CPU_INFORMATION {
1204 WORD Revision; /* combination of CPU model and stepping */
1205 WORD Reserved; /* always zero */
1206 DWORD FeatureSet; /* see bit flags below */
1207 } SYSTEM_CPU_INFORMATION, *PSYSTEM_CPU_INFORMATION;
1209 /* definitions of bits in the Feature set for the x86 processors */
1210 #define CPU_FEATURE_VME 0x00000005 /* Virtual 86 Mode Extensions */
1211 #define CPU_FEATURE_TSC 0x00000002 /* Time Stamp Counter available */
1212 #define CPU_FEATURE_CMOV 0x00000008 /* Conditional Move instruction*/
1213 #define CPU_FEATURE_PGE 0x00000014 /* Page table Entry Global bit */
1214 #define CPU_FEATURE_PSE 0x00000024 /* Page Size Extension */
1215 #define CPU_FEATURE_MTRR 0x00000040 /* Memory Type Range Registers */
1216 #define CPU_FEATURE_CX8 0x00000080 /* Compare and eXchange 8 byte instr. */
1217 #define CPU_FEATURE_MMX 0x00000100 /* Multi Media eXtensions */
1218 #define CPU_FEATURE_X86 0x00000200 /* seems to be always ON, on the '86 */
1219 #define CPU_FEATURE_PAT 0x00000400 /* Page Attribute Table */
1220 #define CPU_FEATURE_FXSR 0x00000800 /* FXSAVE and FXSTORE instructions */
1221 #define CPU_FEATURE_SEP 0x00001000 /* SYSENTER and SYSEXIT instructions */
1222 #define CPU_FEATURE_SSE 0x00002000 /* SSE extensions (ext. MMX) */
1223 #define CPU_FEATURE_3DNOW 0x00008000 /* 3DNOW instructions available
1224 (FIXME: needs to be confirmed) */
1225 #define CPU_FEATURE_SSE2 0x00010000 /* SSE2 extensions (XMMI64) */
1226 #define CPU_FEATURE_DS 0x00020000 /* Debug Store */
1227 #define CPU_FEATURE_HTT 0x00040000 /* Hyper Threading Technology */
1229 /* System Information Class 0x02 */
1231 typedef struct _SYSTEM_PERFORMANCE_INFORMATION {
1232 BYTE Reserved1[312];
1233 } SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION;
1235 /* System Information Class 0x03 */
1237 typedef struct _SYSTEM_TIMEOFDAY_INFORMATION {
1239 LARGE_INTEGER liKeBootTime;
1240 LARGE_INTEGER liKeSystemTime;
1241 LARGE_INTEGER liExpTimeZoneBias;
1242 ULONG uCurrentTimeZoneId;
1243 DWORD dwUnknown1[5];
1247 } SYSTEM_TIMEOFDAY_INFORMATION, *PSYSTEM_TIMEOFDAY_INFORMATION; /* was SYSTEM_TIME_INFORMATION */
1249 /* System Information Class 0x08 */
1251 typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION {
1253 LARGE_INTEGER liIdleTime;
1254 LARGE_INTEGER liKernelTime;
1255 LARGE_INTEGER liUserTime;
1258 LARGE_INTEGER IdleTime;
1259 LARGE_INTEGER KernelTime;
1260 LARGE_INTEGER UserTime;
1261 LARGE_INTEGER Reserved1[2];
1264 } SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION, *PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION;
1266 /* System Information Class 0x0b */
1268 typedef struct _SYSTEM_DRIVER_INFORMATION {
1274 char szName[MAX_PATH + 1];
1275 } SYSTEM_DRIVER_INFORMATION, *PSYSTEM_DRIVER_INFORMATION;
1277 /* System Information Class 0x10 */
1279 typedef struct _SYSTEM_HANDLE_ENTRY {
1284 PVOID ObjectPointer;
1286 } SYSTEM_HANDLE_ENTRY, *PSYSTEM_HANDLE_ENTRY;
1288 typedef struct _SYSTEM_HANDLE_INFORMATION {
1290 SYSTEM_HANDLE_ENTRY Handle[1];
1291 } SYSTEM_HANDLE_INFORMATION, *PSYSTEM_HANDLE_INFORMATION;
1293 /* System Information Class 0x15 */
1295 typedef struct _SYSTEM_CACHE_INFORMATION {
1298 ULONG PageFaultCount;
1299 ULONG MinimumWorkingSet;
1300 ULONG MaximumWorkingSet;
1302 } SYSTEM_CACHE_INFORMATION, *PSYSTEM_CACHE_INFORMATION;
1304 /* System Information Class 0x17 */
1306 typedef struct _SYSTEM_INTERRUPT_INFORMATION {
1308 } SYSTEM_INTERRUPT_INFORMATION, *PSYSTEM_INTERRUPT_INFORMATION;
1310 typedef struct _SYSTEM_CONFIGURATION_INFO {
1314 WORD ProcessorArchitecture;
1319 PVOID MinimumApplicationAddress;
1320 PVOID MaximumApplicationAddress;
1321 ULONG ActiveProcessorMask;
1322 ULONG NumberOfProcessors;
1323 ULONG ProcessorType;
1324 ULONG AllocationGranularity;
1325 WORD ProcessorLevel;
1326 WORD ProcessorRevision;
1327 } SYSTEM_CONFIGURATION_INFO, *PSYSTEM_CONFIGURATION_INFO;
1329 typedef struct _SYSTEM_EXCEPTION_INFORMATION {
1331 } SYSTEM_EXCEPTION_INFORMATION, *PSYSTEM_EXCEPTION_INFORMATION;
1333 typedef struct _SYSTEM_LOOKASIDE_INFORMATION {
1335 } SYSTEM_LOOKASIDE_INFORMATION, *PSYSTEM_LOOKASIDE_INFORMATION;
1337 typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION {
1338 BOOLEAN DebuggerEnabled;
1339 BOOLEAN DebuggerNotPresent;
1340 } SYSTEM_KERNEL_DEBUGGER_INFORMATION, *PSYSTEM_KERNEL_DEBUGGER_INFORMATION;
1342 /* System Information Class 0x05 */
1344 typedef struct _VM_COUNTERS_ {
1345 SIZE_T PeakVirtualSize;
1347 ULONG PageFaultCount;
1348 SIZE_T PeakWorkingSetSize;
1349 SIZE_T WorkingSetSize;
1350 SIZE_T QuotaPeakPagedPoolUsage;
1351 SIZE_T QuotaPagedPoolUsage;
1352 SIZE_T QuotaPeakNonPagedPoolUsage;
1353 SIZE_T QuotaNonPagedPoolUsage;
1354 SIZE_T PagefileUsage;
1355 SIZE_T PeakPagefileUsage;
1356 } VM_COUNTERS, *PVM_COUNTERS;
1358 typedef struct _SYSTEM_PROCESS_INFORMATION {
1361 DWORD dwThreadCount;
1362 DWORD dwUnknown1[6];
1363 FILETIME ftCreationTime;
1364 FILETIME ftUserTime;
1365 FILETIME ftKernelTime;
1366 UNICODE_STRING ProcessName;
1367 DWORD dwBasePriority;
1369 DWORD dwParentProcessID;
1370 DWORD dwHandleCount;
1373 VM_COUNTERS vmCounters;
1374 IO_COUNTERS ioCounters;
1375 SYSTEM_THREAD_INFORMATION ti[1];
1377 ULONG NextEntryOffset;
1380 HANDLE UniqueProcessId;
1384 PVOID Reserved5[11];
1385 SIZE_T PeakPagefileUsage;
1386 SIZE_T PrivatePageCount;
1387 LARGE_INTEGER Reserved6[6];
1389 } SYSTEM_PROCESS_INFORMATION, *PSYSTEM_PROCESS_INFORMATION;
1391 typedef struct _SYSTEM_REGISTRY_QUOTA_INFORMATION {
1392 ULONG RegistryQuotaAllowed;
1393 ULONG RegistryQuotaUsed;
1395 } SYSTEM_REGISTRY_QUOTA_INFORMATION, *PSYSTEM_REGISTRY_QUOTA_INFORMATION;
1397 typedef struct _SYSTEM_TIME_ADJUSTMENT {
1398 ULONG TimeAdjustment;
1399 BOOLEAN TimeAdjustmentDisabled;
1400 } SYSTEM_TIME_ADJUSTMENT, *PSYSTEM_TIME_ADJUSTMENT;
1402 typedef struct _TIME_FIELDS
1409 CSHORT Milliseconds;
1411 } TIME_FIELDS, *PTIME_FIELDS;
1413 typedef struct _WINSTATIONINFORMATIONW {
1416 BYTE Reserved3[1140];
1417 } WINSTATIONINFORMATIONW, *PWINSTATIONINFORMATIONW;
1419 typedef BOOLEAN (WINAPI * PWINSTATIONQUERYINFORMATIONW)(HANDLE,ULONG,WINSTATIONINFOCLASS,PVOID,ULONG,PULONG);
1421 typedef struct _LDR_RESOURCE_INFO
1426 } LDR_RESOURCE_INFO, *PLDR_RESOURCE_INFO;
1429 /* debug buffer definitions */
1431 typedef struct _DEBUG_BUFFER {
1432 HANDLE SectionHandle;
1434 PVOID RemoteSectionBase;
1435 ULONG SectionBaseDelta;
1436 HANDLE EventPairHandle;
1438 HANDLE RemoteThreadHandle;
1439 ULONG InfoClassMask;
1441 ULONG AllocatedSize;
1443 PVOID ModuleInformation;
1444 PVOID BackTraceInformation;
1445 PVOID HeapInformation;
1446 PVOID LockInformation;
1448 } DEBUG_BUFFER, *PDEBUG_BUFFER;
1450 #define PDI_MODULES 0x01
1451 #define PDI_BACKTRACE 0x02
1452 #define PDI_HEAPS 0x04
1453 #define PDI_HEAP_TAGS 0x08
1454 #define PDI_HEAP_BLOCKS 0x10
1455 #define PDI_LOCKS 0x20
1457 typedef struct _DEBUG_MODULE_INFORMATION {
1465 USHORT ModuleNameOffset;
1466 CHAR ImageName[256];
1467 } DEBUG_MODULE_INFORMATION, *PDEBUG_MODULE_INFORMATION;
1469 typedef struct _DEBUG_HEAP_INFORMATION {
1481 } DEBUG_HEAP_INFORMATION, *PDEBUG_HEAP_INFORMATION;
1483 typedef struct _DEBUG_LOCK_INFORMATION {
1486 USHORT CreatorBackTraceIndex;
1487 ULONG OwnerThreadId;
1489 ULONG ContentionCount;
1491 ULONG RecursionCount;
1492 ULONG NumberOfSharedWaiters;
1493 ULONG NumberOfExclusiveWaiters;
1494 } DEBUG_LOCK_INFORMATION, *PDEBUG_LOCK_INFORMATION;
1496 typedef struct _PORT_MESSAGE_HEADER {
1500 USHORT VirtualRangesOffset;
1504 } PORT_MESSAGE_HEADER, *PPORT_MESSAGE_HEADER, PORT_MESSAGE, *PPORT_MESSAGE;
1506 typedef unsigned short RTL_ATOM, *PRTL_ATOM;
1508 /* Wine doesn't implement atom table as NT does:
1509 * - in NT, atom tables are user space tables, which ntdll directly accesses
1510 * - on Wine, (even local) atom tables are wineserver objects, hence a HANDLE
1512 typedef struct atom_table *RTL_ATOM_TABLE, **PRTL_ATOM_TABLE;
1514 typedef enum _ATOM_INFORMATION_CLASS {
1515 AtomBasicInformation = 0,
1516 AtomTableInformation = 1,
1517 } ATOM_INFORMATION_CLASS;
1519 typedef struct _ATOM_BASIC_INFORMATION {
1520 USHORT ReferenceCount;
1524 } ATOM_BASIC_INFORMATION, *PATOM_BASIC_INFORMATION;
1526 /* FIXME: names probably not correct */
1527 typedef struct _RTL_HANDLE
1529 struct _RTL_HANDLE * Next;
1532 /* FIXME: names probably not correct */
1533 typedef struct _RTL_HANDLE_TABLE
1535 ULONG MaxHandleCount; /* 0x00 */
1536 ULONG HandleSize; /* 0x04 */
1537 ULONG Unused[2]; /* 0x08-0x0c */
1538 PVOID NextFree; /* 0x10 */
1539 PVOID FirstHandle; /* 0x14 */
1540 PVOID ReservedMemory; /* 0x18 */
1541 PVOID MaxHandle; /* 0x1c */
1544 /***********************************************************************
1548 /* flags for NtCreateFile and NtOpenFile */
1549 #define FILE_DIRECTORY_FILE 0x00000001
1550 #define FILE_WRITE_THROUGH 0x00000002
1551 #define FILE_SEQUENTIAL_ONLY 0x00000004
1552 #define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008
1553 #define FILE_SYNCHRONOUS_IO_ALERT 0x00000010
1554 #define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020
1555 #define FILE_NON_DIRECTORY_FILE 0x00000040
1556 #define FILE_CREATE_TREE_CONNECTION 0x00000080
1557 #define FILE_COMPLETE_IF_OPLOCKED 0x00000100
1558 #define FILE_NO_EA_KNOWLEDGE 0x00000200
1559 #define FILE_OPEN_FOR_RECOVERY 0x00000400
1560 #define FILE_RANDOM_ACCESS 0x00000800
1561 #define FILE_DELETE_ON_CLOSE 0x00001000
1562 #define FILE_OPEN_BY_FILE_ID 0x00002000
1563 #define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000
1564 #define FILE_NO_COMPRESSION 0x00008000
1565 #define FILE_RESERVE_OPFILTER 0x00100000
1566 #define FILE_TRANSACTED_MODE 0x00200000
1567 #define FILE_OPEN_OFFLINE_FILE 0x00400000
1568 #define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000
1570 #define FILE_ATTRIBUTE_VALID_FLAGS 0x00007fb7
1571 #define FILE_ATTRIBUTE_VALID_SET_FLAGS 0x000031a7
1573 /* status for NtCreateFile or NtOpenFile */
1574 #define FILE_SUPERSEDED 0
1575 #define FILE_OPENED 1
1576 #define FILE_CREATED 2
1577 #define FILE_OVERWRITTEN 3
1578 #define FILE_EXISTS 4
1579 #define FILE_DOES_NOT_EXIST 5
1581 /* disposition for NtCreateFile */
1582 #define FILE_SUPERSEDE 0
1584 #define FILE_CREATE 2
1585 #define FILE_OPEN_IF 3
1586 #define FILE_OVERWRITE 4
1587 #define FILE_OVERWRITE_IF 5
1588 #define FILE_MAXIMUM_DISPOSITION 5
1590 /* Characteristics of a File System */
1591 #define FILE_REMOVABLE_MEDIA 0x00000001
1592 #define FILE_READ_ONLY_DEVICE 0x00000002
1593 #define FILE_FLOPPY_DISKETTE 0x00000004
1594 #define FILE_WRITE_ONE_MEDIA 0x00000008
1595 #define FILE_REMOTE_DEVICE 0x00000010
1596 #define FILE_DEVICE_IS_MOUNTED 0x00000020
1597 #define FILE_VIRTUAL_VOLUME 0x00000040
1598 #define FILE_AUTOGENERATED_DEVICE_NAME 0x00000080
1599 #define FILE_DEVICE_SECURE_OPEN 0x00000100
1601 /* options for NtCreateNamedPipeFile */
1602 #define FILE_PIPE_INBOUND 0x00000000
1603 #define FILE_PIPE_OUTBOUND 0x00000001
1604 #define FILE_PIPE_FULL_DUPLEX 0x00000002
1606 /* options for pipe's type */
1607 #define FILE_PIPE_TYPE_MESSAGE 0x00000001
1608 #define FILE_PIPE_TYPE_BYTE 0x00000000
1609 /* and client / server end */
1610 #define FILE_PIPE_SERVER_END 0x00000001
1611 #define FILE_PIPE_CLIENT_END 0x00000000
1613 #if (_WIN32_WINNT >= 0x0501)
1614 #define INTERNAL_TS_ACTIVE_CONSOLE_ID ( *((volatile ULONG*)(0x7ffe02d8)) )
1615 #endif /* (_WIN32_WINNT >= 0x0501) */
1617 #define LOGONID_CURRENT ((ULONG)-1)
1619 #define OBJ_INHERIT 0x00000002L
1620 #define OBJ_PERMANENT 0x00000010L
1621 #define OBJ_EXCLUSIVE 0x00000020L
1622 #define OBJ_CASE_INSENSITIVE 0x00000040L
1623 #define OBJ_OPENIF 0x00000080L
1624 #define OBJ_OPENLINK 0x00000100L
1625 #define OBJ_KERNEL_HANDLE 0x00000200L
1626 #define OBJ_VALID_ATTRIBUTES 0x000003F2L
1628 #define SERVERNAME_CURRENT ((HANDLE)NULL)
1630 typedef void (CALLBACK *PNTAPCFUNC)(ULONG_PTR,ULONG_PTR,ULONG_PTR); /* FIXME: not the right name */
1631 typedef void (CALLBACK *PRTL_THREAD_START_ROUTINE)(LPVOID); /* FIXME: not the right name */
1632 typedef DWORD (CALLBACK *PRTL_WORK_ITEM_ROUTINE)(LPVOID); /* FIXME: not the right name */
1633 typedef void (NTAPI *RTL_WAITORTIMERCALLBACKFUNC)(PVOID,BOOLEAN); /* FIXME: not the right name */
1636 /* DbgPrintEx default levels */
1637 #define DPFLTR_ERROR_LEVEL 0
1638 #define DPFLTR_WARNING_LEVEL 1
1639 #define DPFLTR_TRACE_LEVEL 2
1640 #define DPFLTR_INFO_LEVEL 3
1641 #define DPFLTR_MASK 0x8000000
1643 /* Well-known LUID values */
1644 #define SE_MIN_WELL_KNOWN_PRIVILEGE 2L
1645 #define SE_CREATE_TOKEN_PRIVILEGE 2L
1646 #define SE_ASSIGNPRIMARYTOKEN_PRIVILEGE 3L
1647 #define SE_LOCK_MEMORY_PRIVILEGE 4L
1648 #define SE_INCREASE_QUOTA_PRIVILEGE 5L
1649 #define SE_UNSOLICITED_INPUT_PRIVILEGE 6L /* obsolete */
1650 #define SE_MACHINE_ACCOUNT_PRIVILEGE 6L
1651 #define SE_TCB_PRIVILEGE 7L
1652 #define SE_SECURITY_PRIVILEGE 8L
1653 #define SE_TAKE_OWNERSHIP_PRIVILEGE 9L
1654 #define SE_LOAD_DRIVER_PRIVILEGE 10L
1655 #define SE_SYSTEM_PROFILE_PRIVILEGE 11L
1656 #define SE_SYSTEMTIME_PRIVILEGE 12L
1657 #define SE_PROF_SINGLE_PROCESS_PRIVILEGE 13L
1658 #define SE_INC_BASE_PRIORITY_PRIVILEGE 14L
1659 #define SE_CREATE_PAGEFILE_PRIVILEGE 15L
1660 #define SE_CREATE_PERMANENT_PRIVILEGE 16L
1661 #define SE_BACKUP_PRIVILEGE 17L
1662 #define SE_RESTORE_PRIVILEGE 18L
1663 #define SE_SHUTDOWN_PRIVILEGE 19L
1664 #define SE_DEBUG_PRIVILEGE 20L
1665 #define SE_AUDIT_PRIVILEGE 21L
1666 #define SE_SYSTEM_ENVIRONMENT_PRIVILEGE 22L
1667 #define SE_CHANGE_NOTIFY_PRIVILEGE 23L
1668 #define SE_REMOTE_SHUTDOWN_PRIVILEGE 24L
1669 #define SE_UNDOCK_PRIVILEGE 25L
1670 #define SE_SYNC_AGENT_PRIVILEGE 26L
1671 #define SE_ENABLE_DELEGATION_PRIVILEGE 27L
1672 #define SE_MANAGE_VOLUME_PRIVILEGE 28L
1673 #define SE_IMPERSONATE_PRIVILEGE 29L
1674 #define SE_CREATE_GLOBAL_PRIVILEGE 30L
1675 #define SE_MAX_WELL_KNOWN_PRIVILEGE SE_CREATE_GLOBAL_PRIVILEGE
1678 /* Rtl*Registry* functions structs and defines */
1679 #define RTL_REGISTRY_ABSOLUTE 0
1680 #define RTL_REGISTRY_SERVICES 1
1681 #define RTL_REGISTRY_CONTROL 2
1682 #define RTL_REGISTRY_WINDOWS_NT 3
1683 #define RTL_REGISTRY_DEVICEMAP 4
1684 #define RTL_REGISTRY_USER 5
1686 #define RTL_REGISTRY_HANDLE 0x40000000
1687 #define RTL_REGISTRY_OPTIONAL 0x80000000
1689 #define RTL_QUERY_REGISTRY_SUBKEY 0x00000001
1690 #define RTL_QUERY_REGISTRY_TOPKEY 0x00000002
1691 #define RTL_QUERY_REGISTRY_REQUIRED 0x00000004
1692 #define RTL_QUERY_REGISTRY_NOVALUE 0x00000008
1693 #define RTL_QUERY_REGISTRY_NOEXPAND 0x00000010
1694 #define RTL_QUERY_REGISTRY_DIRECT 0x00000020
1695 #define RTL_QUERY_REGISTRY_DELETE 0x00000040
1697 typedef NTSTATUS (WINAPI *PRTL_QUERY_REGISTRY_ROUTINE)( PCWSTR ValueName,
1702 PVOID EntryContext);
1704 typedef struct _RTL_QUERY_REGISTRY_TABLE
1706 PRTL_QUERY_REGISTRY_ROUTINE QueryRoutine;
1712 ULONG DefaultLength;
1713 } RTL_QUERY_REGISTRY_TABLE, *PRTL_QUERY_REGISTRY_TABLE;
1715 typedef struct _KEY_MULTIPLE_VALUE_INFORMATION
1717 PUNICODE_STRING ValueName;
1721 } KEY_MULTIPLE_VALUE_INFORMATION, *PKEY_MULTIPLE_VALUE_INFORMATION;
1723 typedef VOID (CALLBACK *PRTL_OVERLAPPED_COMPLETION_ROUTINE)(DWORD,DWORD,LPVOID);
1725 typedef VOID (*PTIMER_APC_ROUTINE) ( PVOID, ULONG, LONG );
1727 typedef enum _EVENT_TYPE {
1729 SynchronizationEvent
1730 } EVENT_TYPE, *PEVENT_TYPE;
1732 typedef enum _EVENT_INFORMATION_CLASS {
1733 EventBasicInformation
1734 } EVENT_INFORMATION_CLASS, *PEVENT_INFORMATION_CLASS;
1736 typedef struct _EVENT_BASIC_INFORMATION {
1737 EVENT_TYPE EventType;
1739 } EVENT_BASIC_INFORMATION, *PEVENT_BASIC_INFORMATION;
1741 typedef enum _SEMAPHORE_INFORMATION_CLASS {
1742 SemaphoreBasicInformation
1743 } SEMAPHORE_INFORMATION_CLASS, *PSEMAPHORE_INFORMATION_CLASS;
1745 typedef struct _SEMAPHORE_BASIC_INFORMATION {
1748 } SEMAPHORE_BASIC_INFORMATION, *PSEMAPHORE_BASIC_INFORMATION;
1750 typedef enum _SECTION_INFORMATION_CLASS
1752 SectionBasicInformation,
1753 SectionImageInformation,
1754 } SECTION_INFORMATION_CLASS;
1756 typedef struct _SECTION_BASIC_INFORMATION {
1760 } SECTION_BASIC_INFORMATION, *PSECTION_BASIC_INFORMATION;
1762 typedef struct _SECTION_IMAGE_INFORMATION {
1764 ULONG StackZeroBits;
1765 ULONG StackReserved;
1767 ULONG ImageSubsystem;
1768 WORD SubsystemVersionLow;
1769 WORD SubsystemVersionHigh;
1771 ULONG ImageCharacteristics;
1772 ULONG ImageMachineType;
1774 } SECTION_IMAGE_INFORMATION, *PSECTION_IMAGE_INFORMATION;
1776 typedef struct _LPC_SECTION_WRITE {
1778 HANDLE SectionHandle;
1779 ULONG SectionOffset;
1782 PVOID TargetViewBase;
1783 } LPC_SECTION_WRITE, *PLPC_SECTION_WRITE;
1785 typedef struct _LPC_SECTION_READ {
1789 } LPC_SECTION_READ, *PLPC_SECTION_READ;
1791 typedef struct _LPC_MESSAGE {
1795 USHORT VirtualRangesOffset;
1799 UCHAR Data[ANYSIZE_ARRAY];
1800 } LPC_MESSAGE, *PLPC_MESSAGE;
1802 typedef enum _SHUTDOWN_ACTION {
1806 } SHUTDOWN_ACTION, *PSHUTDOWN_ACTION;
1808 typedef enum _KPROFILE_SOURCE {
1810 ProfileAlignmentFixup,
1813 ProfileLoadInstructions,
1814 ProfilePipelineFrozen,
1815 ProfileBranchInstructions,
1816 ProfileTotalNonissues,
1817 ProfileDcacheMisses,
1818 ProfileIcacheMisses,
1820 ProfileBranchMispredictions,
1821 ProfileStoreInstructions,
1822 ProfileFpInstructions,
1823 ProfileIntegerInstructions,
1827 ProfileSpecialInstructions,
1829 ProfileIcacheIssues,
1830 ProfileDcacheAccesses,
1831 ProfileMemoryBarrierCycles,
1832 ProfileLoadLinkedIssues,
1834 } KPROFILE_SOURCE, *PKPROFILE_SOURCE;
1836 typedef struct _DIRECTORY_BASIC_INFORMATION {
1837 UNICODE_STRING ObjectName;
1838 UNICODE_STRING ObjectTypeName;
1839 } DIRECTORY_BASIC_INFORMATION, *PDIRECTORY_BASIC_INFORMATION;
1841 typedef struct _INITIAL_TEB {
1845 PVOID StackCommitMax;
1846 PVOID StackReserved;
1847 } INITIAL_TEB, *PINITIAL_TEB;
1849 typedef enum _PORT_INFORMATION_CLASS {
1851 } PORT_INFORMATION_CLASS, *PPORT_INFORMATION_CLASS;
1853 typedef enum _IO_COMPLETION_INFORMATION_CLASS {
1854 IoCompletionBasicInformation
1855 } IO_COMPLETION_INFORMATION_CLASS, *PIO_COMPLETION_INFORMATION_CLASS;
1857 typedef struct _FILE_COMPLETION_INFORMATION {
1858 HANDLE CompletionPort;
1859 ULONG_PTR CompletionKey;
1860 } FILE_COMPLETION_INFORMATION, *PFILE_COMPLETION_INFORMATION;
1862 #define IO_COMPLETION_QUERY_STATE 0x0001
1863 #define IO_COMPLETION_MODIFY_STATE 0x0002
1864 #define IO_COMPLETION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
1866 typedef enum _HARDERROR_RESPONSE_OPTION {
1867 OptionAbortRetryIgnore,
1873 OptionShutdownSystem
1874 } HARDERROR_RESPONSE_OPTION, *PHARDERROR_RESPONSE_OPTION;
1876 typedef enum _HARDERROR_RESPONSE {
1877 ResponseReturnToCaller,
1886 } HARDERROR_RESPONSE, *PHARDERROR_RESPONSE;
1888 typedef enum _SYSDBG_COMMAND {
1889 SysDbgQueryModuleInformation,
1890 SysDbgQueryTraceInformation,
1891 SysDbgSetTracepoint,
1892 SysDbgSetSpecialCall,
1893 SysDbgClearSpecialCalls,
1894 SysDbgQuerySpecialCalls
1895 } SYSDBG_COMMAND, *PSYSDBG_COMMAND;
1898 /*************************************************************************
1901 * Those are not part of standard Winternl.h
1903 typedef struct _LDR_MODULE
1905 LIST_ENTRY InLoadOrderModuleList;
1906 LIST_ENTRY InMemoryOrderModuleList;
1907 LIST_ENTRY InInitializationOrderModuleList;
1911 UNICODE_STRING FullDllName;
1912 UNICODE_STRING BaseDllName;
1916 HANDLE SectionHandle;
1918 ULONG TimeDateStamp;
1919 HANDLE ActivationContext;
1920 } LDR_MODULE, *PLDR_MODULE;
1922 /* those defines are (some of the) regular LDR_MODULE.Flags values */
1923 #define LDR_IMAGE_IS_DLL 0x00000004
1924 #define LDR_LOAD_IN_PROGRESS 0x00001000
1925 #define LDR_UNLOAD_IN_PROGRESS 0x00002000
1926 #define LDR_NO_DLL_CALLS 0x00040000
1927 #define LDR_PROCESS_ATTACHED 0x00080000
1928 #define LDR_MODULE_REBASED 0x00200000
1930 /* these ones is Wine specific */
1931 #define LDR_DONT_RESOLVE_REFS 0x40000000
1932 #define LDR_WINE_INTERNAL 0x80000000
1934 /* FIXME: to be checked */
1935 #define MAXIMUM_FILENAME_LENGTH 256
1937 typedef struct _SYSTEM_MODULE
1941 PVOID ImageBaseAddress;
1948 BYTE Name[MAXIMUM_FILENAME_LENGTH];
1949 } SYSTEM_MODULE, *PSYSTEM_MODULE;
1951 typedef struct _SYSTEM_MODULE_INFORMATION
1954 SYSTEM_MODULE Modules[1]; /* FIXME: should be Modules[0] */
1955 } SYSTEM_MODULE_INFORMATION, *PSYSTEM_MODULE_INFORMATION;
1957 /***********************************************************************
1958 * Function declarations
1961 #if defined(__i386__) && defined(__GNUC__)
1962 static inline void WINAPI DbgBreakPoint(void) { __asm__ __volatile__("int3"); }
1963 static inline void WINAPI DbgUserBreakPoint(void) { __asm__ __volatile__("int3"); }
1964 #else /* __i386__ && __GNUC__ */
1965 NTSYSAPI void WINAPI DbgBreakPoint(void);
1966 NTSYSAPI void WINAPI DbgUserBreakPoint(void);
1967 #endif /* __i386__ && __GNUC__ */
1968 NTSYSAPI NTSTATUS WINAPIV DbgPrint(LPCSTR fmt, ...);
1969 NTSYSAPI NTSTATUS WINAPIV DbgPrintEx(ULONG iComponentId, ULONG Level, LPCSTR fmt, ...);
1970 NTSYSAPI NTSTATUS WINAPI LdrAccessResource(HMODULE,const IMAGE_RESOURCE_DATA_ENTRY*,void**,PULONG);
1971 NTSYSAPI NTSTATUS WINAPI LdrAddRefDll(ULONG,HMODULE);
1972 NTSYSAPI NTSTATUS WINAPI LdrFindResourceDirectory_U(HMODULE,const LDR_RESOURCE_INFO*,ULONG,const IMAGE_RESOURCE_DIRECTORY**);
1973 NTSYSAPI NTSTATUS WINAPI LdrFindResource_U(HMODULE,const LDR_RESOURCE_INFO*,ULONG,const IMAGE_RESOURCE_DATA_ENTRY**);
1974 NTSYSAPI NTSTATUS WINAPI LdrDisableThreadCalloutsForDll(HMODULE);
1975 NTSYSAPI NTSTATUS WINAPI LdrFindEntryForAddress(const void*, PLDR_MODULE*);
1976 NTSYSAPI NTSTATUS WINAPI LdrGetDllHandle(LPCWSTR, ULONG, const UNICODE_STRING*, HMODULE*);
1977 NTSYSAPI NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE, const ANSI_STRING*, ULONG, void**);
1978 NTSYSAPI void WINAPI LdrInitializeThunk(ULONG,ULONG,ULONG,ULONG);
1979 NTSYSAPI NTSTATUS WINAPI LdrLoadDll(LPCWSTR, DWORD, const UNICODE_STRING*, HMODULE*);
1980 NTSYSAPI NTSTATUS WINAPI LdrLockLoaderLock(ULONG,ULONG*,ULONG*);
1981 IMAGE_BASE_RELOCATION * WINAPI LdrProcessRelocationBlock(void*,UINT,USHORT*,INT);
1982 NTSYSAPI NTSTATUS WINAPI LdrQueryProcessModuleInformation(SYSTEM_MODULE_INFORMATION*, ULONG, ULONG*);
1983 NTSYSAPI void WINAPI LdrShutdownProcess(void);
1984 NTSYSAPI void WINAPI LdrShutdownThread(void);
1985 NTSYSAPI NTSTATUS WINAPI LdrUnloadDll(HMODULE);
1986 NTSYSAPI NTSTATUS WINAPI LdrUnlockLoaderLock(ULONG,ULONG);
1987 NTSYSAPI NTSTATUS WINAPI NtAcceptConnectPort(PHANDLE,ULONG,PLPC_MESSAGE,BOOLEAN,PLPC_SECTION_WRITE,PLPC_SECTION_READ);
1988 NTSYSAPI NTSTATUS WINAPI NtAccessCheck(PSECURITY_DESCRIPTOR,HANDLE,ACCESS_MASK,PGENERIC_MAPPING,PPRIVILEGE_SET,PULONG,PULONG,NTSTATUS*);
1989 NTSYSAPI NTSTATUS WINAPI NtAccessCheckAndAuditAlarm(PUNICODE_STRING,HANDLE,PUNICODE_STRING,PUNICODE_STRING,PSECURITY_DESCRIPTOR,ACCESS_MASK,PGENERIC_MAPPING,BOOLEAN,PACCESS_MASK,PBOOLEAN,PBOOLEAN);
1990 NTSYSAPI NTSTATUS WINAPI NtAddAtom(const WCHAR*,ULONG,RTL_ATOM*);
1991 NTSYSAPI NTSTATUS WINAPI NtAdjustGroupsToken(HANDLE,BOOLEAN,PTOKEN_GROUPS,ULONG,PTOKEN_GROUPS,PULONG);
1992 NTSYSAPI NTSTATUS WINAPI NtAdjustPrivilegesToken(HANDLE,BOOLEAN,PTOKEN_PRIVILEGES,DWORD,PTOKEN_PRIVILEGES,PDWORD);
1993 NTSYSAPI NTSTATUS WINAPI NtAlertResumeThread(HANDLE,PULONG);
1994 NTSYSAPI NTSTATUS WINAPI NtAlertThread(HANDLE ThreadHandle);
1995 NTSYSAPI NTSTATUS WINAPI NtAllocateLocallyUniqueId(PLUID lpLuid);
1996 NTSYSAPI NTSTATUS WINAPI NtAllocateUuids(PULARGE_INTEGER,PULONG,PULONG);
1997 NTSYSAPI NTSTATUS WINAPI NtAllocateVirtualMemory(HANDLE,PVOID*,ULONG,SIZE_T*,ULONG,ULONG);
1998 NTSYSAPI NTSTATUS WINAPI NtAreMappedFilesTheSame(PVOID,PVOID);
1999 NTSYSAPI NTSTATUS WINAPI NtAssignProcessToJobObject(HANDLE,HANDLE);
2000 NTSYSAPI NTSTATUS WINAPI NtCallbackReturn(PVOID,ULONG,NTSTATUS);
2001 NTSYSAPI NTSTATUS WINAPI NtCancelIoFile(HANDLE,PIO_STATUS_BLOCK);
2002 NTSYSAPI NTSTATUS WINAPI NtCancelTimer(HANDLE, BOOLEAN*);
2003 NTSYSAPI NTSTATUS WINAPI NtClearEvent(HANDLE);
2004 NTSYSAPI NTSTATUS WINAPI NtClose(HANDLE);
2005 NTSYSAPI NTSTATUS WINAPI NtCloseObjectAuditAlarm(PUNICODE_STRING,HANDLE,BOOLEAN);
2006 NTSYSAPI NTSTATUS WINAPI NtCompleteConnectPort(HANDLE);
2007 NTSYSAPI NTSTATUS WINAPI NtConnectPort(PHANDLE,PUNICODE_STRING,PSECURITY_QUALITY_OF_SERVICE,PLPC_SECTION_WRITE,PLPC_SECTION_READ,PULONG,PVOID,PULONG);
2008 NTSYSAPI NTSTATUS WINAPI NtContinue(PCONTEXT,BOOLEAN);
2009 NTSYSAPI NTSTATUS WINAPI NtCreateDirectoryObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
2010 NTSYSAPI NTSTATUS WINAPI NtCreateEvent(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *,BOOLEAN,BOOLEAN);
2011 NTSYSAPI NTSTATUS WINAPI NtCreateEventPair(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
2012 NTSYSAPI NTSTATUS WINAPI NtCreateFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,PLARGE_INTEGER,ULONG,ULONG,ULONG,ULONG,PVOID,ULONG);
2013 NTSYSAPI NTSTATUS WINAPI NtCreateIoCompletion(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,ULONG);
2014 NTSYSAPI NTSTATUS WINAPI NtCreateJobObject(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
2015 NTSYSAPI NTSTATUS WINAPI NtCreateKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,PULONG);
2016 NTSYSAPI NTSTATUS WINAPI NtCreateMailslotFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG,ULONG,PLARGE_INTEGER);
2017 NTSYSAPI NTSTATUS WINAPI NtCreateMutant(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,BOOLEAN);
2018 NTSYSAPI NTSTATUS WINAPI NtCreateNamedPipeFile(PHANDLE,ULONG,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,PLARGE_INTEGER);
2019 NTSYSAPI NTSTATUS WINAPI NtCreatePagingFile(PUNICODE_STRING,PLARGE_INTEGER,PLARGE_INTEGER,PLARGE_INTEGER);
2020 NTSYSAPI NTSTATUS WINAPI NtCreatePort(PHANDLE,POBJECT_ATTRIBUTES,ULONG,ULONG,PULONG);
2021 NTSYSAPI NTSTATUS WINAPI NtCreateProcess(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,HANDLE,BOOLEAN,HANDLE,HANDLE,HANDLE);
2022 NTSYSAPI NTSTATUS WINAPI NtCreateProfile(PHANDLE,HANDLE,PVOID,ULONG,ULONG,PVOID,ULONG,KPROFILE_SOURCE,KAFFINITY);
2023 NTSYSAPI NTSTATUS WINAPI NtCreateSection(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const LARGE_INTEGER*,ULONG,ULONG,HANDLE);
2024 NTSYSAPI NTSTATUS WINAPI NtCreateSemaphore(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,LONG,LONG);
2025 NTSYSAPI NTSTATUS WINAPI NtCreateSymbolicLinkObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PUNICODE_STRING);
2026 NTSYSAPI NTSTATUS WINAPI NtCreateThread(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,HANDLE,PCLIENT_ID,PCONTEXT,PINITIAL_TEB,BOOLEAN);
2027 NTSYSAPI NTSTATUS WINAPI NtCreateTimer(HANDLE*, ACCESS_MASK, const OBJECT_ATTRIBUTES*, TIMER_TYPE);
2028 NTSYSAPI NTSTATUS WINAPI NtCreateToken(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,TOKEN_TYPE,PLUID,PLARGE_INTEGER,PTOKEN_USER,PTOKEN_GROUPS,PTOKEN_PRIVILEGES,PTOKEN_OWNER,PTOKEN_PRIMARY_GROUP,PTOKEN_DEFAULT_DACL,PTOKEN_SOURCE);
2029 NTSYSAPI NTSTATUS WINAPI NtDelayExecution(BOOLEAN,const LARGE_INTEGER*);
2030 NTSYSAPI NTSTATUS WINAPI NtDeleteAtom(RTL_ATOM);
2031 NTSYSAPI NTSTATUS WINAPI NtDeleteFile(POBJECT_ATTRIBUTES);
2032 NTSYSAPI NTSTATUS WINAPI NtDeleteKey(HANDLE);
2033 NTSYSAPI NTSTATUS WINAPI NtDeleteValueKey(HANDLE,const UNICODE_STRING *);
2034 NTSYSAPI NTSTATUS WINAPI NtDeviceIoControlFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,PVOID,ULONG,PVOID,ULONG);
2035 NTSYSAPI NTSTATUS WINAPI NtDisplayString(PUNICODE_STRING);
2036 NTSYSAPI NTSTATUS WINAPI NtDuplicateObject(HANDLE,HANDLE,HANDLE,PHANDLE,ACCESS_MASK,ULONG,ULONG);
2037 NTSYSAPI NTSTATUS WINAPI NtDuplicateToken(HANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,SECURITY_IMPERSONATION_LEVEL,TOKEN_TYPE,PHANDLE);
2038 NTSYSAPI NTSTATUS WINAPI NtEnumerateKey(HANDLE,ULONG,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *);
2039 NTSYSAPI NTSTATUS WINAPI NtEnumerateValueKey(HANDLE,ULONG,KEY_VALUE_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2040 NTSYSAPI NTSTATUS WINAPI NtExtendSection(HANDLE,PLARGE_INTEGER);
2041 NTSYSAPI NTSTATUS WINAPI NtFindAtom(const WCHAR*,ULONG,RTL_ATOM*);
2042 NTSYSAPI NTSTATUS WINAPI NtFlushBuffersFile(HANDLE,IO_STATUS_BLOCK*);
2043 NTSYSAPI NTSTATUS WINAPI NtFlushInstructionCache(HANDLE,LPCVOID,SIZE_T);
2044 NTSYSAPI NTSTATUS WINAPI NtFlushKey(HANDLE);
2045 NTSYSAPI NTSTATUS WINAPI NtFlushVirtualMemory(HANDLE,LPCVOID*,SIZE_T*,ULONG);
2046 NTSYSAPI NTSTATUS WINAPI NtFlushWriteBuffer(VOID);
2047 NTSYSAPI NTSTATUS WINAPI NtFreeVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
2048 NTSYSAPI NTSTATUS WINAPI NtFsControlFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,PVOID,ULONG,PVOID,ULONG);
2049 NTSYSAPI NTSTATUS WINAPI NtGetContextThread(HANDLE,CONTEXT*);
2050 NTSYSAPI NTSTATUS WINAPI NtGetPlugPlayEvent(ULONG,ULONG,PVOID,ULONG);
2051 NTSYSAPI ULONG WINAPI NtGetTickCount(VOID);
2052 NTSYSAPI NTSTATUS WINAPI NtGetWriteWatch(HANDLE,ULONG,PVOID,SIZE_T,PVOID*,ULONG_PTR*,ULONG*);
2053 NTSYSAPI NTSTATUS WINAPI NtImpersonateAnonymousToken(HANDLE);
2054 NTSYSAPI NTSTATUS WINAPI NtImpersonateClientOfPort(HANDLE,PPORT_MESSAGE);
2055 NTSYSAPI NTSTATUS WINAPI NtImpersonateThread(HANDLE,HANDLE,PSECURITY_QUALITY_OF_SERVICE);
2056 NTSYSAPI NTSTATUS WINAPI NtInitializeRegistry(BOOLEAN);
2057 NTSYSAPI NTSTATUS WINAPI NtInitiatePowerAction(POWER_ACTION,SYSTEM_POWER_STATE,ULONG,BOOLEAN);
2058 NTSYSAPI NTSTATUS WINAPI NtIsProcessInJob(HANDLE,HANDLE);
2059 NTSYSAPI NTSTATUS WINAPI NtListenPort(HANDLE,PLPC_MESSAGE);
2060 NTSYSAPI NTSTATUS WINAPI NtLoadDriver(const UNICODE_STRING *);
2061 NTSYSAPI NTSTATUS WINAPI NtLoadKey(const OBJECT_ATTRIBUTES *,OBJECT_ATTRIBUTES *);
2062 NTSYSAPI NTSTATUS WINAPI NtLockFile(HANDLE,HANDLE,PIO_APC_ROUTINE,void*,PIO_STATUS_BLOCK,PLARGE_INTEGER,PLARGE_INTEGER,ULONG*,BOOLEAN,BOOLEAN);
2063 NTSYSAPI NTSTATUS WINAPI NtLockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
2064 NTSYSAPI NTSTATUS WINAPI NtMakeTemporaryObject(HANDLE);
2065 NTSYSAPI NTSTATUS WINAPI NtMapViewOfSection(HANDLE,HANDLE,PVOID*,ULONG,SIZE_T,const LARGE_INTEGER*,SIZE_T*,SECTION_INHERIT,ULONG,ULONG);
2066 NTSYSAPI NTSTATUS WINAPI NtNotifyChangeDirectoryFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,ULONG,BOOLEAN);
2067 NTSYSAPI NTSTATUS WINAPI NtNotifyChangeKey(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,BOOLEAN,PVOID,ULONG,BOOLEAN);
2068 NTSYSAPI NTSTATUS WINAPI NtOpenDirectoryObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
2069 NTSYSAPI NTSTATUS WINAPI NtOpenEvent(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *);
2070 NTSYSAPI NTSTATUS WINAPI NtOpenEventPair(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
2071 NTSYSAPI NTSTATUS WINAPI NtOpenFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG);
2072 NTSYSAPI NTSTATUS WINAPI NtOpenIoCompletion(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
2073 NTSYSAPI NTSTATUS WINAPI NtOpenJobObject(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
2074 NTSYSAPI NTSTATUS WINAPI NtOpenKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *);
2075 NTSYSAPI NTSTATUS WINAPI NtOpenMutant(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
2076 NTSYSAPI NTSTATUS WINAPI NtOpenObjectAuditAlarm(PUNICODE_STRING,PHANDLE,PUNICODE_STRING,PUNICODE_STRING,PSECURITY_DESCRIPTOR,HANDLE,ACCESS_MASK,ACCESS_MASK,PPRIVILEGE_SET,BOOLEAN,BOOLEAN,PBOOLEAN);
2077 NTSYSAPI NTSTATUS WINAPI NtOpenProcess(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const CLIENT_ID*);
2078 NTSYSAPI NTSTATUS WINAPI NtOpenProcessToken(HANDLE,DWORD,HANDLE *);
2079 NTSYSAPI NTSTATUS WINAPI NtOpenProcessTokenEx(HANDLE,DWORD,DWORD,HANDLE *);
2080 NTSYSAPI NTSTATUS WINAPI NtOpenSection(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
2081 NTSYSAPI NTSTATUS WINAPI NtOpenSemaphore(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
2082 NTSYSAPI NTSTATUS WINAPI NtOpenSymbolicLinkObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
2083 NTSYSAPI NTSTATUS WINAPI NtOpenThread(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const CLIENT_ID*);
2084 NTSYSAPI NTSTATUS WINAPI NtOpenThreadToken(HANDLE,DWORD,BOOLEAN,HANDLE *);
2085 NTSYSAPI NTSTATUS WINAPI NtOpenThreadTokenEx(HANDLE,DWORD,BOOLEAN,DWORD,HANDLE *);
2086 NTSYSAPI NTSTATUS WINAPI NtOpenTimer(HANDLE*, ACCESS_MASK, const OBJECT_ATTRIBUTES*);
2087 NTSYSAPI NTSTATUS WINAPI NtPowerInformation(POWER_INFORMATION_LEVEL,PVOID,ULONG,PVOID,ULONG);
2088 NTSYSAPI NTSTATUS WINAPI NtPrivilegeCheck(HANDLE,PPRIVILEGE_SET,PBOOLEAN);
2089 NTSYSAPI NTSTATUS WINAPI NtPrivilegeObjectAuditAlarm(PUNICODE_STRING,HANDLE,HANDLE,ULONG,PPRIVILEGE_SET,BOOLEAN);
2090 NTSYSAPI NTSTATUS WINAPI NtPrivilegedServiceAuditAlarm(PUNICODE_STRING,PUNICODE_STRING,HANDLE,PPRIVILEGE_SET,BOOLEAN);
2091 NTSYSAPI NTSTATUS WINAPI NtProtectVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG,ULONG*);
2092 NTSYSAPI NTSTATUS WINAPI NtPulseEvent(HANDLE,PULONG);
2093 NTSYSAPI NTSTATUS WINAPI NtQueueApcThread(HANDLE,PNTAPCFUNC,ULONG_PTR,ULONG_PTR,ULONG_PTR);
2094 NTSYSAPI NTSTATUS WINAPI NtQueryAttributesFile(const OBJECT_ATTRIBUTES*,FILE_BASIC_INFORMATION*);
2095 NTSYSAPI NTSTATUS WINAPI NtQueryDefaultLocale(BOOLEAN,LCID*);
2096 NTSYSAPI NTSTATUS WINAPI NtQueryDefaultUILanguage(LANGID*);
2097 NTSYSAPI NTSTATUS WINAPI NtQueryDirectoryFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,FILE_INFORMATION_CLASS,BOOLEAN,PUNICODE_STRING,BOOLEAN);
2098 NTSYSAPI NTSTATUS WINAPI NtQueryDirectoryObject(HANDLE,PDIRECTORY_BASIC_INFORMATION,ULONG,BOOLEAN,BOOLEAN,PULONG,PULONG);
2099 NTSYSAPI NTSTATUS WINAPI NtQueryEaFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,BOOLEAN,PVOID,ULONG,PULONG,BOOLEAN);
2100 NTSYSAPI NTSTATUS WINAPI NtQueryEvent(HANDLE,EVENT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2101 NTSYSAPI NTSTATUS WINAPI NtQueryFullAttributesFile(const OBJECT_ATTRIBUTES*,FILE_NETWORK_OPEN_INFORMATION*);
2102 NTSYSAPI NTSTATUS WINAPI NtQueryInformationAtom(RTL_ATOM,ATOM_INFORMATION_CLASS,PVOID,ULONG,ULONG*);
2103 NTSYSAPI NTSTATUS WINAPI NtQueryInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,LONG,FILE_INFORMATION_CLASS);
2104 NTSYSAPI NTSTATUS WINAPI NtQueryInformationJobObject(HANDLE,JOBOBJECTINFOCLASS,PVOID,ULONG,PULONG);
2105 NTSYSAPI NTSTATUS WINAPI NtQueryInformationPort(HANDLE,PORT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2106 NTSYSAPI NTSTATUS WINAPI NtQueryInformationProcess(HANDLE,PROCESSINFOCLASS,PVOID,ULONG,PULONG);
2107 NTSYSAPI NTSTATUS WINAPI NtQueryInformationThread(HANDLE,THREADINFOCLASS,PVOID,ULONG,PULONG);
2108 NTSYSAPI NTSTATUS WINAPI NtQueryInformationToken(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2109 NTSYSAPI NTSTATUS WINAPI NtQueryInstallUILanguage(LANGID*);
2110 NTSYSAPI NTSTATUS WINAPI NtQueryIntervalProfile(KPROFILE_SOURCE,PULONG);
2111 NTSYSAPI NTSTATUS WINAPI NtQueryIoCompletion(HANDLE,IO_COMPLETION_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2112 NTSYSAPI NTSTATUS WINAPI NtQueryKey(HANDLE,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *);
2113 NTSYSAPI NTSTATUS WINAPI NtQueryMultipleValueKey(HANDLE,PKEY_MULTIPLE_VALUE_INFORMATION,ULONG,PVOID,ULONG,PULONG);
2114 NTSYSAPI NTSTATUS WINAPI NtQueryMutant(HANDLE,MUTANT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2115 NTSYSAPI NTSTATUS WINAPI NtQueryObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG, PULONG);
2116 NTSYSAPI NTSTATUS WINAPI NtQueryOpenSubKeys(POBJECT_ATTRIBUTES,PULONG);
2117 NTSYSAPI NTSTATUS WINAPI NtQueryPerformanceCounter(PLARGE_INTEGER, PLARGE_INTEGER);
2118 NTSYSAPI NTSTATUS WINAPI NtQuerySecurityObject(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,ULONG,PULONG);
2119 NTSYSAPI NTSTATUS WINAPI NtQuerySection(HANDLE,SECTION_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2120 NTSYSAPI NTSTATUS WINAPI NtQuerySemaphore(HANDLE,SEMAPHORE_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2121 NTSYSAPI NTSTATUS WINAPI NtQuerySymbolicLinkObject(HANDLE,PUNICODE_STRING,PULONG);
2122 NTSYSAPI NTSTATUS WINAPI NtQuerySystemEnvironmentValue(PUNICODE_STRING,PWCHAR,ULONG,PULONG);
2123 NTSYSAPI NTSTATUS WINAPI NtQuerySystemInformation(SYSTEM_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2124 NTSYSAPI NTSTATUS WINAPI NtQuerySystemTime(PLARGE_INTEGER);
2125 NTSYSAPI NTSTATUS WINAPI NtQueryTimer(HANDLE,TIMER_INFORMATION_CLASS,PVOID,ULONG,PULONG);
2126 NTSYSAPI NTSTATUS WINAPI NtQueryTimerResolution(PULONG,PULONG,PULONG);
2127 NTSYSAPI NTSTATUS WINAPI NtQueryValueKey(HANDLE,const UNICODE_STRING *,KEY_VALUE_INFORMATION_CLASS,void *,DWORD,DWORD *);
2128 NTSYSAPI NTSTATUS WINAPI NtQueryVirtualMemory(HANDLE,LPCVOID,MEMORY_INFORMATION_CLASS,PVOID,SIZE_T,SIZE_T*);
2129 NTSYSAPI NTSTATUS WINAPI NtQueryVolumeInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS);
2130 NTSYSAPI NTSTATUS WINAPI NtRaiseException(PEXCEPTION_RECORD,PCONTEXT,BOOL);
2131 NTSYSAPI NTSTATUS WINAPI NtRaiseHardError(NTSTATUS,ULONG,PUNICODE_STRING,PVOID*,HARDERROR_RESPONSE_OPTION,PHARDERROR_RESPONSE);
2132 NTSYSAPI NTSTATUS WINAPI NtReadFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,PLARGE_INTEGER,PULONG);
2133 NTSYSAPI NTSTATUS WINAPI NtReadFileScatter(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,FILE_SEGMENT_ELEMENT*,ULONG,PLARGE_INTEGER,PULONG);
2134 NTSYSAPI NTSTATUS WINAPI NtReadRequestData(HANDLE,PLPC_MESSAGE,ULONG,PVOID,ULONG,PULONG);
2135 NTSYSAPI NTSTATUS WINAPI NtReadVirtualMemory(HANDLE,const void*,void*,SIZE_T,SIZE_T*);
2136 NTSYSAPI NTSTATUS WINAPI NtRegisterThreadTerminatePort(HANDLE);
2137 NTSYSAPI NTSTATUS WINAPI NtReleaseMutant(HANDLE,PLONG);
2138 NTSYSAPI NTSTATUS WINAPI NtReleaseSemaphore(HANDLE,ULONG,PULONG);
2139 NTSYSAPI NTSTATUS WINAPI NtRemoveIoCompletion(HANDLE,PULONG_PTR,PULONG_PTR,PIO_STATUS_BLOCK,PLARGE_INTEGER);
2140 NTSYSAPI NTSTATUS WINAPI NtReplaceKey(POBJECT_ATTRIBUTES,HANDLE,POBJECT_ATTRIBUTES);
2141 NTSYSAPI NTSTATUS WINAPI NtReplyPort(HANDLE,PLPC_MESSAGE);
2142 NTSYSAPI NTSTATUS WINAPI NtReplyWaitReceivePort(HANDLE,PULONG,PLPC_MESSAGE,PLPC_MESSAGE);
2143 NTSYSAPI NTSTATUS WINAPI NtReplyWaitReceivePortEx(HANDLE,PVOID*,PPORT_MESSAGE,PPORT_MESSAGE,PLARGE_INTEGER);
2144 NTSYSAPI NTSTATUS WINAPI NtReplyWaitReplyPort(HANDLE,PLPC_MESSAGE);
2145 NTSYSAPI NTSTATUS WINAPI NtRequestPort(HANDLE,PLPC_MESSAGE);
2146 NTSYSAPI NTSTATUS WINAPI NtRequestWaitReplyPort(HANDLE,PLPC_MESSAGE,PLPC_MESSAGE);
2147 NTSYSAPI NTSTATUS WINAPI NtResetEvent(HANDLE,PULONG);
2148 NTSYSAPI NTSTATUS WINAPI NtResetWriteWatch(HANDLE,PVOID,SIZE_T);
2149 NTSYSAPI NTSTATUS WINAPI NtRestoreKey(HANDLE,HANDLE,ULONG);
2150 NTSYSAPI NTSTATUS WINAPI NtResumeThread(HANDLE,PULONG);
2151 NTSYSAPI NTSTATUS WINAPI NtSaveKey(HANDLE,HANDLE);
2152 NTSYSAPI NTSTATUS WINAPI NtSecureConnectPort(PHANDLE,PUNICODE_STRING,PSECURITY_QUALITY_OF_SERVICE,PLPC_SECTION_WRITE,PSID,PLPC_SECTION_READ,PULONG,PVOID,PULONG);
2153 NTSYSAPI NTSTATUS WINAPI NtSetContextThread(HANDLE,const CONTEXT*);
2154 NTSYSAPI NTSTATUS WINAPI NtSetDefaultHardErrorPort(HANDLE);
2155 NTSYSAPI NTSTATUS WINAPI NtSetDefaultLocale(BOOLEAN,LCID);
2156 NTSYSAPI NTSTATUS WINAPI NtSetDefaultUILanguage(LANGID);
2157 NTSYSAPI NTSTATUS WINAPI NtSetEaFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG);
2158 NTSYSAPI NTSTATUS WINAPI NtSetEvent(HANDLE,PULONG);
2159 NTSYSAPI NTSTATUS WINAPI NtSetHighEventPair(HANDLE);
2160 NTSYSAPI NTSTATUS WINAPI NtSetHighWaitLowEventPair(HANDLE);
2161 NTSYSAPI NTSTATUS WINAPI NtSetHighWaitLowThread(VOID);
2162 NTSYSAPI NTSTATUS WINAPI NtSetInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FILE_INFORMATION_CLASS);
2163 NTSYSAPI NTSTATUS WINAPI NtSetInformationJobObject(HANDLE,JOBOBJECTINFOCLASS,PVOID,ULONG);
2164 NTSYSAPI NTSTATUS WINAPI NtSetInformationKey(HANDLE,const int,PVOID,ULONG);
2165 NTSYSAPI NTSTATUS WINAPI NtSetInformationObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG);
2166 NTSYSAPI NTSTATUS WINAPI NtSetInformationProcess(HANDLE,PROCESS_INFORMATION_CLASS,PVOID,ULONG);
2167 NTSYSAPI NTSTATUS WINAPI NtSetInformationThread(HANDLE,THREADINFOCLASS,LPCVOID,ULONG);
2168 NTSYSAPI NTSTATUS WINAPI NtSetInformationToken(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,ULONG);
2169 NTSYSAPI NTSTATUS WINAPI NtSetIntervalProfile(ULONG,KPROFILE_SOURCE);
2170 NTSYSAPI NTSTATUS WINAPI NtSetIoCompletion(HANDLE,ULONG_PTR,ULONG_PTR,NTSTATUS,ULONG);
2171 NTSYSAPI NTSTATUS WINAPI NtSetLdtEntries(ULONG,LDT_ENTRY,ULONG,LDT_ENTRY);
2172 NTSYSAPI NTSTATUS WINAPI NtSetLowEventPair(HANDLE);
2173 NTSYSAPI NTSTATUS WINAPI NtSetLowWaitHighEventPair(HANDLE);
2174 NTSYSAPI NTSTATUS WINAPI NtSetLowWaitHighThread(VOID);
2175 NTSYSAPI NTSTATUS WINAPI NtSetSecurityObject(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
2176 NTSYSAPI NTSTATUS WINAPI NtSetSystemEnvironmentValue(PUNICODE_STRING,PUNICODE_STRING);
2177 NTSYSAPI NTSTATUS WINAPI NtSetSystemInformation(SYSTEM_INFORMATION_CLASS,PVOID,ULONG);
2178 NTSYSAPI NTSTATUS WINAPI NtSetSystemPowerState(POWER_ACTION,SYSTEM_POWER_STATE,ULONG);
2179 NTSYSAPI NTSTATUS WINAPI NtSetSystemTime(const LARGE_INTEGER*,LARGE_INTEGER*);
2180 NTSYSAPI NTSTATUS WINAPI NtSetTimer(HANDLE, const LARGE_INTEGER*, PTIMER_APC_ROUTINE, PVOID, BOOLEAN, ULONG, BOOLEAN*);
2181 NTSYSAPI NTSTATUS WINAPI NtSetTimerResolution(ULONG,BOOLEAN,PULONG);
2182 NTSYSAPI NTSTATUS WINAPI NtSetValueKey(HANDLE,const UNICODE_STRING *,ULONG,ULONG,const void *,ULONG);
2183 NTSYSAPI NTSTATUS WINAPI NtSetVolumeInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS);
2184 NTSYSAPI NTSTATUS WINAPI NtSignalAndWaitForSingleObject(HANDLE,HANDLE,BOOLEAN,const LARGE_INTEGER*);
2185 NTSYSAPI NTSTATUS WINAPI NtShutdownSystem(SHUTDOWN_ACTION);
2186 NTSYSAPI NTSTATUS WINAPI NtStartProfile(HANDLE);
2187 NTSYSAPI NTSTATUS WINAPI NtStopProfile(HANDLE);
2188 NTSYSAPI NTSTATUS WINAPI NtSuspendThread(HANDLE,PULONG);
2189 NTSYSAPI NTSTATUS WINAPI NtSystemDebugControl(SYSDBG_COMMAND,PVOID,ULONG,PVOID,ULONG,PULONG);
2190 NTSYSAPI NTSTATUS WINAPI NtTerminateJobObject(HANDLE,NTSTATUS);
2191 NTSYSAPI NTSTATUS WINAPI NtTerminateProcess(HANDLE,LONG);
2192 NTSYSAPI NTSTATUS WINAPI NtTerminateThread(HANDLE,LONG);
2193 NTSYSAPI NTSTATUS WINAPI NtTestAlert(VOID);
2194 NTSYSAPI NTSTATUS WINAPI NtUnloadDriver(const UNICODE_STRING *);
2195 NTSYSAPI NTSTATUS WINAPI NtUnloadKey(POBJECT_ATTRIBUTES);
2196 NTSYSAPI NTSTATUS WINAPI NtUnloadKeyEx(POBJECT_ATTRIBUTES,HANDLE);
2197 NTSYSAPI NTSTATUS WINAPI NtUnlockFile(HANDLE,PIO_STATUS_BLOCK,PLARGE_INTEGER,PLARGE_INTEGER,PULONG);
2198 NTSYSAPI NTSTATUS WINAPI NtUnlockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
2199 NTSYSAPI NTSTATUS WINAPI NtUnmapViewOfSection(HANDLE,PVOID);
2200 NTSYSAPI NTSTATUS WINAPI NtVdmControl(ULONG,PVOID);
2201 NTSYSAPI NTSTATUS WINAPI NtWaitForSingleObject(HANDLE,BOOLEAN,const LARGE_INTEGER*);
2202 NTSYSAPI NTSTATUS WINAPI NtWaitForMultipleObjects(ULONG,const HANDLE*,BOOLEAN,BOOLEAN,const LARGE_INTEGER*);
2203 NTSYSAPI NTSTATUS WINAPI NtWaitHighEventPair(HANDLE);
2204 NTSYSAPI NTSTATUS WINAPI NtWaitLowEventPair(HANDLE);
2205 NTSYSAPI NTSTATUS WINAPI NtWriteFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,const void*,ULONG,PLARGE_INTEGER,PULONG);
2206 NTSYSAPI NTSTATUS WINAPI NtWriteFileGather(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,FILE_SEGMENT_ELEMENT*,ULONG,PLARGE_INTEGER,PULONG);
2207 NTSYSAPI NTSTATUS WINAPI NtWriteRequestData(HANDLE,PLPC_MESSAGE,ULONG,PVOID,ULONG,PULONG);
2208 NTSYSAPI NTSTATUS WINAPI NtWriteVirtualMemory(HANDLE,void*,const void*,SIZE_T,SIZE_T*);
2209 NTSYSAPI NTSTATUS WINAPI NtYieldExecution(void);
2211 NTSYSAPI void WINAPI RtlAcquirePebLock(void);
2212 NTSYSAPI BYTE WINAPI RtlAcquireResourceExclusive(LPRTL_RWLOCK,BYTE);
2213 NTSYSAPI BYTE WINAPI RtlAcquireResourceShared(LPRTL_RWLOCK,BYTE);
2214 NTSYSAPI NTSTATUS WINAPI RtlActivateActivationContext(DWORD,HANDLE,ULONG_PTR*);
2215 NTSYSAPI NTSTATUS WINAPI RtlAddAce(PACL,DWORD,DWORD,PACE_HEADER,DWORD);
2216 NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedAce(PACL,DWORD,DWORD,PSID);
2217 NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
2218 NTSYSAPI NTSTATUS WINAPI RtlAddAccessDeniedAce(PACL,DWORD,DWORD,PSID);
2219 NTSYSAPI NTSTATUS WINAPI RtlAddAccessDeniedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
2220 NTSYSAPI NTSTATUS WINAPI RtlAddAtomToAtomTable(RTL_ATOM_TABLE,const WCHAR*,RTL_ATOM*);
2221 NTSYSAPI NTSTATUS WINAPI RtlAddAuditAccessAce(PACL,DWORD,DWORD,PSID,BOOL,BOOL);
2222 NTSYSAPI NTSTATUS WINAPI RtlAddAuditAccessAceEx(PACL,DWORD,DWORD,DWORD,PSID,BOOL,BOOL);
2223 NTSYSAPI void WINAPI RtlAddRefActivationContext(HANDLE);
2224 NTSYSAPI PVOID WINAPI RtlAddVectoredExceptionHandler(ULONG,PVECTORED_EXCEPTION_HANDLER);
2225 NTSYSAPI NTSTATUS WINAPI RtlAdjustPrivilege(ULONG,BOOLEAN,BOOLEAN,PBOOLEAN);
2226 NTSYSAPI NTSTATUS WINAPI RtlAllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY,BYTE,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,PSID *);
2227 NTSYSAPI RTL_HANDLE * WINAPI RtlAllocateHandle(RTL_HANDLE_TABLE *,ULONG *);
2228 NTSYSAPI PVOID WINAPI RtlAllocateHeap(HANDLE,ULONG,SIZE_T) __WINE_ALLOC_SIZE(3);
2229 NTSYSAPI WCHAR WINAPI RtlAnsiCharToUnicodeChar(LPSTR *);
2230 NTSYSAPI DWORD WINAPI RtlAnsiStringToUnicodeSize(const STRING *);
2231 NTSYSAPI NTSTATUS WINAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING,PCANSI_STRING,BOOLEAN);
2232 NTSYSAPI NTSTATUS WINAPI RtlAppendAsciizToString(STRING *,LPCSTR);
2233 NTSYSAPI NTSTATUS WINAPI RtlAppendStringToString(STRING *,const STRING *);
2234 NTSYSAPI NTSTATUS WINAPI RtlAppendUnicodeStringToString(UNICODE_STRING *,const UNICODE_STRING *);
2235 NTSYSAPI NTSTATUS WINAPI RtlAppendUnicodeToString(UNICODE_STRING *,LPCWSTR);
2236 NTSYSAPI BOOLEAN WINAPI RtlAreAllAccessesGranted(ACCESS_MASK,ACCESS_MASK);
2237 NTSYSAPI BOOLEAN WINAPI RtlAreAnyAccessesGranted(ACCESS_MASK,ACCESS_MASK);
2238 NTSYSAPI BOOLEAN WINAPI RtlAreBitsSet(PCRTL_BITMAP,ULONG,ULONG);
2239 NTSYSAPI BOOLEAN WINAPI RtlAreBitsClear(PCRTL_BITMAP,ULONG,ULONG);
2240 NTSYSAPI NTSTATUS WINAPI RtlCharToInteger(PCSZ,ULONG,PULONG);
2241 NTSYSAPI NTSTATUS WINAPI RtlCheckRegistryKey(ULONG, PWSTR);
2242 NTSYSAPI void WINAPI RtlClearAllBits(PRTL_BITMAP);
2243 NTSYSAPI void WINAPI RtlClearBits(PRTL_BITMAP,ULONG,ULONG);
2244 NTSYSAPI NTSTATUS WINAPI RtlCreateActivationContext(HANDLE*,const void*);
2245 NTSYSAPI PDEBUG_BUFFER WINAPI RtlCreateQueryDebugBuffer(ULONG,BOOLEAN);
2246 NTSYSAPI ULONG WINAPI RtlCompactHeap(HANDLE,ULONG);
2247 NTSYSAPI LONG WINAPI RtlCompareString(const STRING*,const STRING*,BOOLEAN);
2248 NTSYSAPI LONG WINAPI RtlCompareUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
2249 NTSYSAPI DWORD WINAPI RtlComputeCrc32(DWORD,const BYTE*,INT);
2250 NTSYSAPI NTSTATUS WINAPI RtlConvertSidToUnicodeString(PUNICODE_STRING,PSID,BOOLEAN);
2251 NTSYSAPI LONGLONG WINAPI RtlConvertLongToLargeInteger(LONG);
2252 NTSYSAPI ULONGLONG WINAPI RtlConvertUlongToLargeInteger(ULONG);
2253 NTSYSAPI void WINAPI RtlCopyLuid(PLUID,const LUID*);
2254 NTSYSAPI void WINAPI RtlCopyLuidAndAttributesArray(ULONG,const LUID_AND_ATTRIBUTES*,PLUID_AND_ATTRIBUTES);
2255 NTSYSAPI BOOLEAN WINAPI RtlCopySid(DWORD,PSID,PSID);
2256 NTSYSAPI NTSTATUS WINAPI RtlCopySecurityDescriptor(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR);
2257 NTSYSAPI void WINAPI RtlCopyString(STRING*,const STRING*);
2258 NTSYSAPI void WINAPI RtlCopyUnicodeString(UNICODE_STRING*,const UNICODE_STRING*);
2259 NTSYSAPI NTSTATUS WINAPI RtlCreateAcl(PACL,DWORD,DWORD);
2260 NTSYSAPI NTSTATUS WINAPI RtlCreateAtomTable(ULONG,RTL_ATOM_TABLE*);
2261 NTSYSAPI NTSTATUS WINAPI RtlCreateEnvironment(BOOLEAN, PWSTR*);
2262 NTSYSAPI HANDLE WINAPI RtlCreateHeap(ULONG,PVOID,SIZE_T,SIZE_T,PVOID,PRTL_HEAP_DEFINITION);
2263 NTSYSAPI NTSTATUS WINAPI RtlCreateProcessParameters(RTL_USER_PROCESS_PARAMETERS**,const UNICODE_STRING*,const UNICODE_STRING*,const UNICODE_STRING*,const UNICODE_STRING*,PWSTR,const UNICODE_STRING*,const UNICODE_STRING*,const UNICODE_STRING*,const UNICODE_STRING*);
2264 NTSYSAPI NTSTATUS WINAPI RtlCreateSecurityDescriptor(PSECURITY_DESCRIPTOR,DWORD);
2265 NTSYSAPI NTSTATUS WINAPI RtlCreateTimerQueue(PHANDLE);
2266 NTSYSAPI NTSTATUS WINAPI RtlCreateTimer(PHANDLE, HANDLE, RTL_WAITORTIMERCALLBACKFUNC, PVOID, DWORD, DWORD, ULONG);
2267 NTSYSAPI BOOLEAN WINAPI RtlCreateUnicodeString(PUNICODE_STRING,LPCWSTR);
2268 NTSYSAPI BOOLEAN WINAPI RtlCreateUnicodeStringFromAsciiz(PUNICODE_STRING,LPCSTR);
2269 NTSYSAPI NTSTATUS WINAPI RtlCreateUserThread(HANDLE,const SECURITY_DESCRIPTOR*,BOOLEAN,PVOID,SIZE_T,SIZE_T,PRTL_THREAD_START_ROUTINE,void*,HANDLE*,CLIENT_ID*);
2270 NTSYSAPI void WINAPI RtlDeactivateActivationContext(DWORD,ULONG_PTR);
2271 NTSYSAPI NTSTATUS WINAPI RtlDeleteAce(PACL,DWORD);
2272 NTSYSAPI NTSTATUS WINAPI RtlDeleteAtomFromAtomTable(RTL_ATOM_TABLE,RTL_ATOM);
2273 NTSYSAPI NTSTATUS WINAPI RtlDeleteCriticalSection(RTL_CRITICAL_SECTION *);
2274 NTSYSAPI NTSTATUS WINAPI RtlDeleteRegistryValue(ULONG, PCWSTR, PCWSTR);
2275 NTSYSAPI void WINAPI RtlDeleteResource(LPRTL_RWLOCK);
2276 NTSYSAPI NTSTATUS WINAPI RtlDeleteSecurityObject(PSECURITY_DESCRIPTOR*);
2277 NTSYSAPI NTSTATUS WINAPI RtlDeleteTimer(HANDLE, HANDLE, HANDLE);
2278 NTSYSAPI NTSTATUS WINAPI RtlDeleteTimerQueueEx(HANDLE, HANDLE);
2279 NTSYSAPI PRTL_USER_PROCESS_PARAMETERS WINAPI RtlDeNormalizeProcessParams(RTL_USER_PROCESS_PARAMETERS*);
2280 NTSYSAPI NTSTATUS WINAPI RtlDeregisterWait(HANDLE);
2281 NTSYSAPI NTSTATUS WINAPI RtlDeregisterWaitEx(HANDLE,HANDLE);
2282 NTSYSAPI NTSTATUS WINAPI RtlDestroyAtomTable(RTL_ATOM_TABLE);
2283 NTSYSAPI NTSTATUS WINAPI RtlDestroyEnvironment(PWSTR);
2284 NTSYSAPI NTSTATUS WINAPI RtlDestroyHandleTable(RTL_HANDLE_TABLE *);
2285 NTSYSAPI HANDLE WINAPI RtlDestroyHeap(HANDLE);
2286 NTSYSAPI void WINAPI RtlDestroyProcessParameters(RTL_USER_PROCESS_PARAMETERS*);
2287 NTSYSAPI NTSTATUS WINAPI RtlDestroyQueryDebugBuffer(PDEBUG_BUFFER);
2288 NTSYSAPI DOS_PATHNAME_TYPE WINAPI RtlDetermineDosPathNameType_U(PCWSTR);
2289 NTSYSAPI BOOLEAN WINAPI RtlDllShutdownInProgress(void);
2290 NTSYSAPI BOOLEAN WINAPI RtlDoesFileExists_U(LPCWSTR);
2291 NTSYSAPI BOOLEAN WINAPI RtlDosPathNameToNtPathName_U(PCWSTR,PUNICODE_STRING,PWSTR*,CURDIR*);
2292 NTSYSAPI ULONG WINAPI RtlDosSearchPath_U(LPCWSTR, LPCWSTR, LPCWSTR, ULONG, LPWSTR, LPWSTR*);
2293 NTSYSAPI WCHAR WINAPI RtlDowncaseUnicodeChar(WCHAR);
2294 NTSYSAPI NTSTATUS WINAPI RtlDowncaseUnicodeString(UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
2295 NTSYSAPI void WINAPI RtlDumpResource(LPRTL_RWLOCK);
2296 NTSYSAPI NTSTATUS WINAPI RtlDuplicateUnicodeString(int,const UNICODE_STRING*,UNICODE_STRING*);
2297 NTSYSAPI NTSTATUS WINAPI RtlEmptyAtomTable(RTL_ATOM_TABLE,BOOLEAN);
2298 NTSYSAPI LONGLONG WINAPI RtlEnlargedIntegerMultiply(INT,INT);
2299 NTSYSAPI ULONGLONG WINAPI RtlEnlargedUnsignedMultiply(UINT,UINT);
2300 NTSYSAPI UINT WINAPI RtlEnlargedUnsignedDivide(ULONGLONG,UINT,UINT *);
2301 NTSYSAPI NTSTATUS WINAPI RtlEnterCriticalSection(RTL_CRITICAL_SECTION *);
2302 NTSYSAPI void WINAPI RtlEraseUnicodeString(UNICODE_STRING*);
2303 NTSYSAPI NTSTATUS WINAPI RtlEqualComputerName(const UNICODE_STRING*,const UNICODE_STRING*);
2304 NTSYSAPI NTSTATUS WINAPI RtlEqualDomainName(const UNICODE_STRING*,const UNICODE_STRING*);
2305 NTSYSAPI BOOLEAN WINAPI RtlEqualLuid(const LUID*,const LUID*);
2306 NTSYSAPI BOOL WINAPI RtlEqualPrefixSid(PSID,PSID);
2307 NTSYSAPI BOOL WINAPI RtlEqualSid(PSID,PSID);
2308 NTSYSAPI BOOLEAN WINAPI RtlEqualString(const STRING*,const STRING*,BOOLEAN);
2309 NTSYSAPI BOOLEAN WINAPI RtlEqualUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
2310 NTSYSAPI void DECLSPEC_NORETURN WINAPI RtlExitUserThread(ULONG);
2311 NTSYSAPI NTSTATUS WINAPI RtlExpandEnvironmentStrings_U(PCWSTR, const UNICODE_STRING*, UNICODE_STRING*, ULONG*);
2312 NTSYSAPI LONGLONG WINAPI RtlExtendedMagicDivide(LONGLONG,LONGLONG,INT);
2313 NTSYSAPI LONGLONG WINAPI RtlExtendedIntegerMultiply(LONGLONG,INT);
2314 NTSYSAPI LONGLONG WINAPI RtlExtendedLargeIntegerDivide(LONGLONG,INT,INT *);
2315 NTSYSAPI NTSTATUS WINAPI RtlFindActivationContextSectionString(ULONG,const GUID*,ULONG,const UNICODE_STRING*,PVOID);
2316 NTSYSAPI NTSTATUS WINAPI RtlFindCharInUnicodeString(int,const UNICODE_STRING*,const UNICODE_STRING*,USHORT*);
2317 NTSYSAPI ULONG WINAPI RtlFindClearBits(PCRTL_BITMAP,ULONG,ULONG);
2318 NTSYSAPI ULONG WINAPI RtlFindClearBitsAndSet(PRTL_BITMAP,ULONG,ULONG);
2319 NTSYSAPI ULONG WINAPI RtlFindClearRuns(PCRTL_BITMAP,PRTL_BITMAP_RUN,ULONG,BOOLEAN);
2320 NTSYSAPI ULONG WINAPI RtlFindLastBackwardRunSet(PCRTL_BITMAP,ULONG,PULONG);
2321 NTSYSAPI ULONG WINAPI RtlFindLastBackwardRunClear(PCRTL_BITMAP,ULONG,PULONG);
2322 NTSYSAPI CCHAR WINAPI RtlFindLeastSignificantBit(ULONGLONG);
2323 NTSYSAPI ULONG WINAPI RtlFindLongestRunSet(PCRTL_BITMAP,PULONG);
2324 NTSYSAPI ULONG WINAPI RtlFindLongestRunClear(PCRTL_BITMAP,PULONG);
2325 NTSYSAPI NTSTATUS WINAPI RtlFindMessage(HMODULE,ULONG,ULONG,ULONG,const MESSAGE_RESOURCE_ENTRY**);
2326 NTSYSAPI CCHAR WINAPI RtlFindMostSignificantBit(ULONGLONG);
2327 NTSYSAPI ULONG WINAPI RtlFindNextForwardRunSet(PCRTL_BITMAP,ULONG,PULONG);
2328 NTSYSAPI ULONG WINAPI RtlFindNextForwardRunClear(PCRTL_BITMAP,ULONG,PULONG);
2329 NTSYSAPI ULONG WINAPI RtlFindSetBits(PCRTL_BITMAP,ULONG,ULONG);
2330 NTSYSAPI ULONG WINAPI RtlFindSetBitsAndClear(PRTL_BITMAP,ULONG,ULONG);
2331 NTSYSAPI ULONG WINAPI RtlFindSetRuns(PCRTL_BITMAP,PRTL_BITMAP_RUN,ULONG,BOOLEAN);
2332 NTSYSAPI BOOLEAN WINAPI RtlFirstFreeAce(PACL,PACE_HEADER *);
2333 NTSYSAPI NTSTATUS WINAPI RtlFormatCurrentUserKeyPath(PUNICODE_STRING);
2334 NTSYSAPI NTSTATUS WINAPI RtlFormatMessage(LPWSTR,UCHAR,BOOLEAN,BOOLEAN,BOOLEAN,va_list *,LPWSTR,ULONG);
2335 NTSYSAPI void WINAPI RtlFreeAnsiString(PANSI_STRING);
2336 NTSYSAPI BOOLEAN WINAPI RtlFreeHandle(RTL_HANDLE_TABLE *,RTL_HANDLE *);
2337 NTSYSAPI BOOLEAN WINAPI RtlFreeHeap(HANDLE,ULONG,PVOID);
2338 NTSYSAPI void WINAPI RtlFreeOemString(POEM_STRING);
2339 NTSYSAPI DWORD WINAPI RtlFreeSid(PSID);
2340 NTSYSAPI void WINAPI RtlFreeThreadActivationContextStack(void);
2341 NTSYSAPI void WINAPI RtlFreeUnicodeString(PUNICODE_STRING);
2342 NTSYSAPI NTSTATUS WINAPI RtlGetAce(PACL,DWORD,LPVOID *);
2343 NTSYSAPI NTSTATUS WINAPI RtlGetActiveActivationContext(HANDLE*);
2344 NTSYSAPI NTSTATUS WINAPI RtlGetControlSecurityDescriptor(PSECURITY_DESCRIPTOR, PSECURITY_DESCRIPTOR_CONTROL,LPDWORD);
2345 NTSYSAPI NTSTATUS WINAPI RtlGetCurrentDirectory_U(ULONG, LPWSTR);
2346 NTSYSAPI PEB * WINAPI RtlGetCurrentPeb(void);
2347 NTSYSAPI NTSTATUS WINAPI RtlGetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR,PBOOLEAN,PACL *,PBOOLEAN);
2348 NTSYSAPI ULONG WINAPI RtlGetFullPathName_U(PCWSTR,ULONG,PWSTR,PWSTR*);
2349 NTSYSAPI NTSTATUS WINAPI RtlGetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID *,PBOOLEAN);
2350 NTSYSAPI NTSTATUS WINAPI RtlGetLastNtStatus(void);
2351 NTSYSAPI DWORD WINAPI RtlGetLastWin32Error(void);
2352 NTSYSAPI DWORD WINAPI RtlGetLongestNtPathLength(void);
2353 NTSYSAPI BOOLEAN WINAPI RtlGetNtProductType(LPDWORD);
2354 NTSYSAPI NTSTATUS WINAPI RtlGetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID *,PBOOLEAN);
2355 NTSYSAPI ULONG WINAPI RtlGetProcessHeaps(ULONG,HANDLE*);
2356 NTSYSAPI NTSTATUS WINAPI RtlGetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR,PBOOLEAN,PACL *,PBOOLEAN);
2357 NTSYSAPI NTSTATUS WINAPI RtlGetVersion(RTL_OSVERSIONINFOEXW*);
2358 NTSYSAPI NTSTATUS WINAPI RtlGUIDFromString(PUNICODE_STRING,GUID*);
2359 NTSYSAPI PSID_IDENTIFIER_AUTHORITY WINAPI RtlIdentifierAuthoritySid(PSID);
2360 NTSYSAPI PVOID WINAPI RtlImageDirectoryEntryToData(HMODULE,BOOL,WORD,ULONG *);
2361 NTSYSAPI PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE);
2362 NTSYSAPI PIMAGE_SECTION_HEADER WINAPI RtlImageRvaToSection(const IMAGE_NT_HEADERS *,HMODULE,DWORD);
2363 NTSYSAPI PVOID WINAPI RtlImageRvaToVa(const IMAGE_NT_HEADERS *,HMODULE,DWORD,IMAGE_SECTION_HEADER **);
2364 NTSYSAPI NTSTATUS WINAPI RtlImpersonateSelf(SECURITY_IMPERSONATION_LEVEL);
2365 NTSYSAPI void WINAPI RtlInitString(PSTRING,PCSZ);
2366 NTSYSAPI void WINAPI RtlInitAnsiString(PANSI_STRING,PCSZ);
2367 NTSYSAPI NTSTATUS WINAPI RtlInitAnsiStringEx(PANSI_STRING,PCSZ);
2368 NTSYSAPI void WINAPI RtlInitUnicodeString(PUNICODE_STRING,PCWSTR);
2369 NTSYSAPI NTSTATUS WINAPI RtlInitUnicodeStringEx(PUNICODE_STRING,PCWSTR);
2370 NTSYSAPI NTSTATUS WINAPI RtlInitializeCriticalSection(RTL_CRITICAL_SECTION *);
2371 NTSYSAPI NTSTATUS WINAPI RtlInitializeCriticalSectionAndSpinCount(RTL_CRITICAL_SECTION *,ULONG);
2372 NTSYSAPI NTSTATUS WINAPI RtlInitializeCriticalSectionEx(RTL_CRITICAL_SECTION *,ULONG,ULONG);
2373 NTSYSAPI void WINAPI RtlInitializeBitMap(PRTL_BITMAP,PULONG,ULONG);
2374 NTSYSAPI void WINAPI RtlInitializeHandleTable(ULONG,ULONG,RTL_HANDLE_TABLE *);
2375 NTSYSAPI void WINAPI RtlInitializeResource(LPRTL_RWLOCK);
2376 NTSYSAPI BOOL WINAPI RtlInitializeSid(PSID,PSID_IDENTIFIER_AUTHORITY,BYTE);
2377 NTSYSAPI NTSTATUS WINAPI RtlInt64ToUnicodeString(ULONGLONG,ULONG,UNICODE_STRING *);
2378 NTSYSAPI NTSTATUS WINAPI RtlIntegerToChar(ULONG,ULONG,ULONG,PCHAR);
2379 NTSYSAPI NTSTATUS WINAPI RtlIntegerToUnicodeString(ULONG,ULONG,UNICODE_STRING *);
2380 NTSYSAPI BOOLEAN WINAPI RtlIsActivationContextActive(HANDLE);
2381 NTSYSAPI ULONG WINAPI RtlIsDosDeviceName_U(PCWSTR);
2382 NTSYSAPI BOOLEAN WINAPI RtlIsNameLegalDOS8Dot3(const UNICODE_STRING*,POEM_STRING,PBOOLEAN);
2383 NTSYSAPI BOOLEAN WINAPI RtlIsTextUnicode(LPCVOID,INT,INT *);
2384 NTSYSAPI BOOLEAN WINAPI RtlIsValidHandle(const RTL_HANDLE_TABLE *, const RTL_HANDLE *);
2385 NTSYSAPI BOOLEAN WINAPI RtlIsValidIndexHandle(const RTL_HANDLE_TABLE *, ULONG Index, RTL_HANDLE **);
2386 NTSYSAPI LONGLONG WINAPI RtlLargeIntegerAdd(LONGLONG,LONGLONG);
2387 NTSYSAPI LONGLONG WINAPI RtlLargeIntegerArithmeticShift(LONGLONG,INT);
2388 NTSYSAPI ULONGLONG WINAPI RtlLargeIntegerDivide( ULONGLONG,ULONGLONG,ULONGLONG *);
2389 NTSYSAPI LONGLONG WINAPI RtlLargeIntegerNegate(LONGLONG);
2390 NTSYSAPI LONGLONG WINAPI RtlLargeIntegerShiftLeft(LONGLONG,INT);
2391 NTSYSAPI LONGLONG WINAPI RtlLargeIntegerShiftRight(LONGLONG,INT);
2392 NTSYSAPI LONGLONG WINAPI RtlLargeIntegerSubtract(LONGLONG,LONGLONG);
2393 NTSYSAPI NTSTATUS WINAPI RtlLargeIntegerToChar(const ULONGLONG *,ULONG,ULONG,PCHAR);
2394 NTSYSAPI NTSTATUS WINAPI RtlLeaveCriticalSection(RTL_CRITICAL_SECTION *);
2395 NTSYSAPI DWORD WINAPI RtlLengthRequiredSid(DWORD);
2396 NTSYSAPI ULONG WINAPI RtlLengthSecurityDescriptor(PSECURITY_DESCRIPTOR);
2397 NTSYSAPI DWORD WINAPI RtlLengthSid(PSID);
2398 NTSYSAPI NTSTATUS WINAPI RtlLocalTimeToSystemTime(const LARGE_INTEGER*,PLARGE_INTEGER);
2399 NTSYSAPI BOOLEAN WINAPI RtlLockHeap(HANDLE);
2400 NTSYSAPI NTSTATUS WINAPI RtlLookupAtomInAtomTable(RTL_ATOM_TABLE,const WCHAR*,RTL_ATOM*);
2401 NTSYSAPI NTSTATUS WINAPI RtlMakeSelfRelativeSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,LPDWORD);
2402 NTSYSAPI void WINAPI RtlMapGenericMask(PACCESS_MASK,const GENERIC_MAPPING*);
2403 NTSYSAPI NTSTATUS WINAPI RtlMultiByteToUnicodeN(LPWSTR,DWORD,LPDWORD,LPCSTR,DWORD);
2404 NTSYSAPI NTSTATUS WINAPI RtlMultiByteToUnicodeSize(DWORD*,LPCSTR,UINT);
2405 NTSYSAPI NTSTATUS WINAPI RtlNewSecurityObject(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR*,BOOLEAN,HANDLE,PGENERIC_MAPPING);
2406 NTSYSAPI PRTL_USER_PROCESS_PARAMETERS WINAPI RtlNormalizeProcessParams(RTL_USER_PROCESS_PARAMETERS*);
2407 NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS);
2408 NTSYSAPI ULONG WINAPI RtlNtStatusToDosErrorNoTeb(NTSTATUS);
2409 NTSYSAPI ULONG WINAPI RtlNumberOfSetBits(PCRTL_BITMAP);
2410 NTSYSAPI ULONG WINAPI RtlNumberOfClearBits(PCRTL_BITMAP);
2411 NTSYSAPI UINT WINAPI RtlOemStringToUnicodeSize(const STRING*);
2412 NTSYSAPI NTSTATUS WINAPI RtlOemStringToUnicodeString(UNICODE_STRING*,const STRING*,BOOLEAN);
2413 NTSYSAPI NTSTATUS WINAPI RtlOemToUnicodeN(LPWSTR,DWORD,LPDWORD,LPCSTR,DWORD);
2414 NTSYSAPI NTSTATUS WINAPI RtlOpenCurrentUser(ACCESS_MASK,PHANDLE);
2415 NTSYSAPI PVOID WINAPI RtlPcToFileHeader(PVOID,PVOID*);
2416 NTSYSAPI NTSTATUS WINAPI RtlPinAtomInAtomTable(RTL_ATOM_TABLE,RTL_ATOM);
2417 NTSYSAPI BOOLEAN WINAPI RtlPrefixString(const STRING*,const STRING*,BOOLEAN);
2418 NTSYSAPI BOOLEAN WINAPI RtlPrefixUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
2419 NTSYSAPI NTSTATUS WINAPI RtlQueryAtomInAtomTable(RTL_ATOM_TABLE,RTL_ATOM,ULONG*,ULONG*,WCHAR*,ULONG*);
2420 NTSYSAPI NTSTATUS WINAPI RtlQueryEnvironmentVariable_U(PWSTR,PUNICODE_STRING,PUNICODE_STRING);
2421 NTSYSAPI NTSTATUS WINAPI RtlQueryInformationAcl(PACL,LPVOID,DWORD,ACL_INFORMATION_CLASS);
2422 NTSYSAPI NTSTATUS WINAPI RtlQueryInformationActivationContext(ULONG,HANDLE,PVOID,ULONG,PVOID,SIZE_T,SIZE_T*);
2423 NTSYSAPI NTSTATUS WINAPI RtlQueryProcessDebugInformation(ULONG,ULONG,PDEBUG_BUFFER);
2424 NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID);
2425 NTSYSAPI NTSTATUS WINAPI RtlQueryTimeZoneInformation(RTL_TIME_ZONE_INFORMATION*);
2426 NTSYSAPI NTSTATUS WINAPI RtlQueueWorkItem(PRTL_WORK_ITEM_ROUTINE,PVOID,ULONG);
2427 NTSYSAPI void WINAPI RtlRaiseException(PEXCEPTION_RECORD);
2428 NTSYSAPI void WINAPI RtlRaiseStatus(NTSTATUS);
2429 NTSYSAPI ULONG WINAPI RtlRandom(PULONG);
2430 NTSYSAPI PVOID WINAPI RtlReAllocateHeap(HANDLE,ULONG,PVOID,SIZE_T);
2431 NTSYSAPI NTSTATUS WINAPI RtlRegisterWait(PHANDLE,HANDLE,RTL_WAITORTIMERCALLBACKFUNC,PVOID,ULONG,ULONG);
2432 NTSYSAPI void WINAPI RtlReleaseActivationContext(HANDLE);
2433 NTSYSAPI void WINAPI RtlReleasePebLock(void);
2434 NTSYSAPI void WINAPI RtlReleaseResource(LPRTL_RWLOCK);
2435 NTSYSAPI ULONG WINAPI RtlRemoveVectoredExceptionHandler(PVOID);
2436 NTSYSAPI void WINAPI RtlRestoreLastWin32Error(DWORD);
2437 NTSYSAPI void WINAPI RtlSecondsSince1970ToTime(DWORD,LARGE_INTEGER *);
2438 NTSYSAPI void WINAPI RtlSecondsSince1980ToTime(DWORD,LARGE_INTEGER *);
2439 NTSYSAPI NTSTATUS WINAPI RtlSelfRelativeToAbsoluteSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PDWORD,PACL,PDWORD,PACL,PDWORD,PSID,PDWORD,PSID,PDWORD);
2440 NTSYSAPI void WINAPI RtlSetAllBits(PRTL_BITMAP);
2441 NTSYSAPI void WINAPI RtlSetBits(PRTL_BITMAP,ULONG,ULONG);
2442 NTSYSAPI ULONG WINAPI RtlSetCriticalSectionSpinCount(RTL_CRITICAL_SECTION*,ULONG);
2443 NTSYSAPI NTSTATUS WINAPI RtlSetControlSecurityDescriptor(PSECURITY_DESCRIPTOR,SECURITY_DESCRIPTOR_CONTROL,SECURITY_DESCRIPTOR_CONTROL);
2444 NTSYSAPI NTSTATUS WINAPI RtlSetCurrentDirectory_U(const UNICODE_STRING*);
2445 NTSYSAPI void WINAPI RtlSetCurrentEnvironment(PWSTR, PWSTR*);
2446 NTSYSAPI NTSTATUS WINAPI RtlSetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR,BOOLEAN,PACL,BOOLEAN);
2447 NTSYSAPI NTSTATUS WINAPI RtlSetEnvironmentVariable(PWSTR*,PUNICODE_STRING,PUNICODE_STRING);
2448 NTSYSAPI NTSTATUS WINAPI RtlSetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID,BOOLEAN);
2449 NTSYSAPI NTSTATUS WINAPI RtlSetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID,BOOLEAN);
2450 NTSYSAPI NTSTATUS WINAPI RtlSetIoCompletionCallback(HANDLE,PRTL_OVERLAPPED_COMPLETION_ROUTINE,ULONG);
2451 NTSYSAPI void WINAPI RtlSetLastWin32Error(DWORD);
2452 NTSYSAPI void WINAPI RtlSetLastWin32ErrorAndNtStatusFromNtStatus(NTSTATUS);
2453 NTSYSAPI NTSTATUS WINAPI RtlSetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR,BOOLEAN,PACL,BOOLEAN);
2454 NTSYSAPI NTSTATUS WINAPI RtlSetTimeZoneInformation(const RTL_TIME_ZONE_INFORMATION*);
2455 NTSYSAPI SIZE_T WINAPI RtlSizeHeap(HANDLE,ULONG,const void*);
2456 NTSYSAPI NTSTATUS WINAPI RtlStringFromGUID(REFGUID,PUNICODE_STRING);
2457 NTSYSAPI LPDWORD WINAPI RtlSubAuthoritySid(PSID,DWORD);
2458 NTSYSAPI LPBYTE WINAPI RtlSubAuthorityCountSid(PSID);
2459 NTSYSAPI NTSTATUS WINAPI RtlSystemTimeToLocalTime(const LARGE_INTEGER*,PLARGE_INTEGER);
2460 NTSYSAPI void WINAPI RtlTimeToTimeFields(const LARGE_INTEGER*,PTIME_FIELDS);
2461 NTSYSAPI BOOLEAN WINAPI RtlTimeFieldsToTime(PTIME_FIELDS,PLARGE_INTEGER);
2462 NTSYSAPI void WINAPI RtlTimeToElapsedTimeFields(const LARGE_INTEGER *,PTIME_FIELDS);
2463 NTSYSAPI BOOLEAN WINAPI RtlTimeToSecondsSince1970(const LARGE_INTEGER *,LPDWORD);
2464 NTSYSAPI BOOLEAN WINAPI RtlTimeToSecondsSince1980(const LARGE_INTEGER *,LPDWORD);
2465 NTSYSAPI BOOL WINAPI RtlTryEnterCriticalSection(RTL_CRITICAL_SECTION *);
2466 NTSYSAPI ULONGLONG __cdecl RtlUlonglongByteSwap(ULONGLONG);
2467 NTSYSAPI DWORD WINAPI RtlUnicodeStringToAnsiSize(const UNICODE_STRING*);
2468 NTSYSAPI NTSTATUS WINAPI RtlUnicodeStringToAnsiString(PANSI_STRING,PCUNICODE_STRING,BOOLEAN);
2469 NTSYSAPI NTSTATUS WINAPI RtlUnicodeStringToInteger(const UNICODE_STRING *,ULONG,ULONG *);
2470 NTSYSAPI DWORD WINAPI RtlUnicodeStringToOemSize(const UNICODE_STRING*);
2471 NTSYSAPI NTSTATUS WINAPI RtlUnicodeStringToOemString(POEM_STRING,PCUNICODE_STRING,BOOLEAN);
2472 NTSYSAPI NTSTATUS WINAPI RtlUnicodeToMultiByteN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
2473 NTSYSAPI NTSTATUS WINAPI RtlUnicodeToMultiByteSize(PULONG,PCWSTR,ULONG);
2474 NTSYSAPI NTSTATUS WINAPI RtlUnicodeToOemN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
2475 NTSYSAPI ULONG WINAPI RtlUniform(PULONG);
2476 NTSYSAPI BOOLEAN WINAPI RtlUnlockHeap(HANDLE);
2477 NTSYSAPI void WINAPI RtlUnwind(PVOID,PVOID,PEXCEPTION_RECORD,PVOID);
2479 NTSYSAPI void WINAPI RtlUnwind2(FRAME_POINTERS,PVOID,PEXCEPTION_RECORD,PVOID,PCONTEXT);
2480 NTSYSAPI void WINAPI RtlUnwindEx(FRAME_POINTERS,PVOID,PEXCEPTION_RECORD,PVOID,PCONTEXT,PUNWIND_HISTORY_TABLE);
2482 NTSYSAPI WCHAR WINAPI RtlUpcaseUnicodeChar(WCHAR);
2483 NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeString(UNICODE_STRING*,const UNICODE_STRING *,BOOLEAN);
2484 NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeStringToAnsiString(STRING*,const UNICODE_STRING*,BOOLEAN);
2485 NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeStringToCountedOemString(STRING*,const UNICODE_STRING*,BOOLEAN);
2486 NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeStringToOemString(STRING*,const UNICODE_STRING*,BOOLEAN);
2487 NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeToMultiByteN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
2488 NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeToOemN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
2489 NTSYSAPI NTSTATUS WINAPI RtlUpdateTimer(HANDLE, HANDLE, DWORD, DWORD);
2490 NTSYSAPI CHAR WINAPI RtlUpperChar(CHAR);
2491 NTSYSAPI void WINAPI RtlUpperString(STRING *,const STRING *);
2492 NTSYSAPI NTSTATUS WINAPI RtlValidSecurityDescriptor(PSECURITY_DESCRIPTOR);
2493 NTSYSAPI BOOLEAN WINAPI RtlValidAcl(PACL);
2494 NTSYSAPI BOOLEAN WINAPI RtlValidSid(PSID);
2495 NTSYSAPI BOOLEAN WINAPI RtlValidateHeap(HANDLE,ULONG,LPCVOID);
2496 NTSYSAPI NTSTATUS WINAPI RtlVerifyVersionInfo(const RTL_OSVERSIONINFOEXW*,DWORD,DWORDLONG);
2497 NTSYSAPI NTSTATUS WINAPI RtlWalkHeap(HANDLE,PVOID);
2498 NTSYSAPI NTSTATUS WINAPI RtlWriteRegistryValue(ULONG,PCWSTR,PCWSTR,ULONG,PVOID,ULONG);
2499 NTSYSAPI NTSTATUS WINAPI RtlpNtCreateKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,PULONG);
2500 NTSYSAPI NTSTATUS WINAPI RtlpNtEnumerateSubKey(HANDLE,UNICODE_STRING *, ULONG);
2501 NTSYSAPI NTSTATUS WINAPI RtlpWaitForCriticalSection(RTL_CRITICAL_SECTION *);
2502 NTSYSAPI NTSTATUS WINAPI RtlpUnWaitCriticalSection(RTL_CRITICAL_SECTION *);
2503 NTSYSAPI NTSTATUS WINAPI vDbgPrintEx(ULONG,ULONG,LPCSTR,va_list);
2504 NTSYSAPI NTSTATUS WINAPI vDbgPrintExWithPrefix(LPCSTR,ULONG,ULONG,LPCSTR,va_list);
2506 /* Wine internal functions */
2508 NTSYSAPI NTSTATUS wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRING *unix_name_ret,
2509 UINT disposition, BOOLEAN check_case );
2510 NTSYSAPI NTSTATUS wine_unix_to_nt_file_name( const ANSI_STRING *name, UNICODE_STRING *nt );
2513 /***********************************************************************
2517 #define InitializeObjectAttributes(p,n,a,r,s) \
2519 (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
2520 (p)->RootDirectory = r; \
2521 (p)->Attributes = a; \
2522 (p)->ObjectName = n; \
2523 (p)->SecurityDescriptor = s; \
2524 (p)->SecurityQualityOfService = NULL; \
2527 #define NtCurrentProcess() ((HANDLE)-1)
2529 #define RtlFillMemory(Destination,Length,Fill) memset((Destination),(Fill),(Length))
2530 #define RtlMoveMemory(Destination,Source,Length) memmove((Destination),(Source),(Length))
2531 #define RtlStoreUlong(p,v) do { ULONG _v = (v); memcpy((p), &_v, sizeof(_v)); } while (0)
2532 #define RtlStoreUlonglong(p,v) do { ULONGLONG _v = (v); memcpy((p), &_v, sizeof(_v)); } while (0)
2533 #define RtlRetrieveUlong(p,s) memcpy((p), (s), sizeof(ULONG))
2534 #define RtlRetrieveUlonglong(p,s) memcpy((p), (s), sizeof(ULONGLONG))
2535 #define RtlZeroMemory(Destination,Length) memset((Destination),0,(Length))
2537 static inline BOOLEAN RtlCheckBit(PCRTL_BITMAP lpBits, ULONG ulBit)
2539 if (lpBits && ulBit < lpBits->SizeOfBitMap &&
2540 lpBits->Buffer[ulBit >> 5] & (1 << (ulBit & 31)))
2545 /* These are implemented as __fastcall, so we can't let Winelib apps link with them */
2546 static inline USHORT RtlUshortByteSwap(USHORT s)
2548 return (s >> 8) | (s << 8);
2550 static inline ULONG RtlUlongByteSwap(ULONG i)
2552 #if defined(__i386__) && defined(__GNUC__)
2554 __asm__("bswap %0" : "=r" (ret) : "0" (i) );
2557 return ((ULONG)RtlUshortByteSwap((USHORT)i) << 16) | RtlUshortByteSwap((USHORT)(i >> 16));
2561 /* list manipulation macros */
2562 #define InitializeListHead(le) (void)((le)->Flink = (le)->Blink = (le))
2563 #define InsertHeadList(le,e) do { PLIST_ENTRY f = (le)->Flink; (e)->Flink = f; (e)->Blink = (le); f->Blink = (e); (le)->Flink = (e); } while (0)
2564 #define InsertTailList(le,e) do { PLIST_ENTRY b = (le)->Blink; (e)->Flink = (le); (e)->Blink = b; b->Flink = (e); (le)->Blink = (e); } while (0)
2565 #define IsListEmpty(le) ((le)->Flink == (le))
2566 #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)
2567 static inline PLIST_ENTRY RemoveHeadList(PLIST_ENTRY le)
2569 PLIST_ENTRY f, b, e;
2572 f = le->Flink->Flink;
2573 b = le->Flink->Blink;
2577 if (e != le) e->Flink = e->Blink = NULL;
2580 static inline PLIST_ENTRY RemoveTailList(PLIST_ENTRY le)
2582 PLIST_ENTRY f, b, e;
2585 f = le->Blink->Flink;
2586 b = le->Blink->Blink;
2590 if (e != le) e->Flink = e->Blink = NULL;
2597 /* FIXME: private structure for vm86 mode, stored in teb->GdiTebBatch */
2602 } WINE_VM86_TEB_INFO;
2604 static inline WINE_VM86_TEB_INFO *get_vm86_teb_info(void)
2606 return (WINE_VM86_TEB_INFO *)&NtCurrentTeb()->GdiTebBatch;
2609 /* The thread information for 16-bit threads */
2610 /* NtCurrentTeb()->SubSystemTib points to this */
2613 void *unknown; /* 00 unknown */
2614 UNICODE_STRING *exe_name; /* 04 exe module name */
2616 /* the following fields do not exist under Windows */
2617 UNICODE_STRING exe_str; /* exe name string pointed to by exe_name */
2618 CURDIR curdir; /* current directory */
2619 WCHAR curdir_buffer[MAX_PATH];
2620 } WIN16_SUBSYSTEM_TIB;
2622 #endif /* __WINESRC__ */
2626 #endif /* defined(__cplusplus) */
2628 #endif /* __WINE_WINTERNL_H */