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 UNICODE_STRING CurrentDirectoryName
;
110 HANDLE CurrentDirectoryHandle
;
111 UNICODE_STRING DllPath
;
112 UNICODE_STRING ImagePathName
;
113 UNICODE_STRING CommandLine
;
121 ULONG dwFillAttribute
;
124 UNICODE_STRING WindowTitle
;
125 UNICODE_STRING Desktop
;
126 UNICODE_STRING ShellInfo
;
127 UNICODE_STRING RuntimeInfo
;
128 RTL_DRIVE_LETTER_CURDIR DLCurrentDirectory
[0x20];
129 } RTL_USER_PROCESS_PARAMETERS
, *PRTL_USER_PROCESS_PARAMETERS
;
131 /* value for Flags field (FIXME: not the correct name) */
132 #define PROCESS_PARAMS_FLAG_NORMALIZED 1
134 typedef struct _PEB_LDR_DATA
139 LIST_ENTRY InLoadOrderModuleList
;
140 LIST_ENTRY InMemoryOrderModuleList
;
141 LIST_ENTRY InInitializationOrderModuleList
;
142 } PEB_LDR_DATA
, *PPEB_LDR_DATA
;
144 /***********************************************************************
149 BYTE Reserved1
[2]; /* 00 */
150 BYTE BeingDebugged
; /* 02 */
151 BYTE Reserved2
[5]; /* 03 */
152 HMODULE ImageBaseAddress
; /* 08 */
153 PPEB_LDR_DATA LdrData
; /* 0c */
154 RTL_USER_PROCESS_PARAMETERS
*ProcessParameters
; /* 10 */
155 PVOID __pad_14
; /* 14 */
156 HANDLE ProcessHeap
; /* 18 */
157 BYTE __pad_1c
[36]; /* 1c */
158 PRTL_BITMAP TlsBitmap
; /* 40 */
159 ULONG TlsBitmapBits
[2]; /* 44 */
160 BYTE __pad_4c
[156]; /* 4c */
161 PVOID Reserved3
[59]; /* e8 */
162 ULONG SessionId
; /* 1d4 */
166 /***********************************************************************
169 #if defined(_NTSYSTEM_) || defined(_KERNEL32_) /* hack, should go away */
173 #ifndef WINE_NO_TEB /* don't define TEB if included from thread.h */
174 # ifndef WINE_TEB_DEFINED
175 # define WINE_TEB_DEFINED
178 NT_TIB Tib
; /* 000 */
179 PVOID EnvironmentPointer
; /* 01c */
180 CLIENT_ID ClientId
; /* 020 */
181 PVOID ActiveRpcHandle
; /* 028 */
182 PVOID ThreadLocalStoragePointer
; /* 02c */
184 ULONG LastErrorValue
; /* 034 */
185 BYTE __pad038
[140]; /* 038 */
186 ULONG CurrentLocale
; /* 0c4 */
187 BYTE __pad0c8
[1752]; /* 0c8 */
188 PVOID Reserved2
[278]; /* 7a0 */
189 UNICODE_STRING StaticUnicodeString
; /* bf8 used by advapi32 */
190 WCHAR StaticUnicodeBuffer
[261]; /* c00 used by advapi32 */
191 PVOID DeallocationStack
; /* e0c */
192 PVOID TlsSlots
[64]; /* e10 */
193 LIST_ENTRY TlsLinks
; /* f10 */
194 PVOID Reserved4
[26]; /* f18 */
195 PVOID ReservedForOle
; /* f80 Windows 2000 only */
196 PVOID Reserved5
[4]; /* f84 */
197 PVOID TlsExpansionSlots
; /* f94 */
199 # endif /* WINE_TEB_DEFINED */
200 #endif /* WINE_NO_TEB */
202 /***********************************************************************
206 typedef enum _FILE_INFORMATION_CLASS
{
207 FileDirectoryInformation
= 1,
208 FileFullDirectoryInformation
,
209 FileBothDirectoryInformation
,
210 FileBasicInformation
,
211 FileStandardInformation
,
212 FileInternalInformation
,
214 FileAccessInformation
,
216 FileRenameInformation
,
218 FileNamesInformation
,
219 FileDispositionInformation
,
220 FilePositionInformation
,
221 FileFullEaInformation
,
223 FileAlignmentInformation
,
225 FileAllocationInformation
,
226 FileEndOfFileInformation
,
227 FileAlternateNameInformation
,
228 FileStreamInformation
,
230 FilePipeLocalInformation
,
231 FilePipeRemoteInformation
,
232 FileMailslotQueryInformation
,
233 FileMailslotSetInformation
,
234 FileCompressionInformation
,
235 FileObjectIdInformation
,
236 FileCompletionInformation
,
237 FileMoveClusterInformation
,
238 FileQuotaInformation
,
239 FileReparsePointInformation
,
240 FileNetworkOpenInformation
,
241 FileAttributeTagInformation
,
242 FileTrackingInformation
,
243 FileMaximumInformation
244 } FILE_INFORMATION_CLASS
, *PFILE_INFORMATION_CLASS
;
246 typedef struct _FILE_DIRECTORY_INFORMATION
{
247 ULONG NextEntryOffset
;
249 LARGE_INTEGER CreationTime
;
250 LARGE_INTEGER LastAccessTime
;
251 LARGE_INTEGER LastWriteTime
;
252 LARGE_INTEGER ChangeTime
;
253 LARGE_INTEGER EndOfFile
;
254 LARGE_INTEGER AllocationSize
;
255 ULONG FileAttributes
;
256 ULONG FileNameLength
;
257 WCHAR FileName
[ANYSIZE_ARRAY
];
258 } FILE_DIRECTORY_INFORMATION
, *PFILE_DIRECTORY_INFORMATION
;
260 typedef struct _FILE_FULL_DIRECTORY_INFORMATION
{
261 ULONG NextEntryOffset
;
263 LARGE_INTEGER CreationTime
;
264 LARGE_INTEGER LastAccessTime
;
265 LARGE_INTEGER LastWriteTime
;
266 LARGE_INTEGER ChangeTime
;
267 LARGE_INTEGER EndOfFile
;
268 LARGE_INTEGER AllocationSize
;
269 ULONG FileAttributes
;
270 ULONG FileNameLength
;
272 WCHAR FileName
[ANYSIZE_ARRAY
];
273 } FILE_FULL_DIRECTORY_INFORMATION
, *PFILE_FULL_DIRECTORY_INFORMATION
,
274 FILE_FULL_DIR_INFORMATION
, *PFILE_FULL_DIR_INFORMATION
;
276 typedef struct _FILE_BOTH_DIRECTORY_INFORMATION
{
277 ULONG NextEntryOffset
;
279 LARGE_INTEGER CreationTime
;
280 LARGE_INTEGER LastAccessTime
;
281 LARGE_INTEGER LastWriteTime
;
282 LARGE_INTEGER ChangeTime
;
283 LARGE_INTEGER EndOfFile
;
284 LARGE_INTEGER AllocationSize
;
285 ULONG FileAttributes
;
286 ULONG FileNameLength
;
288 CHAR ShortNameLength
;
290 WCHAR FileName
[ANYSIZE_ARRAY
];
291 } FILE_BOTH_DIRECTORY_INFORMATION
, *PFILE_BOTH_DIRECTORY_INFORMATION
,
292 FILE_BOTH_DIR_INFORMATION
, *PFILE_BOTH_DIR_INFORMATION
;
294 typedef struct _FILE_BASIC_INFORMATION
{
295 LARGE_INTEGER CreationTime
;
296 LARGE_INTEGER LastAccessTime
;
297 LARGE_INTEGER LastWriteTime
;
298 LARGE_INTEGER ChangeTime
;
299 ULONG FileAttributes
;
300 } FILE_BASIC_INFORMATION
, *PFILE_BASIC_INFORMATION
;
302 typedef struct _FILE_STANDARD_INFORMATION
{
303 LARGE_INTEGER AllocationSize
;
304 LARGE_INTEGER EndOfFile
;
306 BOOLEAN DeletePending
;
308 } FILE_STANDARD_INFORMATION
, *PFILE_STANDARD_INFORMATION
;
310 typedef struct _FILE_POSITION_INFORMATION
{
311 LARGE_INTEGER CurrentByteOffset
;
312 } FILE_POSITION_INFORMATION
, *PFILE_POSITION_INFORMATION
;
314 typedef struct _FILE_ALIGNMENT_INFORMATION
{
315 ULONG AlignmentRequirement
;
316 } FILE_ALIGNMENT_INFORMATION
, *PFILE_ALIGNMENT_INFORMATION
;
318 typedef struct _FILE_NETWORK_OPEN_INFORMATION
{
319 LARGE_INTEGER CreationTime
;
320 LARGE_INTEGER LastAccessTime
;
321 LARGE_INTEGER LastWriteTime
;
322 LARGE_INTEGER ChangeTime
;
323 LARGE_INTEGER AllocationSize
;
324 LARGE_INTEGER EndOfFile
;
325 ULONG FileAttributes
;
326 } FILE_NETWORK_OPEN_INFORMATION
, *PFILE_NETWORK_OPEN_INFORMATION
;
328 typedef struct _FILE_FULL_EA_INFORMATION
{
329 ULONG NextEntryOffset
;
332 USHORT EaValueLength
;
334 } FILE_FULL_EA_INFORMATION
, *PFILE_FULL_EA_INFORMATION
;
336 typedef struct _FILE_STREAM_INFORMATION
338 ULONG NextEntryOffset
;
339 ULONG StreamNameLength
;
340 LARGE_INTEGER StreamSize
;
341 LARGE_INTEGER StreamAllocationSize
;
343 } FILE_STREAM_INFORMATION
, *PFILE_STREAM_INFORMATION
;
345 struct _FILE_ATTRIBUTE_TAG_INFORMATION
347 ULONG FileAttributes
;
349 } FILE_ATTRIBUTE_TAG_INFORMATION
, *PFILE_ATTRIBUTE_TAG_INFORMATION
;
351 typedef enum _FSINFOCLASS
{
352 FileFsVolumeInformation
= 1,
353 FileFsLabelInformation
,
354 FileFsSizeInformation
,
355 FileFsDeviceInformation
,
356 FileFsAttributeInformation
,
357 FileFsControlInformation
,
358 FileFsFullSizeInformation
,
359 FileFsObjectIdInformation
,
360 FileFsMaximumInformation
361 } FS_INFORMATION_CLASS
, *PFS_INFORMATION_CLASS
;
363 typedef enum _KEY_INFORMATION_CLASS
{
367 } KEY_INFORMATION_CLASS
;
369 typedef enum _KEY_VALUE_INFORMATION_CLASS
{
370 KeyValueBasicInformation
,
371 KeyValueFullInformation
,
372 KeyValuePartialInformation
,
373 KeyValueFullInformationAlign64
,
374 KeyValuePartialInformationAlign64
375 } KEY_VALUE_INFORMATION_CLASS
;
377 typedef enum _OBJECT_INFORMATION_CLASS
{
378 ObjectBasicInformation
,
379 ObjectNameInformation
,
380 ObjectTypeInformation
,
381 ObjectAllInformation
,
382 ObjectDataInformation
383 } OBJECT_INFORMATION_CLASS
, *POBJECT_INFORMATION_CLASS
;
385 typedef enum _PROCESSINFOCLASS
{
386 ProcessBasicInformation
= 0,
387 ProcessQuotaLimits
= 1,
388 ProcessIoCounters
= 2,
389 ProcessVmCounters
= 3,
391 ProcessBasePriority
= 5,
392 ProcessRaisePriority
= 6,
393 ProcessDebugPort
= 7,
394 ProcessExceptionPort
= 8,
395 ProcessAccessToken
= 9,
396 ProcessLdtInformation
= 10,
398 ProcessDefaultHardErrorMode
= 12,
399 ProcessIoPortHandlers
= 13,
400 ProcessPooledUsageAndLimits
= 14,
401 ProcessWorkingSetWatch
= 15,
402 ProcessUserModeIOPL
= 16,
403 ProcessEnableAlignmentFaultFixup
= 17,
404 ProcessPriorityClass
= 18,
405 ProcessWx86Information
= 19,
406 ProcessHandleCount
= 20,
407 ProcessAffinityMask
= 21,
408 ProcessPriorityBoost
= 22,
409 ProcessDeviceMap
= 23,
410 ProcessSessionInformation
= 24,
411 ProcessForegroundInformation
= 25,
412 ProcessWow64Information
= 26,
416 typedef enum _SECTION_INHERIT
{
421 typedef enum SYSTEM_INFORMATION_CLASS
{
422 SystemBasicInformation
= 0,
424 SystemPerformanceInformation
= 2,
425 SystemTimeOfDayInformation
= 3, /* was SystemTimeInformation */
427 SystemProcessInformation
= 5,
430 SystemProcessorPerformanceInformation
= 8,
433 SystemDriverInformation
,
443 SystemCacheInformation
,
445 SystemInterruptInformation
= 23,
446 SystemExceptionInformation
= 33,
447 SystemRegistryQuotaInformation
= 37,
448 SystemLookasideInformation
= 45
449 } SYSTEM_INFORMATION_CLASS
, *PSYSTEM_INFORMATION_CLASS
;
451 typedef enum _TIMER_TYPE
{
456 typedef enum _THREADINFOCLASS
{
457 ThreadBasicInformation
,
462 ThreadImpersonationToken
,
463 ThreadDescriptorTableEntry
,
464 ThreadEnableAlignmentFaultFixup
,
465 ThreadEventPair_Reusable
,
466 ThreadQuerySetWin32StartAddress
,
468 ThreadPerformanceCount
,
470 ThreadIdealProcessor
,
472 ThreadSetTlsArrayAddress
,
477 typedef struct _THREAD_BASIC_INFORMATION
480 PVOID TebBaseAddress
;
485 } THREAD_BASIC_INFORMATION
, *PTHREAD_BASIC_INFORMATION
;
488 typedef enum _WINSTATIONINFOCLASS
{
489 WinStationInformation
= 8
490 } WINSTATIONINFOCLASS
;
494 MemoryBasicInformation
= 0
495 } MEMORY_INFORMATION_CLASS
;
497 /* return type of RtlDetermineDosPathNameType_U (FIXME: not the correct names) */
501 UNC_PATH
, /* "//foo" */
502 ABSOLUTE_DRIVE_PATH
, /* "c:/foo" */
503 RELATIVE_DRIVE_PATH
, /* "c:foo" */
504 ABSOLUTE_PATH
, /* "/foo" */
505 RELATIVE_PATH
, /* "foo" */
506 DEVICE_PATH
, /* "//./foo" */
507 UNC_DOT_PATH
/* "//." */
510 /***********************************************************************
511 * IA64 specific types and data structures
516 typedef struct _FRAME_POINTERS
{
517 ULONGLONG MemoryStackFp
;
518 ULONGLONG BackingStoreFp
;
519 } FRAME_POINTERS
, *PFRAME_POINTERS
;
521 #define UNWIND_HISTORY_TABLE_SIZE 12
523 typedef struct _RUNTIME_FUNCTION
{
526 ULONG UnwindInfoAddress
;
527 } RUNTIME_FUNCTION
, *PRUNTIME_FUNCTION
;
529 typedef struct _UNWIND_HISTORY_TABLE_ENTRY
{
532 PRUNTIME_FUNCTION FunctionEntry
;
533 } UNWIND_HISTORY_TABLE_ENTRY
, *PUNWIND_HISTORY_TABLE_ENTRY
;
535 typedef struct _UNWIND_HISTORY_TABLE
{
540 UNWIND_HISTORY_TABLE_ENTRY Entry
[UNWIND_HISTORY_TABLE_SIZE
];
541 } UNWIND_HISTORY_TABLE
, *PUNWIND_HISTORY_TABLE
;
543 #endif /* defined(__ia64__) */
545 /***********************************************************************
546 * Types and data structures
549 /* This is used by NtQuerySystemInformation */
550 /* FIXME: Isn't THREAD_INFO and THREADINFO the same structure? */
552 FILETIME ftKernelTime
;
554 FILETIME ftCreateTime
;
556 DWORD dwStartAddress
;
559 DWORD dwCurrentPriority
;
560 DWORD dwBasePriority
;
561 DWORD dwContextSwitches
;
564 } THREADINFO
, *PTHREADINFO
;
566 /* FIXME: Isn't THREAD_INFO and THREADINFO the same structure? */
567 typedef struct _THREAD_INFO
{
574 } THREAD_INFO
, PTHREAD_INFO
;
576 /***********************************************************************
577 * Types and data structures
580 typedef struct _IO_STATUS_BLOCK
{
586 ULONG_PTR Information
;
587 } IO_STATUS_BLOCK
, *PIO_STATUS_BLOCK
;
589 typedef void (WINAPI
* PIO_APC_ROUTINE
)(PVOID
,PIO_STATUS_BLOCK
,ULONG
);
591 typedef struct _KEY_BASIC_INFORMATION
{
592 LARGE_INTEGER LastWriteTime
;
596 } KEY_BASIC_INFORMATION
, *PKEY_BASIC_INFORMATION
;
598 typedef struct _KEY_NODE_INFORMATION
600 LARGE_INTEGER LastWriteTime
;
607 } KEY_NODE_INFORMATION
, *PKEY_NODE_INFORMATION
;
609 typedef struct _KEY_FULL_INFORMATION
611 LARGE_INTEGER LastWriteTime
;
619 ULONG MaxValueNameLen
;
620 ULONG MaxValueDataLen
;
622 } KEY_FULL_INFORMATION
, *PKEY_FULL_INFORMATION
;
624 typedef struct _KEY_VALUE_ENTRY
626 PUNICODE_STRING ValueName
;
630 } KEY_VALUE_ENTRY
, *PKEY_VALUE_ENTRY
;
632 typedef struct _KEY_VALUE_BASIC_INFORMATION
{
637 } KEY_VALUE_BASIC_INFORMATION
, *PKEY_VALUE_BASIC_INFORMATION
;
639 typedef struct _KEY_VALUE_FULL_INFORMATION
{
646 } KEY_VALUE_FULL_INFORMATION
, *PKEY_VALUE_FULL_INFORMATION
;
648 typedef struct _KEY_VALUE_PARTIAL_INFORMATION
{
653 } KEY_VALUE_PARTIAL_INFORMATION
, *PKEY_VALUE_PARTIAL_INFORMATION
;
655 typedef struct _OBJECT_ATTRIBUTES
{
657 HANDLE RootDirectory
;
658 PUNICODE_STRING ObjectName
;
660 PVOID SecurityDescriptor
; /* type SECURITY_DESCRIPTOR */
661 PVOID SecurityQualityOfService
; /* type SECURITY_QUALITY_OF_SERVICE */
662 } OBJECT_ATTRIBUTES
, *POBJECT_ATTRIBUTES
;
664 typedef struct _OBJECT_DATA_INFORMATION
{
665 BOOLEAN InheritHandle
;
666 BOOLEAN ProtectFromClose
;
667 } OBJECT_DATA_INFORMATION
, *POBJECT_DATA_INFORMATION
;
669 typedef struct _PROCESS_BASIC_INFORMATION
{
672 DWORD PebBaseAddress
;
675 ULONG UniqueProcessId
;
676 ULONG InheritedFromUniqueProcessId
;
681 ULONG_PTR UniqueProcessId
;
684 } PROCESS_BASIC_INFORMATION
, *PPROCESS_BASIC_INFORMATION
;
686 typedef struct _PROCESS_INFO
{
687 DWORD Offset
; /* 00 offset to next PROCESS_INFO ok*/
688 DWORD ThreadCount
; /* 04 number of ThreadInfo member ok */
690 FILETIME CreationTime
; /* 20 */
692 PWCHAR ProcessName
; /* 3c ok */
694 DWORD ProcessID
; /* 44 ok*/
695 DWORD ParentProcessID
;
697 DWORD Unknown3
[2]; /* 50 */
698 ULONG PeakVirtualSize
;
700 ULONG PageFaultCount
;
701 ULONG PeakWorkingSetSize
;
702 ULONG WorkingSetSize
;
703 ULONG QuotaPeakPagedPoolUsage
;
704 ULONG QuotaPagedPoolUsage
;
705 ULONG QuotaPeakNonPagedPoolUsage
;
706 ULONG QuotaNonPagedPoolUsage
;
708 ULONG PeakPagefileUsage
;
711 THREAD_INFO ati
[ANYSIZE_ARRAY
]; /* 94 size=0x40*/
712 } PROCESS_INFO
, PPROCESS_INFO
;
714 typedef struct _RTL_HEAP_DEFINITION
{
715 ULONG Length
; /* = sizeof(RTL_HEAP_DEFINITION) */
718 } RTL_HEAP_DEFINITION
, *PRTL_HEAP_DEFINITION
;
720 typedef struct _RTL_RWLOCK
{
721 RTL_CRITICAL_SECTION rtlCS
;
723 HANDLE hSharedReleaseSemaphore
;
726 HANDLE hExclusiveReleaseSemaphore
;
727 UINT uExclusiveWaiters
;
730 HANDLE hOwningThreadId
;
731 DWORD dwTimeoutBoost
;
733 } RTL_RWLOCK
, *LPRTL_RWLOCK
;
735 /* System Information Class 0x00 */
736 typedef struct _SYSTEM_BASIC_INFORMATION
{
739 ULONG uKeMaximumIncrement
;
741 ULONG uMmNumberOfPhysicalPages
;
742 ULONG uMmLowestPhysicalPage
;
743 ULONG uMmHighestPhysicalPage
;
744 ULONG uAllocationGranularity
;
745 PVOID pLowestUserAddress
;
746 PVOID pMmHighestUserAddress
;
747 ULONG uKeActiveProcessors
;
748 BYTE bKeNumberProcessors
;
754 CCHAR NumberOfProcessors
;
756 } SYSTEM_BASIC_INFORMATION
, *PSYSTEM_BASIC_INFORMATION
;
758 /* System Information Class 0x15 */
762 ULONG PageFaultCount
;
763 ULONG MinimumWorkingSet
;
764 ULONG MaximumWorkingSet
;
766 } SYSTEM_CACHE_INFORMATION
;
768 typedef struct _SYSTEM_CONFIGURATION_INFO
{
772 WORD ProcessorArchitecture
;
777 PVOID MinimumApplicationAddress
;
778 PVOID MaximumApplicationAddress
;
779 ULONG ActiveProcessorMask
;
780 ULONG NumberOfProcessors
;
782 ULONG AllocationGranularity
;
784 WORD ProcessorRevision
;
785 } SYSTEM_CONFIGURATION_INFO
, *PSYSTEM_CONFIGURATION_INFO
;
787 /* System Information Class 0x0b */
794 char szName
[MAX_PATH
+ 1];
795 } SYSTEM_DRIVER_INFORMATION
;
797 typedef struct _SYSTEM_EXCEPTION_INFORMATION
{
799 } SYSTEM_EXCEPTION_INFORMATION
, *PSYSTEM_EXCEPTION_INFORMATION
;
801 typedef struct _SYSTEM_LOOKASIDE_INFORMATION
{
803 } SYSTEM_LOOKASIDE_INFORMATION
, *PSYSTEM_LOOKASIDE_INFORMATION
;
805 typedef struct _SYSTEM_INTERRUPT_INFORMATION
{
807 } SYSTEM_INTERRUPT_INFORMATION
, *PSYSTEM_INTERRUPT_INFORMATION
;
809 /* System Information Class 0x10 */
812 USHORT dwCreatorBackTraceIndex
;
814 BYTE bHandleAttributes
;
815 USHORT usHandleOffset
;
817 ULONG ulGrantedAccess
;
818 } HANDLEINFO
, *PHANDLEINFO
; /* FIXME: SYSTEM_HANDLE_INFORMATION? */
820 typedef struct _SYSTEM_PERFORMANCE_INFORMATION
{
822 } SYSTEM_PERFORMANCE_INFORMATION
, *PSYSTEM_PERFORMANCE_INFORMATION
;
824 /* System Information Class 0x02 */
825 typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
{
827 LARGE_INTEGER liIdleTime
;
830 LARGE_INTEGER IdleTime
;
831 LARGE_INTEGER KernelTime
;
832 LARGE_INTEGER UserTime
;
833 LARGE_INTEGER Reserved1
[2];
836 } SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
, *PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
;
838 /* System Information Class 0x05 */
839 typedef struct _SYSTEM_PROCESS_INFORMATION
{
844 FILETIME ftCreationTime
;
846 WCHAR
*pszProcessName
;
847 DWORD dwBasePriority
;
849 DWORD dwParentProcessID
;
853 DWORD dwVirtualBytesPeak
;
854 DWORD dwVirtualBytes
;
856 DWORD dwWorkingSetPeak
;
861 DWORD dwNonPagedPool
;
862 DWORD dwPageFileBytesPeak
;
863 DWORD dwPrivateBytes
;
864 DWORD dwPageFileBytes
;
868 ULONG NextEntryOffset
;
871 HANDLE UniqueProcessId
;
876 SIZE_T PeakPagefileUsage
;
877 SIZE_T PrivatePageCount
;
878 LARGE_INTEGER Reserved6
[6];
880 } SYSTEM_PROCESS_INFORMATION
, *PSYSTEM_PROCESS_INFORMATION
;
882 typedef struct _SYSTEM_REGISTRY_QUOTA_INFORMATION
{
883 ULONG RegistryQuotaAllowed
;
884 ULONG RegistryQuotaUsed
;
886 } SYSTEM_REGISTRY_QUOTA_INFORMATION
, *PSYSTEM_REGISTRY_QUOTA_INFORMATION
;
888 typedef struct _SYSTEM_TIME_ADJUSTMENT
{
889 ULONG TimeAdjustment
;
890 BOOLEAN TimeAdjustmentDisabled
;
891 } SYSTEM_TIME_ADJUSTMENT
, *PSYSTEM_TIME_ADJUSTMENT
;
893 /* System Information Class 0x03 */
894 typedef struct _SYSTEM_TIMEOFDAY_INFORMATION
{
896 LARGE_INTEGER liKeBootTime
;
897 LARGE_INTEGER liKeSystemTime
;
898 LARGE_INTEGER liExpTimeZoneBias
;
899 ULONG uCurrentTimeZoneId
;
904 } SYSTEM_TIMEOFDAY_INFORMATION
, *PSYSTEM_TIMEOFDAY_INFORMATION
; /* was SYSTEM_TIME_INFORMATION */
906 typedef struct _TIME_FIELDS
915 } TIME_FIELDS
, *PTIME_FIELDS
;
917 typedef struct _WINSTATIONINFORMATIONW
{
920 BYTE Reserved3
[1140];
921 } WINSTATIONINFORMATIONW
, *PWINSTATIONINFORMATIONW
;
923 typedef struct _VM_COUNTERS_
{
924 ULONG PeakVirtualSize
;
926 ULONG PageFaultCount
;
927 ULONG PeakWorkingSetSize
;
928 ULONG WorkingSetSize
;
929 ULONG QuotaPeakPagedPoolUsage
;
930 ULONG QuotaPagedPoolUsage
;
931 ULONG QuotaPeakNonPagedPoolUsage
;
932 ULONG QuotaNonPagedPoolUsage
;
934 ULONG PeakPagefileUsage
;
935 } VM_COUNTERS
, *PVM_COUNTERS
;
937 typedef BOOLEAN (WINAPI
* PWINSTATIONQUERYINFORMATIONW
)(HANDLE
,ULONG
,WINSTATIONINFOCLASS
,PVOID
,ULONG
,PULONG
);
939 typedef struct _LDR_RESOURCE_INFO
944 } LDR_RESOURCE_INFO
, *PLDR_RESOURCE_INFO
;
947 /* debug buffer definitions */
949 typedef struct _DEBUG_BUFFER
{
950 HANDLE SectionHandle
;
952 PVOID RemoteSectionBase
;
953 ULONG SectionBaseDelta
;
954 HANDLE EventPairHandle
;
956 HANDLE RemoteThreadHandle
;
961 PVOID ModuleInformation
;
962 PVOID BackTraceInformation
;
963 PVOID HeapInformation
;
964 PVOID LockInformation
;
966 } DEBUG_BUFFER
, *PDEBUG_BUFFER
;
968 #define PDI_MODULES 0x01
969 #define PDI_BACKTRACE 0x02
970 #define PDI_HEAPS 0x04
971 #define PDI_HEAP_TAGS 0x08
972 #define PDI_HEAP_BLOCKS 0x10
973 #define PDI_LOCKS 0x20
975 typedef struct _DEBUG_MODULE_INFORMATION
{
983 USHORT ModuleNameOffset
;
985 } DEBUG_MODULE_INFORMATION
, *PDEBUG_MODULE_INFORMATION
;
987 typedef struct _DEBUG_HEAP_INFORMATION
{
999 } DEBUG_HEAP_INFORMATION
, *PDEBUG_HEAP_INFORMATION
;
1001 typedef struct _DEBUG_LOCK_INFORMATION
{
1004 USHORT CreatorBackTraceIndex
;
1005 ULONG OwnerThreadId
;
1007 ULONG ContentionCount
;
1009 ULONG RecursionCount
;
1010 ULONG NumberOfSharedWaiters
;
1011 ULONG NumberOfExclusiveWaiters
;
1012 } DEBUG_LOCK_INFORMATION
, *PDEBUG_LOCK_INFORMATION
;
1015 /***********************************************************************
1019 /* flags for NtCreateFile and NtOpenFile */
1020 #define FILE_DIRECTORY_FILE 0x00000001
1021 #define FILE_WRITE_THROUGH 0x00000002
1022 #define FILE_SEQUENTIAL_ONLY 0x00000004
1023 #define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008
1024 #define FILE_SYNCHRONOUS_IO_ALERT 0x00000010
1025 #define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020
1026 #define FILE_NON_DIRECTORY_FILE 0x00000040
1027 #define FILE_CREATE_TREE_CONNECTION 0x00000080
1028 #define FILE_COMPLETE_IF_OPLOCKED 0x00000100
1029 #define FILE_NO_EA_KNOWLEDGE 0x00000200
1030 #define FILE_OPEN_FOR_RECOVERY 0x00000400
1031 #define FILE_RANDOM_ACCESS 0x00000800
1032 #define FILE_DELETE_ON_CLOSE 0x00001000
1033 #define FILE_OPEN_BY_FILE_ID 0x00002000
1034 #define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000
1035 #define FILE_NO_COMPRESSION 0x00008000
1036 #define FILE_RESERVE_OPFILTER 0x00100000
1037 #define FILE_TRANSACTED_MODE 0x00200000
1038 #define FILE_OPEN_OFFLINE_FILE 0x00400000
1040 #define FILE_ATTRIBUTE_VALID_FLAGS 0x00007fb7
1041 #define FILE_ATTRIBUTE_VALID_SET_FLAGS 0x000031a7
1043 /* status for NtCreateFile or NtOpenFile */
1044 #define FILE_SUPERSEDED 0
1045 #define FILE_OPENED 1
1046 #define FILE_CREATED 2
1047 #define FILE_OVERWRITTEN 3
1048 #define FILE_EXISTS 4
1049 #define FILE_DOES_NOT_EXIST 5
1051 /* disposition for NtCreateFile */
1052 #define FILE_SUPERSEDE 0
1054 #define FILE_CREATE 2
1055 #define FILE_OPEN_IF 3
1056 #define FILE_OVERWRITE 4
1057 #define FILE_OVERWRITE_IF 5
1058 #define FILE_MAXIMUM_DISPOSITION 5
1060 /* Characteristics of a File System */
1061 #define FILE_REMOVABLE_MEDIA 0x00000001
1062 #define FILE_READ_ONLY_DEVICE 0x00000002
1063 #define FILE_FLOPPY_DISKETTE 0x00000004
1064 #define FILE_WRITE_ONE_MEDIA 0x00000008
1065 #define FILE_REMOTE_DEVICE 0x00000010
1066 #define FILE_DEVICE_IS_MOUNTED 0x00000020
1067 #define FILE_VIRTUAL_VOLUME 0x00000040
1069 #if (_WIN32_WINNT >= 0x0501)
1070 #define INTERNAL_TS_ACTIVE_CONSOLE_ID ( *((volatile ULONG*)(0x7ffe02d8)) )
1071 #endif /* (_WIN32_WINNT >= 0x0501) */
1073 #define LOGONID_CURRENT ((ULONG)-1)
1075 #define OBJ_INHERIT 0x00000002L
1076 #define OBJ_PERMANENT 0x00000010L
1077 #define OBJ_EXCLUSIVE 0x00000020L
1078 #define OBJ_CASE_INSENSITIVE 0x00000040L
1079 #define OBJ_OPENIF 0x00000080L
1080 #define OBJ_OPENLINK 0x00000100L
1081 #define OBJ_KERNEL_HANDLE 0x00000200L
1082 #define OBJ_VALID_ATTRIBUTES 0x000003F2L
1084 #define SERVERNAME_CURRENT ((HANDLE)NULL)
1086 typedef void (CALLBACK
*PNTAPCFUNC
)(ULONG_PTR
,ULONG_PTR
,ULONG_PTR
); /* FIXME: not the right name */
1087 typedef void (CALLBACK
*PRTL_THREAD_START_ROUTINE
)(LPVOID
); /* FIXME: not the right name */
1089 /***********************************************************************
1090 * Function declarations
1093 extern LPSTR
_strlwr(LPSTR str
); /* FIXME: Doesn't belong here */
1094 extern LPSTR
_strupr(LPSTR str
); /* FIXME: Doesn't belong here */
1096 #if defined(__i386__) && defined(__GNUC__)
1097 static inline void WINAPI
DbgBreakPoint(void) { __asm__
__volatile__("int3"); }
1098 static inline void WINAPI
DbgUserBreakPoint(void) { __asm__
__volatile__("int3"); }
1099 #else /* __i386__ && __GNUC__ */
1100 void WINAPI
DbgBreakPoint(void);
1101 void WINAPI
DbgUserBreakPoint(void);
1102 #endif /* __i386__ && __GNUC__ */
1103 void WINAPIV
DbgPrint(LPCSTR fmt
, ...);
1105 NTSTATUS WINAPI
LdrAccessResource(HMODULE
,const IMAGE_RESOURCE_DATA_ENTRY
*,void**,PULONG
);
1106 NTSTATUS WINAPI
LdrFindResourceDirectory_U(HMODULE
,const LDR_RESOURCE_INFO
*,ULONG
,const IMAGE_RESOURCE_DIRECTORY
**);
1107 NTSTATUS WINAPI
LdrFindResource_U(HMODULE
,const LDR_RESOURCE_INFO
*,ULONG
,const IMAGE_RESOURCE_DATA_ENTRY
**);
1108 NTSTATUS WINAPI
LdrGetDllHandle(ULONG
, ULONG
, const UNICODE_STRING
*, HMODULE
*);
1109 NTSTATUS WINAPI
LdrGetProcedureAddress(HMODULE
, const ANSI_STRING
*, ULONG
, void**);
1110 void WINAPI
LdrInitializeThunk(HANDLE
,ULONG
,ULONG
,ULONG
);
1111 NTSTATUS WINAPI
LdrLoadDll(LPCWSTR
, DWORD
, const UNICODE_STRING
*, HMODULE
*);
1112 void WINAPI
LdrShutdownProcess(void);
1113 void WINAPI
LdrShutdownThread(void);
1114 NTSTATUS WINAPI
NtAccessCheck(PSECURITY_DESCRIPTOR
,HANDLE
,ACCESS_MASK
,PGENERIC_MAPPING
,PPRIVILEGE_SET
,PULONG
,PULONG
,PBOOLEAN
);
1115 NTSTATUS WINAPI
NtAdjustPrivilegesToken(HANDLE
,BOOLEAN
,PTOKEN_PRIVILEGES
,DWORD
,PTOKEN_PRIVILEGES
,PDWORD
);
1116 NTSTATUS WINAPI
NtAllocateVirtualMemory(HANDLE
,PVOID
*,PVOID
,ULONG
*,ULONG
,ULONG
);
1117 NTSTATUS WINAPI
NtCancelTimer(HANDLE
, BOOLEAN
*);
1118 NTSTATUS WINAPI
NtClearEvent(HANDLE
);
1119 NTSTATUS WINAPI
NtClose(HANDLE
);
1120 NTSTATUS WINAPI
NtCreateEvent(PHANDLE
,ACCESS_MASK
,const OBJECT_ATTRIBUTES
*,BOOLEAN
,BOOLEAN
);
1121 NTSTATUS WINAPI
NtCreateFile(PHANDLE
,ACCESS_MASK
,POBJECT_ATTRIBUTES
,PIO_STATUS_BLOCK
,PLARGE_INTEGER
,ULONG
,ULONG
,ULONG
,ULONG
,PVOID
,ULONG
);
1122 NTSTATUS WINAPI
NtCreateKey(PHKEY
,ACCESS_MASK
,const OBJECT_ATTRIBUTES
*,ULONG
,const UNICODE_STRING
*,ULONG
,PULONG
);
1123 NTSTATUS WINAPI
NtCreateSection(HANDLE
*,ACCESS_MASK
,const OBJECT_ATTRIBUTES
*,const LARGE_INTEGER
*,ULONG
,ULONG
,HANDLE
);
1124 NTSTATUS WINAPI
NtCreateSemaphore(PHANDLE
,ACCESS_MASK
,const OBJECT_ATTRIBUTES
*,ULONG
,ULONG
);
1125 NTSTATUS WINAPI
NtCreateTimer(HANDLE
*, ACCESS_MASK
, const OBJECT_ATTRIBUTES
*, TIMER_TYPE
);
1126 NTSTATUS WINAPI
NtDelayExecution(BOOLEAN
,const LARGE_INTEGER
*);
1127 NTSTATUS WINAPI
NtDeleteKey(HKEY
);
1128 NTSTATUS WINAPI
NtDeleteValueKey(HKEY
,const UNICODE_STRING
*);
1129 NTSTATUS WINAPI
NtDeviceIoControlFile(HANDLE
,HANDLE
,PIO_APC_ROUTINE
,PVOID
,PIO_STATUS_BLOCK
,ULONG
,PVOID
,ULONG
,PVOID
,ULONG
);
1130 NTSTATUS WINAPI
NtDuplicateObject(HANDLE
,HANDLE
,HANDLE
,PHANDLE
,ACCESS_MASK
,ULONG
,ULONG
);
1131 NTSTATUS WINAPI
NtEnumerateKey(HKEY
,ULONG
,KEY_INFORMATION_CLASS
,void *,DWORD
,DWORD
*);
1132 NTSTATUS WINAPI
NtEnumerateValueKey(HKEY
,ULONG
,KEY_VALUE_INFORMATION_CLASS
,PVOID
,ULONG
,PULONG
);
1133 NTSTATUS WINAPI
NtFlushBuffersFile(HANDLE
,IO_STATUS_BLOCK
*);
1134 NTSTATUS WINAPI
NtFlushKey(HKEY
);
1135 NTSTATUS WINAPI
NtFlushVirtualMemory(HANDLE
,LPCVOID
*,ULONG
*,ULONG
);
1136 NTSTATUS WINAPI
NtFreeVirtualMemory(HANDLE
,PVOID
*,ULONG
*,ULONG
);
1137 NTSTATUS WINAPI
NtGetContextThread(HANDLE
,CONTEXT
*);
1138 NTSTATUS WINAPI
NtLoadKey(const OBJECT_ATTRIBUTES
*,const OBJECT_ATTRIBUTES
*);
1139 NTSTATUS WINAPI
NtLockFile(HANDLE
,HANDLE
,PIO_APC_ROUTINE
,void*,PIO_STATUS_BLOCK
,PLARGE_INTEGER
,PLARGE_INTEGER
,ULONG
*,BOOLEAN
,BOOLEAN
);
1140 NTSTATUS WINAPI
NtLockVirtualMemory(HANDLE
,PVOID
*,ULONG
*,ULONG
);
1141 NTSTATUS WINAPI
NtMapViewOfSection(HANDLE
,HANDLE
,PVOID
*,ULONG
,ULONG
,const LARGE_INTEGER
*,ULONG
*,SECTION_INHERIT
,ULONG
,ULONG
);
1142 NTSTATUS WINAPI
NtNotifyChangeKey(HKEY
,HANDLE
,PIO_APC_ROUTINE
,PVOID
,PIO_STATUS_BLOCK
,ULONG
,BOOLEAN
,PVOID
,ULONG
,BOOLEAN
);
1143 NTSTATUS WINAPI
NtOpenEvent(PHANDLE
,ACCESS_MASK
,const OBJECT_ATTRIBUTES
*);
1144 NTSTATUS WINAPI
NtOpenFile(PHANDLE
,ACCESS_MASK
,POBJECT_ATTRIBUTES
,PIO_STATUS_BLOCK
,ULONG
,ULONG
);
1145 NTSTATUS WINAPI
NtOpenKey(PHKEY
,ACCESS_MASK
,const OBJECT_ATTRIBUTES
*);
1146 NTSTATUS WINAPI
NtOpenProcessToken(HANDLE
,DWORD
,HANDLE
*);
1147 NTSTATUS WINAPI
NtOpenSection(HANDLE
*,ACCESS_MASK
,const OBJECT_ATTRIBUTES
*);
1148 NTSTATUS WINAPI
NtOpenThread(HANDLE
*,ACCESS_MASK
,const OBJECT_ATTRIBUTES
*,const CLIENT_ID
*);
1149 NTSTATUS WINAPI
NtOpenThreadToken(HANDLE
,DWORD
,BOOLEAN
,HANDLE
*);
1150 NTSTATUS WINAPI
NtOpenTimer(HANDLE
*, ACCESS_MASK
, const OBJECT_ATTRIBUTES
*);
1151 NTSTATUS WINAPI
NtProtectVirtualMemory(HANDLE
,PVOID
*,ULONG
*,ULONG
,ULONG
*);
1152 NTSTATUS WINAPI
NtPulseEvent(HANDLE
,PULONG
);
1153 NTSTATUS WINAPI
NtQueueApcThread(HANDLE
,PNTAPCFUNC
,ULONG_PTR
,ULONG_PTR
,ULONG_PTR
);
1154 NTSTATUS WINAPI
NtQueryDefaultLocale(BOOLEAN
,LCID
*);
1155 NTSTATUS WINAPI
NtQueryDirectoryFile(HANDLE
,HANDLE
,PIO_APC_ROUTINE
,PVOID
,PIO_STATUS_BLOCK
,PVOID
,ULONG
,FILE_INFORMATION_CLASS
,BOOLEAN
,PUNICODE_STRING
,BOOLEAN
);
1156 NTSTATUS WINAPI
NtQueryInformationFile(HANDLE
,PIO_STATUS_BLOCK
,PVOID
,LONG
,FILE_INFORMATION_CLASS
);
1157 NTSTATUS WINAPI
NtQueryInformationProcess(HANDLE
,PROCESSINFOCLASS
,PVOID
,ULONG
,PULONG
);
1158 NTSTATUS WINAPI
NtQueryInformationThread(HANDLE
,THREADINFOCLASS
,PVOID
,ULONG
,PULONG
);
1159 NTSTATUS WINAPI
NtQueryInformationToken(HANDLE
,DWORD
,LPVOID
,DWORD
,LPDWORD
);
1160 NTSTATUS WINAPI
NtQueryKey(HKEY
,KEY_INFORMATION_CLASS
,void *,DWORD
,DWORD
*);
1161 NTSTATUS WINAPI
NtQueryMultipleValueKey(HKEY
,PVALENTW
,ULONG
,PVOID
,ULONG
,PULONG
);
1162 NTSTATUS WINAPI
NtQueryObject(HANDLE
, OBJECT_INFORMATION_CLASS
, PVOID
, ULONG
, PULONG
);
1163 NTSTATUS WINAPI
NtQuerySecurityObject(HANDLE
,SECURITY_INFORMATION
,PSECURITY_DESCRIPTOR
,ULONG
,PULONG
);
1164 NTSTATUS WINAPI
NtQuerySystemInformation(SYSTEM_INFORMATION_CLASS
,PVOID
,ULONG
,PULONG
);
1165 NTSTATUS WINAPI
NtQuerySystemTime(PLARGE_INTEGER
);
1166 NTSTATUS WINAPI
NtQueryValueKey(HKEY
,const UNICODE_STRING
*,KEY_VALUE_INFORMATION_CLASS
,void *,DWORD
,DWORD
*);
1167 NTSTATUS WINAPI
NtQueryVirtualMemory(HANDLE
,LPCVOID
,MEMORY_INFORMATION_CLASS
,PVOID
,ULONG
,ULONG
*);
1168 void WINAPI
NtRaiseException(PEXCEPTION_RECORD
,PCONTEXT
,BOOL
);
1169 NTSTATUS WINAPI
NtReadFile(HANDLE
,HANDLE
,PIO_APC_ROUTINE
,PVOID
,PIO_STATUS_BLOCK
,PVOID
,ULONG
,PLARGE_INTEGER
,PULONG
);
1170 NTSTATUS WINAPI
NtReadVirtualMemory(HANDLE
,const void*,void*,SIZE_T
,SIZE_T
*);
1171 NTSTATUS WINAPI
NtReleaseSemaphore(HANDLE
,ULONG
,PULONG
);
1172 NTSTATUS WINAPI
NtReplaceKey(POBJECT_ATTRIBUTES
,HKEY
,POBJECT_ATTRIBUTES
);
1173 NTSTATUS WINAPI
NtResetEvent(HANDLE
,PULONG
);
1174 NTSTATUS WINAPI
NtRestoreKey(HKEY
,HANDLE
,ULONG
);
1175 NTSTATUS WINAPI
NtResumeThread(HANDLE
,PULONG
);
1176 NTSTATUS WINAPI
NtSaveKey(HKEY
,HANDLE
);
1177 NTSTATUS WINAPI
NtSetContextThread(HANDLE
,const CONTEXT
*);
1178 NTSTATUS WINAPI
NtSetDefaultLocale(BOOLEAN
,LCID
);
1179 NTSTATUS WINAPI
NtSetEvent(HANDLE
,PULONG
);
1180 NTSTATUS WINAPI
NtSetInformationFile(HANDLE
,PIO_STATUS_BLOCK
,PVOID
,ULONG
,FILE_INFORMATION_CLASS
);
1181 NTSTATUS WINAPI
NtSetInformationKey(HKEY
,const int,PVOID
,ULONG
);
1182 NTSTATUS WINAPI
NtSetInformationObject(HANDLE
, OBJECT_INFORMATION_CLASS
, PVOID
, ULONG
);
1183 NTSTATUS WINAPI
NtSetInformationThread(HANDLE
,THREADINFOCLASS
,LPCVOID
,ULONG
);
1184 NTSTATUS WINAPI
NtSetSecurityObject(HANDLE
,SECURITY_INFORMATION
,PSECURITY_DESCRIPTOR
);
1185 NTSTATUS WINAPI
NtSetSystemTime(const LARGE_INTEGER
*,LARGE_INTEGER
*);
1186 NTSTATUS WINAPI
NtSetTimer(HANDLE
, const LARGE_INTEGER
*, PTIMERAPCROUTINE
, PVOID
, BOOLEAN
, ULONG
, BOOLEAN
*);
1187 NTSTATUS WINAPI
NtSetValueKey(HKEY
,const UNICODE_STRING
*,ULONG
,ULONG
,const void *,ULONG
);
1188 NTSTATUS WINAPI
NtSuspendThread(HANDLE
,PULONG
);
1189 NTSTATUS WINAPI
NtTerminateProcess(HANDLE
,LONG
);
1190 NTSTATUS WINAPI
NtTerminateThread(HANDLE
,LONG
);
1191 NTSTATUS WINAPI
NtUnloadKey(HKEY
);
1192 NTSTATUS WINAPI
NtUnlockFile(HANDLE
,PIO_STATUS_BLOCK
,PLARGE_INTEGER
,PLARGE_INTEGER
,PULONG
);
1193 NTSTATUS WINAPI
NtUnlockVirtualMemory(HANDLE
,PVOID
*,ULONG
*,ULONG
);
1194 NTSTATUS WINAPI
NtUnmapViewOfSection(HANDLE
,PVOID
);
1195 NTSTATUS WINAPI
NtWaitForSingleObject(HANDLE
,BOOLEAN
,const LARGE_INTEGER
*);
1196 NTSTATUS WINAPI
NtWaitForMultipleObjects(ULONG
,const HANDLE
*,BOOLEAN
,BOOLEAN
,const LARGE_INTEGER
*);
1197 NTSTATUS WINAPI
NtWriteFile(HANDLE
,HANDLE
,PIO_APC_ROUTINE
,PVOID
,PIO_STATUS_BLOCK
,const void*,ULONG
,PLARGE_INTEGER
,PULONG
);
1198 NTSTATUS WINAPI
NtWriteVirtualMemory(HANDLE
,void*,const void*,SIZE_T
,SIZE_T
*);
1200 void WINAPI
RtlAcquirePebLock(void);
1201 BYTE WINAPI
RtlAcquireResourceExclusive(LPRTL_RWLOCK
,BYTE
);
1202 BYTE WINAPI
RtlAcquireResourceShared(LPRTL_RWLOCK
,BYTE
);
1203 NTSTATUS WINAPI
RtlAddAce(PACL
,DWORD
,DWORD
,PACE_HEADER
,DWORD
);
1204 NTSTATUS WINAPI
RtlAddAccessAllowedAce(PACL
,DWORD
,DWORD
,PSID
);
1205 NTSTATUS WINAPI
RtlAddAccessAllowedAceEx(PACL
,DWORD
,DWORD
,DWORD
,PSID
);
1206 NTSTATUS WINAPI
RtlAddAccessDeniedAce(PACL
,DWORD
,DWORD
,PSID
);
1207 NTSTATUS WINAPI
RtlAddAccessDeniedAceEx(PACL
,DWORD
,DWORD
,DWORD
,PSID
);
1208 PVOID WINAPI
RtlAddVectoredExceptionHandler(ULONG
,PVECTORED_EXCEPTION_HANDLER
);
1209 DWORD WINAPI
RtlAdjustPrivilege(DWORD
,DWORD
,DWORD
,DWORD
);
1210 BOOLEAN WINAPI
RtlAllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY
,BYTE
,DWORD
,DWORD
,DWORD
,DWORD
,DWORD
,DWORD
,DWORD
,DWORD
,PSID
*);
1211 PVOID WINAPI
RtlAllocateHeap(HANDLE
,ULONG
,ULONG
);
1212 DWORD WINAPI
RtlAnsiStringToUnicodeSize(const STRING
*);
1213 NTSTATUS WINAPI
RtlAnsiStringToUnicodeString(PUNICODE_STRING
,PCANSI_STRING
,BOOLEAN
);
1214 NTSTATUS WINAPI
RtlAppendAsciizToString(STRING
*,LPCSTR
);
1215 NTSTATUS WINAPI
RtlAppendStringToString(STRING
*,const STRING
*);
1216 NTSTATUS WINAPI
RtlAppendUnicodeStringToString(UNICODE_STRING
*,const UNICODE_STRING
*);
1217 NTSTATUS WINAPI
RtlAppendUnicodeToString(UNICODE_STRING
*,LPCWSTR
);
1218 BOOLEAN WINAPI
RtlAreAllAccessesGranted(ACCESS_MASK
,ACCESS_MASK
);
1219 BOOLEAN WINAPI
RtlAreAnyAccessesGranted(ACCESS_MASK
,ACCESS_MASK
);
1220 BOOLEAN WINAPI
RtlAreBitsSet(PCRTL_BITMAP
,ULONG
,ULONG
);
1221 BOOLEAN WINAPI
RtlAreBitsClear(PCRTL_BITMAP
,ULONG
,ULONG
);
1223 NTSTATUS WINAPI
RtlCharToInteger(PCSZ
,ULONG
,PULONG
);
1224 void WINAPI
RtlClearAllBits(PRTL_BITMAP
);
1225 void WINAPI
RtlClearBits(PRTL_BITMAP
,ULONG
,ULONG
);
1226 ULONG WINAPI
RtlCompactHeap(HANDLE
,ULONG
);
1227 LONG WINAPI
RtlCompareString(const STRING
*,const STRING
*,BOOLEAN
);
1228 LONG WINAPI
RtlCompareUnicodeString(const UNICODE_STRING
*,const UNICODE_STRING
*,BOOLEAN
);
1229 DWORD WINAPI
RtlComputeCrc32(DWORD
,PBYTE
,INT
);
1230 NTSTATUS WINAPI
RtlConvertSidToUnicodeString(PUNICODE_STRING
,PSID
,BOOLEAN
);
1231 LONGLONG WINAPI
RtlConvertLongToLargeInteger(LONG
);
1232 ULONGLONG WINAPI
RtlConvertUlongToLargeInteger(ULONG
);
1233 void WINAPI
RtlCopyLuid(PLUID
,const LUID
*);
1234 void WINAPI
RtlCopyLuidAndAttributesArray(ULONG
,const LUID_AND_ATTRIBUTES
*,PLUID_AND_ATTRIBUTES
);
1235 DWORD WINAPI
RtlCopySid(DWORD
,PSID
,PSID
);
1236 void WINAPI
RtlCopyString(STRING
*,const STRING
*);
1237 void WINAPI
RtlCopyUnicodeString(UNICODE_STRING
*,const UNICODE_STRING
*);
1238 NTSTATUS WINAPI
RtlCreateAcl(PACL
,DWORD
,DWORD
);
1239 NTSTATUS WINAPI
RtlCreateEnvironment(BOOLEAN
, PWSTR
*);
1240 HANDLE WINAPI
RtlCreateHeap(ULONG
,PVOID
,ULONG
,ULONG
,PVOID
,PRTL_HEAP_DEFINITION
);
1241 NTSTATUS WINAPI
RtlCreateProcessParameters(RTL_USER_PROCESS_PARAMETERS
**,const UNICODE_STRING
*,
1242 const UNICODE_STRING
*,const UNICODE_STRING
*,
1243 const UNICODE_STRING
*,PWSTR
,const UNICODE_STRING
*,
1244 const UNICODE_STRING
*,const UNICODE_STRING
*,
1245 const UNICODE_STRING
*);
1246 NTSTATUS WINAPI
RtlCreateSecurityDescriptor(PSECURITY_DESCRIPTOR
,DWORD
);
1247 BOOLEAN WINAPI
RtlCreateUnicodeString(PUNICODE_STRING
,LPCWSTR
);
1248 BOOLEAN WINAPI
RtlCreateUnicodeStringFromAsciiz(PUNICODE_STRING
,LPCSTR
);
1249 NTSTATUS WINAPI
RtlCreateUserThread(HANDLE
,const SECURITY_DESCRIPTOR
*,BOOLEAN
,PVOID
,SIZE_T
,SIZE_T
,PRTL_THREAD_START_ROUTINE
,void*,HANDLE
*,CLIENT_ID
*);
1251 NTSTATUS WINAPI
RtlDeleteAce(PACL
,DWORD
);
1252 NTSTATUS WINAPI
RtlDeleteCriticalSection(RTL_CRITICAL_SECTION
*);
1253 void WINAPI
RtlDeleteResource(LPRTL_RWLOCK
);
1254 DWORD WINAPI
RtlDeleteSecurityObject(DWORD
);
1255 PRTL_USER_PROCESS_PARAMETERS WINAPI
RtlDeNormalizeProcessParams(RTL_USER_PROCESS_PARAMETERS
*);
1256 NTSTATUS WINAPI
RtlDestroyEnvironment(PWSTR
);
1257 HANDLE WINAPI
RtlDestroyHeap(HANDLE
);
1258 void WINAPI
RtlDestroyProcessParameters(RTL_USER_PROCESS_PARAMETERS
*);
1259 DOS_PATHNAME_TYPE WINAPI
RtlDetermineDosPathNameType_U(PCWSTR
);
1260 BOOLEAN WINAPI
RtlDoesFileExists_U(LPCWSTR
);
1261 BOOLEAN WINAPI
RtlDosPathNameToNtPathName_U(LPWSTR
,PUNICODE_STRING
,PWSTR
*,CURDIR
*);
1262 ULONG WINAPI
RtlDosSearchPath_U(LPCWSTR
, LPCWSTR
, LPCWSTR
, ULONG
, LPWSTR
, LPWSTR
*);
1263 WCHAR WINAPI
RtlDowncaseUnicodeChar(WCHAR
);
1264 NTSTATUS WINAPI
RtlDowncaseUnicodeString(UNICODE_STRING
*,const UNICODE_STRING
*,BOOLEAN
);
1265 void WINAPI
RtlDumpResource(LPRTL_RWLOCK
);
1266 NTSTATUS WINAPI
RtlDuplicateUnicodeString(int,const UNICODE_STRING
*,UNICODE_STRING
*);
1268 LONGLONG WINAPI
RtlEnlargedIntegerMultiply(INT
,INT
);
1269 ULONGLONG WINAPI
RtlEnlargedUnsignedMultiply(UINT
,UINT
);
1270 UINT WINAPI
RtlEnlargedUnsignedDivide(ULONGLONG
,UINT
,UINT
*);
1271 NTSTATUS WINAPI
RtlEnterCriticalSection(RTL_CRITICAL_SECTION
*);
1272 void WINAPI
RtlEraseUnicodeString(UNICODE_STRING
*);
1273 NTSTATUS WINAPI
RtlEqualComputerName(const UNICODE_STRING
*,const UNICODE_STRING
*);
1274 NTSTATUS WINAPI
RtlEqualDomainName(const UNICODE_STRING
*,const UNICODE_STRING
*);
1275 BOOLEAN WINAPI
RtlEqualLuid(const LUID
*,const LUID
*);
1276 BOOL WINAPI
RtlEqualPrefixSid(PSID
,PSID
);
1277 BOOL WINAPI
RtlEqualSid(PSID
,PSID
);
1278 BOOLEAN WINAPI
RtlEqualString(const STRING
*,const STRING
*,BOOLEAN
);
1279 BOOLEAN WINAPI
RtlEqualUnicodeString(const UNICODE_STRING
*,const UNICODE_STRING
*,BOOLEAN
);
1280 NTSTATUS WINAPI
RtlExpandEnvironmentStrings_U(PWSTR
, const UNICODE_STRING
*, UNICODE_STRING
*, ULONG
*);
1281 LONGLONG WINAPI
RtlExtendedMagicDivide(LONGLONG
,LONGLONG
,INT
);
1282 LONGLONG WINAPI
RtlExtendedIntegerMultiply(LONGLONG
,INT
);
1283 LONGLONG WINAPI
RtlExtendedLargeIntegerDivide(LONGLONG
,INT
,INT
*);
1285 NTSTATUS WINAPI
RtlFindCharInUnicodeString(int,const UNICODE_STRING
*,const UNICODE_STRING
*,USHORT
*);
1286 ULONG WINAPI
RtlFindClearBits(PCRTL_BITMAP
,ULONG
,ULONG
);
1287 ULONG WINAPI
RtlFindClearBitsAndSet(PRTL_BITMAP
,ULONG
,ULONG
);
1288 ULONG WINAPI
RtlFindClearRuns(PCRTL_BITMAP
,PRTL_BITMAP_RUN
,ULONG
,BOOLEAN
);
1289 ULONG WINAPI
RtlFindLastBackwardRunSet(PCRTL_BITMAP
,ULONG
,PULONG
);
1290 ULONG WINAPI
RtlFindLastBackwardRunClear(PCRTL_BITMAP
,ULONG
,PULONG
);
1291 CCHAR WINAPI
RtlFindLeastSignificantBit(ULONGLONG
);
1292 ULONG WINAPI
RtlFindLongestRunSet(PCRTL_BITMAP
,PULONG
);
1293 ULONG WINAPI
RtlFindLongestRunClear(PCRTL_BITMAP
,PULONG
);
1294 NTSTATUS WINAPI
RtlFindMessage(HMODULE
,ULONG
,ULONG
,ULONG
,const MESSAGE_RESOURCE_ENTRY
**);
1295 CCHAR WINAPI
RtlFindMostSignificantBit(ULONGLONG
);
1296 ULONG WINAPI
RtlFindNextForwardRunSet(PCRTL_BITMAP
,ULONG
,PULONG
);
1297 ULONG WINAPI
RtlFindNextForwardRunClear(PCRTL_BITMAP
,ULONG
,PULONG
);
1298 ULONG WINAPI
RtlFindSetBits(PCRTL_BITMAP
,ULONG
,ULONG
);
1299 ULONG WINAPI
RtlFindSetBitsAndClear(PRTL_BITMAP
,ULONG
,ULONG
);
1300 ULONG WINAPI
RtlFindSetRuns(PCRTL_BITMAP
,PRTL_BITMAP_RUN
,ULONG
,BOOLEAN
);
1301 BOOLEAN WINAPI
RtlFirstFreeAce(PACL
,PACE_HEADER
*);
1302 NTSTATUS WINAPI
RtlFormatCurrentUserKeyPath(PUNICODE_STRING
);
1303 void WINAPI
RtlFreeAnsiString(PANSI_STRING
);
1304 BOOLEAN WINAPI
RtlFreeHeap(HANDLE
,ULONG
,PVOID
);
1305 void WINAPI
RtlFreeOemString(POEM_STRING
);
1306 DWORD WINAPI
RtlFreeSid(PSID
);
1307 void WINAPI
RtlFreeUnicodeString(PUNICODE_STRING
);
1309 DWORD WINAPI
RtlGetAce(PACL
,DWORD
,LPVOID
*);
1310 NTSTATUS WINAPI
RtlGetControlSecurityDescriptor(PSECURITY_DESCRIPTOR
, PSECURITY_DESCRIPTOR_CONTROL
,LPDWORD
);
1311 NTSTATUS WINAPI
RtlGetCurrentDirectory_U(ULONG
, LPWSTR
);
1312 NTSTATUS WINAPI
RtlGetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR
,PBOOLEAN
,PACL
*,PBOOLEAN
);
1313 ULONG WINAPI
RtlGetFullPathName_U(PCWSTR
,ULONG
,PWSTR
,PWSTR
*);
1314 NTSTATUS WINAPI
RtlGetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR
,PSID
*,PBOOLEAN
);
1315 DWORD WINAPI
RtlGetLastWin32Error(void);
1316 DWORD WINAPI
RtlGetLongestNtPathLength(void);
1317 BOOLEAN WINAPI
RtlGetNtProductType(LPDWORD
);
1318 NTSTATUS WINAPI
RtlGetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR
,PSID
*,PBOOLEAN
);
1319 ULONG WINAPI
RtlGetProcessHeaps(ULONG
,HANDLE
*);
1320 NTSTATUS WINAPI
RtlGetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR
,PBOOLEAN
,PACL
*,PBOOLEAN
);
1321 NTSTATUS WINAPI
RtlGetVersion(RTL_OSVERSIONINFOEXW
*);
1323 PSID_IDENTIFIER_AUTHORITY WINAPI
RtlIdentifierAuthoritySid(PSID
);
1324 PVOID WINAPI
RtlImageDirectoryEntryToData(HMODULE
,BOOL
,WORD
,ULONG
*);
1325 PIMAGE_NT_HEADERS WINAPI
RtlImageNtHeader(HMODULE
);
1326 PIMAGE_SECTION_HEADER WINAPI
RtlImageRvaToSection(const IMAGE_NT_HEADERS
*,HMODULE
,DWORD
);
1327 PVOID WINAPI
RtlImageRvaToVa(const IMAGE_NT_HEADERS
*,HMODULE
,DWORD
,IMAGE_SECTION_HEADER
**);
1328 BOOL WINAPI
RtlImpersonateSelf(SECURITY_IMPERSONATION_LEVEL
);
1329 void WINAPI
RtlInitString(PSTRING
,PCSZ
);
1330 void WINAPI
RtlInitAnsiString(PANSI_STRING
,PCSZ
);
1331 void WINAPI
RtlInitUnicodeString(PUNICODE_STRING
,PCWSTR
);
1332 NTSTATUS WINAPI
RtlInitUnicodeStringEx(PUNICODE_STRING
,PCWSTR
);
1333 NTSTATUS WINAPI
RtlInitializeCriticalSection(RTL_CRITICAL_SECTION
*);
1334 NTSTATUS WINAPI
RtlInitializeCriticalSectionAndSpinCount(RTL_CRITICAL_SECTION
*,DWORD
);
1335 void WINAPI
RtlInitializeBitMap(PRTL_BITMAP
,LPBYTE
,ULONG
);
1336 void WINAPI
RtlInitializeResource(LPRTL_RWLOCK
);
1337 BOOL WINAPI
RtlInitializeSid(PSID
,PSID_IDENTIFIER_AUTHORITY
,BYTE
);
1339 NTSTATUS WINAPI
RtlInt64ToUnicodeString(ULONGLONG
,ULONG
,UNICODE_STRING
*);
1340 NTSTATUS WINAPI
RtlIntegerToChar(ULONG
,ULONG
,ULONG
,PCHAR
);
1341 NTSTATUS WINAPI
RtlIntegerToUnicodeString(ULONG
,ULONG
,UNICODE_STRING
*);
1342 ULONG WINAPI
RtlIsDosDeviceName_U(PCWSTR
);
1343 BOOLEAN WINAPI
RtlIsNameLegalDOS8Dot3(const UNICODE_STRING
*,POEM_STRING
,PBOOLEAN
);
1344 DWORD WINAPI
RtlIsTextUnicode(LPVOID
,DWORD
,DWORD
*);
1346 LONGLONG WINAPI
RtlLargeIntegerAdd(LONGLONG
,LONGLONG
);
1347 LONGLONG WINAPI
RtlLargeIntegerArithmeticShift(LONGLONG
,INT
);
1348 ULONGLONG WINAPI
RtlLargeIntegerDivide( ULONGLONG
,ULONGLONG
,ULONGLONG
*);
1349 LONGLONG WINAPI
RtlLargeIntegerNegate(LONGLONG
);
1350 LONGLONG WINAPI
RtlLargeIntegerShiftLeft(LONGLONG
,INT
);
1351 LONGLONG WINAPI
RtlLargeIntegerShiftRight(LONGLONG
,INT
);
1352 LONGLONG WINAPI
RtlLargeIntegerSubtract(LONGLONG
,LONGLONG
);
1353 NTSTATUS WINAPI
RtlLargeIntegerToChar(const ULONGLONG
*,ULONG
,ULONG
,PCHAR
);
1354 NTSTATUS WINAPI
RtlLeaveCriticalSection(RTL_CRITICAL_SECTION
*);
1355 DWORD WINAPI
RtlLengthRequiredSid(DWORD
);
1356 ULONG WINAPI
RtlLengthSecurityDescriptor(PSECURITY_DESCRIPTOR
);
1357 DWORD WINAPI
RtlLengthSid(PSID
);
1358 NTSTATUS WINAPI
RtlLocalTimeToSystemTime(const LARGE_INTEGER
*,PLARGE_INTEGER
);
1359 BOOLEAN WINAPI
RtlLockHeap(HANDLE
);
1361 NTSTATUS WINAPI
RtlMakeSelfRelativeSD(PSECURITY_DESCRIPTOR
,PSECURITY_DESCRIPTOR
,LPDWORD
);
1362 void WINAPI
RtlMapGenericMask(PACCESS_MASK
,const GENERIC_MAPPING
*);
1363 NTSTATUS WINAPI
RtlMultiByteToUnicodeN(LPWSTR
,DWORD
,LPDWORD
,LPCSTR
,DWORD
);
1364 NTSTATUS WINAPI
RtlMultiByteToUnicodeSize(DWORD
*,LPCSTR
,UINT
);
1366 DWORD WINAPI
RtlNewSecurityObject(DWORD
,DWORD
,DWORD
,DWORD
,DWORD
,DWORD
);
1367 PRTL_USER_PROCESS_PARAMETERS WINAPI
RtlNormalizeProcessParams(RTL_USER_PROCESS_PARAMETERS
*);
1368 ULONG WINAPI
RtlNtStatusToDosError(NTSTATUS
);
1369 ULONG WINAPI
RtlNtStatusToDosErrorNoTeb(NTSTATUS
);
1370 ULONG WINAPI
RtlNumberOfSetBits(PCRTL_BITMAP
);
1371 ULONG WINAPI
RtlNumberOfClearBits(PCRTL_BITMAP
);
1373 UINT WINAPI
RtlOemStringToUnicodeSize(const STRING
*);
1374 NTSTATUS WINAPI
RtlOemStringToUnicodeString(UNICODE_STRING
*,const STRING
*,BOOLEAN
);
1375 NTSTATUS WINAPI
RtlOemToUnicodeN(LPWSTR
,DWORD
,LPDWORD
,LPCSTR
,DWORD
);
1376 DWORD WINAPI
RtlOpenCurrentUser(ACCESS_MASK
,PHKEY
);
1378 BOOLEAN WINAPI
RtlPrefixString(const STRING
*,const STRING
*,BOOLEAN
);
1379 BOOLEAN WINAPI
RtlPrefixUnicodeString(const UNICODE_STRING
*,const UNICODE_STRING
*,BOOLEAN
);
1381 NTSTATUS WINAPI
RtlQueryEnvironmentVariable_U(PWSTR
,PUNICODE_STRING
,PUNICODE_STRING
);
1382 NTSTATUS WINAPI
RtlQueryInformationAcl(PACL
,LPVOID
,DWORD
,ACL_INFORMATION_CLASS
);
1383 NTSTATUS WINAPI
RtlQueryTimeZoneInformation(LPTIME_ZONE_INFORMATION
);
1385 void WINAPI
RtlRaiseException(PEXCEPTION_RECORD
);
1386 void WINAPI
RtlRaiseStatus(NTSTATUS
);
1387 ULONG WINAPI
RtlRandom(PULONG
);
1388 PVOID WINAPI
RtlReAllocateHeap(HANDLE
,ULONG
,PVOID
,ULONG
);
1389 void WINAPI
RtlReleasePebLock(void);
1390 void WINAPI
RtlReleaseResource(LPRTL_RWLOCK
);
1391 ULONG WINAPI
RtlRemoveVectoredExceptionHandler(PVOID
);
1392 void WINAPI
RtlRestoreLastWin32Error(DWORD
);
1394 void WINAPI
RtlSecondsSince1970ToTime(DWORD
,LARGE_INTEGER
*);
1395 void WINAPI
RtlSecondsSince1980ToTime(DWORD
,LARGE_INTEGER
*);
1396 NTSTATUS WINAPI
RtlSelfRelativeToAbsoluteSD(PSECURITY_DESCRIPTOR
,PSECURITY_DESCRIPTOR
,
1397 PDWORD
,PACL
,PDWORD
,PACL
,PDWORD
,PSID
,PDWORD
,PSID
,PDWORD
);
1398 void WINAPI
RtlSetAllBits(PRTL_BITMAP
);
1399 void WINAPI
RtlSetBits(PRTL_BITMAP
,ULONG
,ULONG
);
1400 NTSTATUS WINAPI
RtlSetCurrentDirectory_U(const UNICODE_STRING
*);
1401 void WINAPI
RtlSetCurrentEnvironment(PWSTR
, PWSTR
*);
1402 NTSTATUS WINAPI
RtlSetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR
,BOOLEAN
,PACL
,BOOLEAN
);
1403 NTSTATUS WINAPI
RtlSetEnvironmentVariable(PWSTR
*,PUNICODE_STRING
,PUNICODE_STRING
);
1404 NTSTATUS WINAPI
RtlSetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR
,PSID
,BOOLEAN
);
1405 NTSTATUS WINAPI
RtlSetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR
,PSID
,BOOLEAN
);
1406 void WINAPI
RtlSetLastWin32Error(DWORD
);
1407 NTSTATUS WINAPI
RtlSetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR
,BOOLEAN
,PACL
,BOOLEAN
);
1408 NTSTATUS WINAPI
RtlSetTimeZoneInformation(const TIME_ZONE_INFORMATION
*);
1409 ULONG WINAPI
RtlSizeHeap(HANDLE
,ULONG
,PVOID
);
1410 LPDWORD WINAPI
RtlSubAuthoritySid(PSID
,DWORD
);
1411 LPBYTE WINAPI
RtlSubAuthorityCountSid(PSID
);
1412 NTSTATUS WINAPI
RtlSystemTimeToLocalTime(const LARGE_INTEGER
*,PLARGE_INTEGER
);
1414 void WINAPI
RtlTimeToTimeFields(const LARGE_INTEGER
*,PTIME_FIELDS
);
1415 BOOLEAN WINAPI
RtlTimeFieldsToTime(PTIME_FIELDS
,PLARGE_INTEGER
);
1416 void WINAPI
RtlTimeToElapsedTimeFields(const LARGE_INTEGER
*,PTIME_FIELDS
);
1417 BOOLEAN WINAPI
RtlTimeToSecondsSince1970(const LARGE_INTEGER
*,LPDWORD
);
1418 BOOLEAN WINAPI
RtlTimeToSecondsSince1980(const LARGE_INTEGER
*,LPDWORD
);
1419 BOOL WINAPI
RtlTryEnterCriticalSection(RTL_CRITICAL_SECTION
*);
1421 ULONGLONG __cdecl
RtlUlonglongByteSwap(ULONGLONG
);
1422 DWORD WINAPI
RtlUnicodeStringToAnsiSize(const UNICODE_STRING
*);
1423 NTSTATUS WINAPI
RtlUnicodeStringToAnsiString(PANSI_STRING
,PCUNICODE_STRING
,BOOLEAN
);
1424 NTSTATUS WINAPI
RtlUnicodeStringToInteger(const UNICODE_STRING
*,ULONG
,ULONG
*);
1425 DWORD WINAPI
RtlUnicodeStringToOemSize(const UNICODE_STRING
*);
1426 NTSTATUS WINAPI
RtlUnicodeStringToOemString(POEM_STRING
,PCUNICODE_STRING
,BOOLEAN
);
1427 NTSTATUS WINAPI
RtlUnicodeToMultiByteN(LPSTR
,DWORD
,LPDWORD
,LPCWSTR
,DWORD
);
1428 NTSTATUS WINAPI
RtlUnicodeToMultiByteSize(PULONG
,PCWSTR
,ULONG
);
1429 NTSTATUS WINAPI
RtlUnicodeToOemN(LPSTR
,DWORD
,LPDWORD
,LPCWSTR
,DWORD
);
1430 ULONG WINAPI
RtlUniform(PULONG
);
1431 BOOLEAN WINAPI
RtlUnlockHeap(HANDLE
);
1432 void WINAPI
RtlUnwind(PVOID
,PVOID
,PEXCEPTION_RECORD
,PVOID
);
1434 void WINAPI
RtlUnwind2(FRAME_POINTERS
,PVOID
,PEXCEPTION_RECORD
,PVOID
,PCONTEXT
);
1435 void WINAPI
RtlUnwindEx(FRAME_POINTERS
,PVOID
,PEXCEPTION_RECORD
,PVOID
,PCONTEXT
,PUNWIND_HISTORY_TABLE
);
1437 WCHAR WINAPI
RtlUpcaseUnicodeChar(WCHAR
);
1438 NTSTATUS WINAPI
RtlUpcaseUnicodeString(UNICODE_STRING
*,const UNICODE_STRING
*,BOOLEAN
);
1439 NTSTATUS WINAPI
RtlUpcaseUnicodeStringToAnsiString(STRING
*,const UNICODE_STRING
*,BOOLEAN
);
1440 NTSTATUS WINAPI
RtlUpcaseUnicodeStringToCountedOemString(STRING
*,const UNICODE_STRING
*,BOOLEAN
);
1441 NTSTATUS WINAPI
RtlUpcaseUnicodeStringToOemString(STRING
*,const UNICODE_STRING
*,BOOLEAN
);
1442 NTSTATUS WINAPI
RtlUpcaseUnicodeToMultiByteN(LPSTR
,DWORD
,LPDWORD
,LPCWSTR
,DWORD
);
1443 NTSTATUS WINAPI
RtlUpcaseUnicodeToOemN(LPSTR
,DWORD
,LPDWORD
,LPCWSTR
,DWORD
);
1444 CHAR WINAPI
RtlUpperChar(CHAR
);
1445 void WINAPI
RtlUpperString(STRING
*,const STRING
*);
1447 NTSTATUS WINAPI
RtlValidSecurityDescriptor(PSECURITY_DESCRIPTOR
);
1448 BOOLEAN WINAPI
RtlValidAcl(PACL
);
1449 BOOLEAN WINAPI
RtlValidSid(PSID
);
1450 BOOLEAN WINAPI
RtlValidateHeap(HANDLE
,ULONG
,LPCVOID
);
1451 NTSTATUS WINAPI
RtlVerifyVersionInfo(const RTL_OSVERSIONINFOEXW
*,DWORD
,DWORDLONG
);
1453 NTSTATUS WINAPI
RtlWalkHeap(HANDLE
,PVOID
);
1455 NTSTATUS WINAPI
RtlpWaitForCriticalSection(RTL_CRITICAL_SECTION
*);
1456 NTSTATUS WINAPI
RtlpUnWaitCriticalSection(RTL_CRITICAL_SECTION
*);
1458 /***********************************************************************
1462 #define InitializeObjectAttributes(p,n,a,r,s) \
1464 (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
1465 (p)->RootDirectory = r; \
1466 (p)->Attributes = a; \
1467 (p)->ObjectName = n; \
1468 (p)->SecurityDescriptor = s; \
1469 (p)->SecurityQualityOfService = NULL; \
1472 #define NtCurrentProcess() ((HANDLE)-1)
1474 #define RtlFillMemory(Destination,Length,Fill) memset((Destination),(Fill),(Length))
1475 #define RtlMoveMemory(Destination,Source,Length) memmove((Destination),(Source),(Length))
1476 #define RtlStoreUlong(p,v) do { ULONG _v = (v); memcpy((p), &_v, sizeof(_v)); } while (0)
1477 #define RtlStoreUlonglong(p,v) do { ULONGLONG _v = (v); memcpy((p), &_v, sizeof(_v)); } while (0)
1478 #define RtlRetrieveUlong(p,s) memcpy((p), (s), sizeof(ULONG))
1479 #define RtlRetrieveUlonglong(p,s) memcpy((p), (s), sizeof(ULONGLONG))
1480 #define RtlZeroMemory(Destination,Length) memset((Destination),0,(Length))
1482 inline static BOOLEAN
RtlCheckBit(PCRTL_BITMAP lpBits
, ULONG ulBit
)
1484 if (lpBits
&& ulBit
< lpBits
->SizeOfBitMap
&&
1485 lpBits
->BitMapBuffer
[ulBit
>> 3] & (1 << (ulBit
& 7)))
1490 #define RtlClearAllBits(p) \
1492 PRTL_BITMAP _p = (p); \
1493 memset(_p->BitMapBuffer,0,((_p->SizeOfBitMap + 31) & 0xffffffe0) >> 3); \
1496 #define RtlInitializeBitMap(p,b,s) \
1498 PRTL_BITMAP _p = (p); \
1499 _p->SizeOfBitMap = (s); \
1500 _p->BitMapBuffer = (b); \
1503 #define RtlSetAllBits(p) \
1505 PRTL_BITMAP _p = (p); \
1506 memset(_p->BitMapBuffer,0xff,((_p->SizeOfBitMap + 31) & 0xffffffe0) >> 3); \
1509 /* These are implemented as __fastcall, so we can't let Winelib apps link with them */
1510 inline static USHORT
RtlUshortByteSwap(USHORT s
)
1512 return (s
>> 8) | (s
<< 8);
1514 inline static ULONG
RtlUlongByteSwap(ULONG i
)
1516 #if defined(__i386__) && defined(__GNUC__)
1518 __asm__("bswap %0" : "=r" (ret
) : "0" (i
) );
1521 return ((ULONG
)RtlUshortByteSwap((USHORT
)i
) << 16) | RtlUshortByteSwap((USHORT
)(i
>> 16));
1525 /*************************************************************************
1526 * Loader functions and structures.
1528 * Those are not part of standard Winternl.h
1530 typedef struct _LDR_MODULE
1532 LIST_ENTRY InLoadOrderModuleList
;
1533 LIST_ENTRY InMemoryOrderModuleList
;
1534 LIST_ENTRY InInitializationOrderModuleList
;
1538 UNICODE_STRING FullDllName
;
1539 UNICODE_STRING BaseDllName
;
1543 HANDLE SectionHandle
;
1545 ULONG TimeDateStamp
;
1546 } LDR_MODULE
, *PLDR_MODULE
;
1548 /* those defines are (some of the) regular LDR_MODULE.Flags values */
1549 #define LDR_IMAGE_IS_DLL 0x00000004
1550 #define LDR_LOAD_IN_PROGRESS 0x00001000
1551 #define LDR_UNLOAD_IN_PROGRESS 0x00002000
1552 #define LDR_NO_DLL_CALLS 0x00040000
1553 #define LDR_PROCESS_ATTACHED 0x00080000
1554 #define LDR_MODULE_REBASED 0x00200000
1556 /* these ones is Wine specific */
1557 #define LDR_DONT_RESOLVE_REFS 0x40000000
1558 #define LDR_WINE_INTERNAL 0x80000000
1560 /* FIXME: to be checked */
1561 #define MAXIMUM_FILENAME_LENGTH 256
1563 typedef struct _SYSTEM_MODULE
1567 PVOID ImageBaseAddress
;
1574 BYTE Name
[MAXIMUM_FILENAME_LENGTH
];
1575 } SYSTEM_MODULE
, *PSYSTEM_MODULE
;
1577 typedef struct _SYSTEM_MODULE_INFORMATION
1580 SYSTEM_MODULE Modules
[1]; /* FIXME: should be Modules[0] */
1581 } SYSTEM_MODULE_INFORMATION
, *PSYSTEM_MODULE_INFORMATION
;
1583 NTSTATUS WINAPI
LdrDisableThreadCalloutsForDll(HMODULE
);
1584 NTSTATUS WINAPI
LdrFindEntryForAddress(const void*, PLDR_MODULE
*);
1585 NTSTATUS WINAPI
LdrLockLoaderLock(ULONG
,ULONG
*,ULONG
*);
1586 NTSTATUS WINAPI
LdrQueryProcessModuleInformation(SYSTEM_MODULE_INFORMATION
*, ULONG
, ULONG
*);
1587 NTSTATUS WINAPI
LdrUnloadDll(HMODULE
);
1588 NTSTATUS WINAPI
LdrUnlockLoaderLock(ULONG
,ULONG
);
1590 /* list manipulation macros */
1591 #define InitializeListHead(le) (void)((le)->Flink = (le)->Blink = (le))
1592 #define InsertHeadList(le,e) do { PLIST_ENTRY f = (le)->Flink; (e)->Flink = f; (e)->Blink = (le); f->Blink = (e); (le)->Flink = (e); } while (0)
1593 #define InsertTailList(le,e) do { PLIST_ENTRY b = (le)->Blink; (e)->Flink = (le); (e)->Blink = b; b->Flink = (e); (le)->Blink = (e); } while (0)
1594 #define IsListEmpty(le) ((le)->Flink == (le))
1595 #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)
1596 static inline PLIST_ENTRY
RemoveHeadList(PLIST_ENTRY le
)
1598 PLIST_ENTRY f
, b
, e
;
1601 f
= le
->Flink
->Flink
;
1602 b
= le
->Flink
->Blink
;
1606 if (e
!= le
) e
->Flink
= e
->Blink
= NULL
;
1609 static inline PLIST_ENTRY
RemoveTailList(PLIST_ENTRY le
)
1611 PLIST_ENTRY f
, b
, e
;
1614 f
= le
->Blink
->Flink
;
1615 b
= le
->Blink
->Blink
;
1619 if (e
!= le
) e
->Flink
= e
->Blink
= NULL
;
1625 #endif /* defined(__cplusplus) */
1627 #endif /* __WINE_WINTERNAL_H */