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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __WINE_WINTERNAL_H
22 #define __WINE_WINTERNAL_H
28 #endif /* defined(__cplusplus) */
31 /**********************************************************************
32 * Fundamental types and data structures
35 typedef LONG NTSTATUS
;
37 typedef CONST
char *PCSZ
;
40 typedef CSHORT
*PCSHORT
;
42 typedef struct _STRING
{
48 typedef STRING ANSI_STRING
;
49 typedef PSTRING PANSI_STRING
;
50 typedef const STRING
*PCANSI_STRING
;
52 typedef STRING OEM_STRING
;
53 typedef PSTRING POEM_STRING
;
54 typedef const STRING
*PCOEM_STRING
;
56 typedef struct _UNICODE_STRING
{
57 USHORT Length
; /* bytes */
58 USHORT MaximumLength
; /* bytes */
60 } UNICODE_STRING
, *PUNICODE_STRING
;
62 typedef const UNICODE_STRING
*PCUNICODE_STRING
;
64 typedef struct _CLIENT_ID
68 } CLIENT_ID
, *PCLIENT_ID
;
70 typedef struct _CURDIR
72 UNICODE_STRING DosPath
;
76 typedef struct RTL_DRIVE_LETTER_CURDIR
81 UNICODE_STRING DosPath
;
82 } RTL_DRIVE_LETTER_CURDIR
, *PRTL_DRIVE_LETTER_CURDIR
;
84 typedef struct tagRTL_BITMAP
{
85 ULONG SizeOfBitMap
; /* Number of bits in the bitmap */
86 LPBYTE BitMapBuffer
; /* Bitmap data, assumed sized to a DWORD boundary */
87 } RTL_BITMAP
, *PRTL_BITMAP
;
89 typedef const RTL_BITMAP
*PCRTL_BITMAP
;
91 typedef struct tagRTL_BITMAP_RUN
{
92 ULONG StartOfRun
; /* Bit position at which run starts - FIXME: Name? */
93 ULONG SizeOfRun
; /* Size of the run in bits - FIXME: Name? */
94 } RTL_BITMAP_RUN
, *PRTL_BITMAP_RUN
;
96 typedef const RTL_BITMAP_RUN
*PCRTL_BITMAP_RUN
;
98 typedef struct _RTL_USER_PROCESS_PARAMETERS
100 ULONG AllocationSize
;
109 CURDIR CurrentDirectory
;
110 UNICODE_STRING DllPath
;
111 UNICODE_STRING ImagePathName
;
112 UNICODE_STRING CommandLine
;
120 ULONG dwFillAttribute
;
123 UNICODE_STRING WindowTitle
;
124 UNICODE_STRING Desktop
;
125 UNICODE_STRING ShellInfo
;
126 UNICODE_STRING RuntimeInfo
;
127 RTL_DRIVE_LETTER_CURDIR DLCurrentDirectory
[0x20];
128 } RTL_USER_PROCESS_PARAMETERS
, *PRTL_USER_PROCESS_PARAMETERS
;
130 /* value for Flags field (FIXME: not the correct name) */
131 #define PROCESS_PARAMS_FLAG_NORMALIZED 1
133 typedef struct _PEB_LDR_DATA
138 LIST_ENTRY InLoadOrderModuleList
;
139 LIST_ENTRY InMemoryOrderModuleList
;
140 LIST_ENTRY InInitializationOrderModuleList
;
141 } PEB_LDR_DATA
, *PPEB_LDR_DATA
;
143 /***********************************************************************
148 BYTE Reserved1
[2]; /* 00 */
149 BYTE BeingDebugged
; /* 02 */
150 BYTE Reserved2
[5]; /* 03 */
151 HMODULE ImageBaseAddress
; /* 08 */
152 PPEB_LDR_DATA LdrData
; /* 0c */
153 RTL_USER_PROCESS_PARAMETERS
*ProcessParameters
; /* 10 */
154 PVOID __pad_14
; /* 14 */
155 HANDLE ProcessHeap
; /* 18 */
156 BYTE __pad_1c
[36]; /* 1c */
157 PRTL_BITMAP TlsBitmap
; /* 40 */
158 ULONG TlsBitmapBits
[2]; /* 44 */
159 BYTE __pad_4c
[24]; /* 4c */
160 ULONG NumberOfProcessors
; /* 64 */
161 BYTE __pad_68
[128]; /* 68 */
162 PVOID Reserved3
[59]; /* e8 */
163 ULONG SessionId
; /* 1d4 */
167 /***********************************************************************
170 #if defined(_NTSYSTEM_) || defined(_KERNEL32_) /* hack, should go away */
174 #ifndef WINE_NO_TEB /* don't define TEB if included from thread.h */
175 # ifndef WINE_TEB_DEFINED
176 # define WINE_TEB_DEFINED
179 NT_TIB Tib
; /* 000 */
180 PVOID EnvironmentPointer
; /* 01c */
181 CLIENT_ID ClientId
; /* 020 */
182 PVOID ActiveRpcHandle
; /* 028 */
183 PVOID ThreadLocalStoragePointer
; /* 02c */
185 ULONG LastErrorValue
; /* 034 */
186 BYTE __pad038
[140]; /* 038 */
187 ULONG CurrentLocale
; /* 0c4 */
188 BYTE __pad0c8
[1752]; /* 0c8 */
189 PVOID Reserved2
[278]; /* 7a0 */
190 UNICODE_STRING StaticUnicodeString
; /* bf8 used by advapi32 */
191 WCHAR StaticUnicodeBuffer
[261]; /* c00 used by advapi32 */
192 PVOID DeallocationStack
; /* e0c */
193 PVOID TlsSlots
[64]; /* e10 */
194 LIST_ENTRY TlsLinks
; /* f10 */
195 PVOID Reserved4
[26]; /* f18 */
196 PVOID ReservedForOle
; /* f80 Windows 2000 only */
197 PVOID Reserved5
[4]; /* f84 */
198 PVOID TlsExpansionSlots
; /* f94 */
200 # endif /* WINE_TEB_DEFINED */
201 #endif /* WINE_NO_TEB */
203 /***********************************************************************
207 typedef enum _FILE_INFORMATION_CLASS
{
208 FileDirectoryInformation
= 1,
209 FileFullDirectoryInformation
,
210 FileBothDirectoryInformation
,
211 FileBasicInformation
,
212 FileStandardInformation
,
213 FileInternalInformation
,
215 FileAccessInformation
,
217 FileRenameInformation
,
219 FileNamesInformation
,
220 FileDispositionInformation
,
221 FilePositionInformation
,
222 FileFullEaInformation
,
224 FileAlignmentInformation
,
226 FileAllocationInformation
,
227 FileEndOfFileInformation
,
228 FileAlternateNameInformation
,
229 FileStreamInformation
,
231 FilePipeLocalInformation
,
232 FilePipeRemoteInformation
,
233 FileMailslotQueryInformation
,
234 FileMailslotSetInformation
,
235 FileCompressionInformation
,
236 FileObjectIdInformation
,
237 FileCompletionInformation
,
238 FileMoveClusterInformation
,
239 FileQuotaInformation
,
240 FileReparsePointInformation
,
241 FileNetworkOpenInformation
,
242 FileAttributeTagInformation
,
243 FileTrackingInformation
,
244 FileMaximumInformation
245 } FILE_INFORMATION_CLASS
, *PFILE_INFORMATION_CLASS
;
247 typedef struct _FILE_DIRECTORY_INFORMATION
{
248 ULONG NextEntryOffset
;
250 LARGE_INTEGER CreationTime
;
251 LARGE_INTEGER LastAccessTime
;
252 LARGE_INTEGER LastWriteTime
;
253 LARGE_INTEGER ChangeTime
;
254 LARGE_INTEGER EndOfFile
;
255 LARGE_INTEGER AllocationSize
;
256 ULONG FileAttributes
;
257 ULONG FileNameLength
;
258 WCHAR FileName
[ANYSIZE_ARRAY
];
259 } FILE_DIRECTORY_INFORMATION
, *PFILE_DIRECTORY_INFORMATION
;
261 typedef struct _FILE_FULL_DIRECTORY_INFORMATION
{
262 ULONG NextEntryOffset
;
264 LARGE_INTEGER CreationTime
;
265 LARGE_INTEGER LastAccessTime
;
266 LARGE_INTEGER LastWriteTime
;
267 LARGE_INTEGER ChangeTime
;
268 LARGE_INTEGER EndOfFile
;
269 LARGE_INTEGER AllocationSize
;
270 ULONG FileAttributes
;
271 ULONG FileNameLength
;
273 WCHAR FileName
[ANYSIZE_ARRAY
];
274 } FILE_FULL_DIRECTORY_INFORMATION
, *PFILE_FULL_DIRECTORY_INFORMATION
,
275 FILE_FULL_DIR_INFORMATION
, *PFILE_FULL_DIR_INFORMATION
;
277 typedef struct _FILE_BOTH_DIRECTORY_INFORMATION
{
278 ULONG NextEntryOffset
;
280 LARGE_INTEGER CreationTime
;
281 LARGE_INTEGER LastAccessTime
;
282 LARGE_INTEGER LastWriteTime
;
283 LARGE_INTEGER ChangeTime
;
284 LARGE_INTEGER EndOfFile
;
285 LARGE_INTEGER AllocationSize
;
286 ULONG FileAttributes
;
287 ULONG FileNameLength
;
289 CHAR ShortNameLength
;
291 WCHAR FileName
[ANYSIZE_ARRAY
];
292 } FILE_BOTH_DIRECTORY_INFORMATION
, *PFILE_BOTH_DIRECTORY_INFORMATION
,
293 FILE_BOTH_DIR_INFORMATION
, *PFILE_BOTH_DIR_INFORMATION
;
295 typedef struct _FILE_BASIC_INFORMATION
{
296 LARGE_INTEGER CreationTime
;
297 LARGE_INTEGER LastAccessTime
;
298 LARGE_INTEGER LastWriteTime
;
299 LARGE_INTEGER ChangeTime
;
300 ULONG FileAttributes
;
301 } FILE_BASIC_INFORMATION
, *PFILE_BASIC_INFORMATION
;
303 typedef struct _FILE_STANDARD_INFORMATION
{
304 LARGE_INTEGER AllocationSize
;
305 LARGE_INTEGER EndOfFile
;
307 BOOLEAN DeletePending
;
309 } FILE_STANDARD_INFORMATION
, *PFILE_STANDARD_INFORMATION
;
311 typedef struct _FILE_INTERNAL_INFORMATION
{
312 LARGE_INTEGER IndexNumber
;
313 } FILE_INTERNAL_INFORMATION
, *PFILE_INTERNAL_INFORMATION
;
315 typedef struct _FILE_EA_INFORMATION
{
317 } FILE_EA_INFORMATION
, *PFILE_EA_INFORMATION
;
319 typedef struct _FILE_ACCESS_INFORMATION
{
320 ACCESS_MASK AccessFlags
;
321 } FILE_ACCESS_INFORMATION
, *PFILE_ACCESS_INFORMATION
;
323 typedef struct _FILE_NAME_INFORMATION
{
324 ULONG FileNameLength
;
326 } FILE_NAME_INFORMATION
, *PFILE_NAME_INFORMATION
;
328 typedef struct _FILE_RENAME_INFORMATION
{
331 ULONG FileNameLength
;
333 } FILE_RENAME_INFORMATION
, *PFILE_RENAME_INFORMATION
;
335 typedef struct _FILE_NAMES_INFORMATION
{
336 ULONG NextEntryOffset
;
338 ULONG FileNameLength
;
340 } FILE_NAMES_INFORMATION
, *PFILE_NAMES_INFORMATION
;
342 typedef struct _FILE_DISPOSITION_INFORMATION
{
343 BOOLEAN DoDeleteFile
;
344 } FILE_DISPOSITION_INFORMATION
, *PFILE_DISPOSITION_INFORMATION
;
346 typedef struct _FILE_POSITION_INFORMATION
{
347 LARGE_INTEGER CurrentByteOffset
;
348 } FILE_POSITION_INFORMATION
, *PFILE_POSITION_INFORMATION
;
350 typedef struct _FILE_ALIGNMENT_INFORMATION
{
351 ULONG AlignmentRequirement
;
352 } FILE_ALIGNMENT_INFORMATION
, *PFILE_ALIGNMENT_INFORMATION
;
354 typedef struct _FILE_ALLOCATION_INFORMATION
{
355 LARGE_INTEGER AllocationSize
;
356 } FILE_ALLOCATION_INFORMATION
, *PFILE_ALLOCATION_INFORMATION
;
358 typedef struct _FILE_END_OF_FILE_INFORMATION
{
359 LARGE_INTEGER EndOfFile
;
360 } FILE_END_OF_FILE_INFORMATION
, *PFILE_END_OF_FILE_INFORMATION
;
362 typedef struct _FILE_NETWORK_OPEN_INFORMATION
{
363 LARGE_INTEGER CreationTime
;
364 LARGE_INTEGER LastAccessTime
;
365 LARGE_INTEGER LastWriteTime
;
366 LARGE_INTEGER ChangeTime
;
367 LARGE_INTEGER AllocationSize
;
368 LARGE_INTEGER EndOfFile
;
369 ULONG FileAttributes
;
370 } FILE_NETWORK_OPEN_INFORMATION
, *PFILE_NETWORK_OPEN_INFORMATION
;
372 typedef struct _FILE_FULL_EA_INFORMATION
{
373 ULONG NextEntryOffset
;
376 USHORT EaValueLength
;
378 } FILE_FULL_EA_INFORMATION
, *PFILE_FULL_EA_INFORMATION
;
380 typedef struct _FILE_MODE_INFORMATION
{
382 } FILE_MODE_INFORMATION
, *PFILE_MODE_INFORMATION
;
384 typedef struct _FILE_STREAM_INFORMATION
386 ULONG NextEntryOffset
;
387 ULONG StreamNameLength
;
388 LARGE_INTEGER StreamSize
;
389 LARGE_INTEGER StreamAllocationSize
;
391 } FILE_STREAM_INFORMATION
, *PFILE_STREAM_INFORMATION
;
393 typedef struct _FILE_ATTRIBUTE_TAG_INFORMATION
395 ULONG FileAttributes
;
397 } FILE_ATTRIBUTE_TAG_INFORMATION
, *PFILE_ATTRIBUTE_TAG_INFORMATION
;
399 typedef struct _FILE_ALL_INFORMATION
401 FILE_BASIC_INFORMATION BasicInformation
;
402 FILE_STANDARD_INFORMATION StandardInformation
;
403 FILE_INTERNAL_INFORMATION InternalInformation
;
404 FILE_EA_INFORMATION EaInformation
;
405 FILE_ACCESS_INFORMATION AccessInformation
;
406 FILE_POSITION_INFORMATION PositionInformation
;
407 FILE_MODE_INFORMATION ModeInformation
;
408 FILE_ALIGNMENT_INFORMATION AlignmentInformation
;
409 FILE_NAME_INFORMATION NameInformation
;
410 } FILE_ALL_INFORMATION
, *PFILE_ALL_INFORMATION
;
412 typedef enum _FSINFOCLASS
{
413 FileFsVolumeInformation
= 1,
414 FileFsLabelInformation
,
415 FileFsSizeInformation
,
416 FileFsDeviceInformation
,
417 FileFsAttributeInformation
,
418 FileFsControlInformation
,
419 FileFsFullSizeInformation
,
420 FileFsObjectIdInformation
,
421 FileFsMaximumInformation
422 } FS_INFORMATION_CLASS
, *PFS_INFORMATION_CLASS
;
424 typedef enum _KEY_INFORMATION_CLASS
{
428 } KEY_INFORMATION_CLASS
;
430 typedef enum _KEY_VALUE_INFORMATION_CLASS
{
431 KeyValueBasicInformation
,
432 KeyValueFullInformation
,
433 KeyValuePartialInformation
,
434 KeyValueFullInformationAlign64
,
435 KeyValuePartialInformationAlign64
436 } KEY_VALUE_INFORMATION_CLASS
;
438 typedef enum _OBJECT_INFORMATION_CLASS
{
439 ObjectBasicInformation
,
440 ObjectNameInformation
,
441 ObjectTypeInformation
,
442 ObjectAllInformation
,
443 ObjectDataInformation
444 } OBJECT_INFORMATION_CLASS
, *POBJECT_INFORMATION_CLASS
;
446 typedef enum _PROCESSINFOCLASS
{
447 ProcessBasicInformation
= 0,
448 ProcessQuotaLimits
= 1,
449 ProcessIoCounters
= 2,
450 ProcessVmCounters
= 3,
452 ProcessBasePriority
= 5,
453 ProcessRaisePriority
= 6,
454 ProcessDebugPort
= 7,
455 ProcessExceptionPort
= 8,
456 ProcessAccessToken
= 9,
457 ProcessLdtInformation
= 10,
459 ProcessDefaultHardErrorMode
= 12,
460 ProcessIoPortHandlers
= 13,
461 ProcessPooledUsageAndLimits
= 14,
462 ProcessWorkingSetWatch
= 15,
463 ProcessUserModeIOPL
= 16,
464 ProcessEnableAlignmentFaultFixup
= 17,
465 ProcessPriorityClass
= 18,
466 ProcessWx86Information
= 19,
467 ProcessHandleCount
= 20,
468 ProcessAffinityMask
= 21,
469 ProcessPriorityBoost
= 22,
470 ProcessDeviceMap
= 23,
471 ProcessSessionInformation
= 24,
472 ProcessForegroundInformation
= 25,
473 ProcessWow64Information
= 26,
477 typedef enum _SECTION_INHERIT
{
482 typedef enum SYSTEM_INFORMATION_CLASS
{
483 SystemBasicInformation
= 0,
485 SystemPerformanceInformation
= 2,
486 SystemTimeOfDayInformation
= 3, /* was SystemTimeInformation */
488 SystemProcessInformation
= 5,
491 SystemProcessorPerformanceInformation
= 8,
494 SystemDriverInformation
,
504 SystemCacheInformation
,
506 SystemInterruptInformation
= 23,
507 SystemDpcBehaviourInformation
= 24,
508 SystemFullMemoryInformation
= 25,
509 SystemNotImplemented6
= 25,
510 SystemLoadImage
= 26,
511 SystemUnloadImage
= 27,
512 SystemTimeAdjustmentInformation
= 28,
513 SystemTimeAdjustment
= 28,
514 SystemSummaryMemoryInformation
= 29,
515 SystemNotImplemented7
= 29,
516 SystemNextEventIdInformation
= 30,
517 SystemNotImplemented8
= 30,
518 SystemEventIdsInformation
= 31,
519 SystemCrashDumpInformation
= 32,
520 SystemExceptionInformation
= 33,
521 SystemCrashDumpStateInformation
= 34,
522 SystemKernelDebuggerInformation
= 35,
523 SystemContextSwitchInformation
= 36,
524 SystemRegistryQuotaInformation
= 37,
525 SystemCurrentTimeZoneInformation
= 44,
526 SystemTimeZoneInformation
= 44,
527 SystemLookasideInformation
= 45,
528 SystemSetTimeSlipEvent
= 46,
529 SystemCreateSession
= 47,
530 SystemDeleteSession
= 48,
531 SystemInvalidInfoClass4
= 49,
532 SystemRangeStartInformation
= 50,
533 SystemVerifierInformation
= 51,
534 SystemAddVerifier
= 52,
535 SystemSessionProcessesInformation
= 53,
536 SystemInformationClassMax
537 } SYSTEM_INFORMATION_CLASS
, *PSYSTEM_INFORMATION_CLASS
;
539 typedef enum _TIMER_TYPE
{
544 typedef enum _THREADINFOCLASS
{
545 ThreadBasicInformation
,
550 ThreadImpersonationToken
,
551 ThreadDescriptorTableEntry
,
552 ThreadEnableAlignmentFaultFixup
,
553 ThreadEventPair_Reusable
,
554 ThreadQuerySetWin32StartAddress
,
556 ThreadPerformanceCount
,
558 ThreadIdealProcessor
,
560 ThreadSetTlsArrayAddress
,
565 typedef struct _THREAD_BASIC_INFORMATION
568 PVOID TebBaseAddress
;
573 } THREAD_BASIC_INFORMATION
, *PTHREAD_BASIC_INFORMATION
;
576 typedef enum _WINSTATIONINFOCLASS
{
577 WinStationInformation
= 8
578 } WINSTATIONINFOCLASS
;
582 MemoryBasicInformation
= 0
583 } MEMORY_INFORMATION_CLASS
;
585 /* return type of RtlDetermineDosPathNameType_U (FIXME: not the correct names) */
589 UNC_PATH
, /* "//foo" */
590 ABSOLUTE_DRIVE_PATH
, /* "c:/foo" */
591 RELATIVE_DRIVE_PATH
, /* "c:foo" */
592 ABSOLUTE_PATH
, /* "/foo" */
593 RELATIVE_PATH
, /* "foo" */
594 DEVICE_PATH
, /* "//./foo" */
595 UNC_DOT_PATH
/* "//." */
598 /***********************************************************************
599 * IA64 specific types and data structures
604 typedef struct _FRAME_POINTERS
{
605 ULONGLONG MemoryStackFp
;
606 ULONGLONG BackingStoreFp
;
607 } FRAME_POINTERS
, *PFRAME_POINTERS
;
609 #define UNWIND_HISTORY_TABLE_SIZE 12
611 typedef struct _RUNTIME_FUNCTION
{
614 ULONG UnwindInfoAddress
;
615 } RUNTIME_FUNCTION
, *PRUNTIME_FUNCTION
;
617 typedef struct _UNWIND_HISTORY_TABLE_ENTRY
{
620 PRUNTIME_FUNCTION FunctionEntry
;
621 } UNWIND_HISTORY_TABLE_ENTRY
, *PUNWIND_HISTORY_TABLE_ENTRY
;
623 typedef struct _UNWIND_HISTORY_TABLE
{
628 UNWIND_HISTORY_TABLE_ENTRY Entry
[UNWIND_HISTORY_TABLE_SIZE
];
629 } UNWIND_HISTORY_TABLE
, *PUNWIND_HISTORY_TABLE
;
631 #endif /* defined(__ia64__) */
633 /***********************************************************************
634 * Types and data structures
637 /* This is used by NtQuerySystemInformation */
638 /* FIXME: Isn't THREAD_INFO and THREADINFO the same structure? */
640 FILETIME ftKernelTime
;
642 FILETIME ftCreateTime
;
644 DWORD dwStartAddress
;
647 DWORD dwCurrentPriority
;
648 DWORD dwBasePriority
;
649 DWORD dwContextSwitches
;
652 } THREADINFO
, *PTHREADINFO
;
654 /* FIXME: Isn't THREAD_INFO and THREADINFO the same structure? */
655 typedef struct _THREAD_INFO
{
662 } THREAD_INFO
, PTHREAD_INFO
;
664 /***********************************************************************
665 * Types and data structures
668 typedef struct _IO_STATUS_BLOCK
{
674 ULONG_PTR Information
;
675 } IO_STATUS_BLOCK
, *PIO_STATUS_BLOCK
;
677 typedef void (WINAPI
* PIO_APC_ROUTINE
)(PVOID
,PIO_STATUS_BLOCK
,ULONG
);
679 typedef struct _KEY_BASIC_INFORMATION
{
680 LARGE_INTEGER LastWriteTime
;
684 } KEY_BASIC_INFORMATION
, *PKEY_BASIC_INFORMATION
;
686 typedef struct _KEY_NODE_INFORMATION
688 LARGE_INTEGER LastWriteTime
;
695 } KEY_NODE_INFORMATION
, *PKEY_NODE_INFORMATION
;
697 typedef struct _KEY_FULL_INFORMATION
699 LARGE_INTEGER LastWriteTime
;
707 ULONG MaxValueNameLen
;
708 ULONG MaxValueDataLen
;
710 } KEY_FULL_INFORMATION
, *PKEY_FULL_INFORMATION
;
712 typedef struct _KEY_VALUE_ENTRY
714 PUNICODE_STRING ValueName
;
718 } KEY_VALUE_ENTRY
, *PKEY_VALUE_ENTRY
;
720 typedef struct _KEY_VALUE_BASIC_INFORMATION
{
725 } KEY_VALUE_BASIC_INFORMATION
, *PKEY_VALUE_BASIC_INFORMATION
;
727 typedef struct _KEY_VALUE_FULL_INFORMATION
{
734 } KEY_VALUE_FULL_INFORMATION
, *PKEY_VALUE_FULL_INFORMATION
;
736 typedef struct _KEY_VALUE_PARTIAL_INFORMATION
{
741 } KEY_VALUE_PARTIAL_INFORMATION
, *PKEY_VALUE_PARTIAL_INFORMATION
;
743 typedef struct _OBJECT_ATTRIBUTES
{
745 HANDLE RootDirectory
;
746 PUNICODE_STRING ObjectName
;
748 PVOID SecurityDescriptor
; /* type SECURITY_DESCRIPTOR */
749 PVOID SecurityQualityOfService
; /* type SECURITY_QUALITY_OF_SERVICE */
750 } OBJECT_ATTRIBUTES
, *POBJECT_ATTRIBUTES
;
752 typedef struct _OBJECT_DATA_INFORMATION
{
753 BOOLEAN InheritHandle
;
754 BOOLEAN ProtectFromClose
;
755 } OBJECT_DATA_INFORMATION
, *POBJECT_DATA_INFORMATION
;
757 typedef struct _PROCESS_BASIC_INFORMATION
{
760 DWORD PebBaseAddress
;
763 ULONG UniqueProcessId
;
764 ULONG InheritedFromUniqueProcessId
;
769 ULONG_PTR UniqueProcessId
;
772 } PROCESS_BASIC_INFORMATION
, *PPROCESS_BASIC_INFORMATION
;
774 typedef struct _PROCESS_INFO
{
775 DWORD Offset
; /* 00 offset to next PROCESS_INFO ok*/
776 DWORD ThreadCount
; /* 04 number of ThreadInfo member ok */
778 FILETIME CreationTime
; /* 20 */
780 PWCHAR ProcessName
; /* 3c ok */
782 DWORD ProcessID
; /* 44 ok*/
783 DWORD ParentProcessID
;
785 DWORD Unknown3
[2]; /* 50 */
786 ULONG PeakVirtualSize
;
788 ULONG PageFaultCount
;
789 ULONG PeakWorkingSetSize
;
790 ULONG WorkingSetSize
;
791 ULONG QuotaPeakPagedPoolUsage
;
792 ULONG QuotaPagedPoolUsage
;
793 ULONG QuotaPeakNonPagedPoolUsage
;
794 ULONG QuotaNonPagedPoolUsage
;
796 ULONG PeakPagefileUsage
;
799 THREAD_INFO ati
[ANYSIZE_ARRAY
]; /* 94 size=0x40*/
800 } PROCESS_INFO
, PPROCESS_INFO
;
802 typedef struct _RTL_HEAP_DEFINITION
{
803 ULONG Length
; /* = sizeof(RTL_HEAP_DEFINITION) */
806 } RTL_HEAP_DEFINITION
, *PRTL_HEAP_DEFINITION
;
808 typedef struct _RTL_RWLOCK
{
809 RTL_CRITICAL_SECTION rtlCS
;
811 HANDLE hSharedReleaseSemaphore
;
814 HANDLE hExclusiveReleaseSemaphore
;
815 UINT uExclusiveWaiters
;
818 HANDLE hOwningThreadId
;
819 DWORD dwTimeoutBoost
;
821 } RTL_RWLOCK
, *LPRTL_RWLOCK
;
823 /* System Information Class 0x00 */
824 typedef struct _SYSTEM_BASIC_INFORMATION
{
827 ULONG uKeMaximumIncrement
;
829 ULONG uMmNumberOfPhysicalPages
;
830 ULONG uMmLowestPhysicalPage
;
831 ULONG uMmHighestPhysicalPage
;
832 ULONG uAllocationGranularity
;
833 PVOID pLowestUserAddress
;
834 PVOID pMmHighestUserAddress
;
835 ULONG uKeActiveProcessors
;
836 BYTE bKeNumberProcessors
;
842 CCHAR NumberOfProcessors
;
844 } SYSTEM_BASIC_INFORMATION
, *PSYSTEM_BASIC_INFORMATION
;
846 /* System Information Class 0x15 */
850 ULONG PageFaultCount
;
851 ULONG MinimumWorkingSet
;
852 ULONG MaximumWorkingSet
;
854 } SYSTEM_CACHE_INFORMATION
;
856 typedef struct _SYSTEM_CONFIGURATION_INFO
{
860 WORD ProcessorArchitecture
;
865 PVOID MinimumApplicationAddress
;
866 PVOID MaximumApplicationAddress
;
867 ULONG ActiveProcessorMask
;
868 ULONG NumberOfProcessors
;
870 ULONG AllocationGranularity
;
872 WORD ProcessorRevision
;
873 } SYSTEM_CONFIGURATION_INFO
, *PSYSTEM_CONFIGURATION_INFO
;
875 /* System Information Class 0x0b */
882 char szName
[MAX_PATH
+ 1];
883 } SYSTEM_DRIVER_INFORMATION
;
885 typedef struct _SYSTEM_EXCEPTION_INFORMATION
{
887 } SYSTEM_EXCEPTION_INFORMATION
, *PSYSTEM_EXCEPTION_INFORMATION
;
889 typedef struct _SYSTEM_LOOKASIDE_INFORMATION
{
891 } SYSTEM_LOOKASIDE_INFORMATION
, *PSYSTEM_LOOKASIDE_INFORMATION
;
893 typedef struct _SYSTEM_INTERRUPT_INFORMATION
{
895 } SYSTEM_INTERRUPT_INFORMATION
, *PSYSTEM_INTERRUPT_INFORMATION
;
897 typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION
{
898 BOOLEAN DebuggerEnabled
;
899 BOOLEAN DebuggerNotPresent
;
900 } SYSTEM_KERNEL_DEBUGGER_INFORMATION
, *PSYSTEM_KERNEL_DEBUGGER_INFORMATION
;
902 /* System Information Class 0x10 */
905 USHORT dwCreatorBackTraceIndex
;
907 BYTE bHandleAttributes
;
908 USHORT usHandleOffset
;
910 ULONG ulGrantedAccess
;
911 } HANDLEINFO
, *PHANDLEINFO
; /* FIXME: SYSTEM_HANDLE_INFORMATION? */
913 typedef struct _SYSTEM_PERFORMANCE_INFORMATION
{
915 } SYSTEM_PERFORMANCE_INFORMATION
, *PSYSTEM_PERFORMANCE_INFORMATION
;
917 /* System Information Class 0x02 */
918 typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
{
920 LARGE_INTEGER liIdleTime
;
923 LARGE_INTEGER IdleTime
;
924 LARGE_INTEGER KernelTime
;
925 LARGE_INTEGER UserTime
;
926 LARGE_INTEGER Reserved1
[2];
929 } SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
, *PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
;
931 /* System Information Class 0x05 */
932 typedef struct _SYSTEM_PROCESS_INFORMATION
{
937 FILETIME ftCreationTime
;
939 WCHAR
*pszProcessName
;
940 DWORD dwBasePriority
;
942 DWORD dwParentProcessID
;
946 DWORD dwVirtualBytesPeak
;
947 DWORD dwVirtualBytes
;
949 DWORD dwWorkingSetPeak
;
954 DWORD dwNonPagedPool
;
955 DWORD dwPageFileBytesPeak
;
956 DWORD dwPrivateBytes
;
957 DWORD dwPageFileBytes
;
961 ULONG NextEntryOffset
;
964 HANDLE UniqueProcessId
;
969 SIZE_T PeakPagefileUsage
;
970 SIZE_T PrivatePageCount
;
971 LARGE_INTEGER Reserved6
[6];
973 } SYSTEM_PROCESS_INFORMATION
, *PSYSTEM_PROCESS_INFORMATION
;
975 typedef struct _SYSTEM_REGISTRY_QUOTA_INFORMATION
{
976 ULONG RegistryQuotaAllowed
;
977 ULONG RegistryQuotaUsed
;
979 } SYSTEM_REGISTRY_QUOTA_INFORMATION
, *PSYSTEM_REGISTRY_QUOTA_INFORMATION
;
981 typedef struct _SYSTEM_TIME_ADJUSTMENT
{
982 ULONG TimeAdjustment
;
983 BOOLEAN TimeAdjustmentDisabled
;
984 } SYSTEM_TIME_ADJUSTMENT
, *PSYSTEM_TIME_ADJUSTMENT
;
986 /* System Information Class 0x03 */
987 typedef struct _SYSTEM_TIMEOFDAY_INFORMATION
{
989 LARGE_INTEGER liKeBootTime
;
990 LARGE_INTEGER liKeSystemTime
;
991 LARGE_INTEGER liExpTimeZoneBias
;
992 ULONG uCurrentTimeZoneId
;
997 } SYSTEM_TIMEOFDAY_INFORMATION
, *PSYSTEM_TIMEOFDAY_INFORMATION
; /* was SYSTEM_TIME_INFORMATION */
999 typedef struct _TIME_FIELDS
1006 CSHORT Milliseconds
;
1008 } TIME_FIELDS
, *PTIME_FIELDS
;
1010 typedef struct _WINSTATIONINFORMATIONW
{
1013 BYTE Reserved3
[1140];
1014 } WINSTATIONINFORMATIONW
, *PWINSTATIONINFORMATIONW
;
1016 typedef struct _VM_COUNTERS_
{
1017 ULONG PeakVirtualSize
;
1019 ULONG PageFaultCount
;
1020 ULONG PeakWorkingSetSize
;
1021 ULONG WorkingSetSize
;
1022 ULONG QuotaPeakPagedPoolUsage
;
1023 ULONG QuotaPagedPoolUsage
;
1024 ULONG QuotaPeakNonPagedPoolUsage
;
1025 ULONG QuotaNonPagedPoolUsage
;
1026 ULONG PagefileUsage
;
1027 ULONG PeakPagefileUsage
;
1028 } VM_COUNTERS
, *PVM_COUNTERS
;
1030 typedef BOOLEAN (WINAPI
* PWINSTATIONQUERYINFORMATIONW
)(HANDLE
,ULONG
,WINSTATIONINFOCLASS
,PVOID
,ULONG
,PULONG
);
1032 typedef struct _LDR_RESOURCE_INFO
1037 } LDR_RESOURCE_INFO
, *PLDR_RESOURCE_INFO
;
1040 /* debug buffer definitions */
1042 typedef struct _DEBUG_BUFFER
{
1043 HANDLE SectionHandle
;
1045 PVOID RemoteSectionBase
;
1046 ULONG SectionBaseDelta
;
1047 HANDLE EventPairHandle
;
1049 HANDLE RemoteThreadHandle
;
1050 ULONG InfoClassMask
;
1052 ULONG AllocatedSize
;
1054 PVOID ModuleInformation
;
1055 PVOID BackTraceInformation
;
1056 PVOID HeapInformation
;
1057 PVOID LockInformation
;
1059 } DEBUG_BUFFER
, *PDEBUG_BUFFER
;
1061 #define PDI_MODULES 0x01
1062 #define PDI_BACKTRACE 0x02
1063 #define PDI_HEAPS 0x04
1064 #define PDI_HEAP_TAGS 0x08
1065 #define PDI_HEAP_BLOCKS 0x10
1066 #define PDI_LOCKS 0x20
1068 typedef struct _DEBUG_MODULE_INFORMATION
{
1076 USHORT ModuleNameOffset
;
1077 CHAR ImageName
[256];
1078 } DEBUG_MODULE_INFORMATION
, *PDEBUG_MODULE_INFORMATION
;
1080 typedef struct _DEBUG_HEAP_INFORMATION
{
1092 } DEBUG_HEAP_INFORMATION
, *PDEBUG_HEAP_INFORMATION
;
1094 typedef struct _DEBUG_LOCK_INFORMATION
{
1097 USHORT CreatorBackTraceIndex
;
1098 ULONG OwnerThreadId
;
1100 ULONG ContentionCount
;
1102 ULONG RecursionCount
;
1103 ULONG NumberOfSharedWaiters
;
1104 ULONG NumberOfExclusiveWaiters
;
1105 } DEBUG_LOCK_INFORMATION
, *PDEBUG_LOCK_INFORMATION
;
1107 typedef struct _PORT_MESSAGE_HEADER
{
1111 USHORT VirtualRangesOffset
;
1115 } PORT_MESSAGE_HEADER
, *PPORT_MESSAGE_HEADER
, PORT_MESSAGE
, *PPORT_MESSAGE
;
1117 /***********************************************************************
1121 /* flags for NtCreateFile and NtOpenFile */
1122 #define FILE_DIRECTORY_FILE 0x00000001
1123 #define FILE_WRITE_THROUGH 0x00000002
1124 #define FILE_SEQUENTIAL_ONLY 0x00000004
1125 #define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008
1126 #define FILE_SYNCHRONOUS_IO_ALERT 0x00000010
1127 #define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020
1128 #define FILE_NON_DIRECTORY_FILE 0x00000040
1129 #define FILE_CREATE_TREE_CONNECTION 0x00000080
1130 #define FILE_COMPLETE_IF_OPLOCKED 0x00000100
1131 #define FILE_NO_EA_KNOWLEDGE 0x00000200
1132 #define FILE_OPEN_FOR_RECOVERY 0x00000400
1133 #define FILE_RANDOM_ACCESS 0x00000800
1134 #define FILE_DELETE_ON_CLOSE 0x00001000
1135 #define FILE_OPEN_BY_FILE_ID 0x00002000
1136 #define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000
1137 #define FILE_NO_COMPRESSION 0x00008000
1138 #define FILE_RESERVE_OPFILTER 0x00100000
1139 #define FILE_TRANSACTED_MODE 0x00200000
1140 #define FILE_OPEN_OFFLINE_FILE 0x00400000
1142 #define FILE_ATTRIBUTE_VALID_FLAGS 0x00007fb7
1143 #define FILE_ATTRIBUTE_VALID_SET_FLAGS 0x000031a7
1145 /* status for NtCreateFile or NtOpenFile */
1146 #define FILE_SUPERSEDED 0
1147 #define FILE_OPENED 1
1148 #define FILE_CREATED 2
1149 #define FILE_OVERWRITTEN 3
1150 #define FILE_EXISTS 4
1151 #define FILE_DOES_NOT_EXIST 5
1153 /* disposition for NtCreateFile */
1154 #define FILE_SUPERSEDE 0
1156 #define FILE_CREATE 2
1157 #define FILE_OPEN_IF 3
1158 #define FILE_OVERWRITE 4
1159 #define FILE_OVERWRITE_IF 5
1160 #define FILE_MAXIMUM_DISPOSITION 5
1162 /* Characteristics of a File System */
1163 #define FILE_REMOVABLE_MEDIA 0x00000001
1164 #define FILE_READ_ONLY_DEVICE 0x00000002
1165 #define FILE_FLOPPY_DISKETTE 0x00000004
1166 #define FILE_WRITE_ONE_MEDIA 0x00000008
1167 #define FILE_REMOTE_DEVICE 0x00000010
1168 #define FILE_DEVICE_IS_MOUNTED 0x00000020
1169 #define FILE_VIRTUAL_VOLUME 0x00000040
1171 #if (_WIN32_WINNT >= 0x0501)
1172 #define INTERNAL_TS_ACTIVE_CONSOLE_ID ( *((volatile ULONG*)(0x7ffe02d8)) )
1173 #endif /* (_WIN32_WINNT >= 0x0501) */
1175 #define LOGONID_CURRENT ((ULONG)-1)
1177 #define OBJ_INHERIT 0x00000002L
1178 #define OBJ_PERMANENT 0x00000010L
1179 #define OBJ_EXCLUSIVE 0x00000020L
1180 #define OBJ_CASE_INSENSITIVE 0x00000040L
1181 #define OBJ_OPENIF 0x00000080L
1182 #define OBJ_OPENLINK 0x00000100L
1183 #define OBJ_KERNEL_HANDLE 0x00000200L
1184 #define OBJ_VALID_ATTRIBUTES 0x000003F2L
1186 #define SERVERNAME_CURRENT ((HANDLE)NULL)
1188 typedef void (CALLBACK
*PNTAPCFUNC
)(ULONG_PTR
,ULONG_PTR
,ULONG_PTR
); /* FIXME: not the right name */
1189 typedef void (CALLBACK
*PRTL_THREAD_START_ROUTINE
)(LPVOID
); /* FIXME: not the right name */
1192 /* DbgPrintEx default levels */
1193 #define DPFLTR_ERROR_LEVEL 0
1194 #define DPFLTR_WARNING_LEVEL 1
1195 #define DPFLTR_TRACE_LEVEL 2
1196 #define DPFLTR_INFO_LEVEL 3
1197 #define DPFLTR_MASK 0x8000000
1199 /***********************************************************************
1200 * Function declarations
1203 extern LPSTR
_strlwr(LPSTR str
); /* FIXME: Doesn't belong here */
1204 extern LPSTR
_strupr(LPSTR str
); /* FIXME: Doesn't belong here */
1206 #if defined(__i386__) && defined(__GNUC__)
1207 static inline void WINAPI
DbgBreakPoint(void) { __asm__
__volatile__("int3"); }
1208 static inline void WINAPI
DbgUserBreakPoint(void) { __asm__
__volatile__("int3"); }
1209 #else /* __i386__ && __GNUC__ */
1210 void WINAPI
DbgBreakPoint(void);
1211 void WINAPI
DbgUserBreakPoint(void);
1212 #endif /* __i386__ && __GNUC__ */
1213 NTSTATUS WINAPIV
DbgPrint(LPCSTR fmt
, ...);
1214 NTSTATUS WINAPIV
DbgPrintEx(ULONG iComponentId
, ULONG Level
, LPCSTR fmt
, ...);
1216 NTSTATUS WINAPI
LdrAccessResource(HMODULE
,const IMAGE_RESOURCE_DATA_ENTRY
*,void**,PULONG
);
1217 NTSTATUS WINAPI
LdrFindResourceDirectory_U(HMODULE
,const LDR_RESOURCE_INFO
*,ULONG
,const IMAGE_RESOURCE_DIRECTORY
**);
1218 NTSTATUS WINAPI
LdrFindResource_U(HMODULE
,const LDR_RESOURCE_INFO
*,ULONG
,const IMAGE_RESOURCE_DATA_ENTRY
**);
1219 NTSTATUS WINAPI
LdrGetDllHandle(ULONG
, ULONG
, const UNICODE_STRING
*, HMODULE
*);
1220 NTSTATUS WINAPI
LdrGetProcedureAddress(HMODULE
, const ANSI_STRING
*, ULONG
, void**);
1221 void WINAPI
LdrInitializeThunk(HANDLE
,ULONG
,ULONG
,ULONG
);
1222 NTSTATUS WINAPI
LdrLoadDll(LPCWSTR
, DWORD
, const UNICODE_STRING
*, HMODULE
*);
1223 void WINAPI
LdrShutdownProcess(void);
1224 void WINAPI
LdrShutdownThread(void);
1225 NTSTATUS WINAPI
NtAccessCheck(PSECURITY_DESCRIPTOR
,HANDLE
,ACCESS_MASK
,PGENERIC_MAPPING
,PPRIVILEGE_SET
,PULONG
,PULONG
,PBOOLEAN
);
1226 NTSTATUS WINAPI
NtAdjustPrivilegesToken(HANDLE
,BOOLEAN
,PTOKEN_PRIVILEGES
,DWORD
,PTOKEN_PRIVILEGES
,PDWORD
);
1227 NTSTATUS WINAPI
NtAllocateVirtualMemory(HANDLE
,PVOID
*,PVOID
,ULONG
*,ULONG
,ULONG
);
1228 NTSTATUS WINAPI
NtCancelTimer(HANDLE
, BOOLEAN
*);
1229 NTSTATUS WINAPI
NtClearEvent(HANDLE
);
1230 NTSTATUS WINAPI
NtClose(HANDLE
);
1231 NTSTATUS WINAPI
NtCreateEvent(PHANDLE
,ACCESS_MASK
,const OBJECT_ATTRIBUTES
*,BOOLEAN
,BOOLEAN
);
1232 NTSTATUS WINAPI
NtCreateFile(PHANDLE
,ACCESS_MASK
,POBJECT_ATTRIBUTES
,PIO_STATUS_BLOCK
,PLARGE_INTEGER
,ULONG
,ULONG
,ULONG
,ULONG
,PVOID
,ULONG
);
1233 NTSTATUS WINAPI
NtCreateKey(PHKEY
,ACCESS_MASK
,const OBJECT_ATTRIBUTES
*,ULONG
,const UNICODE_STRING
*,ULONG
,PULONG
);
1234 NTSTATUS WINAPI
NtCreateNamedPipeFile(PHANDLE
,ULONG
,POBJECT_ATTRIBUTES
,PIO_STATUS_BLOCK
,ULONG
,ULONG
,ULONG
,ULONG
,ULONG
,ULONG
,ULONG
,ULONG
,ULONG
,PLARGE_INTEGER
);
1235 NTSTATUS WINAPI
NtCreateSection(HANDLE
*,ACCESS_MASK
,const OBJECT_ATTRIBUTES
*,const LARGE_INTEGER
*,ULONG
,ULONG
,HANDLE
);
1236 NTSTATUS WINAPI
NtCreateSemaphore(PHANDLE
,ACCESS_MASK
,const OBJECT_ATTRIBUTES
*,ULONG
,ULONG
);
1237 NTSTATUS WINAPI
NtCreateTimer(HANDLE
*, ACCESS_MASK
, const OBJECT_ATTRIBUTES
*, TIMER_TYPE
);
1238 NTSTATUS WINAPI
NtDelayExecution(BOOLEAN
,const LARGE_INTEGER
*);
1239 NTSTATUS WINAPI
NtDeleteKey(HKEY
);
1240 NTSTATUS WINAPI
NtDeleteValueKey(HKEY
,const UNICODE_STRING
*);
1241 NTSTATUS WINAPI
NtDeviceIoControlFile(HANDLE
,HANDLE
,PIO_APC_ROUTINE
,PVOID
,PIO_STATUS_BLOCK
,ULONG
,PVOID
,ULONG
,PVOID
,ULONG
);
1242 NTSTATUS WINAPI
NtDuplicateObject(HANDLE
,HANDLE
,HANDLE
,PHANDLE
,ACCESS_MASK
,ULONG
,ULONG
);
1243 NTSTATUS WINAPI
NtEnumerateKey(HKEY
,ULONG
,KEY_INFORMATION_CLASS
,void *,DWORD
,DWORD
*);
1244 NTSTATUS WINAPI
NtEnumerateValueKey(HKEY
,ULONG
,KEY_VALUE_INFORMATION_CLASS
,PVOID
,ULONG
,PULONG
);
1245 NTSTATUS WINAPI
NtFlushBuffersFile(HANDLE
,IO_STATUS_BLOCK
*);
1246 NTSTATUS WINAPI
NtFlushInstructionCache(HANDLE
,LPCVOID
,ULONG
);
1247 NTSTATUS WINAPI
NtFlushKey(HKEY
);
1248 NTSTATUS WINAPI
NtFlushVirtualMemory(HANDLE
,LPCVOID
*,ULONG
*,ULONG
);
1249 NTSTATUS WINAPI
NtFreeVirtualMemory(HANDLE
,PVOID
*,ULONG
*,ULONG
);
1250 NTSTATUS WINAPI
NtGetContextThread(HANDLE
,CONTEXT
*);
1251 NTSTATUS WINAPI
NtImpersonateAnonymousToken(HANDLE
);
1252 NTSTATUS WINAPI
NtImpersonateClientOfPort(HANDLE
,PPORT_MESSAGE
);
1253 NTSTATUS WINAPI
NtImpersonateThread(HANDLE
,HANDLE
,PSECURITY_QUALITY_OF_SERVICE
);
1254 NTSTATUS WINAPI
NtLoadKey(const OBJECT_ATTRIBUTES
*,const OBJECT_ATTRIBUTES
*);
1255 NTSTATUS WINAPI
NtLockFile(HANDLE
,HANDLE
,PIO_APC_ROUTINE
,void*,PIO_STATUS_BLOCK
,PLARGE_INTEGER
,PLARGE_INTEGER
,ULONG
*,BOOLEAN
,BOOLEAN
);
1256 NTSTATUS WINAPI
NtLockVirtualMemory(HANDLE
,PVOID
*,ULONG
*,ULONG
);
1257 NTSTATUS WINAPI
NtMapViewOfSection(HANDLE
,HANDLE
,PVOID
*,ULONG
,ULONG
,const LARGE_INTEGER
*,ULONG
*,SECTION_INHERIT
,ULONG
,ULONG
);
1258 NTSTATUS WINAPI
NtNotifyChangeKey(HKEY
,HANDLE
,PIO_APC_ROUTINE
,PVOID
,PIO_STATUS_BLOCK
,ULONG
,BOOLEAN
,PVOID
,ULONG
,BOOLEAN
);
1259 NTSTATUS WINAPI
NtOpenEvent(PHANDLE
,ACCESS_MASK
,const OBJECT_ATTRIBUTES
*);
1260 NTSTATUS WINAPI
NtOpenFile(PHANDLE
,ACCESS_MASK
,POBJECT_ATTRIBUTES
,PIO_STATUS_BLOCK
,ULONG
,ULONG
);
1261 NTSTATUS WINAPI
NtOpenKey(PHKEY
,ACCESS_MASK
,const OBJECT_ATTRIBUTES
*);
1262 NTSTATUS WINAPI
NtOpenProcessToken(HANDLE
,DWORD
,HANDLE
*);
1263 NTSTATUS WINAPI
NtOpenSection(HANDLE
*,ACCESS_MASK
,const OBJECT_ATTRIBUTES
*);
1264 NTSTATUS WINAPI
NtOpenThread(HANDLE
*,ACCESS_MASK
,const OBJECT_ATTRIBUTES
*,const CLIENT_ID
*);
1265 NTSTATUS WINAPI
NtOpenThreadToken(HANDLE
,DWORD
,BOOLEAN
,HANDLE
*);
1266 NTSTATUS WINAPI
NtOpenTimer(HANDLE
*, ACCESS_MASK
, const OBJECT_ATTRIBUTES
*);
1267 NTSTATUS WINAPI
NtProtectVirtualMemory(HANDLE
,PVOID
*,ULONG
*,ULONG
,ULONG
*);
1268 NTSTATUS WINAPI
NtPulseEvent(HANDLE
,PULONG
);
1269 NTSTATUS WINAPI
NtQueueApcThread(HANDLE
,PNTAPCFUNC
,ULONG_PTR
,ULONG_PTR
,ULONG_PTR
);
1270 NTSTATUS WINAPI
NtQueryAttributesFile(const OBJECT_ATTRIBUTES
*,FILE_BASIC_INFORMATION
*);
1271 NTSTATUS WINAPI
NtQueryDefaultLocale(BOOLEAN
,LCID
*);
1272 NTSTATUS WINAPI
NtQueryDefaultUILanguage(LANGID
*);
1273 NTSTATUS WINAPI
NtQueryDirectoryFile(HANDLE
,HANDLE
,PIO_APC_ROUTINE
,PVOID
,PIO_STATUS_BLOCK
,PVOID
,ULONG
,FILE_INFORMATION_CLASS
,BOOLEAN
,PUNICODE_STRING
,BOOLEAN
);
1274 NTSTATUS WINAPI
NtQueryFullAttributesFile(const OBJECT_ATTRIBUTES
*,FILE_NETWORK_OPEN_INFORMATION
*);
1275 NTSTATUS WINAPI
NtQueryInformationFile(HANDLE
,PIO_STATUS_BLOCK
,PVOID
,LONG
,FILE_INFORMATION_CLASS
);
1276 NTSTATUS WINAPI
NtQueryInformationProcess(HANDLE
,PROCESSINFOCLASS
,PVOID
,ULONG
,PULONG
);
1277 NTSTATUS WINAPI
NtQueryInformationThread(HANDLE
,THREADINFOCLASS
,PVOID
,ULONG
,PULONG
);
1278 NTSTATUS WINAPI
NtQueryInformationToken(HANDLE
,DWORD
,LPVOID
,DWORD
,LPDWORD
);
1279 NTSTATUS WINAPI
NtQueryInstallUILanguage(LANGID
*);
1280 NTSTATUS WINAPI
NtQueryKey(HKEY
,KEY_INFORMATION_CLASS
,void *,DWORD
,DWORD
*);
1281 NTSTATUS WINAPI
NtQueryMultipleValueKey(HKEY
,PVALENTW
,ULONG
,PVOID
,ULONG
,PULONG
);
1282 NTSTATUS WINAPI
NtQueryObject(HANDLE
, OBJECT_INFORMATION_CLASS
, PVOID
, ULONG
, PULONG
);
1283 NTSTATUS WINAPI
NtQuerySecurityObject(HANDLE
,SECURITY_INFORMATION
,PSECURITY_DESCRIPTOR
,ULONG
,PULONG
);
1284 NTSTATUS WINAPI
NtQuerySystemInformation(SYSTEM_INFORMATION_CLASS
,PVOID
,ULONG
,PULONG
);
1285 NTSTATUS WINAPI
NtQuerySystemTime(PLARGE_INTEGER
);
1286 NTSTATUS WINAPI
NtQueryValueKey(HKEY
,const UNICODE_STRING
*,KEY_VALUE_INFORMATION_CLASS
,void *,DWORD
,DWORD
*);
1287 NTSTATUS WINAPI
NtQueryVirtualMemory(HANDLE
,LPCVOID
,MEMORY_INFORMATION_CLASS
,PVOID
,ULONG
,ULONG
*);
1288 NTSTATUS WINAPI
NtQueryVolumeInformationFile(HANDLE
,PIO_STATUS_BLOCK
,PVOID
,ULONG
,FS_INFORMATION_CLASS
);
1289 void WINAPI
NtRaiseException(PEXCEPTION_RECORD
,PCONTEXT
,BOOL
);
1290 NTSTATUS WINAPI
NtReadFile(HANDLE
,HANDLE
,PIO_APC_ROUTINE
,PVOID
,PIO_STATUS_BLOCK
,PVOID
,ULONG
,PLARGE_INTEGER
,PULONG
);
1291 NTSTATUS WINAPI
NtReadVirtualMemory(HANDLE
,const void*,void*,SIZE_T
,SIZE_T
*);
1292 NTSTATUS WINAPI
NtReleaseSemaphore(HANDLE
,ULONG
,PULONG
);
1293 NTSTATUS WINAPI
NtReplaceKey(POBJECT_ATTRIBUTES
,HKEY
,POBJECT_ATTRIBUTES
);
1294 NTSTATUS WINAPI
NtResetEvent(HANDLE
,PULONG
);
1295 NTSTATUS WINAPI
NtRestoreKey(HKEY
,HANDLE
,ULONG
);
1296 NTSTATUS WINAPI
NtResumeThread(HANDLE
,PULONG
);
1297 NTSTATUS WINAPI
NtSaveKey(HKEY
,HANDLE
);
1298 NTSTATUS WINAPI
NtSetContextThread(HANDLE
,const CONTEXT
*);
1299 NTSTATUS WINAPI
NtSetDefaultLocale(BOOLEAN
,LCID
);
1300 NTSTATUS WINAPI
NtSetDefaultUILanguage(LANGID
);
1301 NTSTATUS WINAPI
NtSetEvent(HANDLE
,PULONG
);
1302 NTSTATUS WINAPI
NtSetInformationFile(HANDLE
,PIO_STATUS_BLOCK
,PVOID
,ULONG
,FILE_INFORMATION_CLASS
);
1303 NTSTATUS WINAPI
NtSetInformationKey(HKEY
,const int,PVOID
,ULONG
);
1304 NTSTATUS WINAPI
NtSetInformationObject(HANDLE
, OBJECT_INFORMATION_CLASS
, PVOID
, ULONG
);
1305 NTSTATUS WINAPI
NtSetInformationThread(HANDLE
,THREADINFOCLASS
,LPCVOID
,ULONG
);
1306 NTSTATUS WINAPI
NtSetInformationToken(HANDLE
,TOKEN_INFORMATION_CLASS
,PVOID
,ULONG
);
1307 NTSTATUS WINAPI
NtSetSecurityObject(HANDLE
,SECURITY_INFORMATION
,PSECURITY_DESCRIPTOR
);
1308 NTSTATUS WINAPI
NtSetSystemTime(const LARGE_INTEGER
*,LARGE_INTEGER
*);
1309 NTSTATUS WINAPI
NtSetTimer(HANDLE
, const LARGE_INTEGER
*, PTIMERAPCROUTINE
, PVOID
, BOOLEAN
, ULONG
, BOOLEAN
*);
1310 NTSTATUS WINAPI
NtSetValueKey(HKEY
,const UNICODE_STRING
*,ULONG
,ULONG
,const void *,ULONG
);
1311 NTSTATUS WINAPI
NtSuspendThread(HANDLE
,PULONG
);
1312 NTSTATUS WINAPI
NtTerminateProcess(HANDLE
,LONG
);
1313 NTSTATUS WINAPI
NtTerminateThread(HANDLE
,LONG
);
1314 NTSTATUS WINAPI
NtUnloadKey(HKEY
);
1315 NTSTATUS WINAPI
NtUnlockFile(HANDLE
,PIO_STATUS_BLOCK
,PLARGE_INTEGER
,PLARGE_INTEGER
,PULONG
);
1316 NTSTATUS WINAPI
NtUnlockVirtualMemory(HANDLE
,PVOID
*,ULONG
*,ULONG
);
1317 NTSTATUS WINAPI
NtUnmapViewOfSection(HANDLE
,PVOID
);
1318 NTSTATUS WINAPI
NtWaitForSingleObject(HANDLE
,BOOLEAN
,const LARGE_INTEGER
*);
1319 NTSTATUS WINAPI
NtWaitForMultipleObjects(ULONG
,const HANDLE
*,BOOLEAN
,BOOLEAN
,const LARGE_INTEGER
*);
1320 NTSTATUS WINAPI
NtWriteFile(HANDLE
,HANDLE
,PIO_APC_ROUTINE
,PVOID
,PIO_STATUS_BLOCK
,const void*,ULONG
,PLARGE_INTEGER
,PULONG
);
1321 NTSTATUS WINAPI
NtWriteVirtualMemory(HANDLE
,void*,const void*,SIZE_T
,SIZE_T
*);
1323 void WINAPI
RtlAcquirePebLock(void);
1324 BYTE WINAPI
RtlAcquireResourceExclusive(LPRTL_RWLOCK
,BYTE
);
1325 BYTE WINAPI
RtlAcquireResourceShared(LPRTL_RWLOCK
,BYTE
);
1326 NTSTATUS WINAPI
RtlAddAce(PACL
,DWORD
,DWORD
,PACE_HEADER
,DWORD
);
1327 NTSTATUS WINAPI
RtlAddAccessAllowedAce(PACL
,DWORD
,DWORD
,PSID
);
1328 NTSTATUS WINAPI
RtlAddAccessAllowedAceEx(PACL
,DWORD
,DWORD
,DWORD
,PSID
);
1329 NTSTATUS WINAPI
RtlAddAccessDeniedAce(PACL
,DWORD
,DWORD
,PSID
);
1330 NTSTATUS WINAPI
RtlAddAccessDeniedAceEx(PACL
,DWORD
,DWORD
,DWORD
,PSID
);
1331 PVOID WINAPI
RtlAddVectoredExceptionHandler(ULONG
,PVECTORED_EXCEPTION_HANDLER
);
1332 DWORD WINAPI
RtlAdjustPrivilege(DWORD
,DWORD
,DWORD
,DWORD
);
1333 BOOLEAN WINAPI
RtlAllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY
,BYTE
,DWORD
,DWORD
,DWORD
,DWORD
,DWORD
,DWORD
,DWORD
,DWORD
,PSID
*);
1334 PVOID WINAPI
RtlAllocateHeap(HANDLE
,ULONG
,ULONG
);
1335 DWORD WINAPI
RtlAnsiStringToUnicodeSize(const STRING
*);
1336 NTSTATUS WINAPI
RtlAnsiStringToUnicodeString(PUNICODE_STRING
,PCANSI_STRING
,BOOLEAN
);
1337 NTSTATUS WINAPI
RtlAppendAsciizToString(STRING
*,LPCSTR
);
1338 NTSTATUS WINAPI
RtlAppendStringToString(STRING
*,const STRING
*);
1339 NTSTATUS WINAPI
RtlAppendUnicodeStringToString(UNICODE_STRING
*,const UNICODE_STRING
*);
1340 NTSTATUS WINAPI
RtlAppendUnicodeToString(UNICODE_STRING
*,LPCWSTR
);
1341 BOOLEAN WINAPI
RtlAreAllAccessesGranted(ACCESS_MASK
,ACCESS_MASK
);
1342 BOOLEAN WINAPI
RtlAreAnyAccessesGranted(ACCESS_MASK
,ACCESS_MASK
);
1343 BOOLEAN WINAPI
RtlAreBitsSet(PCRTL_BITMAP
,ULONG
,ULONG
);
1344 BOOLEAN WINAPI
RtlAreBitsClear(PCRTL_BITMAP
,ULONG
,ULONG
);
1346 NTSTATUS WINAPI
RtlCharToInteger(PCSZ
,ULONG
,PULONG
);
1347 void WINAPI
RtlClearAllBits(PRTL_BITMAP
);
1348 void WINAPI
RtlClearBits(PRTL_BITMAP
,ULONG
,ULONG
);
1349 ULONG WINAPI
RtlCompactHeap(HANDLE
,ULONG
);
1350 LONG WINAPI
RtlCompareString(const STRING
*,const STRING
*,BOOLEAN
);
1351 LONG WINAPI
RtlCompareUnicodeString(const UNICODE_STRING
*,const UNICODE_STRING
*,BOOLEAN
);
1352 DWORD WINAPI
RtlComputeCrc32(DWORD
,PBYTE
,INT
);
1353 NTSTATUS WINAPI
RtlConvertSidToUnicodeString(PUNICODE_STRING
,PSID
,BOOLEAN
);
1354 LONGLONG WINAPI
RtlConvertLongToLargeInteger(LONG
);
1355 ULONGLONG WINAPI
RtlConvertUlongToLargeInteger(ULONG
);
1356 void WINAPI
RtlCopyLuid(PLUID
,const LUID
*);
1357 void WINAPI
RtlCopyLuidAndAttributesArray(ULONG
,const LUID_AND_ATTRIBUTES
*,PLUID_AND_ATTRIBUTES
);
1358 DWORD WINAPI
RtlCopySid(DWORD
,PSID
,PSID
);
1359 void WINAPI
RtlCopyString(STRING
*,const STRING
*);
1360 void WINAPI
RtlCopyUnicodeString(UNICODE_STRING
*,const UNICODE_STRING
*);
1361 NTSTATUS WINAPI
RtlCreateAcl(PACL
,DWORD
,DWORD
);
1362 NTSTATUS WINAPI
RtlCreateEnvironment(BOOLEAN
, PWSTR
*);
1363 HANDLE WINAPI
RtlCreateHeap(ULONG
,PVOID
,ULONG
,ULONG
,PVOID
,PRTL_HEAP_DEFINITION
);
1364 NTSTATUS WINAPI
RtlCreateProcessParameters(RTL_USER_PROCESS_PARAMETERS
**,const UNICODE_STRING
*,
1365 const UNICODE_STRING
*,const UNICODE_STRING
*,
1366 const UNICODE_STRING
*,PWSTR
,const UNICODE_STRING
*,
1367 const UNICODE_STRING
*,const UNICODE_STRING
*,
1368 const UNICODE_STRING
*);
1369 NTSTATUS WINAPI
RtlCreateSecurityDescriptor(PSECURITY_DESCRIPTOR
,DWORD
);
1370 BOOLEAN WINAPI
RtlCreateUnicodeString(PUNICODE_STRING
,LPCWSTR
);
1371 BOOLEAN WINAPI
RtlCreateUnicodeStringFromAsciiz(PUNICODE_STRING
,LPCSTR
);
1372 NTSTATUS WINAPI
RtlCreateUserThread(HANDLE
,const SECURITY_DESCRIPTOR
*,BOOLEAN
,PVOID
,SIZE_T
,SIZE_T
,PRTL_THREAD_START_ROUTINE
,void*,HANDLE
*,CLIENT_ID
*);
1374 NTSTATUS WINAPI
RtlDeleteAce(PACL
,DWORD
);
1375 NTSTATUS WINAPI
RtlDeleteCriticalSection(RTL_CRITICAL_SECTION
*);
1376 void WINAPI
RtlDeleteResource(LPRTL_RWLOCK
);
1377 DWORD WINAPI
RtlDeleteSecurityObject(DWORD
);
1378 PRTL_USER_PROCESS_PARAMETERS WINAPI
RtlDeNormalizeProcessParams(RTL_USER_PROCESS_PARAMETERS
*);
1379 NTSTATUS WINAPI
RtlDestroyEnvironment(PWSTR
);
1380 HANDLE WINAPI
RtlDestroyHeap(HANDLE
);
1381 void WINAPI
RtlDestroyProcessParameters(RTL_USER_PROCESS_PARAMETERS
*);
1382 DOS_PATHNAME_TYPE WINAPI
RtlDetermineDosPathNameType_U(PCWSTR
);
1383 BOOLEAN WINAPI
RtlDoesFileExists_U(LPCWSTR
);
1384 BOOLEAN WINAPI
RtlDosPathNameToNtPathName_U(PCWSTR
,PUNICODE_STRING
,PWSTR
*,CURDIR
*);
1385 ULONG WINAPI
RtlDosSearchPath_U(LPCWSTR
, LPCWSTR
, LPCWSTR
, ULONG
, LPWSTR
, LPWSTR
*);
1386 WCHAR WINAPI
RtlDowncaseUnicodeChar(WCHAR
);
1387 NTSTATUS WINAPI
RtlDowncaseUnicodeString(UNICODE_STRING
*,const UNICODE_STRING
*,BOOLEAN
);
1388 void WINAPI
RtlDumpResource(LPRTL_RWLOCK
);
1389 NTSTATUS WINAPI
RtlDuplicateUnicodeString(int,const UNICODE_STRING
*,UNICODE_STRING
*);
1391 LONGLONG WINAPI
RtlEnlargedIntegerMultiply(INT
,INT
);
1392 ULONGLONG WINAPI
RtlEnlargedUnsignedMultiply(UINT
,UINT
);
1393 UINT WINAPI
RtlEnlargedUnsignedDivide(ULONGLONG
,UINT
,UINT
*);
1394 NTSTATUS WINAPI
RtlEnterCriticalSection(RTL_CRITICAL_SECTION
*);
1395 void WINAPI
RtlEraseUnicodeString(UNICODE_STRING
*);
1396 NTSTATUS WINAPI
RtlEqualComputerName(const UNICODE_STRING
*,const UNICODE_STRING
*);
1397 NTSTATUS WINAPI
RtlEqualDomainName(const UNICODE_STRING
*,const UNICODE_STRING
*);
1398 BOOLEAN WINAPI
RtlEqualLuid(const LUID
*,const LUID
*);
1399 BOOL WINAPI
RtlEqualPrefixSid(PSID
,PSID
);
1400 BOOL WINAPI
RtlEqualSid(PSID
,PSID
);
1401 BOOLEAN WINAPI
RtlEqualString(const STRING
*,const STRING
*,BOOLEAN
);
1402 BOOLEAN WINAPI
RtlEqualUnicodeString(const UNICODE_STRING
*,const UNICODE_STRING
*,BOOLEAN
);
1403 NTSTATUS WINAPI
RtlExpandEnvironmentStrings_U(PWSTR
, const UNICODE_STRING
*, UNICODE_STRING
*, ULONG
*);
1404 LONGLONG WINAPI
RtlExtendedMagicDivide(LONGLONG
,LONGLONG
,INT
);
1405 LONGLONG WINAPI
RtlExtendedIntegerMultiply(LONGLONG
,INT
);
1406 LONGLONG WINAPI
RtlExtendedLargeIntegerDivide(LONGLONG
,INT
,INT
*);
1408 NTSTATUS WINAPI
RtlFindCharInUnicodeString(int,const UNICODE_STRING
*,const UNICODE_STRING
*,USHORT
*);
1409 ULONG WINAPI
RtlFindClearBits(PCRTL_BITMAP
,ULONG
,ULONG
);
1410 ULONG WINAPI
RtlFindClearBitsAndSet(PRTL_BITMAP
,ULONG
,ULONG
);
1411 ULONG WINAPI
RtlFindClearRuns(PCRTL_BITMAP
,PRTL_BITMAP_RUN
,ULONG
,BOOLEAN
);
1412 ULONG WINAPI
RtlFindLastBackwardRunSet(PCRTL_BITMAP
,ULONG
,PULONG
);
1413 ULONG WINAPI
RtlFindLastBackwardRunClear(PCRTL_BITMAP
,ULONG
,PULONG
);
1414 CCHAR WINAPI
RtlFindLeastSignificantBit(ULONGLONG
);
1415 ULONG WINAPI
RtlFindLongestRunSet(PCRTL_BITMAP
,PULONG
);
1416 ULONG WINAPI
RtlFindLongestRunClear(PCRTL_BITMAP
,PULONG
);
1417 NTSTATUS WINAPI
RtlFindMessage(HMODULE
,ULONG
,ULONG
,ULONG
,const MESSAGE_RESOURCE_ENTRY
**);
1418 CCHAR WINAPI
RtlFindMostSignificantBit(ULONGLONG
);
1419 ULONG WINAPI
RtlFindNextForwardRunSet(PCRTL_BITMAP
,ULONG
,PULONG
);
1420 ULONG WINAPI
RtlFindNextForwardRunClear(PCRTL_BITMAP
,ULONG
,PULONG
);
1421 ULONG WINAPI
RtlFindSetBits(PCRTL_BITMAP
,ULONG
,ULONG
);
1422 ULONG WINAPI
RtlFindSetBitsAndClear(PRTL_BITMAP
,ULONG
,ULONG
);
1423 ULONG WINAPI
RtlFindSetRuns(PCRTL_BITMAP
,PRTL_BITMAP_RUN
,ULONG
,BOOLEAN
);
1424 BOOLEAN WINAPI
RtlFirstFreeAce(PACL
,PACE_HEADER
*);
1425 NTSTATUS WINAPI
RtlFormatCurrentUserKeyPath(PUNICODE_STRING
);
1426 NTSTATUS WINAPI
RtlFormatMessage(LPWSTR
,UCHAR
,BOOLEAN
,BOOLEAN
,BOOLEAN
,va_list *,LPWSTR
,ULONG
);
1427 void WINAPI
RtlFreeAnsiString(PANSI_STRING
);
1428 BOOLEAN WINAPI
RtlFreeHeap(HANDLE
,ULONG
,PVOID
);
1429 void WINAPI
RtlFreeOemString(POEM_STRING
);
1430 DWORD WINAPI
RtlFreeSid(PSID
);
1431 void WINAPI
RtlFreeUnicodeString(PUNICODE_STRING
);
1433 DWORD WINAPI
RtlGetAce(PACL
,DWORD
,LPVOID
*);
1434 NTSTATUS WINAPI
RtlGetControlSecurityDescriptor(PSECURITY_DESCRIPTOR
, PSECURITY_DESCRIPTOR_CONTROL
,LPDWORD
);
1435 NTSTATUS WINAPI
RtlGetCurrentDirectory_U(ULONG
, LPWSTR
);
1436 NTSTATUS WINAPI
RtlGetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR
,PBOOLEAN
,PACL
*,PBOOLEAN
);
1437 ULONG WINAPI
RtlGetFullPathName_U(PCWSTR
,ULONG
,PWSTR
,PWSTR
*);
1438 NTSTATUS WINAPI
RtlGetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR
,PSID
*,PBOOLEAN
);
1439 DWORD WINAPI
RtlGetLastWin32Error(void);
1440 DWORD WINAPI
RtlGetLongestNtPathLength(void);
1441 BOOLEAN WINAPI
RtlGetNtProductType(LPDWORD
);
1442 NTSTATUS WINAPI
RtlGetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR
,PSID
*,PBOOLEAN
);
1443 ULONG WINAPI
RtlGetProcessHeaps(ULONG
,HANDLE
*);
1444 NTSTATUS WINAPI
RtlGetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR
,PBOOLEAN
,PACL
*,PBOOLEAN
);
1445 NTSTATUS WINAPI
RtlGetVersion(RTL_OSVERSIONINFOEXW
*);
1447 PSID_IDENTIFIER_AUTHORITY WINAPI
RtlIdentifierAuthoritySid(PSID
);
1448 PVOID WINAPI
RtlImageDirectoryEntryToData(HMODULE
,BOOL
,WORD
,ULONG
*);
1449 PIMAGE_NT_HEADERS WINAPI
RtlImageNtHeader(HMODULE
);
1450 PIMAGE_SECTION_HEADER WINAPI
RtlImageRvaToSection(const IMAGE_NT_HEADERS
*,HMODULE
,DWORD
);
1451 PVOID WINAPI
RtlImageRvaToVa(const IMAGE_NT_HEADERS
*,HMODULE
,DWORD
,IMAGE_SECTION_HEADER
**);
1452 BOOL WINAPI
RtlImpersonateSelf(SECURITY_IMPERSONATION_LEVEL
);
1453 void WINAPI
RtlInitString(PSTRING
,PCSZ
);
1454 void WINAPI
RtlInitAnsiString(PANSI_STRING
,PCSZ
);
1455 void WINAPI
RtlInitUnicodeString(PUNICODE_STRING
,PCWSTR
);
1456 NTSTATUS WINAPI
RtlInitUnicodeStringEx(PUNICODE_STRING
,PCWSTR
);
1457 NTSTATUS WINAPI
RtlInitializeCriticalSection(RTL_CRITICAL_SECTION
*);
1458 NTSTATUS WINAPI
RtlInitializeCriticalSectionAndSpinCount(RTL_CRITICAL_SECTION
*,DWORD
);
1459 void WINAPI
RtlInitializeBitMap(PRTL_BITMAP
,LPBYTE
,ULONG
);
1460 void WINAPI
RtlInitializeResource(LPRTL_RWLOCK
);
1461 BOOL WINAPI
RtlInitializeSid(PSID
,PSID_IDENTIFIER_AUTHORITY
,BYTE
);
1463 NTSTATUS WINAPI
RtlInt64ToUnicodeString(ULONGLONG
,ULONG
,UNICODE_STRING
*);
1464 NTSTATUS WINAPI
RtlIntegerToChar(ULONG
,ULONG
,ULONG
,PCHAR
);
1465 NTSTATUS WINAPI
RtlIntegerToUnicodeString(ULONG
,ULONG
,UNICODE_STRING
*);
1466 ULONG WINAPI
RtlIsDosDeviceName_U(PCWSTR
);
1467 BOOLEAN WINAPI
RtlIsNameLegalDOS8Dot3(const UNICODE_STRING
*,POEM_STRING
,PBOOLEAN
);
1468 DWORD WINAPI
RtlIsTextUnicode(LPVOID
,DWORD
,DWORD
*);
1470 LONGLONG WINAPI
RtlLargeIntegerAdd(LONGLONG
,LONGLONG
);
1471 LONGLONG WINAPI
RtlLargeIntegerArithmeticShift(LONGLONG
,INT
);
1472 ULONGLONG WINAPI
RtlLargeIntegerDivide( ULONGLONG
,ULONGLONG
,ULONGLONG
*);
1473 LONGLONG WINAPI
RtlLargeIntegerNegate(LONGLONG
);
1474 LONGLONG WINAPI
RtlLargeIntegerShiftLeft(LONGLONG
,INT
);
1475 LONGLONG WINAPI
RtlLargeIntegerShiftRight(LONGLONG
,INT
);
1476 LONGLONG WINAPI
RtlLargeIntegerSubtract(LONGLONG
,LONGLONG
);
1477 NTSTATUS WINAPI
RtlLargeIntegerToChar(const ULONGLONG
*,ULONG
,ULONG
,PCHAR
);
1478 NTSTATUS WINAPI
RtlLeaveCriticalSection(RTL_CRITICAL_SECTION
*);
1479 DWORD WINAPI
RtlLengthRequiredSid(DWORD
);
1480 ULONG WINAPI
RtlLengthSecurityDescriptor(PSECURITY_DESCRIPTOR
);
1481 DWORD WINAPI
RtlLengthSid(PSID
);
1482 NTSTATUS WINAPI
RtlLocalTimeToSystemTime(const LARGE_INTEGER
*,PLARGE_INTEGER
);
1483 BOOLEAN WINAPI
RtlLockHeap(HANDLE
);
1485 NTSTATUS WINAPI
RtlMakeSelfRelativeSD(PSECURITY_DESCRIPTOR
,PSECURITY_DESCRIPTOR
,LPDWORD
);
1486 void WINAPI
RtlMapGenericMask(PACCESS_MASK
,const GENERIC_MAPPING
*);
1487 NTSTATUS WINAPI
RtlMultiByteToUnicodeN(LPWSTR
,DWORD
,LPDWORD
,LPCSTR
,DWORD
);
1488 NTSTATUS WINAPI
RtlMultiByteToUnicodeSize(DWORD
*,LPCSTR
,UINT
);
1490 DWORD WINAPI
RtlNewSecurityObject(DWORD
,DWORD
,DWORD
,DWORD
,DWORD
,DWORD
);
1491 PRTL_USER_PROCESS_PARAMETERS WINAPI
RtlNormalizeProcessParams(RTL_USER_PROCESS_PARAMETERS
*);
1492 ULONG WINAPI
RtlNtStatusToDosError(NTSTATUS
);
1493 ULONG WINAPI
RtlNtStatusToDosErrorNoTeb(NTSTATUS
);
1494 ULONG WINAPI
RtlNumberOfSetBits(PCRTL_BITMAP
);
1495 ULONG WINAPI
RtlNumberOfClearBits(PCRTL_BITMAP
);
1497 UINT WINAPI
RtlOemStringToUnicodeSize(const STRING
*);
1498 NTSTATUS WINAPI
RtlOemStringToUnicodeString(UNICODE_STRING
*,const STRING
*,BOOLEAN
);
1499 NTSTATUS WINAPI
RtlOemToUnicodeN(LPWSTR
,DWORD
,LPDWORD
,LPCSTR
,DWORD
);
1500 DWORD WINAPI
RtlOpenCurrentUser(ACCESS_MASK
,PHKEY
);
1502 BOOLEAN WINAPI
RtlPrefixString(const STRING
*,const STRING
*,BOOLEAN
);
1503 BOOLEAN WINAPI
RtlPrefixUnicodeString(const UNICODE_STRING
*,const UNICODE_STRING
*,BOOLEAN
);
1505 NTSTATUS WINAPI
RtlQueryEnvironmentVariable_U(PWSTR
,PUNICODE_STRING
,PUNICODE_STRING
);
1506 NTSTATUS WINAPI
RtlQueryInformationAcl(PACL
,LPVOID
,DWORD
,ACL_INFORMATION_CLASS
);
1507 NTSTATUS WINAPI
RtlQueryTimeZoneInformation(LPTIME_ZONE_INFORMATION
);
1509 void WINAPI
RtlRaiseException(PEXCEPTION_RECORD
);
1510 void WINAPI
RtlRaiseStatus(NTSTATUS
);
1511 ULONG WINAPI
RtlRandom(PULONG
);
1512 PVOID WINAPI
RtlReAllocateHeap(HANDLE
,ULONG
,PVOID
,ULONG
);
1513 void WINAPI
RtlReleasePebLock(void);
1514 void WINAPI
RtlReleaseResource(LPRTL_RWLOCK
);
1515 ULONG WINAPI
RtlRemoveVectoredExceptionHandler(PVOID
);
1516 void WINAPI
RtlRestoreLastWin32Error(DWORD
);
1518 void WINAPI
RtlSecondsSince1970ToTime(DWORD
,LARGE_INTEGER
*);
1519 void WINAPI
RtlSecondsSince1980ToTime(DWORD
,LARGE_INTEGER
*);
1520 NTSTATUS WINAPI
RtlSelfRelativeToAbsoluteSD(PSECURITY_DESCRIPTOR
,PSECURITY_DESCRIPTOR
,
1521 PDWORD
,PACL
,PDWORD
,PACL
,PDWORD
,PSID
,PDWORD
,PSID
,PDWORD
);
1522 void WINAPI
RtlSetAllBits(PRTL_BITMAP
);
1523 void WINAPI
RtlSetBits(PRTL_BITMAP
,ULONG
,ULONG
);
1524 ULONG WINAPI
RtlSetCriticalSectionSpinCount(RTL_CRITICAL_SECTION
*,ULONG
);
1525 NTSTATUS WINAPI
RtlSetCurrentDirectory_U(const UNICODE_STRING
*);
1526 void WINAPI
RtlSetCurrentEnvironment(PWSTR
, PWSTR
*);
1527 NTSTATUS WINAPI
RtlSetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR
,BOOLEAN
,PACL
,BOOLEAN
);
1528 NTSTATUS WINAPI
RtlSetEnvironmentVariable(PWSTR
*,PUNICODE_STRING
,PUNICODE_STRING
);
1529 NTSTATUS WINAPI
RtlSetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR
,PSID
,BOOLEAN
);
1530 NTSTATUS WINAPI
RtlSetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR
,PSID
,BOOLEAN
);
1531 void WINAPI
RtlSetLastWin32Error(DWORD
);
1532 NTSTATUS WINAPI
RtlSetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR
,BOOLEAN
,PACL
,BOOLEAN
);
1533 NTSTATUS WINAPI
RtlSetTimeZoneInformation(const TIME_ZONE_INFORMATION
*);
1534 ULONG WINAPI
RtlSizeHeap(HANDLE
,ULONG
,PVOID
);
1535 LPDWORD WINAPI
RtlSubAuthoritySid(PSID
,DWORD
);
1536 LPBYTE WINAPI
RtlSubAuthorityCountSid(PSID
);
1537 NTSTATUS WINAPI
RtlSystemTimeToLocalTime(const LARGE_INTEGER
*,PLARGE_INTEGER
);
1539 void WINAPI
RtlTimeToTimeFields(const LARGE_INTEGER
*,PTIME_FIELDS
);
1540 BOOLEAN WINAPI
RtlTimeFieldsToTime(PTIME_FIELDS
,PLARGE_INTEGER
);
1541 void WINAPI
RtlTimeToElapsedTimeFields(const LARGE_INTEGER
*,PTIME_FIELDS
);
1542 BOOLEAN WINAPI
RtlTimeToSecondsSince1970(const LARGE_INTEGER
*,LPDWORD
);
1543 BOOLEAN WINAPI
RtlTimeToSecondsSince1980(const LARGE_INTEGER
*,LPDWORD
);
1544 BOOL WINAPI
RtlTryEnterCriticalSection(RTL_CRITICAL_SECTION
*);
1546 ULONGLONG __cdecl
RtlUlonglongByteSwap(ULONGLONG
);
1547 DWORD WINAPI
RtlUnicodeStringToAnsiSize(const UNICODE_STRING
*);
1548 NTSTATUS WINAPI
RtlUnicodeStringToAnsiString(PANSI_STRING
,PCUNICODE_STRING
,BOOLEAN
);
1549 NTSTATUS WINAPI
RtlUnicodeStringToInteger(const UNICODE_STRING
*,ULONG
,ULONG
*);
1550 DWORD WINAPI
RtlUnicodeStringToOemSize(const UNICODE_STRING
*);
1551 NTSTATUS WINAPI
RtlUnicodeStringToOemString(POEM_STRING
,PCUNICODE_STRING
,BOOLEAN
);
1552 NTSTATUS WINAPI
RtlUnicodeToMultiByteN(LPSTR
,DWORD
,LPDWORD
,LPCWSTR
,DWORD
);
1553 NTSTATUS WINAPI
RtlUnicodeToMultiByteSize(PULONG
,PCWSTR
,ULONG
);
1554 NTSTATUS WINAPI
RtlUnicodeToOemN(LPSTR
,DWORD
,LPDWORD
,LPCWSTR
,DWORD
);
1555 ULONG WINAPI
RtlUniform(PULONG
);
1556 BOOLEAN WINAPI
RtlUnlockHeap(HANDLE
);
1557 void WINAPI
RtlUnwind(PVOID
,PVOID
,PEXCEPTION_RECORD
,PVOID
);
1559 void WINAPI
RtlUnwind2(FRAME_POINTERS
,PVOID
,PEXCEPTION_RECORD
,PVOID
,PCONTEXT
);
1560 void WINAPI
RtlUnwindEx(FRAME_POINTERS
,PVOID
,PEXCEPTION_RECORD
,PVOID
,PCONTEXT
,PUNWIND_HISTORY_TABLE
);
1562 WCHAR WINAPI
RtlUpcaseUnicodeChar(WCHAR
);
1563 NTSTATUS WINAPI
RtlUpcaseUnicodeString(UNICODE_STRING
*,const UNICODE_STRING
*,BOOLEAN
);
1564 NTSTATUS WINAPI
RtlUpcaseUnicodeStringToAnsiString(STRING
*,const UNICODE_STRING
*,BOOLEAN
);
1565 NTSTATUS WINAPI
RtlUpcaseUnicodeStringToCountedOemString(STRING
*,const UNICODE_STRING
*,BOOLEAN
);
1566 NTSTATUS WINAPI
RtlUpcaseUnicodeStringToOemString(STRING
*,const UNICODE_STRING
*,BOOLEAN
);
1567 NTSTATUS WINAPI
RtlUpcaseUnicodeToMultiByteN(LPSTR
,DWORD
,LPDWORD
,LPCWSTR
,DWORD
);
1568 NTSTATUS WINAPI
RtlUpcaseUnicodeToOemN(LPSTR
,DWORD
,LPDWORD
,LPCWSTR
,DWORD
);
1569 CHAR WINAPI
RtlUpperChar(CHAR
);
1570 void WINAPI
RtlUpperString(STRING
*,const STRING
*);
1572 NTSTATUS WINAPI
RtlValidSecurityDescriptor(PSECURITY_DESCRIPTOR
);
1573 BOOLEAN WINAPI
RtlValidAcl(PACL
);
1574 BOOLEAN WINAPI
RtlValidSid(PSID
);
1575 BOOLEAN WINAPI
RtlValidateHeap(HANDLE
,ULONG
,LPCVOID
);
1576 NTSTATUS WINAPI
RtlVerifyVersionInfo(const RTL_OSVERSIONINFOEXW
*,DWORD
,DWORDLONG
);
1578 NTSTATUS WINAPI
RtlWalkHeap(HANDLE
,PVOID
);
1580 NTSTATUS WINAPI
RtlpWaitForCriticalSection(RTL_CRITICAL_SECTION
*);
1581 NTSTATUS WINAPI
RtlpUnWaitCriticalSection(RTL_CRITICAL_SECTION
*);
1583 /* Wine internal functions */
1585 extern NTSTATUS
wine_nt_to_unix_file_name( const UNICODE_STRING
*nameW
, ANSI_STRING
*unix_name_ret
,
1586 UINT disposition
, BOOLEAN check_case
);
1588 /***********************************************************************
1592 #define InitializeObjectAttributes(p,n,a,r,s) \
1594 (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
1595 (p)->RootDirectory = r; \
1596 (p)->Attributes = a; \
1597 (p)->ObjectName = n; \
1598 (p)->SecurityDescriptor = s; \
1599 (p)->SecurityQualityOfService = NULL; \
1602 #define NtCurrentProcess() ((HANDLE)-1)
1604 #define RtlFillMemory(Destination,Length,Fill) memset((Destination),(Fill),(Length))
1605 #define RtlMoveMemory(Destination,Source,Length) memmove((Destination),(Source),(Length))
1606 #define RtlStoreUlong(p,v) do { ULONG _v = (v); memcpy((p), &_v, sizeof(_v)); } while (0)
1607 #define RtlStoreUlonglong(p,v) do { ULONGLONG _v = (v); memcpy((p), &_v, sizeof(_v)); } while (0)
1608 #define RtlRetrieveUlong(p,s) memcpy((p), (s), sizeof(ULONG))
1609 #define RtlRetrieveUlonglong(p,s) memcpy((p), (s), sizeof(ULONGLONG))
1610 #define RtlZeroMemory(Destination,Length) memset((Destination),0,(Length))
1612 inline static BOOLEAN
RtlCheckBit(PCRTL_BITMAP lpBits
, ULONG ulBit
)
1614 if (lpBits
&& ulBit
< lpBits
->SizeOfBitMap
&&
1615 lpBits
->BitMapBuffer
[ulBit
>> 3] & (1 << (ulBit
& 7)))
1620 #define RtlClearAllBits(p) \
1622 PRTL_BITMAP _p = (p); \
1623 memset(_p->BitMapBuffer,0,((_p->SizeOfBitMap + 31) & 0xffffffe0) >> 3); \
1626 #define RtlInitializeBitMap(p,b,s) \
1628 PRTL_BITMAP _p = (p); \
1629 _p->SizeOfBitMap = (s); \
1630 _p->BitMapBuffer = (b); \
1633 #define RtlSetAllBits(p) \
1635 PRTL_BITMAP _p = (p); \
1636 memset(_p->BitMapBuffer,0xff,((_p->SizeOfBitMap + 31) & 0xffffffe0) >> 3); \
1639 /* These are implemented as __fastcall, so we can't let Winelib apps link with them */
1640 inline static USHORT
RtlUshortByteSwap(USHORT s
)
1642 return (s
>> 8) | (s
<< 8);
1644 inline static ULONG
RtlUlongByteSwap(ULONG i
)
1646 #if defined(__i386__) && defined(__GNUC__)
1648 __asm__("bswap %0" : "=r" (ret
) : "0" (i
) );
1651 return ((ULONG
)RtlUshortByteSwap((USHORT
)i
) << 16) | RtlUshortByteSwap((USHORT
)(i
>> 16));
1655 /*************************************************************************
1656 * Loader functions and structures.
1658 * Those are not part of standard Winternl.h
1660 typedef struct _LDR_MODULE
1662 LIST_ENTRY InLoadOrderModuleList
;
1663 LIST_ENTRY InMemoryOrderModuleList
;
1664 LIST_ENTRY InInitializationOrderModuleList
;
1668 UNICODE_STRING FullDllName
;
1669 UNICODE_STRING BaseDllName
;
1673 HANDLE SectionHandle
;
1675 ULONG TimeDateStamp
;
1676 } LDR_MODULE
, *PLDR_MODULE
;
1678 /* those defines are (some of the) regular LDR_MODULE.Flags values */
1679 #define LDR_IMAGE_IS_DLL 0x00000004
1680 #define LDR_LOAD_IN_PROGRESS 0x00001000
1681 #define LDR_UNLOAD_IN_PROGRESS 0x00002000
1682 #define LDR_NO_DLL_CALLS 0x00040000
1683 #define LDR_PROCESS_ATTACHED 0x00080000
1684 #define LDR_MODULE_REBASED 0x00200000
1686 /* these ones is Wine specific */
1687 #define LDR_DONT_RESOLVE_REFS 0x40000000
1688 #define LDR_WINE_INTERNAL 0x80000000
1690 /* FIXME: to be checked */
1691 #define MAXIMUM_FILENAME_LENGTH 256
1693 typedef struct _SYSTEM_MODULE
1697 PVOID ImageBaseAddress
;
1704 BYTE Name
[MAXIMUM_FILENAME_LENGTH
];
1705 } SYSTEM_MODULE
, *PSYSTEM_MODULE
;
1707 typedef struct _SYSTEM_MODULE_INFORMATION
1710 SYSTEM_MODULE Modules
[1]; /* FIXME: should be Modules[0] */
1711 } SYSTEM_MODULE_INFORMATION
, *PSYSTEM_MODULE_INFORMATION
;
1713 NTSTATUS WINAPI
LdrDisableThreadCalloutsForDll(HMODULE
);
1714 NTSTATUS WINAPI
LdrFindEntryForAddress(const void*, PLDR_MODULE
*);
1715 NTSTATUS WINAPI
LdrLockLoaderLock(ULONG
,ULONG
*,ULONG
*);
1716 NTSTATUS WINAPI
LdrQueryProcessModuleInformation(SYSTEM_MODULE_INFORMATION
*, ULONG
, ULONG
*);
1717 NTSTATUS WINAPI
LdrUnloadDll(HMODULE
);
1718 NTSTATUS WINAPI
LdrUnlockLoaderLock(ULONG
,ULONG
);
1720 /* list manipulation macros */
1721 #define InitializeListHead(le) (void)((le)->Flink = (le)->Blink = (le))
1722 #define InsertHeadList(le,e) do { PLIST_ENTRY f = (le)->Flink; (e)->Flink = f; (e)->Blink = (le); f->Blink = (e); (le)->Flink = (e); } while (0)
1723 #define InsertTailList(le,e) do { PLIST_ENTRY b = (le)->Blink; (e)->Flink = (le); (e)->Blink = b; b->Flink = (e); (le)->Blink = (e); } while (0)
1724 #define IsListEmpty(le) ((le)->Flink == (le))
1725 #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)
1726 static inline PLIST_ENTRY
RemoveHeadList(PLIST_ENTRY le
)
1728 PLIST_ENTRY f
, b
, e
;
1731 f
= le
->Flink
->Flink
;
1732 b
= le
->Flink
->Blink
;
1736 if (e
!= le
) e
->Flink
= e
->Blink
= NULL
;
1739 static inline PLIST_ENTRY
RemoveTailList(PLIST_ENTRY le
)
1741 PLIST_ENTRY f
, b
, e
;
1744 f
= le
->Blink
->Flink
;
1745 b
= le
->Blink
->Blink
;
1749 if (e
!= le
) e
->Flink
= e
->Blink
= NULL
;
1755 #endif /* defined(__cplusplus) */
1757 #endif /* __WINE_WINTERNAL_H */