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