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 _RTL_USER_PROCESS_PARAMETERS
95 UNICODE_STRING CurrentDirectoryName
;
96 HANDLE CurrentDirectoryHandle
;
97 UNICODE_STRING DllPath
;
98 UNICODE_STRING ImagePathName
;
99 UNICODE_STRING CommandLine
;
107 ULONG dwFillAttribute
;
110 UNICODE_STRING WindowTitle
;
111 UNICODE_STRING Desktop
;
112 UNICODE_STRING ShellInfo
;
113 UNICODE_STRING RuntimeInfo
;
114 RTL_DRIVE_LETTER_CURDIR DLCurrentDirectory
[0x20];
115 } RTL_USER_PROCESS_PARAMETERS
, *PRTL_USER_PROCESS_PARAMETERS
;
118 typedef struct _PEB_LDR_DATA
123 LIST_ENTRY InLoadOrderModuleList
;
124 LIST_ENTRY InMemoryOrderModuleList
;
125 LIST_ENTRY InInitializationOrderModuleList
;
126 } PEB_LDR_DATA
, *PPEB_LDR_DATA
;
128 /***********************************************************************
133 BYTE Reserved1
[2]; /* 00 */
134 BYTE BeingDebugged
; /* 02 */
135 BYTE Reserved2
[5]; /* 03 */
136 HMODULE ImageBaseAddress
; /* 08 */
137 PPEB_LDR_DATA LdrData
; /* 0c */
138 RTL_USER_PROCESS_PARAMETERS
*ProcessParameters
; /* 10 */
139 PVOID __pad_14
; /* 14 */
140 HANDLE ProcessHeap
; /* 18 */
141 BYTE __pad_1c
[204]; /* 1c */
142 PVOID Reserved3
[59]; /* e8 */
143 ULONG SessionId
; /* 1d4 */
147 /***********************************************************************
150 #if defined(_NTSYSTEM_) || defined(_KERNEL32_) /* hack, should go away */
154 #ifndef WINE_NO_TEB /* don't define TEB if included from thread.h */
155 # ifndef WINE_TEB_DEFINED
156 # define WINE_TEB_DEFINED
159 NT_TIB Tib
; /* 000 */
160 PVOID EnvironmentPointer
; /* 01c */
161 CLIENT_ID ClientId
; /* 020 */
162 PVOID ActiveRpcHandle
; /* 028 */
163 PVOID ThreadLocalStoragePointer
; /* 02c */
165 ULONG LastErrorValue
; /* 034 */
166 BYTE __pad038
[140]; /* 038 */
167 ULONG CurrentLocale
; /* 0c4 */
168 BYTE __pad0c8
[1752]; /* 0c8 */
169 PVOID Reserved2
[278]; /* 7a0 */
170 UNICODE_STRING StaticUnicodeString
; /* bf8 used by advapi32 */
171 WCHAR StaticUnicodeBuffer
[261]; /* c00 used by advapi32 */
172 PVOID DeallocationStack
; /* e0c */
173 PVOID TlsSlots
[64]; /* e10 */
174 LIST_ENTRY TlsLinks
; /* f10 */
175 PVOID Reserved4
[26]; /* f18 */
176 PVOID ReservedForOle
; /* f80 Windows 2000 only */
177 PVOID Reserved5
[4]; /* f84 */
178 PVOID TlsExpansionSlots
; /* f94 */
180 # endif /* WINE_TEB_DEFINED */
181 #endif /* WINE_NO_TEB */
183 /***********************************************************************
187 typedef enum _FILE_INFORMATION_CLASS
{
188 FileDirectoryInformation
= 1,
189 FileFullDirectoryInformation
,
190 FileBothDirectoryInformation
,
191 FileBasicInformation
,
192 FileStandardInformation
,
193 FileInternalInformation
,
195 FileAccessInformation
,
197 FileRenameInformation
,
199 FileNamesInformation
,
200 FileDispositionInformation
,
201 FilePositionInformation
,
202 FileFullEaInformation
,
204 FileAlignmentInformation
,
206 FileAllocationInformation
,
207 FileEndOfFileInformation
,
208 FileAlternateNameInformation
,
209 FileStreamInformation
,
211 FilePipeLocalInformation
,
212 FilePipeRemoteInformation
,
213 FileMailslotQueryInformation
,
214 FileMailslotSetInformation
,
215 FileCompressionInformation
,
216 FileObjectIdInformation
,
217 FileCompletionInformation
,
218 FileMoveClusterInformation
,
219 FileQuotaInformation
,
220 FileReparsePointInformation
,
221 FileNetworkOpenInformation
,
222 FileAttributeTagInformation
,
223 FileTrackingInformation
,
224 FileMaximumInformation
225 } FILE_INFORMATION_CLASS
, *PFILE_INFORMATION_CLASS
;
227 typedef struct _FILE_BASIC_INFORMATION
{
228 LARGE_INTEGER CreationTime
;
229 LARGE_INTEGER LastAccessTime
;
230 LARGE_INTEGER LastWriteTime
;
231 LARGE_INTEGER ChangeTime
;
232 ULONG FileAttributes
;
233 } FILE_BASIC_INFORMATION
, *PFILE_BASIC_INFORMATION
;
235 typedef struct _FILE_STANDARD_INFORMATION
{
236 LARGE_INTEGER AllocationSize
;
237 LARGE_INTEGER EndOfFile
;
239 BOOLEAN DeletePending
;
241 } FILE_STANDARD_INFORMATION
, *PFILE_STANDARD_INFORMATION
;
243 typedef struct _FILE_POSITION_INFORMATION
{
244 LARGE_INTEGER CurrentByteOffset
;
245 } FILE_POSITION_INFORMATION
, *PFILE_POSITION_INFORMATION
;
247 typedef struct _FILE_ALIGNMENT_INFORMATION
{
248 ULONG AlignmentRequirement
;
249 } FILE_ALIGNMENT_INFORMATION
, *PFILE_ALIGNMENT_INFORMATION
;
251 typedef struct _FILE_NETWORK_OPEN_INFORMATION
{
252 LARGE_INTEGER CreationTime
;
253 LARGE_INTEGER LastAccessTime
;
254 LARGE_INTEGER LastWriteTime
;
255 LARGE_INTEGER ChangeTime
;
256 LARGE_INTEGER AllocationSize
;
257 LARGE_INTEGER EndOfFile
;
258 ULONG FileAttributes
;
259 } FILE_NETWORK_OPEN_INFORMATION
, *PFILE_NETWORK_OPEN_INFORMATION
;
261 typedef struct _FILE_FULL_EA_INFORMATION
{
262 ULONG NextEntryOffset
;
265 USHORT EaValueLength
;
267 } FILE_FULL_EA_INFORMATION
, *PFILE_FULL_EA_INFORMATION
;
269 typedef struct _FILE_STREAM_INFORMATION
271 ULONG NextEntryOffset
;
272 ULONG StreamNameLength
;
273 LARGE_INTEGER StreamSize
;
274 LARGE_INTEGER StreamAllocationSize
;
276 } FILE_STREAM_INFORMATION
, *PFILE_STREAM_INFORMATION
;
278 struct _FILE_ATTRIBUTE_TAG_INFORMATION
280 ULONG FileAttributes
;
282 } FILE_ATTRIBUTE_TAG_INFORMATION
, *PFILE_ATTRIBUTE_TAG_INFORMATION
;
284 typedef enum _FSINFOCLASS
{
285 FileFsVolumeInformation
= 1,
286 FileFsLabelInformation
,
287 FileFsSizeInformation
,
288 FileFsDeviceInformation
,
289 FileFsAttributeInformation
,
290 FileFsControlInformation
,
291 FileFsFullSizeInformation
,
292 FileFsObjectIdInformation
,
293 FileFsMaximumInformation
294 } FS_INFORMATION_CLASS
, *PFS_INFORMATION_CLASS
;
296 typedef enum _KEY_INFORMATION_CLASS
{
300 } KEY_INFORMATION_CLASS
;
302 typedef enum _KEY_VALUE_INFORMATION_CLASS
{
303 KeyValueBasicInformation
,
304 KeyValueFullInformation
,
305 KeyValuePartialInformation
,
306 KeyValueFullInformationAlign64
,
307 KeyValuePartialInformationAlign64
308 } KEY_VALUE_INFORMATION_CLASS
;
310 typedef enum _OBJECT_INFORMATION_CLASS
{
311 ObjectBasicInformation
,
312 ObjectNameInformation
,
313 ObjectTypeInformation
,
314 ObjectAllInformation
,
315 ObjectDataInformation
316 } OBJECT_INFORMATION_CLASS
, *POBJECT_INFORMATION_CLASS
;
318 typedef enum _PROCESSINFOCLASS
{
319 ProcessBasicInformation
= 0,
320 ProcessQuotaLimits
= 1,
321 ProcessIoCounters
= 2,
322 ProcessVmCounters
= 3,
324 ProcessBasePriority
= 5,
325 ProcessRaisePriority
= 6,
326 ProcessDebugPort
= 7,
327 ProcessExceptionPort
= 8,
328 ProcessAccessToken
= 9,
329 ProcessLdtInformation
= 10,
331 ProcessDefaultHardErrorMode
= 12,
332 ProcessIoPortHandlers
= 13,
333 ProcessPooledUsageAndLimits
= 14,
334 ProcessWorkingSetWatch
= 15,
335 ProcessUserModeIOPL
= 16,
336 ProcessEnableAlignmentFaultFixup
= 17,
337 ProcessPriorityClass
= 18,
338 ProcessWx86Information
= 19,
339 ProcessHandleCount
= 20,
340 ProcessAffinityMask
= 21,
341 ProcessPriorityBoost
= 22,
342 ProcessDeviceMap
= 23,
343 ProcessSessionInformation
= 24,
344 ProcessForegroundInformation
= 25,
345 ProcessWow64Information
= 26,
349 typedef enum _SECTION_INHERIT
{
354 typedef enum SYSTEM_INFORMATION_CLASS
{
355 SystemBasicInformation
= 0,
357 SystemPerformanceInformation
= 2,
358 SystemTimeOfDayInformation
= 3, /* was SystemTimeInformation */
360 SystemProcessInformation
= 5,
363 SystemProcessorPerformanceInformation
= 8,
366 SystemDriverInformation
,
376 SystemCacheInformation
,
378 SystemInterruptInformation
= 23,
379 SystemExceptionInformation
= 33,
380 SystemRegistryQuotaInformation
= 37,
381 SystemLookasideInformation
= 45
382 } SYSTEM_INFORMATION_CLASS
, *PSYSTEM_INFORMATION_CLASS
;
384 typedef enum _TIMER_TYPE
{
389 typedef enum _THREADINFOCLASS
{
390 ThreadBasicInformation
,
395 ThreadImpersonationToken
,
396 ThreadDescriptorTableEntry
,
397 ThreadEnableAlignmentFaultFixup
,
398 ThreadEventPair_Reusable
,
399 ThreadQuerySetWin32StartAddress
,
401 ThreadPerformanceCount
,
403 ThreadIdealProcessor
,
405 ThreadSetTlsArrayAddress
,
410 typedef struct _THREAD_BASIC_INFORMATION
413 PVOID TebBaseAddress
;
418 } THREAD_BASIC_INFORMATION
, *PTHREAD_BASIC_INFORMATION
;
421 typedef enum _WINSTATIONINFOCLASS
{
422 WinStationInformation
= 8
423 } WINSTATIONINFOCLASS
;
427 MemoryBasicInformation
= 0
428 } MEMORY_INFORMATION_CLASS
;
430 /* return type of RtlDetermineDosPathNameType_U (FIXME: not the correct names) */
434 UNC_PATH
, /* "//foo" */
435 ABSOLUTE_DRIVE_PATH
, /* "c:/foo" */
436 RELATIVE_DRIVE_PATH
, /* "c:foo" */
437 ABSOLUTE_PATH
, /* "/foo" */
438 RELATIVE_PATH
, /* "foo" */
439 DEVICE_PATH
, /* "//./foo" */
440 UNC_DOT_PATH
/* "//." */
443 /***********************************************************************
444 * IA64 specific types and data structures
449 typedef struct _FRAME_POINTERS
{
450 ULONGLONG MemoryStackFp
;
451 ULONGLONG BackingStoreFp
;
452 } FRAME_POINTERS
, *PFRAME_POINTERS
;
454 #define UNWIND_HISTORY_TABLE_SIZE 12
456 typedef struct _RUNTIME_FUNCTION
{
459 ULONG UnwindInfoAddress
;
460 } RUNTIME_FUNCTION
, *PRUNTIME_FUNCTION
;
462 typedef struct _UNWIND_HISTORY_TABLE_ENTRY
{
465 PRUNTIME_FUNCTION FunctionEntry
;
466 } UNWIND_HISTORY_TABLE_ENTRY
, *PUNWIND_HISTORY_TABLE_ENTRY
;
468 typedef struct _UNWIND_HISTORY_TABLE
{
473 UNWIND_HISTORY_TABLE_ENTRY Entry
[UNWIND_HISTORY_TABLE_SIZE
];
474 } UNWIND_HISTORY_TABLE
, *PUNWIND_HISTORY_TABLE
;
476 #endif /* defined(__ia64__) */
478 /***********************************************************************
479 * Types and data structures
482 /* This is used by NtQuerySystemInformation */
483 /* FIXME: Isn't THREAD_INFO and THREADINFO the same structure? */
485 FILETIME ftKernelTime
;
487 FILETIME ftCreateTime
;
489 DWORD dwStartAddress
;
492 DWORD dwCurrentPriority
;
493 DWORD dwBasePriority
;
494 DWORD dwContextSwitches
;
497 } THREADINFO
, *PTHREADINFO
;
499 /* FIXME: Isn't THREAD_INFO and THREADINFO the same structure? */
500 typedef struct _THREAD_INFO
{
507 } THREAD_INFO
, PTHREAD_INFO
;
509 /***********************************************************************
510 * Types and data structures
513 typedef struct _IO_STATUS_BLOCK
{
519 ULONG_PTR Information
;
520 } IO_STATUS_BLOCK
, *PIO_STATUS_BLOCK
;
522 typedef void (WINAPI
* PIO_APC_ROUTINE
)(PVOID
,PIO_STATUS_BLOCK
,ULONG
);
524 typedef struct _KEY_BASIC_INFORMATION
{
525 LARGE_INTEGER LastWriteTime
;
529 } KEY_BASIC_INFORMATION
, *PKEY_BASIC_INFORMATION
;
531 typedef struct _KEY_NODE_INFORMATION
533 LARGE_INTEGER LastWriteTime
;
540 } KEY_NODE_INFORMATION
, *PKEY_NODE_INFORMATION
;
542 typedef struct _KEY_FULL_INFORMATION
544 LARGE_INTEGER LastWriteTime
;
552 ULONG MaxValueNameLen
;
553 ULONG MaxValueDataLen
;
555 } KEY_FULL_INFORMATION
, *PKEY_FULL_INFORMATION
;
557 typedef struct _KEY_VALUE_ENTRY
559 PUNICODE_STRING ValueName
;
563 } KEY_VALUE_ENTRY
, *PKEY_VALUE_ENTRY
;
565 typedef struct _KEY_VALUE_BASIC_INFORMATION
{
570 } KEY_VALUE_BASIC_INFORMATION
, *PKEY_VALUE_BASIC_INFORMATION
;
572 typedef struct _KEY_VALUE_FULL_INFORMATION
{
579 } KEY_VALUE_FULL_INFORMATION
, *PKEY_VALUE_FULL_INFORMATION
;
581 typedef struct _KEY_VALUE_PARTIAL_INFORMATION
{
586 } KEY_VALUE_PARTIAL_INFORMATION
, *PKEY_VALUE_PARTIAL_INFORMATION
;
588 typedef struct _OBJECT_ATTRIBUTES
{
590 HANDLE RootDirectory
;
591 PUNICODE_STRING ObjectName
;
593 PVOID SecurityDescriptor
; /* type SECURITY_DESCRIPTOR */
594 PVOID SecurityQualityOfService
; /* type SECURITY_QUALITY_OF_SERVICE */
595 } OBJECT_ATTRIBUTES
, *POBJECT_ATTRIBUTES
;
597 typedef struct _OBJECT_DATA_INFORMATION
{
598 BOOLEAN InheritHandle
;
599 BOOLEAN ProtectFromClose
;
600 } OBJECT_DATA_INFORMATION
, *POBJECT_DATA_INFORMATION
;
602 typedef struct _PROCESS_BASIC_INFORMATION
{
605 DWORD PebBaseAddress
;
608 ULONG UniqueProcessId
;
609 ULONG InheritedFromUniqueProcessId
;
614 ULONG_PTR UniqueProcessId
;
617 } PROCESS_BASIC_INFORMATION
, *PPROCESS_BASIC_INFORMATION
;
619 typedef struct _PROCESS_INFO
{
620 DWORD Offset
; /* 00 offset to next PROCESS_INFO ok*/
621 DWORD ThreadCount
; /* 04 number of ThreadInfo member ok */
623 FILETIME CreationTime
; /* 20 */
625 PWCHAR ProcessName
; /* 3c ok */
627 DWORD ProcessID
; /* 44 ok*/
628 DWORD ParentProcessID
;
630 DWORD Unknown3
[2]; /* 50 */
631 ULONG PeakVirtualSize
;
633 ULONG PageFaultCount
;
634 ULONG PeakWorkingSetSize
;
635 ULONG WorkingSetSize
;
636 ULONG QuotaPeakPagedPoolUsage
;
637 ULONG QuotaPagedPoolUsage
;
638 ULONG QuotaPeakNonPagedPoolUsage
;
639 ULONG QuotaNonPagedPoolUsage
;
641 ULONG PeakPagefileUsage
;
644 THREAD_INFO ati
[ANYSIZE_ARRAY
]; /* 94 size=0x40*/
645 } PROCESS_INFO
, PPROCESS_INFO
;
647 typedef struct _RTL_HEAP_DEFINITION
{
648 ULONG Length
; /* = sizeof(RTL_HEAP_DEFINITION) */
651 } RTL_HEAP_DEFINITION
, *PRTL_HEAP_DEFINITION
;
653 typedef struct tagRTL_BITMAP
{
654 ULONG SizeOfBitMap
; /* Number of bits in the bitmap */
655 LPBYTE BitMapBuffer
; /* Bitmap data, assumed sized to a DWORD boundary */
656 } RTL_BITMAP
, *PRTL_BITMAP
;
658 typedef const RTL_BITMAP
*PCRTL_BITMAP
;
660 typedef struct tagRTL_BITMAP_RUN
{
661 ULONG StartOfRun
; /* Bit position at which run starts - FIXME: Name? */
662 ULONG SizeOfRun
; /* Size of the run in bits - FIXME: Name? */
663 } RTL_BITMAP_RUN
, *PRTL_BITMAP_RUN
;
665 typedef const RTL_BITMAP_RUN
*PCRTL_BITMAP_RUN
;
667 typedef struct _RTL_RWLOCK
{
668 RTL_CRITICAL_SECTION rtlCS
;
670 HANDLE hSharedReleaseSemaphore
;
673 HANDLE hExclusiveReleaseSemaphore
;
674 UINT uExclusiveWaiters
;
677 HANDLE hOwningThreadId
;
678 DWORD dwTimeoutBoost
;
680 } RTL_RWLOCK
, *LPRTL_RWLOCK
;
682 /* System Information Class 0x00 */
683 typedef struct _SYSTEM_BASIC_INFORMATION
{
686 ULONG uKeMaximumIncrement
;
688 ULONG uMmNumberOfPhysicalPages
;
689 ULONG uMmLowestPhysicalPage
;
690 ULONG uMmHighestPhysicalPage
;
691 ULONG uAllocationGranularity
;
692 PVOID pLowestUserAddress
;
693 PVOID pMmHighestUserAddress
;
694 ULONG uKeActiveProcessors
;
695 BYTE bKeNumberProcessors
;
701 CCHAR NumberOfProcessors
;
703 } SYSTEM_BASIC_INFORMATION
, *PSYSTEM_BASIC_INFORMATION
;
705 /* System Information Class 0x15 */
709 ULONG PageFaultCount
;
710 ULONG MinimumWorkingSet
;
711 ULONG MaximumWorkingSet
;
713 } SYSTEM_CACHE_INFORMATION
;
715 typedef struct _SYSTEM_CONFIGURATION_INFO
{
719 WORD ProcessorArchitecture
;
724 PVOID MinimumApplicationAddress
;
725 PVOID MaximumApplicationAddress
;
726 ULONG ActiveProcessorMask
;
727 ULONG NumberOfProcessors
;
729 ULONG AllocationGranularity
;
731 WORD ProcessorRevision
;
732 } SYSTEM_CONFIGURATION_INFO
, *PSYSTEM_CONFIGURATION_INFO
;
734 /* System Information Class 0x0b */
741 char szName
[MAX_PATH
+ 1];
742 } SYSTEM_DRIVER_INFORMATION
;
744 typedef struct _SYSTEM_EXCEPTION_INFORMATION
{
746 } SYSTEM_EXCEPTION_INFORMATION
, *PSYSTEM_EXCEPTION_INFORMATION
;
748 typedef struct _SYSTEM_LOOKASIDE_INFORMATION
{
750 } SYSTEM_LOOKASIDE_INFORMATION
, *PSYSTEM_LOOKASIDE_INFORMATION
;
752 typedef struct _SYSTEM_INTERRUPT_INFORMATION
{
754 } SYSTEM_INTERRUPT_INFORMATION
, *PSYSTEM_INTERRUPT_INFORMATION
;
756 /* System Information Class 0x10 */
759 USHORT dwCreatorBackTraceIndex
;
761 BYTE bHandleAttributes
;
762 USHORT usHandleOffset
;
764 ULONG ulGrantedAccess
;
765 } HANDLEINFO
, *PHANDLEINFO
; /* FIXME: SYSTEM_HANDLE_INFORMATION? */
767 typedef struct _SYSTEM_PERFORMANCE_INFORMATION
{
769 } SYSTEM_PERFORMANCE_INFORMATION
, *PSYSTEM_PERFORMANCE_INFORMATION
;
771 /* System Information Class 0x02 */
772 typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
{
774 LARGE_INTEGER liIdleTime
;
777 LARGE_INTEGER IdleTime
;
778 LARGE_INTEGER KernelTime
;
779 LARGE_INTEGER UserTime
;
780 LARGE_INTEGER Reserved1
[2];
783 } SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
, *PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
;
785 /* System Information Class 0x05 */
786 typedef struct _SYSTEM_PROCESS_INFORMATION
{
791 FILETIME ftCreationTime
;
793 WCHAR
*pszProcessName
;
794 DWORD dwBasePriority
;
796 DWORD dwParentProcessID
;
800 DWORD dwVirtualBytesPeak
;
801 DWORD dwVirtualBytes
;
803 DWORD dwWorkingSetPeak
;
808 DWORD dwNonPagedPool
;
809 DWORD dwPageFileBytesPeak
;
810 DWORD dwPrivateBytes
;
811 DWORD dwPageFileBytes
;
815 ULONG NextEntryOffset
;
818 HANDLE UniqueProcessId
;
823 SIZE_T PeakPagefileUsage
;
824 SIZE_T PrivatePageCount
;
825 LARGE_INTEGER Reserved6
[6];
827 } SYSTEM_PROCESS_INFORMATION
, *PSYSTEM_PROCESS_INFORMATION
;
829 typedef struct _SYSTEM_REGISTRY_QUOTA_INFORMATION
{
830 ULONG RegistryQuotaAllowed
;
831 ULONG RegistryQuotaUsed
;
833 } SYSTEM_REGISTRY_QUOTA_INFORMATION
, *PSYSTEM_REGISTRY_QUOTA_INFORMATION
;
835 typedef struct _SYSTEM_TIME_ADJUSTMENT
{
836 ULONG TimeAdjustment
;
837 BOOLEAN TimeAdjustmentDisabled
;
838 } SYSTEM_TIME_ADJUSTMENT
, *PSYSTEM_TIME_ADJUSTMENT
;
840 /* System Information Class 0x03 */
841 typedef struct _SYSTEM_TIMEOFDAY_INFORMATION
{
843 LARGE_INTEGER liKeBootTime
;
844 LARGE_INTEGER liKeSystemTime
;
845 LARGE_INTEGER liExpTimeZoneBias
;
846 ULONG uCurrentTimeZoneId
;
851 } SYSTEM_TIMEOFDAY_INFORMATION
, *PSYSTEM_TIMEOFDAY_INFORMATION
; /* was SYSTEM_TIME_INFORMATION */
853 typedef struct _TIME_FIELDS
862 } TIME_FIELDS
, *PTIME_FIELDS
;
864 typedef struct _WINSTATIONINFORMATIONW
{
867 BYTE Reserved3
[1140];
868 } WINSTATIONINFORMATIONW
, *PWINSTATIONINFORMATIONW
;
870 typedef struct _VM_COUNTERS_
{
871 ULONG PeakVirtualSize
;
873 ULONG PageFaultCount
;
874 ULONG PeakWorkingSetSize
;
875 ULONG WorkingSetSize
;
876 ULONG QuotaPeakPagedPoolUsage
;
877 ULONG QuotaPagedPoolUsage
;
878 ULONG QuotaPeakNonPagedPoolUsage
;
879 ULONG QuotaNonPagedPoolUsage
;
881 ULONG PeakPagefileUsage
;
882 } VM_COUNTERS
, *PVM_COUNTERS
;
884 typedef BOOLEAN (WINAPI
* PWINSTATIONQUERYINFORMATIONW
)(HANDLE
,ULONG
,WINSTATIONINFOCLASS
,PVOID
,ULONG
,PULONG
);
886 typedef struct _LDR_RESOURCE_INFO
891 } LDR_RESOURCE_INFO
, *PLDR_RESOURCE_INFO
;
893 /***********************************************************************
897 /* flags for NtCreateFile and NtOpenFile */
898 #define FILE_DIRECTORY_FLAG 0x00000001
899 #define FILE_WRITE_THROUGH 0x00000002
900 #define FILE_SEQUENTIAL_ONLY 0x00000004
901 #define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008
902 #define FILE_SYNCHRONOUS_IO_ALERT 0x00000010
903 #define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020
904 #define FILE_NON_DIRECTORY_FILE 0x00000040
905 #define FILE_CREATE_TREE_CONNECTION 0x00000080
907 /* status for NtCreateFile or NtOpenFile */
908 #define FILE_SUPERSEDED 0x00000000
909 #define FILE_OPENED 0x00000001
910 #define FILE_CREATED 0x00000002
911 #define FILE_OVERWRITTEN 0x00000003
912 #define FILE_EXISTS 0x00000004
913 #define FILE_DOES_NOT_EXIST 0x00000005
915 #if (_WIN32_WINNT >= 0x0501)
916 #define INTERNAL_TS_ACTIVE_CONSOLE_ID ( *((volatile ULONG*)(0x7ffe02d8)) )
917 #endif /* (_WIN32_WINNT >= 0x0501) */
919 #define LOGONID_CURRENT ((ULONG)-1)
921 #define OBJ_INHERIT 0x00000002L
922 #define OBJ_PERMANENT 0x00000010L
923 #define OBJ_EXCLUSIVE 0x00000020L
924 #define OBJ_CASE_INSENSITIVE 0x00000040L
925 #define OBJ_OPENIF 0x00000080L
926 #define OBJ_OPENLINK 0x00000100L
927 #define OBJ_KERNEL_HANDLE 0x00000200L
928 #define OBJ_VALID_ATTRIBUTES 0x000003F2L
930 #define SERVERNAME_CURRENT ((HANDLE)NULL)
932 typedef void (CALLBACK
*PNTAPCFUNC
)(ULONG_PTR
,ULONG_PTR
,ULONG_PTR
); /* FIXME: not the right name */
934 /***********************************************************************
935 * Function declarations
938 extern LPSTR
_strlwr(LPSTR str
); /* FIXME: Doesn't belong here */
939 extern LPSTR
_strupr(LPSTR str
); /* FIXME: Doesn't belong here */
941 #if defined(__i386__) && defined(__GNUC__)
942 static inline void WINAPI
DbgBreakPoint(void) { __asm__
__volatile__("int3"); }
943 static inline void WINAPI
DbgUserBreakPoint(void) { __asm__
__volatile__("int3"); }
944 #else /* __i386__ && __GNUC__ */
945 void WINAPI
DbgBreakPoint(void);
946 void WINAPI
DbgUserBreakPoint(void);
947 #endif /* __i386__ && __GNUC__ */
948 void WINAPIV
DbgPrint(LPCSTR fmt
, ...);
950 NTSTATUS WINAPI
LdrAccessResource(HMODULE
,const IMAGE_RESOURCE_DATA_ENTRY
*,void**,PULONG
);
951 NTSTATUS WINAPI
LdrFindResourceDirectory_U(HMODULE
,const LDR_RESOURCE_INFO
*,ULONG
,const IMAGE_RESOURCE_DIRECTORY
**);
952 NTSTATUS WINAPI
LdrFindResource_U(HMODULE
,const LDR_RESOURCE_INFO
*,ULONG
,const IMAGE_RESOURCE_DATA_ENTRY
**);
953 void WINAPI
LdrShutdownProcess(void);
954 void WINAPI
LdrShutdownThread(void);
955 NTSTATUS WINAPI
NtAccessCheck(PSECURITY_DESCRIPTOR
,HANDLE
,ACCESS_MASK
,PGENERIC_MAPPING
,PPRIVILEGE_SET
,PULONG
,PULONG
,PBOOLEAN
);
956 NTSTATUS WINAPI
NtAdjustPrivilegesToken(HANDLE
,BOOLEAN
,PTOKEN_PRIVILEGES
,DWORD
,PTOKEN_PRIVILEGES
,PDWORD
);
957 NTSTATUS WINAPI
NtAllocateVirtualMemory(HANDLE
,PVOID
*,PVOID
,ULONG
*,ULONG
,ULONG
);
958 NTSTATUS WINAPI
NtCancelTimer(HANDLE
, BOOLEAN
*);
959 NTSTATUS WINAPI
NtClearEvent(HANDLE
);
960 NTSTATUS WINAPI
NtClose(HANDLE
);
961 NTSTATUS WINAPI
NtCreateEvent(PHANDLE
,ACCESS_MASK
,const OBJECT_ATTRIBUTES
*,BOOLEAN
,BOOLEAN
);
962 NTSTATUS WINAPI
NtCreateFile(PHANDLE
,ACCESS_MASK
,POBJECT_ATTRIBUTES
,PIO_STATUS_BLOCK
,PLARGE_INTEGER
,ULONG
,ULONG
,ULONG
,ULONG
,PVOID
,ULONG
);
963 NTSTATUS WINAPI
NtCreateKey(PHKEY
,ACCESS_MASK
,const OBJECT_ATTRIBUTES
*,ULONG
,const UNICODE_STRING
*,ULONG
,PULONG
);
964 NTSTATUS WINAPI
NtCreateSection(HANDLE
*,ACCESS_MASK
,const OBJECT_ATTRIBUTES
*,const LARGE_INTEGER
*,ULONG
,ULONG
,HANDLE
);
965 NTSTATUS WINAPI
NtCreateSemaphore(PHANDLE
,ACCESS_MASK
,const OBJECT_ATTRIBUTES
*,ULONG
,ULONG
);
966 NTSTATUS WINAPI
NtCreateTimer(HANDLE
*, ACCESS_MASK
, const OBJECT_ATTRIBUTES
*, TIMER_TYPE
);
967 NTSTATUS WINAPI
NtDelayExecution(BOOLEAN
,const LARGE_INTEGER
*);
968 NTSTATUS WINAPI
NtDeleteKey(HKEY
);
969 NTSTATUS WINAPI
NtDeleteValueKey(HKEY
,const UNICODE_STRING
*);
970 NTSTATUS WINAPI
NtDeviceIoControlFile(HANDLE
,HANDLE
,PIO_APC_ROUTINE
,PVOID
,PIO_STATUS_BLOCK
,ULONG
,PVOID
,ULONG
,PVOID
,ULONG
);
971 NTSTATUS WINAPI
NtDuplicateObject(HANDLE
,HANDLE
,HANDLE
,PHANDLE
,ACCESS_MASK
,ULONG
,ULONG
);
972 NTSTATUS WINAPI
NtEnumerateKey(HKEY
,ULONG
,KEY_INFORMATION_CLASS
,void *,DWORD
,DWORD
*);
973 NTSTATUS WINAPI
NtEnumerateValueKey(HKEY
,ULONG
,KEY_VALUE_INFORMATION_CLASS
,PVOID
,ULONG
,PULONG
);
974 NTSTATUS WINAPI
NtFlushBuffersFile(HANDLE
,IO_STATUS_BLOCK
*);
975 NTSTATUS WINAPI
NtFlushKey(HKEY
);
976 NTSTATUS WINAPI
NtFlushVirtualMemory(HANDLE
,LPCVOID
*,ULONG
*,ULONG
);
977 NTSTATUS WINAPI
NtFreeVirtualMemory(HANDLE
,PVOID
*,ULONG
*,ULONG
);
978 NTSTATUS WINAPI
NtGetContextThread(HANDLE
,CONTEXT
*);
979 NTSTATUS WINAPI
NtLoadKey(const OBJECT_ATTRIBUTES
*,const OBJECT_ATTRIBUTES
*);
980 NTSTATUS WINAPI
NtLockFile(HANDLE
,HANDLE
,PIO_APC_ROUTINE
,void*,PIO_STATUS_BLOCK
,PLARGE_INTEGER
,PLARGE_INTEGER
,ULONG
*,BOOLEAN
,BOOLEAN
);
981 NTSTATUS WINAPI
NtLockVirtualMemory(HANDLE
,PVOID
*,ULONG
*,ULONG
);
982 NTSTATUS WINAPI
NtMapViewOfSection(HANDLE
,HANDLE
,PVOID
*,ULONG
,ULONG
,const LARGE_INTEGER
*,ULONG
*,SECTION_INHERIT
,ULONG
,ULONG
);
983 NTSTATUS WINAPI
NtNotifyChangeKey(HKEY
,HANDLE
,PIO_APC_ROUTINE
,PVOID
,PIO_STATUS_BLOCK
,ULONG
,BOOLEAN
,PVOID
,ULONG
,BOOLEAN
);
984 NTSTATUS WINAPI
NtOpenEvent(PHANDLE
,ACCESS_MASK
,const OBJECT_ATTRIBUTES
*);
985 NTSTATUS WINAPI
NtOpenFile(PHANDLE
,ACCESS_MASK
,POBJECT_ATTRIBUTES
,PIO_STATUS_BLOCK
,ULONG
,ULONG
);
986 NTSTATUS WINAPI
NtOpenKey(PHKEY
,ACCESS_MASK
,const OBJECT_ATTRIBUTES
*);
987 NTSTATUS WINAPI
NtOpenProcessToken(HANDLE
,DWORD
,HANDLE
*);
988 NTSTATUS WINAPI
NtOpenSection(HANDLE
*,ACCESS_MASK
,const OBJECT_ATTRIBUTES
*);
989 NTSTATUS WINAPI
NtOpenThread(HANDLE
*,ACCESS_MASK
,const OBJECT_ATTRIBUTES
*,const CLIENT_ID
*);
990 NTSTATUS WINAPI
NtOpenThreadToken(HANDLE
,DWORD
,BOOLEAN
,HANDLE
*);
991 NTSTATUS WINAPI
NtOpenTimer(HANDLE
*, ACCESS_MASK
, const OBJECT_ATTRIBUTES
*);
992 NTSTATUS WINAPI
NtProtectVirtualMemory(HANDLE
,PVOID
*,ULONG
*,ULONG
,ULONG
*);
993 NTSTATUS WINAPI
NtPulseEvent(HANDLE
,PULONG
);
994 NTSTATUS WINAPI
NtQueueApcThread(HANDLE
,PNTAPCFUNC
,ULONG_PTR
,ULONG_PTR
,ULONG_PTR
);
995 NTSTATUS WINAPI
NtQueryDefaultLocale(BOOLEAN
,LCID
*);
996 NTSTATUS WINAPI
NtQueryInformationFile(HANDLE
,PIO_STATUS_BLOCK
,PVOID
,LONG
,FILE_INFORMATION_CLASS
);
997 NTSTATUS WINAPI
NtQueryInformationProcess(HANDLE
,PROCESSINFOCLASS
,PVOID
,ULONG
,PULONG
);
998 NTSTATUS WINAPI
NtQueryInformationThread(HANDLE
,THREADINFOCLASS
,PVOID
,ULONG
,PULONG
);
999 NTSTATUS WINAPI
NtQueryInformationToken(HANDLE
,DWORD
,LPVOID
,DWORD
,LPDWORD
);
1000 NTSTATUS WINAPI
NtQueryKey(HKEY
,KEY_INFORMATION_CLASS
,void *,DWORD
,DWORD
*);
1001 NTSTATUS WINAPI
NtQueryMultipleValueKey(HKEY
,PVALENTW
,ULONG
,PVOID
,ULONG
,PULONG
);
1002 NTSTATUS WINAPI
NtQueryObject(HANDLE
, OBJECT_INFORMATION_CLASS
, PVOID
, ULONG
, PULONG
);
1003 NTSTATUS WINAPI
NtQuerySecurityObject(HANDLE
,SECURITY_INFORMATION
,PSECURITY_DESCRIPTOR
,ULONG
,PULONG
);
1004 NTSTATUS WINAPI
NtQuerySystemInformation(SYSTEM_INFORMATION_CLASS
,PVOID
,ULONG
,PULONG
);
1005 NTSTATUS WINAPI
NtQuerySystemTime(PLARGE_INTEGER
);
1006 NTSTATUS WINAPI
NtQueryValueKey(HKEY
,const UNICODE_STRING
*,KEY_VALUE_INFORMATION_CLASS
,void *,DWORD
,DWORD
*);
1007 NTSTATUS WINAPI
NtQueryVirtualMemory(HANDLE
,LPCVOID
,MEMORY_INFORMATION_CLASS
,PVOID
,ULONG
,ULONG
*);
1008 void WINAPI
NtRaiseException(PEXCEPTION_RECORD
,PCONTEXT
,BOOL
);
1009 NTSTATUS WINAPI
NtReadFile(HANDLE
,HANDLE
,PIO_APC_ROUTINE
,PVOID
,PIO_STATUS_BLOCK
,PVOID
,ULONG
,PLARGE_INTEGER
,PULONG
);
1010 NTSTATUS WINAPI
NtReadVirtualMemory(HANDLE
,const void*,void*,SIZE_T
,SIZE_T
*);
1011 NTSTATUS WINAPI
NtReleaseSemaphore(HANDLE
,ULONG
,PULONG
);
1012 NTSTATUS WINAPI
NtReplaceKey(POBJECT_ATTRIBUTES
,HKEY
,POBJECT_ATTRIBUTES
);
1013 NTSTATUS WINAPI
NtResetEvent(HANDLE
,PULONG
);
1014 NTSTATUS WINAPI
NtRestoreKey(HKEY
,HANDLE
,ULONG
);
1015 NTSTATUS WINAPI
NtResumeThread(HANDLE
,PULONG
);
1016 NTSTATUS WINAPI
NtSaveKey(HKEY
,HANDLE
);
1017 NTSTATUS WINAPI
NtSetContextThread(HANDLE
,const CONTEXT
*);
1018 NTSTATUS WINAPI
NtSetDefaultLocale(BOOLEAN
,LCID
);
1019 NTSTATUS WINAPI
NtSetEvent(HANDLE
,PULONG
);
1020 NTSTATUS WINAPI
NtSetInformationFile(HANDLE
,PIO_STATUS_BLOCK
,PVOID
,ULONG
,FILE_INFORMATION_CLASS
);
1021 NTSTATUS WINAPI
NtSetInformationKey(HKEY
,const int,PVOID
,ULONG
);
1022 NTSTATUS WINAPI
NtSetInformationObject(HANDLE
, OBJECT_INFORMATION_CLASS
, PVOID
, ULONG
);
1023 NTSTATUS WINAPI
NtSetInformationThread(HANDLE
,THREADINFOCLASS
,LPCVOID
,ULONG
);
1024 NTSTATUS WINAPI
NtSetSecurityObject(HANDLE
,SECURITY_INFORMATION
,PSECURITY_DESCRIPTOR
);
1025 NTSTATUS WINAPI
NtSetSystemTime(const LARGE_INTEGER
*,LARGE_INTEGER
*);
1026 NTSTATUS WINAPI
NtSetTimer(HANDLE
, const LARGE_INTEGER
*, PTIMERAPCROUTINE
, PVOID
, BOOLEAN
, ULONG
, BOOLEAN
*);
1027 NTSTATUS WINAPI
NtSetValueKey(HKEY
,const UNICODE_STRING
*,ULONG
,ULONG
,const void *,ULONG
);
1028 NTSTATUS WINAPI
NtSuspendThread(HANDLE
,PULONG
);
1029 NTSTATUS WINAPI
NtTerminateProcess(HANDLE
,LONG
);
1030 NTSTATUS WINAPI
NtTerminateThread(HANDLE
,LONG
);
1031 NTSTATUS WINAPI
NtUnloadKey(HKEY
);
1032 NTSTATUS WINAPI
NtUnlockFile(HANDLE
,PIO_STATUS_BLOCK
,PLARGE_INTEGER
,PLARGE_INTEGER
,PULONG
);
1033 NTSTATUS WINAPI
NtUnlockVirtualMemory(HANDLE
,PVOID
*,ULONG
*,ULONG
);
1034 NTSTATUS WINAPI
NtUnmapViewOfSection(HANDLE
,PVOID
);
1035 NTSTATUS WINAPI
NtWaitForSingleObject(HANDLE
,BOOLEAN
,const LARGE_INTEGER
*);
1036 NTSTATUS WINAPI
NtWaitForMultipleObjects(ULONG
,const HANDLE
*,BOOLEAN
,BOOLEAN
,const LARGE_INTEGER
*);
1037 NTSTATUS WINAPI
NtWriteFile(HANDLE
,HANDLE
,PIO_APC_ROUTINE
,PVOID
,PIO_STATUS_BLOCK
,const void*,ULONG
,PLARGE_INTEGER
,PULONG
);
1038 NTSTATUS WINAPI
NtWriteVirtualMemory(HANDLE
,void*,const void*,SIZE_T
,SIZE_T
*);
1040 void WINAPI
RtlAcquirePebLock(void);
1041 BYTE WINAPI
RtlAcquireResourceExclusive(LPRTL_RWLOCK
,BYTE
);
1042 BYTE WINAPI
RtlAcquireResourceShared(LPRTL_RWLOCK
,BYTE
);
1043 NTSTATUS WINAPI
RtlAddAce(PACL
,DWORD
,DWORD
,PACE_HEADER
,DWORD
);
1044 NTSTATUS WINAPI
RtlAddAccessAllowedAce(PACL
,DWORD
,DWORD
,PSID
);
1045 NTSTATUS WINAPI
RtlAddAccessAllowedAceEx(PACL
,DWORD
,DWORD
,DWORD
,PSID
);
1046 NTSTATUS WINAPI
RtlAddAccessDeniedAce(PACL
,DWORD
,DWORD
,PSID
);
1047 NTSTATUS WINAPI
RtlAddAccessDeniedAceEx(PACL
,DWORD
,DWORD
,DWORD
,PSID
);
1048 DWORD WINAPI
RtlAdjustPrivilege(DWORD
,DWORD
,DWORD
,DWORD
);
1049 BOOLEAN WINAPI
RtlAllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY
,BYTE
,DWORD
,DWORD
,DWORD
,DWORD
,DWORD
,DWORD
,DWORD
,DWORD
,PSID
*);
1050 PVOID WINAPI
RtlAllocateHeap(HANDLE
,ULONG
,ULONG
);
1051 DWORD WINAPI
RtlAnsiStringToUnicodeSize(const STRING
*);
1052 NTSTATUS WINAPI
RtlAnsiStringToUnicodeString(PUNICODE_STRING
,PCANSI_STRING
,BOOLEAN
);
1053 NTSTATUS WINAPI
RtlAppendAsciizToString(STRING
*,LPCSTR
);
1054 NTSTATUS WINAPI
RtlAppendStringToString(STRING
*,const STRING
*);
1055 NTSTATUS WINAPI
RtlAppendUnicodeStringToString(UNICODE_STRING
*,const UNICODE_STRING
*);
1056 NTSTATUS WINAPI
RtlAppendUnicodeToString(UNICODE_STRING
*,LPCWSTR
);
1057 BOOLEAN WINAPI
RtlAreAllAccessesGranted(ACCESS_MASK
,ACCESS_MASK
);
1058 BOOLEAN WINAPI
RtlAreAnyAccessesGranted(ACCESS_MASK
,ACCESS_MASK
);
1059 BOOLEAN WINAPI
RtlAreBitsSet(PCRTL_BITMAP
,ULONG
,ULONG
);
1060 BOOLEAN WINAPI
RtlAreBitsClear(PCRTL_BITMAP
,ULONG
,ULONG
);
1062 NTSTATUS WINAPI
RtlCharToInteger(PCSZ
,ULONG
,PULONG
);
1063 void WINAPI
RtlClearAllBits(PRTL_BITMAP
);
1064 void WINAPI
RtlClearBits(PRTL_BITMAP
,ULONG
,ULONG
);
1065 ULONG WINAPI
RtlCompactHeap(HANDLE
,ULONG
);
1066 LONG WINAPI
RtlCompareString(const STRING
*,const STRING
*,BOOLEAN
);
1067 LONG WINAPI
RtlCompareUnicodeString(const UNICODE_STRING
*,const UNICODE_STRING
*,BOOLEAN
);
1068 DWORD WINAPI
RtlComputeCrc32(DWORD
,PBYTE
,INT
);
1069 NTSTATUS WINAPI
RtlConvertSidToUnicodeString(PUNICODE_STRING
,PSID
,BOOLEAN
);
1070 LONGLONG WINAPI
RtlConvertLongToLargeInteger(LONG
);
1071 ULONGLONG WINAPI
RtlConvertUlongToLargeInteger(ULONG
);
1072 void WINAPI
RtlCopyLuid(PLUID
,const LUID
*);
1073 void WINAPI
RtlCopyLuidAndAttributesArray(ULONG
,const LUID_AND_ATTRIBUTES
*,PLUID_AND_ATTRIBUTES
);
1074 DWORD WINAPI
RtlCopySid(DWORD
,PSID
,PSID
);
1075 void WINAPI
RtlCopyString(STRING
*,const STRING
*);
1076 void WINAPI
RtlCopyUnicodeString(UNICODE_STRING
*,const UNICODE_STRING
*);
1077 NTSTATUS WINAPI
RtlCreateAcl(PACL
,DWORD
,DWORD
);
1078 NTSTATUS WINAPI
RtlCreateEnvironment(BOOLEAN
, PWSTR
*);
1079 HANDLE WINAPI
RtlCreateHeap(ULONG
,PVOID
,ULONG
,ULONG
,PVOID
,PRTL_HEAP_DEFINITION
);
1080 NTSTATUS WINAPI
RtlCreateSecurityDescriptor(PSECURITY_DESCRIPTOR
,DWORD
);
1081 BOOLEAN WINAPI
RtlCreateUnicodeString(PUNICODE_STRING
,LPCWSTR
);
1082 BOOLEAN WINAPI
RtlCreateUnicodeStringFromAsciiz(PUNICODE_STRING
,LPCSTR
);
1084 NTSTATUS WINAPI
RtlDeleteCriticalSection(RTL_CRITICAL_SECTION
*);
1085 void WINAPI
RtlDeleteResource(LPRTL_RWLOCK
);
1086 DWORD WINAPI
RtlDeleteSecurityObject(DWORD
);
1087 NTSTATUS WINAPI
RtlDestroyEnvironment(PWSTR
);
1088 HANDLE WINAPI
RtlDestroyHeap(HANDLE
);
1089 DOS_PATHNAME_TYPE WINAPI
RtlDetermineDosPathNameType_U(PCWSTR
);
1090 BOOLEAN WINAPI
RtlDoesFileExists_U(LPCWSTR
);
1091 BOOLEAN WINAPI
RtlDosPathNameToNtPathName_U(LPWSTR
,PUNICODE_STRING
,PWSTR
*,CURDIR
*);
1092 ULONG WINAPI
RtlDosSearchPath_U(LPCWSTR
, LPCWSTR
, LPCWSTR
, ULONG
, LPWSTR
, LPWSTR
*);
1093 WCHAR WINAPI
RtlDowncaseUnicodeChar(WCHAR
);
1094 NTSTATUS WINAPI
RtlDowncaseUnicodeString(UNICODE_STRING
*,const UNICODE_STRING
*,BOOLEAN
);
1095 void WINAPI
RtlDumpResource(LPRTL_RWLOCK
);
1096 NTSTATUS WINAPI
RtlDuplicateUnicodeString(int,const UNICODE_STRING
*,UNICODE_STRING
*);
1098 LONGLONG WINAPI
RtlEnlargedIntegerMultiply(INT
,INT
);
1099 ULONGLONG WINAPI
RtlEnlargedUnsignedMultiply(UINT
,UINT
);
1100 UINT WINAPI
RtlEnlargedUnsignedDivide(ULONGLONG
,UINT
,UINT
*);
1101 NTSTATUS WINAPI
RtlEnterCriticalSection(RTL_CRITICAL_SECTION
*);
1102 void WINAPI
RtlEraseUnicodeString(UNICODE_STRING
*);
1103 NTSTATUS WINAPI
RtlEqualComputerName(const UNICODE_STRING
*,const UNICODE_STRING
*);
1104 NTSTATUS WINAPI
RtlEqualDomainName(const UNICODE_STRING
*,const UNICODE_STRING
*);
1105 BOOLEAN WINAPI
RtlEqualLuid(const LUID
*,const LUID
*);
1106 BOOL WINAPI
RtlEqualPrefixSid(PSID
,PSID
);
1107 BOOL WINAPI
RtlEqualSid(PSID
,PSID
);
1108 BOOLEAN WINAPI
RtlEqualString(const STRING
*,const STRING
*,BOOLEAN
);
1109 BOOLEAN WINAPI
RtlEqualUnicodeString(const UNICODE_STRING
*,const UNICODE_STRING
*,BOOLEAN
);
1110 NTSTATUS WINAPI
RtlExpandEnvironmentStrings_U(PWSTR
, const UNICODE_STRING
*, UNICODE_STRING
*, ULONG
*);
1111 LONGLONG WINAPI
RtlExtendedMagicDivide(LONGLONG
,LONGLONG
,INT
);
1112 LONGLONG WINAPI
RtlExtendedIntegerMultiply(LONGLONG
,INT
);
1113 LONGLONG WINAPI
RtlExtendedLargeIntegerDivide(LONGLONG
,INT
,INT
*);
1115 NTSTATUS WINAPI
RtlFindCharInUnicodeString(int,const UNICODE_STRING
*,const UNICODE_STRING
*,USHORT
*);
1116 ULONG WINAPI
RtlFindClearBits(PCRTL_BITMAP
,ULONG
,ULONG
);
1117 ULONG WINAPI
RtlFindClearBitsAndSet(PRTL_BITMAP
,ULONG
,ULONG
);
1118 ULONG WINAPI
RtlFindClearRuns(PCRTL_BITMAP
,PRTL_BITMAP_RUN
,ULONG
,BOOLEAN
);
1119 ULONG WINAPI
RtlFindLastBackwardRunSet(PCRTL_BITMAP
,ULONG
,PULONG
);
1120 ULONG WINAPI
RtlFindLastBackwardRunClear(PCRTL_BITMAP
,ULONG
,PULONG
);
1121 CCHAR WINAPI
RtlFindLeastSignificantBit(ULONGLONG
);
1122 ULONG WINAPI
RtlFindLongestRunSet(PCRTL_BITMAP
,PULONG
);
1123 ULONG WINAPI
RtlFindLongestRunClear(PCRTL_BITMAP
,PULONG
);
1124 NTSTATUS WINAPI
RtlFindMessage(HMODULE
,ULONG
,ULONG
,ULONG
,const MESSAGE_RESOURCE_ENTRY
**);
1125 CCHAR WINAPI
RtlFindMostSignificantBit(ULONGLONG
);
1126 ULONG WINAPI
RtlFindNextForwardRunSet(PCRTL_BITMAP
,ULONG
,PULONG
);
1127 ULONG WINAPI
RtlFindNextForwardRunClear(PCRTL_BITMAP
,ULONG
,PULONG
);
1128 ULONG WINAPI
RtlFindSetBits(PCRTL_BITMAP
,ULONG
,ULONG
);
1129 ULONG WINAPI
RtlFindSetBitsAndClear(PRTL_BITMAP
,ULONG
,ULONG
);
1130 ULONG WINAPI
RtlFindSetRuns(PCRTL_BITMAP
,PRTL_BITMAP_RUN
,ULONG
,BOOLEAN
);
1131 BOOLEAN WINAPI
RtlFirstFreeAce(PACL
,PACE_HEADER
*);
1132 NTSTATUS WINAPI
RtlFormatCurrentUserKeyPath(PUNICODE_STRING
);
1133 void WINAPI
RtlFreeAnsiString(PANSI_STRING
);
1134 BOOLEAN WINAPI
RtlFreeHeap(HANDLE
,ULONG
,PVOID
);
1135 void WINAPI
RtlFreeOemString(POEM_STRING
);
1136 DWORD WINAPI
RtlFreeSid(PSID
);
1137 void WINAPI
RtlFreeUnicodeString(PUNICODE_STRING
);
1139 DWORD WINAPI
RtlGetAce(PACL
,DWORD
,LPVOID
*);
1140 NTSTATUS WINAPI
RtlGetControlSecurityDescriptor(PSECURITY_DESCRIPTOR
, PSECURITY_DESCRIPTOR_CONTROL
,LPDWORD
);
1141 NTSTATUS WINAPI
RtlGetCurrentDirectory_U(ULONG
, LPWSTR
);
1142 NTSTATUS WINAPI
RtlGetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR
,PBOOLEAN
,PACL
*,PBOOLEAN
);
1143 ULONG WINAPI
RtlGetFullPathName_U(PCWSTR
,ULONG
,PWSTR
,PWSTR
*);
1144 NTSTATUS WINAPI
RtlGetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR
,PSID
*,PBOOLEAN
);
1145 DWORD WINAPI
RtlGetLongestNtPathLength(void);
1146 BOOLEAN WINAPI
RtlGetNtProductType(LPDWORD
);
1147 NTSTATUS WINAPI
RtlGetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR
,PSID
*,PBOOLEAN
);
1148 ULONG WINAPI
RtlGetProcessHeaps(ULONG
,HANDLE
*);
1149 NTSTATUS WINAPI
RtlGetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR
,PBOOLEAN
,PACL
*,PBOOLEAN
);
1151 PSID_IDENTIFIER_AUTHORITY WINAPI
RtlIdentifierAuthoritySid(PSID
);
1152 PVOID WINAPI
RtlImageDirectoryEntryToData(HMODULE
,BOOL
,WORD
,ULONG
*);
1153 PIMAGE_NT_HEADERS WINAPI
RtlImageNtHeader(HMODULE
);
1154 PIMAGE_SECTION_HEADER WINAPI
RtlImageRvaToSection(const IMAGE_NT_HEADERS
*,HMODULE
,DWORD
);
1155 PVOID WINAPI
RtlImageRvaToVa(const IMAGE_NT_HEADERS
*,HMODULE
,DWORD
,IMAGE_SECTION_HEADER
**);
1156 BOOL WINAPI
RtlImpersonateSelf(SECURITY_IMPERSONATION_LEVEL
);
1157 void WINAPI
RtlInitString(PSTRING
,PCSZ
);
1158 void WINAPI
RtlInitAnsiString(PANSI_STRING
,PCSZ
);
1159 void WINAPI
RtlInitUnicodeString(PUNICODE_STRING
,PCWSTR
);
1160 NTSTATUS WINAPI
RtlInitUnicodeStringEx(PUNICODE_STRING
,PCWSTR
);
1161 NTSTATUS WINAPI
RtlInitializeCriticalSection(RTL_CRITICAL_SECTION
*);
1162 NTSTATUS WINAPI
RtlInitializeCriticalSectionAndSpinCount(RTL_CRITICAL_SECTION
*,DWORD
);
1163 void WINAPI
RtlInitializeBitMap(PRTL_BITMAP
,LPBYTE
,ULONG
);
1164 void WINAPI
RtlInitializeResource(LPRTL_RWLOCK
);
1165 BOOL WINAPI
RtlInitializeSid(PSID
,PSID_IDENTIFIER_AUTHORITY
,BYTE
);
1167 NTSTATUS WINAPI
RtlInt64ToUnicodeString(ULONGLONG
,ULONG
,UNICODE_STRING
*);
1168 NTSTATUS WINAPI
RtlIntegerToChar(ULONG
,ULONG
,ULONG
,PCHAR
);
1169 NTSTATUS WINAPI
RtlIntegerToUnicodeString(ULONG
,ULONG
,UNICODE_STRING
*);
1170 ULONG WINAPI
RtlIsDosDeviceName_U(PCWSTR
);
1171 BOOLEAN WINAPI
RtlIsNameLegalDOS8Dot3(const UNICODE_STRING
*,POEM_STRING
,PBOOLEAN
);
1172 DWORD WINAPI
RtlIsTextUnicode(LPVOID
,DWORD
,DWORD
*);
1174 LONGLONG WINAPI
RtlLargeIntegerAdd(LONGLONG
,LONGLONG
);
1175 LONGLONG WINAPI
RtlLargeIntegerArithmeticShift(LONGLONG
,INT
);
1176 ULONGLONG WINAPI
RtlLargeIntegerDivide( ULONGLONG
,ULONGLONG
,ULONGLONG
*);
1177 LONGLONG WINAPI
RtlLargeIntegerNegate(LONGLONG
);
1178 LONGLONG WINAPI
RtlLargeIntegerShiftLeft(LONGLONG
,INT
);
1179 LONGLONG WINAPI
RtlLargeIntegerShiftRight(LONGLONG
,INT
);
1180 LONGLONG WINAPI
RtlLargeIntegerSubtract(LONGLONG
,LONGLONG
);
1181 NTSTATUS WINAPI
RtlLargeIntegerToChar(const ULONGLONG
*,ULONG
,ULONG
,PCHAR
);
1182 NTSTATUS WINAPI
RtlLeaveCriticalSection(RTL_CRITICAL_SECTION
*);
1183 DWORD WINAPI
RtlLengthRequiredSid(DWORD
);
1184 ULONG WINAPI
RtlLengthSecurityDescriptor(PSECURITY_DESCRIPTOR
);
1185 DWORD WINAPI
RtlLengthSid(PSID
);
1186 NTSTATUS WINAPI
RtlLocalTimeToSystemTime(const LARGE_INTEGER
*,PLARGE_INTEGER
);
1187 BOOLEAN WINAPI
RtlLockHeap(HANDLE
);
1189 NTSTATUS WINAPI
RtlMakeSelfRelativeSD(PSECURITY_DESCRIPTOR
,PSECURITY_DESCRIPTOR
,LPDWORD
);
1190 void WINAPI
RtlMapGenericMask(PACCESS_MASK
,const GENERIC_MAPPING
*);
1191 NTSTATUS WINAPI
RtlMultiByteToUnicodeN(LPWSTR
,DWORD
,LPDWORD
,LPCSTR
,DWORD
);
1192 NTSTATUS WINAPI
RtlMultiByteToUnicodeSize(DWORD
*,LPCSTR
,UINT
);
1194 DWORD WINAPI
RtlNewSecurityObject(DWORD
,DWORD
,DWORD
,DWORD
,DWORD
,DWORD
);
1195 LPVOID WINAPI
RtlNormalizeProcessParams(LPVOID
);
1196 ULONG WINAPI
RtlNtStatusToDosError(NTSTATUS
);
1197 ULONG WINAPI
RtlNumberOfSetBits(PCRTL_BITMAP
);
1198 ULONG WINAPI
RtlNumberOfClearBits(PCRTL_BITMAP
);
1200 UINT WINAPI
RtlOemStringToUnicodeSize(const STRING
*);
1201 NTSTATUS WINAPI
RtlOemStringToUnicodeString(UNICODE_STRING
*,const STRING
*,BOOLEAN
);
1202 NTSTATUS WINAPI
RtlOemToUnicodeN(LPWSTR
,DWORD
,LPDWORD
,LPCSTR
,DWORD
);
1203 DWORD WINAPI
RtlOpenCurrentUser(ACCESS_MASK
,PHKEY
);
1205 BOOLEAN WINAPI
RtlPrefixString(const STRING
*,const STRING
*,BOOLEAN
);
1206 BOOLEAN WINAPI
RtlPrefixUnicodeString(const UNICODE_STRING
*,const UNICODE_STRING
*,BOOLEAN
);
1208 NTSTATUS WINAPI
RtlQueryEnvironmentVariable_U(PWSTR
,PUNICODE_STRING
,PUNICODE_STRING
);
1209 NTSTATUS WINAPI
RtlQueryTimeZoneInformation(LPTIME_ZONE_INFORMATION
);
1211 void WINAPI
RtlRaiseException(PEXCEPTION_RECORD
);
1212 void WINAPI
RtlRaiseStatus(NTSTATUS
);
1213 ULONG WINAPI
RtlRandom(PULONG
);
1214 PVOID WINAPI
RtlReAllocateHeap(HANDLE
,ULONG
,PVOID
,ULONG
);
1215 void WINAPI
RtlReleasePebLock(void);
1216 void WINAPI
RtlReleaseResource(LPRTL_RWLOCK
);
1218 void WINAPI
RtlSecondsSince1970ToTime(DWORD
,LARGE_INTEGER
*);
1219 void WINAPI
RtlSecondsSince1980ToTime(DWORD
,LARGE_INTEGER
*);
1220 void WINAPI
RtlSetAllBits(PRTL_BITMAP
);
1221 void WINAPI
RtlSetBits(PRTL_BITMAP
,ULONG
,ULONG
);
1222 NTSTATUS WINAPI
RtlSetCurrentDirectory_U(const UNICODE_STRING
*);
1223 void WINAPI
RtlSetCurrentEnvironment(PWSTR
, PWSTR
*);
1224 NTSTATUS WINAPI
RtlSetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR
,BOOLEAN
,PACL
,BOOLEAN
);
1225 NTSTATUS WINAPI
RtlSetEnvironmentVariable(PWSTR
*,PUNICODE_STRING
,PUNICODE_STRING
);
1226 NTSTATUS WINAPI
RtlSetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR
,PSID
,BOOLEAN
);
1227 NTSTATUS WINAPI
RtlSetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR
,PSID
,BOOLEAN
);
1228 NTSTATUS WINAPI
RtlSetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR
,BOOLEAN
,PACL
,BOOLEAN
);
1229 NTSTATUS WINAPI
RtlSetTimeZoneInformation(const TIME_ZONE_INFORMATION
*);
1230 ULONG WINAPI
RtlSizeHeap(HANDLE
,ULONG
,PVOID
);
1231 LPDWORD WINAPI
RtlSubAuthoritySid(PSID
,DWORD
);
1232 LPBYTE WINAPI
RtlSubAuthorityCountSid(PSID
);
1233 NTSTATUS WINAPI
RtlSystemTimeToLocalTime(const LARGE_INTEGER
*,PLARGE_INTEGER
);
1235 void WINAPI
RtlTimeToTimeFields(const LARGE_INTEGER
*,PTIME_FIELDS
);
1236 BOOLEAN WINAPI
RtlTimeFieldsToTime(PTIME_FIELDS
,PLARGE_INTEGER
);
1237 void WINAPI
RtlTimeToElapsedTimeFields(const LARGE_INTEGER
*,PTIME_FIELDS
);
1238 BOOLEAN WINAPI
RtlTimeToSecondsSince1970(const LARGE_INTEGER
*,LPDWORD
);
1239 BOOLEAN WINAPI
RtlTimeToSecondsSince1980(const LARGE_INTEGER
*,LPDWORD
);
1240 BOOL WINAPI
RtlTryEnterCriticalSection(RTL_CRITICAL_SECTION
*);
1242 ULONGLONG __cdecl
RtlUlonglongByteSwap(ULONGLONG
);
1243 DWORD WINAPI
RtlUnicodeStringToAnsiSize(const UNICODE_STRING
*);
1244 NTSTATUS WINAPI
RtlUnicodeStringToAnsiString(PANSI_STRING
,PCUNICODE_STRING
,BOOLEAN
);
1245 NTSTATUS WINAPI
RtlUnicodeStringToInteger(const UNICODE_STRING
*,ULONG
,ULONG
*);
1246 DWORD WINAPI
RtlUnicodeStringToOemSize(const UNICODE_STRING
*);
1247 NTSTATUS WINAPI
RtlUnicodeStringToOemString(POEM_STRING
,PCUNICODE_STRING
,BOOLEAN
);
1248 NTSTATUS WINAPI
RtlUnicodeToMultiByteN(LPSTR
,DWORD
,LPDWORD
,LPCWSTR
,DWORD
);
1249 NTSTATUS WINAPI
RtlUnicodeToMultiByteSize(PULONG
,PCWSTR
,ULONG
);
1250 NTSTATUS WINAPI
RtlUnicodeToOemN(LPSTR
,DWORD
,LPDWORD
,LPCWSTR
,DWORD
);
1251 ULONG WINAPI
RtlUniform(PULONG
);
1252 BOOLEAN WINAPI
RtlUnlockHeap(HANDLE
);
1253 void WINAPI
RtlUnwind(PVOID
,PVOID
,PEXCEPTION_RECORD
,PVOID
);
1255 void WINAPI
RtlUnwind2(FRAME_POINTERS
,PVOID
,PEXCEPTION_RECORD
,PVOID
,PCONTEXT
);
1256 void WINAPI
RtlUnwindEx(FRAME_POINTERS
,PVOID
,PEXCEPTION_RECORD
,PVOID
,PCONTEXT
,PUNWIND_HISTORY_TABLE
);
1258 WCHAR WINAPI
RtlUpcaseUnicodeChar(WCHAR
);
1259 NTSTATUS WINAPI
RtlUpcaseUnicodeString(UNICODE_STRING
*,const UNICODE_STRING
*,BOOLEAN
);
1260 NTSTATUS WINAPI
RtlUpcaseUnicodeStringToAnsiString(STRING
*,const UNICODE_STRING
*,BOOLEAN
);
1261 NTSTATUS WINAPI
RtlUpcaseUnicodeStringToCountedOemString(STRING
*,const UNICODE_STRING
*,BOOLEAN
);
1262 NTSTATUS WINAPI
RtlUpcaseUnicodeStringToOemString(STRING
*,const UNICODE_STRING
*,BOOLEAN
);
1263 NTSTATUS WINAPI
RtlUpcaseUnicodeToMultiByteN(LPSTR
,DWORD
,LPDWORD
,LPCWSTR
,DWORD
);
1264 NTSTATUS WINAPI
RtlUpcaseUnicodeToOemN(LPSTR
,DWORD
,LPDWORD
,LPCWSTR
,DWORD
);
1265 CHAR WINAPI
RtlUpperChar(CHAR
);
1266 void WINAPI
RtlUpperString(STRING
*,const STRING
*);
1268 NTSTATUS WINAPI
RtlValidSecurityDescriptor(PSECURITY_DESCRIPTOR
);
1269 BOOLEAN WINAPI
RtlValidAcl(PACL
);
1270 BOOLEAN WINAPI
RtlValidSid(PSID
);
1271 BOOLEAN WINAPI
RtlValidateHeap(HANDLE
,ULONG
,LPCVOID
);
1273 NTSTATUS WINAPI
RtlWalkHeap(HANDLE
,PVOID
);
1275 NTSTATUS WINAPI
RtlpWaitForCriticalSection(RTL_CRITICAL_SECTION
*);
1276 NTSTATUS WINAPI
RtlpUnWaitCriticalSection(RTL_CRITICAL_SECTION
*);
1278 /***********************************************************************
1282 #define InitializeObjectAttributes(p,n,a,r,s) \
1284 (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
1285 (p)->RootDirectory = r; \
1286 (p)->Attributes = a; \
1287 (p)->ObjectName = n; \
1288 (p)->SecurityDescriptor = s; \
1289 (p)->SecurityQualityOfService = NULL; \
1292 #define NtCurrentProcess() ((HANDLE)-1)
1294 #define RtlFillMemory(Destination,Length,Fill) memset((Destination),(Fill),(Length))
1295 #define RtlMoveMemory(Destination,Source,Length) memmove((Destination),(Source),(Length))
1296 #define RtlStoreUlong(p,v) do { ULONG _v = (v); memcpy((p), &_v, sizeof(_v)); } while (0)
1297 #define RtlStoreUlonglong(p,v) do { ULONGLONG _v = (v); memcpy((p), &_v, sizeof(_v)); } while (0)
1298 #define RtlRetrieveUlong(p,s) memcpy((p), (s), sizeof(ULONG))
1299 #define RtlRetrieveUlonglong(p,s) memcpy((p), (s), sizeof(ULONGLONG))
1300 #define RtlZeroMemory(Destination,Length) memset((Destination),0,(Length))
1302 inline static BOOLEAN
RtlCheckBit(PCRTL_BITMAP lpBits
, ULONG ulBit
)
1304 if (lpBits
&& ulBit
< lpBits
->SizeOfBitMap
&&
1305 lpBits
->BitMapBuffer
[ulBit
>> 3] & (1 << (ulBit
& 7)))
1310 #define RtlClearAllBits(p) \
1312 PRTL_BITMAP _p = (p); \
1313 memset(_p->BitMapBuffer,0,((_p->SizeOfBitMap + 31) & 0xffffffe0) >> 3); \
1316 #define RtlInitializeBitMap(p,b,s) \
1318 PRTL_BITMAP _p = (p); \
1319 _p->SizeOfBitMap = (s); \
1320 _p->BitMapBuffer = (b); \
1323 #define RtlSetAllBits(p) \
1325 PRTL_BITMAP _p = (p); \
1326 memset(_p->BitMapBuffer,0xff,((_p->SizeOfBitMap + 31) & 0xffffffe0) >> 3); \
1329 /* These are implemented as __fastcall, so we can't let Winelib apps link with them */
1330 inline static USHORT
RtlUshortByteSwap(USHORT s
)
1332 return (s
>> 8) | (s
<< 8);
1334 inline static ULONG
RtlUlongByteSwap(ULONG i
)
1336 #if defined(__i386__) && defined(__GNUC__)
1338 __asm__("bswap %0" : "=r" (ret
) : "0" (i
) );
1341 return ((ULONG
)RtlUshortByteSwap((USHORT
)i
) << 16) | RtlUshortByteSwap((USHORT
)(i
>> 16));
1345 /*************************************************************************
1346 * Loader functions and structures.
1348 * Those are not part of standard Winternl.h
1350 typedef struct _LDR_MODULE
1352 LIST_ENTRY InLoadOrderModuleList
;
1353 LIST_ENTRY InMemoryOrderModuleList
;
1354 LIST_ENTRY InInitializationOrderModuleList
;
1358 UNICODE_STRING FullDllName
;
1359 UNICODE_STRING BaseDllName
;
1363 HANDLE SectionHandle
;
1365 ULONG TimeDateStamp
;
1366 } LDR_MODULE
, *PLDR_MODULE
;
1368 /* those defines are (some of the) regular LDR_MODULE.Flags values */
1369 #define LDR_IMAGE_IS_DLL 0x00000004
1370 #define LDR_LOAD_IN_PROGRESS 0x00001000
1371 #define LDR_UNLOAD_IN_PROGRESS 0x00002000
1372 #define LDR_NO_DLL_CALLS 0x00040000
1373 #define LDR_PROCESS_ATTACHED 0x00080000
1374 #define LDR_MODULE_REBASED 0x00200000
1376 /* these ones is Wine specific */
1377 #define LDR_DONT_RESOLVE_REFS 0x40000000
1378 #define LDR_WINE_INTERNAL 0x80000000
1380 /* FIXME: to be checked */
1381 #define MAXIMUM_FILENAME_LENGTH 256
1383 typedef struct _SYSTEM_MODULE
1387 PVOID ImageBaseAddress
;
1394 BYTE Name
[MAXIMUM_FILENAME_LENGTH
];
1395 } SYSTEM_MODULE
, *PSYSTEM_MODULE
;
1397 typedef struct _SYSTEM_MODULE_INFORMATION
1400 SYSTEM_MODULE Modules
[1]; /* FIXME: should be Modules[0] */
1401 } SYSTEM_MODULE_INFORMATION
, *PSYSTEM_MODULE_INFORMATION
;
1403 NTSTATUS WINAPI
LdrDisableThreadCalloutsForDll(HMODULE
);
1404 NTSTATUS WINAPI
LdrFindEntryForAddress(const void*, PLDR_MODULE
*);
1405 NTSTATUS WINAPI
LdrGetDllHandle(ULONG
, ULONG
, PUNICODE_STRING
, HMODULE
*);
1406 NTSTATUS WINAPI
LdrGetProcedureAddress(HMODULE
, PANSI_STRING
, ULONG
, void**);
1407 NTSTATUS WINAPI
LdrLoadDll(LPCWSTR
, DWORD
, PUNICODE_STRING
, HMODULE
*);
1408 NTSTATUS WINAPI
LdrLockLoaderLock(ULONG
,ULONG
*,ULONG
*);
1409 NTSTATUS WINAPI
LdrQueryProcessModuleInformation(SYSTEM_MODULE_INFORMATION
*, ULONG
, ULONG
*);
1410 NTSTATUS WINAPI
LdrUnloadDll(HMODULE
);
1411 NTSTATUS WINAPI
LdrUnlockLoaderLock(ULONG
,ULONG
);
1413 /* list manipulation macros */
1414 #define InitializeListHead(le) (void)((le)->Flink = (le)->Blink = (le))
1415 #define InsertHeadList(le,e) do { PLIST_ENTRY f = (le)->Flink; (e)->Flink = f; (e)->Blink = (le); f->Blink = (e); (le)->Flink = (e); } while (0)
1416 #define InsertTailList(le,e) do { PLIST_ENTRY b = (le)->Blink; (e)->Flink = (le); (e)->Blink = b; b->Flink = (e); (le)->Blink = (e); } while (0)
1417 #define IsListEmpty(le) ((le)->Flink == (le))
1418 #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)
1419 static inline PLIST_ENTRY
RemoveHeadList(PLIST_ENTRY le
)
1421 PLIST_ENTRY f
, b
, e
;
1424 f
= le
->Flink
->Flink
;
1425 b
= le
->Flink
->Blink
;
1429 if (e
!= le
) e
->Flink
= e
->Blink
= NULL
;
1432 static inline PLIST_ENTRY
RemoveTailList(PLIST_ENTRY le
)
1434 PLIST_ENTRY f
, b
, e
;
1437 f
= le
->Blink
->Flink
;
1438 b
= le
->Blink
->Blink
;
1442 if (e
!= le
) e
->Flink
= e
->Blink
= NULL
;
1448 #endif /* defined(__cplusplus) */
1450 #endif /* __WINE_WINTERNAL_H */