2#if defined(__ROS_LONG64__)
3#undef InterlockedExchange
4#define InterlockedExchange(a,b) _InterlockedExchange((long*)a,b)
5#undef InterlockedExchangeAdd
6#define InterlockedExchangeAdd(a,b) _InterlockedExchangeAdd((long*)a,b)
7#undef InterlockedCompareExchange
8#define InterlockedCompareExchange(a,b,c) _InterlockedCompareExchange((long*)a,b,c)
9#undef InterlockedIncrement
10#define InterlockedIncrement(a) _InterlockedIncrement((long*)a)
11#undef InterlockedDecrement
12#define InterlockedDecrement(a) _InterlockedDecrement((long*)a)
16#undef __C89_NAMELESSSTRUCTNAME
17#undef __C89_NAMELESSSTRUCTNAME1
18#undef __C89_NAMELESSSTRUCTNAME2
19#undef __C89_NAMELESSSTRUCTNAME3
20#undef __C89_NAMELESSSTRUCTNAME4
21#undef __C89_NAMELESSSTRUCTNAME5
22#undef __C89_NAMELESSUNIONNAME
23#undef __C89_NAMELESSUNIONNAME1
24#undef __C89_NAMELESSUNIONNAME2
25#undef __C89_NAMELESSUNIONNAME3
26#undef __C89_NAMELESSUNIONNAME4
27#undef __C89_NAMELESSUNIONNAME5
28#undef __C89_NAMELESSUNIONNAME6
29#undef __C89_NAMELESSUNIONNAME7
30#undef __C89_NAMELESSUNIONNAME8
32#if !defined(__WINESRC__) && !defined(WINE_NO_NAMELESS_EXTENSION)
35# if (__GNUC__ > 2) || ((__GNUC__ == 2) && ((__GNUC_MINOR__ > 95) || ((__GNUC_MINOR__ == 95) && defined(__cplusplus))))
36# define __C89_NAMELESS __extension__
38# elif defined(_MSC_VER)
39# define __C89_NAMELESS
44# define __C89_NAMELESSSTRUCTNAME
45# define __C89_NAMELESSSTRUCTNAME1
46# define __C89_NAMELESSSTRUCTNAME2
47# define __C89_NAMELESSSTRUCTNAME3
48# define __C89_NAMELESSSTRUCTNAME4
49# define __C89_NAMELESSSTRUCTNAME5
50# define __C89_NAMELESSUNIONNAME
51# define __C89_NAMELESSUNIONNAME1
52# define __C89_NAMELESSUNIONNAME2
53# define __C89_NAMELESSUNIONNAME3
54# define __C89_NAMELESSUNIONNAME4
55# define __C89_NAMELESSUNIONNAME5
56# define __C89_NAMELESSUNIONNAME6
57# define __C89_NAMELESSUNIONNAME7
58# define __C89_NAMELESSUNIONNAME8
60# define __C89_NAMELESS
61# define __C89_NAMELESSSTRUCTNAME DUMMYSTRUCTNAME
62# define __C89_NAMELESSSTRUCTNAME1 DUMMYSTRUCTNAME1
63# define __C89_NAMELESSSTRUCTNAME2 DUMMYSTRUCTNAME2
64# define __C89_NAMELESSSTRUCTNAME3 DUMMYSTRUCTNAME3
65# define __C89_NAMELESSSTRUCTNAME4 DUMMYSTRUCTNAME4
66# define __C89_NAMELESSSTRUCTNAME5 DUMMYSTRUCTNAME5
67# define __C89_NAMELESSUNIONNAME DUMMYUNIONNAME
68# define __C89_NAMELESSUNIONNAME1 DUMMYUNIONNAME1
69# define __C89_NAMELESSUNIONNAME2 DUMMYUNIONNAME2
70# define __C89_NAMELESSUNIONNAME3 DUMMYUNIONNAME3
71# define __C89_NAMELESSUNIONNAME4 DUMMYUNIONNAME4
72# define __C89_NAMELESSUNIONNAME5 DUMMYUNIONNAME5
73# define __C89_NAMELESSUNIONNAME6 DUMMYUNIONNAME6
74# define __C89_NAMELESSUNIONNAME7 DUMMYUNIONNAME7
75# define __C89_NAMELESSUNIONNAME8 DUMMYUNIONNAME8
78#define DECLSPEC_HIDDEN
81#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))
82# define __WINE_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))
84# define __WINE_ALLOC_SIZE(x)
90# ifndef _INTEGRAL_MAX_BITS
91# define _INTEGRAL_MAX_BITS 64
94# define __int64 long long
95#elif (defined(__WATCOMC__) || defined(_MSC_VER)) && (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64 )
100# pragma warning(push)
101# pragma warning(disable:4201)
102# pragma warning(disable:4214)
103# pragma warning(disable:4820)
106#define ACE_OBJECT_TYPE_PRESENT 0x00000001
107#define ACE_INHERITED_OBJECT_TYPE_PRESENT 0x00000002
110#define COMPRESSION_FORMAT_NONE (0x0000)
111#define COMPRESSION_FORMAT_DEFAULT (0x0001)
112#define COMPRESSION_FORMAT_LZNT1 (0x0002)
113#define COMPRESSION_ENGINE_STANDARD (0x0000)
114#define COMPRESSION_ENGINE_MAXIMUM (0x0100)
115#define COMPRESSION_ENGINE_HIBER (0x0200)
116#define ACCESS_ALLOWED_ACE_TYPE (0x0)
117#define ACCESS_DENIED_ACE_TYPE (0x1)
118#define SYSTEM_AUDIT_ACE_TYPE (0x2)
119#define SYSTEM_ALARM_ACE_TYPE (0x3)
122#define REG_STANDARD_FORMAT 1
123#define REG_LATEST_FORMAT 2
124#define REG_NO_COMPRESSION 4
126#ifndef WIN32_NO_STATUS
128#define STATUS_WAIT_0 ((DWORD)0x00000000)
129#define STATUS_ABANDONED_WAIT_0 ((DWORD)0x00000080)
130#define STATUS_USER_APC ((DWORD)0x000000C0)
131#define STATUS_TIMEOUT ((DWORD)0x00000102)
132#define STATUS_PENDING ((DWORD)0x00000103)
133#define DBG_EXCEPTION_HANDLED ((DWORD)0x00010001)
134#define DBG_CONTINUE ((DWORD)0x00010002)
135#define STATUS_SEGMENT_NOTIFICATION ((DWORD)0x40000005)
136#define STATUS_FATAL_APP_EXIT ((DWORD)0x40000015)
137#define DBG_REPLY_LATER ((DWORD)0x40010001)
138#define DBG_TERMINATE_THREAD ((DWORD)0x40010003)
139#define DBG_TERMINATE_PROCESS ((DWORD)0x40010004)
140#define DBG_CONTROL_C ((DWORD)0x40010005)
141#define DBG_PRINTEXCEPTION_C ((DWORD)0x40010006)
142#define DBG_RIPEXCEPTION ((DWORD)0x40010007)
143#define DBG_CONTROL_BREAK ((DWORD)0x40010008)
144#define DBG_COMMAND_EXCEPTION ((DWORD)0x40010009)
145#define DBG_PRINTEXCEPTION_WIDE_C ((DWORD)0x4001000A)
146#define STATUS_GUARD_PAGE_VIOLATION ((DWORD)0x80000001)
147#define STATUS_DATATYPE_MISALIGNMENT ((DWORD)0x80000002)
148#define STATUS_BREAKPOINT ((DWORD)0x80000003)
149#define STATUS_SINGLE_STEP ((DWORD)0x80000004)
150#define STATUS_LONGJUMP ((DWORD)0x80000026)
151#define STATUS_UNWIND_CONSOLIDATE ((DWORD)0x80000029)
152#define DBG_EXCEPTION_NOT_HANDLED ((DWORD)0x80010001)
153#define STATUS_ACCESS_VIOLATION ((DWORD)0xC0000005)
154#define STATUS_IN_PAGE_ERROR ((DWORD)0xC0000006)
155#define STATUS_INVALID_HANDLE ((DWORD)0xC0000008)
156#define STATUS_INVALID_PARAMETER ((DWORD)0xC000000D)
157#define STATUS_NO_MEMORY ((DWORD)0xC0000017)
158#define STATUS_ILLEGAL_INSTRUCTION ((DWORD)0xC000001D)
159#define STATUS_NONCONTINUABLE_EXCEPTION ((DWORD)0xC0000025)
160#define STATUS_INVALID_DISPOSITION ((DWORD)0xC0000026)
161#define STATUS_ARRAY_BOUNDS_EXCEEDED ((DWORD)0xC000008C)
162#define STATUS_FLOAT_DENORMAL_OPERAND ((DWORD)0xC000008D)
163#define STATUS_FLOAT_DIVIDE_BY_ZERO ((DWORD)0xC000008E)
164#define STATUS_FLOAT_INEXACT_RESULT ((DWORD)0xC000008F)
165#define STATUS_FLOAT_INVALID_OPERATION ((DWORD)0xC0000090)
166#define STATUS_FLOAT_OVERFLOW ((DWORD)0xC0000091)
167#define STATUS_FLOAT_STACK_CHECK ((DWORD)0xC0000092)
168#define STATUS_FLOAT_UNDERFLOW ((DWORD)0xC0000093)
169#define STATUS_INTEGER_DIVIDE_BY_ZERO ((DWORD)0xC0000094)
170#define STATUS_INTEGER_OVERFLOW ((DWORD)0xC0000095)
171#define STATUS_PRIVILEGED_INSTRUCTION ((DWORD)0xC0000096)
172#define STATUS_STACK_OVERFLOW ((DWORD)0xC00000FD)
173#define STATUS_DLL_NOT_FOUND ((DWORD)0xC0000135)
174#define STATUS_ORDINAL_NOT_FOUND ((DWORD)0xC0000138)
175#define STATUS_ENTRYPOINT_NOT_FOUND ((DWORD)0xC0000139)
176#define STATUS_CONTROL_C_EXIT ((DWORD)0xC000013A)
177#define STATUS_DLL_INIT_FAILED ((DWORD)0xC0000142)
178#define STATUS_CONTROL_STACK_VIOLATION ((DWORD)0xC00001B2)
179#define STATUS_FLOAT_MULTIPLE_FAULTS ((DWORD)0xC00002B4)
180#define STATUS_FLOAT_MULTIPLE_TRAPS ((DWORD)0xC00002B5)
181#define STATUS_REG_NAT_CONSUMPTION ((DWORD)0xC00002C9)
182#define STATUS_HEAP_CORRUPTION ((DWORD)0xC0000374)
183#define STATUS_STACK_BUFFER_OVERRUN ((DWORD)0xC0000409)
184#define STATUS_INVALID_CRUNTIME_PARAMETER ((DWORD)0xC0000417)
185#define STATUS_ASSERTION_FAILURE ((DWORD)0xC0000420)
186#define STATUS_ENCLAVE_VIOLATION ((DWORD)0xC00004A2)
187#define STATUS_INTERRUPTED ((DWORD)0xC0000515)
188#define STATUS_THREAD_NOT_RUNNING ((DWORD)0xC0000516)
189#define STATUS_ALREADY_REGISTERED ((DWORD)0xC0000718)
190#define STATUS_SXS_EARLY_DEACTIVATION ((DWORD)0xC015000F)
191#define STATUS_SXS_INVALID_DEACTIVATION ((DWORD)0xC0150010)
193#define DBG_EXCEPTION_HANDLED ((DWORD)0x00010001)
194#define DBG_CONTINUE ((DWORD)0x00010002)
195#define DBG_TERMINATE_THREAD ((DWORD)0x40010003)
196#define DBG_TERMINATE_PROCESS ((DWORD)0x40010004)
197#define DBG_CONTROL_C ((DWORD)0x40010005)
198#define DBG_CONTROL_BREAK ((DWORD)0x40010008)
199#define DBG_COMMAND_EXCEPTION ((DWORD)0x40010009)
200#define DBG_EXCEPTION_NOT_HANDLED ((DWORD)0x80010001)
204#define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
207#define FILE_LIST_DIRECTORY 0x00000001
208#define FILE_READ_DATA 0x00000001
209#define FILE_ADD_FILE 0x00000002
210#define FILE_WRITE_DATA 0x00000002
211#define FILE_ADD_SUBDIRECTORY 0x00000004
212#define FILE_APPEND_DATA 0x00000004
213#define FILE_CREATE_PIPE_INSTANCE 0x00000004
214#define FILE_READ_EA 0x00000008
215#define FILE_READ_PROPERTIES 0x00000008
216#define FILE_WRITE_EA 0x00000010
217#define FILE_WRITE_PROPERTIES 0x00000010
218#define FILE_EXECUTE 0x00000020
219#define FILE_TRAVERSE 0x00000020
220#define FILE_DELETE_CHILD 0x00000040
221#define FILE_READ_ATTRIBUTES 0x00000080
222#define FILE_WRITE_ATTRIBUTES 0x00000100
224#define FILE_SHARE_READ 0x00000001
225#define FILE_SHARE_WRITE 0x00000002
226#define FILE_SHARE_DELETE 0x00000004
227#define FILE_SHARE_VALID_FLAGS 0x00000007
229#define FILE_ATTRIBUTE_READONLY 0x00000001
230#define FILE_ATTRIBUTE_HIDDEN 0x00000002
231#define FILE_ATTRIBUTE_SYSTEM 0x00000004
232#define FILE_ATTRIBUTE_DIRECTORY 0x00000010
233#define FILE_ATTRIBUTE_ARCHIVE 0x00000020
234#define FILE_ATTRIBUTE_DEVICE 0x00000040
235#define FILE_ATTRIBUTE_NORMAL 0x00000080
236#define FILE_ATTRIBUTE_TEMPORARY 0x00000100
237#define FILE_ATTRIBUTE_SPARSE_FILE 0x00000200
238#define FILE_ATTRIBUTE_REPARSE_POINT 0x00000400
239#define FILE_ATTRIBUTE_COMPRESSED 0x00000800
240#define FILE_ATTRIBUTE_OFFLINE 0x00001000
241#define FILE_ATTRIBUTE_NOT_CONTENT_INDEXED 0x00002000
242#define FILE_ATTRIBUTE_ENCRYPTED 0x00004000
243#define FILE_ATTRIBUTE_INTEGRITY_STREAM 0x00008000
244#define FILE_ATTRIBUTE_VIRTUAL 0x00010000
245#define FILE_ATTRIBUTE_VALID_FLAGS 0x00007fb7
246#define FILE_ATTRIBUTE_VALID_SET_FLAGS 0x000031a7
248#define FILE_COPY_STRUCTURED_STORAGE 0x00000041
249#define FILE_STRUCTURED_STORAGE 0x00000441
251#define FILE_VALID_OPTION_FLAGS 0x00ffffff
252#define FILE_VALID_PIPE_OPTION_FLAGS 0x00000032
253#define FILE_VALID_MAILSLOT_OPTION_FLAGS 0x00000032
254#define FILE_VALID_SET_FLAGS 0x00000036
256#define FILE_DIRECTORY_FILE 0x00000001
257#define FILE_WRITE_THROUGH 0x00000002
258#define FILE_SEQUENTIAL_ONLY 0x00000004
259#define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008
260#define FILE_SYNCHRONOUS_IO_ALERT 0x00000010
261#define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020
262#define FILE_NON_DIRECTORY_FILE 0x00000040
263#define FILE_CREATE_TREE_CONNECTION 0x00000080
264#define FILE_COMPLETE_IF_OPLOCKED 0x00000100
265#define FILE_NO_EA_KNOWLEDGE 0x00000200
266#define FILE_OPEN_REMOTE_INSTANCE 0x00000400
267#define FILE_RANDOM_ACCESS 0x00000800
268#define FILE_DELETE_ON_CLOSE 0x00001000
269#define FILE_OPEN_BY_FILE_ID 0x00002000
270#define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000
271#define FILE_NO_COMPRESSION 0x00008000
272#define FILE_RESERVE_OPFILTER 0x00100000
273#define FILE_OPEN_REPARSE_POINT 0x00200000
274#define FILE_OPEN_NO_RECALL 0x00400000
275#define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000
277#define FILE_ALL_ACCESS \
278 (STANDARD_RIGHTS_REQUIRED | \
282#define FILE_GENERIC_EXECUTE \
283 (STANDARD_RIGHTS_EXECUTE | \
284 FILE_READ_ATTRIBUTES | \
288#define FILE_GENERIC_READ \
289 (STANDARD_RIGHTS_READ | \
291 FILE_READ_ATTRIBUTES | \
295#define FILE_GENERIC_WRITE \
296 (STANDARD_RIGHTS_WRITE | \
298 FILE_WRITE_ATTRIBUTES | \
304#define FILE_NOTIFY_CHANGE_FILE_NAME 0x00000001
305#define FILE_NOTIFY_CHANGE_DIR_NAME 0x00000002
306#define FILE_NOTIFY_CHANGE_NAME 0x00000003
307#define FILE_NOTIFY_CHANGE_ATTRIBUTES 0x00000004
308#define FILE_NOTIFY_CHANGE_SIZE 0x00000008
309#define FILE_NOTIFY_CHANGE_LAST_WRITE 0x00000010
310#define FILE_NOTIFY_CHANGE_LAST_ACCESS 0x00000020
311#define FILE_NOTIFY_CHANGE_CREATION 0x00000040
312#define FILE_NOTIFY_CHANGE_EA 0x00000080
313#define FILE_NOTIFY_CHANGE_SECURITY 0x00000100
314#define FILE_NOTIFY_CHANGE_STREAM_NAME 0x00000200
315#define FILE_NOTIFY_CHANGE_STREAM_SIZE 0x00000400
316#define FILE_NOTIFY_CHANGE_STREAM_WRITE 0x00000800
317#define FILE_NOTIFY_VALID_MASK 0x00000fff
319#define FILE_CASE_SENSITIVE_SEARCH 0x00000001
320#define FILE_CASE_PRESERVED_NAMES 0x00000002
321#define FILE_UNICODE_ON_DISK 0x00000004
322#define FILE_PERSISTENT_ACLS 0x00000008
323#define FILE_FILE_COMPRESSION 0x00000010
324#define FILE_VOLUME_QUOTAS 0x00000020
325#define FILE_SUPPORTS_SPARSE_FILES 0x00000040
326#define FILE_SUPPORTS_REPARSE_POINTS 0x00000080
327#define FILE_SUPPORTS_REMOTE_STORAGE 0x00000100
328#define FS_LFN_APIS 0x00004000
329#define FILE_VOLUME_IS_COMPRESSED 0x00008000
330#define FILE_SUPPORTS_OBJECT_IDS 0x00010000
331#define FILE_SUPPORTS_ENCRYPTION 0x00020000
332#define FILE_NAMED_STREAMS 0x00040000
333#define FILE_READ_ONLY_VOLUME 0x00080000
334#define FILE_SEQUENTIAL_WRITE_ONCE 0x00100000
335#define FILE_SUPPORTS_TRANSACTIONS 0x00200000
336#define FILE_SUPPORTS_HARD_LINKS 0x00400000
337#define FILE_SUPPORTS_EXTENDED_ATTRIBUTES 0x00800000
338#define FILE_SUPPORTS_OPEN_BY_FILE_ID 0x01000000
339#define FILE_SUPPORTS_USN_JOURNAL 0x02000000
340#define FILE_SUPPORTS_INTEGRITY_STREAMS 0x04000000
341#define FILE_SUPPORTS_BLOCK_REFCOUNTING 0x08000000
342#define FILE_SUPPORTS_SPARSE_VDL 0x10000000
343#define FILE_DAX_VOLUME 0x20000000
345#define IO_COMPLETION_QUERY_STATE 0x0001
346#define IO_COMPLETION_MODIFY_STATE 0x0002
347#define IO_COMPLETION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
351#define DUPLICATE_CLOSE_SOURCE 0x00000001
352#define DUPLICATE_SAME_ACCESS 0x00000002
355#define MAILSLOT_NO_MESSAGE ((DWORD)-1)
356#define MAILSLOT_WAIT_FOREVER ((DWORD)-1)
357#define PROCESS_TERMINATE 1
358#define PROCESS_CREATE_THREAD 2
359#define PROCESS_SET_SESSIONID 4
360#define PROCESS_VM_OPERATION 8
361#define PROCESS_VM_READ 16
362#define PROCESS_VM_WRITE 32
363#define PROCESS_CREATE_PROCESS 128
364#define PROCESS_SET_QUOTA 256
365#define PROCESS_SET_INFORMATION 512
366#define PROCESS_QUERY_INFORMATION 1024
367#define PROCESS_SUSPEND_RESUME 2048
368#define PROCESS_QUERY_LIMITED_INFORMATION 0x1000
369#define PROCESS_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0xFFF)
370#define PROCESS_DUP_HANDLE 64
371#define THREAD_TERMINATE 1
372#define THREAD_SUSPEND_RESUME 2
373#define THREAD_GET_CONTEXT 8
374#define THREAD_SET_CONTEXT 16
375#define THREAD_SET_INFORMATION 32
376#define THREAD_QUERY_INFORMATION 64
377#define THREAD_SET_THREAD_TOKEN 128
378#define THREAD_IMPERSONATE 256
379#define THREAD_DIRECT_IMPERSONATION 0x200
380#define THREAD_QUERY_LIMITED_INFORMATION 0x0800
381#define THREAD_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3FF)
382#define MUTANT_QUERY_STATE 0x0001
383#define MUTANT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|MUTANT_QUERY_STATE)
384#define TIMER_QUERY_STATE 0x0001
385#define TIMER_MODIFY_STATE 0x0002
386#define TIMER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|TIMER_QUERY_STATE|TIMER_MODIFY_STATE)
387#define THREAD_BASE_PRIORITY_LOWRT 15
388#define THREAD_BASE_PRIORITY_MAX 2
389#define THREAD_BASE_PRIORITY_MIN (-2)
390#define THREAD_BASE_PRIORITY_IDLE (-15)
392#define PROCESS_SET_LIMITED_INFORMATION 0x2000
393#define THREAD_RESUME 0x1000
395#define SE_CREATE_TOKEN_NAME TEXT("SeCreateTokenPrivilege")
396#define SE_ASSIGNPRIMARYTOKEN_NAME TEXT("SeAssignPrimaryTokenPrivilege")
397#define SE_LOCK_MEMORY_NAME TEXT("SeLockMemoryPrivilege")
398#define SE_INCREASE_QUOTA_NAME TEXT("SeIncreaseQuotaPrivilege")
399#define SE_UNSOLICITED_INPUT_NAME TEXT("SeUnsolicitedInputPrivilege")
400#define SE_MACHINE_ACCOUNT_NAME TEXT("SeMachineAccountPrivilege")
401#define SE_TCB_NAME TEXT("SeTcbPrivilege")
402#define SE_SECURITY_NAME TEXT("SeSecurityPrivilege")
403#define SE_TAKE_OWNERSHIP_NAME TEXT("SeTakeOwnershipPrivilege")
404#define SE_LOAD_DRIVER_NAME TEXT("SeLoadDriverPrivilege")
405#define SE_SYSTEM_PROFILE_NAME TEXT("SeSystemProfilePrivilege")
406#define SE_SYSTEMTIME_NAME TEXT("SeSystemtimePrivilege")
407#define SE_PROF_SINGLE_PROCESS_NAME TEXT("SeProfileSingleProcessPrivilege")
408#define SE_INC_BASE_PRIORITY_NAME TEXT("SeIncreaseBasePriorityPrivilege")
409#define SE_CREATE_PAGEFILE_NAME TEXT("SeCreatePagefilePrivilege")
410#define SE_CREATE_PERMANENT_NAME TEXT("SeCreatePermanentPrivilege")
411#define SE_BACKUP_NAME TEXT("SeBackupPrivilege")
412#define SE_RESTORE_NAME TEXT("SeRestorePrivilege")
413#define SE_SHUTDOWN_NAME TEXT("SeShutdownPrivilege")
414#define SE_DEBUG_NAME TEXT("SeDebugPrivilege")
415#define SE_AUDIT_NAME TEXT("SeAuditPrivilege")
416#define SE_SYSTEM_ENVIRONMENT_NAME TEXT("SeSystemEnvironmentPrivilege")
417#define SE_CHANGE_NOTIFY_NAME TEXT("SeChangeNotifyPrivilege")
418#define SE_REMOTE_SHUTDOWN_NAME TEXT("SeRemoteShutdownPrivilege")
419#define SE_UNDOCK_NAME TEXT("SeUndockPrivilege")
420#define SE_SYNC_AGENT_NAME TEXT("SeSyncAgentPrivilege")
421#define SE_ENABLE_DELEGATION_NAME TEXT("SeEnableDelegationPrivilege")
422#define SE_MANAGE_VOLUME_NAME TEXT("SeManageVolumePrivilege")
423#define SE_IMPERSONATE_NAME TEXT("SeImpersonatePrivilege")
424#define SE_CREATE_GLOBAL_NAME TEXT("SeCreateGlobalPrivilege")
426#define SE_GROUP_MANDATORY 0x00000001
427#define SE_GROUP_ENABLED_BY_DEFAULT 0x00000002
428#define SE_GROUP_ENABLED 0x00000004
429#define SE_GROUP_OWNER 0x00000008
430#define SE_GROUP_USE_FOR_DENY_ONLY 0x00000010
431#define SE_GROUP_INTEGRITY 0x00000020
432#define SE_GROUP_INTEGRITY_ENABLED 0x00000040
433#define SE_GROUP_LOGON_ID 0xC0000000
434#define SE_GROUP_RESOURCE 0x20000000
435#define SE_GROUP_VALID_ATTRIBUTES 0xE000007F
438#define LANG_ESPERANTO 0x8f
439#define LANG_WALON 0x90
440#define LANG_CORNISH 0x92
443#define LANG_MALAGASY 0x8d
444#define LANG_GAELIC 0x94
445#define LANG_SAAMI 0x3b
446#define LANG_SUTU 0x30
447#define LANG_TSONGA 0x31
448#define LANG_VENDA 0x33
449#define LANG_MANX_GAELIC 0x94
450#define SUBLANG_PORTUGUESE_PORTUGAL 0x02
452#define PROCESSOR_INTEL_386 386
453#define PROCESSOR_INTEL_486 486
454#define PROCESSOR_INTEL_PENTIUM 586
455#define PROCESSOR_MIPS_R4000 4000
456#define PROCESSOR_ALPHA_21064 21064
457#define PROCESSOR_INTEL_IA64 2200
458#define PROCESSOR_PPC_601 601
459#define PROCESSOR_PPC_603 603
460#define PROCESSOR_PPC_604 604
461#define PROCESSOR_PPC_620 620
462#define PROCESSOR_INTEL_860 860
463#define PROCESSOR_AMD_X8664 8664
464#define PROCESSOR_MIPS_R2000 2000
465#define PROCESSOR_MIPS_R3000 3000
466#define PROCESSOR_HITACHI_SH3 10003
467#define PROCESSOR_HITACHI_SH3E 10004
468#define PROCESSOR_HITACHI_SH4 10005
469#define PROCESSOR_MOTOROLA_821 821
470#define PROCESSOR_SHx_SH3 103
471#define PROCESSOR_SHx_SH4 104
472#define PROCESSOR_STRONGARM 2577
473#define PROCESSOR_ARM720 1824
474#define PROCESSOR_ARM820 2080
475#define PROCESSOR_ARM920 2336
476#define PROCESSOR_ARM_7TDMI 70001
477#define PROCESSOR_ARCHITECTURE_INTEL 0
478#define PROCESSOR_ARCHITECTURE_MIPS 1
479#define PROCESSOR_ARCHITECTURE_ALPHA 2
480#define PROCESSOR_ARCHITECTURE_PPC 3
481#define PROCESSOR_ARCHITECTURE_SHX 4
482#define PROCESSOR_ARCHITECTURE_ARM 5
483#define PROCESSOR_ARCHITECTURE_IA64 6
484#define PROCESSOR_ARCHITECTURE_ALPHA64 7
485#define PROCESSOR_ARCHITECTURE_MSIL 8
486#define PROCESSOR_ARCHITECTURE_AMD64 9
487#define PROCESSOR_ARCHITECTURE_UNKNOWN 0xFFFF
490#define FILE_ACTION_ADDED 0x00000001
491#define FILE_ACTION_REMOVED 0x00000002
492#define FILE_ACTION_MODIFIED 0x00000003
493#define FILE_ACTION_RENAMED_OLD_NAME 0x00000004
494#define FILE_ACTION_RENAMED_NEW_NAME 0x00000005
495#define FILE_ACTION_ADDED_STREAM 0x00000006
496#define FILE_ACTION_REMOVED_STREAM 0x00000007
497#define FILE_ACTION_MODIFIED_STREAM 0x00000008
498#define FILE_ACTION_REMOVED_BY_DELETE 0x00000009
499#define FILE_ACTION_ID_NOT_TUNNELLED 0x0000000A
500#define FILE_ACTION_TUNNELLED_ID_COLLISION 0x0000000B
502#define HEAP_NO_SERIALIZE 1
503#define HEAP_GROWABLE 2
504#define HEAP_GENERATE_EXCEPTIONS 4
505#define HEAP_ZERO_MEMORY 8
506#define HEAP_REALLOC_IN_PLACE_ONLY 16
507#define HEAP_TAIL_CHECKING_ENABLED 32
508#define HEAP_FREE_CHECKING_ENABLED 64
509#define HEAP_DISABLE_COALESCE_ON_FREE 128
510#define HEAP_CREATE_ALIGN_16 0x10000
511#define HEAP_CREATE_ENABLE_TRACING 0x20000
512#define HEAP_CREATE_ENABLE_EXECUTE 0x00040000
513#define HEAP_MAXIMUM_TAG 0xFFF
514#define HEAP_PSEUDO_TAG_FLAG 0x8000
515#define HEAP_TAG_SHIFT 16
516#define HEAP_MAKE_TAG_FLAGS(b,o) ((DWORD)((b)+(o)<<16)))
518#define KEY_QUERY_VALUE 1
519#define KEY_SET_VALUE 2
520#define KEY_CREATE_SUB_KEY 4
521#define KEY_ENUMERATE_SUB_KEYS 8
523#define KEY_CREATE_LINK 32
524#define KEY_WOW64_64KEY 0x00000100
525#define KEY_WOW64_32KEY 0x00000200
526#define KEY_WOW64_RES 0x00000300
528#define KEY_WRITE 0x20006
529#define KEY_EXECUTE 0x20019
530#define KEY_READ 0x20019
531#define KEY_ALL_ACCESS 0xf003f
532#define REG_WHOLE_HIVE_VOLATILE 1
533#define REG_REFRESH_HIVE 2
534#define REG_NO_LAZY_FLUSH 4
535#define REG_FORCE_RESTORE 8
536#define REG_OPTION_RESERVED 0
537#define REG_OPTION_NON_VOLATILE 0
538#define REG_OPTION_VOLATILE 1
539#define REG_OPTION_CREATE_LINK 2
540#define REG_OPTION_BACKUP_RESTORE 4
541#define REG_OPTION_OPEN_LINK 8
542#define REG_LEGAL_OPTION 15
543#define MAXIMUM_PROCESSORS 32
544#define PAGE_NOACCESS 0x0001
545#define PAGE_READONLY 0x0002
546#define PAGE_READWRITE 0x0004
547#define PAGE_WRITECOPY 0x0008
548#define PAGE_EXECUTE 0x0010
549#define PAGE_EXECUTE_READ 0x0020
550#define PAGE_EXECUTE_READWRITE 0x0040
551#define PAGE_EXECUTE_WRITECOPY 0x0080
552#define PAGE_GUARD 0x0100
553#define PAGE_NOCACHE 0x0200
554#define PAGE_WRITECOMBINE 0x0400
555#define MEM_COMMIT 0x1000
556#define MEM_RESERVE 0x2000
557#define MEM_DECOMMIT 0x4000
558#define MEM_RELEASE 0x8000
559#define MEM_FREE 0x10000
560#define MEM_PRIVATE 0x20000
561#define MEM_MAPPED 0x40000
562#define MEM_RESET 0x80000
563#define MEM_TOP_DOWN 0x100000
564#define MEM_WRITE_WATCH 0x200000
565#define MEM_PHYSICAL 0x400000
566#define MEM_4MB_PAGES 0x80000000
567#define MEM_IMAGE SEC_IMAGE
568#define SEC_NO_CHANGE 0x00400000
569#define SEC_FILE 0x00800000
570#define SEC_IMAGE 0x01000000
571#define SEC_VLM 0x02000000
572#define SEC_RESERVE 0x04000000
573#define SEC_COMMIT 0x08000000
574#define SEC_NOCACHE 0x10000000
575#define SEC_WRITECOMBINE 0x40000000
576#define SEC_LARGE_PAGES 0x80000000
577#define SEC_IMAGE_NO_EXECUTE (SEC_IMAGE | SEC_NOCACHE)
578#define SECTION_MAP_EXECUTE_EXPLICIT 0x0020
579#define SECTION_EXTEND_SIZE 16
580#define SECTION_MAP_READ 4
581#define SECTION_MAP_WRITE 2
582#define SECTION_QUERY 1
583#define SECTION_MAP_EXECUTE 8
584#define SECTION_ALL_ACCESS 0xf001f
585#define WRITE_WATCH_FLAG_RESET 0x01
586#define MESSAGE_RESOURCE_UNICODE 1
587#define RTL_CRITSECT_TYPE 0
588#define RTL_RESOURCE_TYPE 1
590#define AT_ROUND_TO_PAGE 0x40000000
592#define IMAGE_SIZEOF_FILE_HEADER 20
593#define IMAGE_FILE_RELOCS_STRIPPED 1
594#define IMAGE_FILE_EXECUTABLE_IMAGE 2
595#define IMAGE_FILE_LINE_NUMS_STRIPPED 4
596#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 8
597#define IMAGE_FILE_AGGRESIVE_WS_TRIM 16
598#define IMAGE_FILE_LARGE_ADDRESS_AWARE 32
599#define IMAGE_FILE_BYTES_REVERSED_LO 128
600#define IMAGE_FILE_32BIT_MACHINE 256
601#define IMAGE_FILE_DEBUG_STRIPPED 512
602#define IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP 1024
603#define IMAGE_FILE_NET_RUN_FROM_SWAP 2048
604#define IMAGE_FILE_SYSTEM 4096
605#define IMAGE_FILE_DLL 8192
606#define IMAGE_FILE_UP_SYSTEM_ONLY 16384
607#define IMAGE_FILE_BYTES_REVERSED_HI 32768
608#define IMAGE_FILE_MACHINE_UNKNOWN 0
610#define IMAGE_FILE_MACHINE_AM33 0x1d3
611#define IMAGE_FILE_MACHINE_AMD64 0x8664
612#define IMAGE_FILE_MACHINE_ARM 0x1c0
613#define IMAGE_FILE_MACHINE_ARMNT 0x1c4
614#define IMAGE_FILE_MACHINE_EBC 0xebc
615#define IMAGE_FILE_MACHINE_I386 0x14c
616#define IMAGE_FILE_MACHINE_IA64 0x200
617#define IMAGE_FILE_MACHINE_M32R 0x9041
618#define IMAGE_FILE_MACHINE_MIPS16 0x266
619#define IMAGE_FILE_MACHINE_MIPSFPU 0x366
620#define IMAGE_FILE_MACHINE_MIPSFPU16 0x466
621#define IMAGE_FILE_MACHINE_POWERPC 0x1f0
622#define IMAGE_FILE_MACHINE_POWERPCFP 0x1f1
623#define IMAGE_FILE_MACHINE_R4000 0x166
624#define IMAGE_FILE_MACHINE_SH3 0x1a2
625#define IMAGE_FILE_MACHINE_SH3E 0x01a4
626#define IMAGE_FILE_MACHINE_SH3DSP 0x1a3
627#define IMAGE_FILE_MACHINE_SH4 0x1a6
628#define IMAGE_FILE_MACHINE_SH5 0x1a8
629#define IMAGE_FILE_MACHINE_THUMB 0x1c2
630#define IMAGE_FILE_MACHINE_WCEMIPSV2 0x169
631#define IMAGE_FILE_MACHINE_R3000 0x162
632#define IMAGE_FILE_MACHINE_R10000 0x168
633#define IMAGE_FILE_MACHINE_ALPHA 0x184
634#define IMAGE_FILE_MACHINE_ALPHA64 0x0284
635#define IMAGE_FILE_MACHINE_AXP64 IMAGE_FILE_MACHINE_ALPHA64
636#define IMAGE_FILE_MACHINE_CEE 0xC0EE
637#define IMAGE_FILE_MACHINE_TRICORE 0x0520
638#define IMAGE_FILE_MACHINE_CEF 0x0CEF
639#define IMAGE_FILE_MACHINE_ARM64 0xAA64
641#define IMAGE_FILE_EXPORT_DIRECTORY 0
642#define IMAGE_FILE_IMPORT_DIRECTORY 1
643#define IMAGE_FILE_RESOURCE_DIRECTORY 2
644#define IMAGE_FILE_EXCEPTION_DIRECTORY 3
645#define IMAGE_FILE_SECURITY_DIRECTORY 4
646#define IMAGE_FILE_BASE_RELOCATION_TABLE 5
647#define IMAGE_FILE_DEBUG_DIRECTORY 6
648#define IMAGE_FILE_DESCRIPTION_STRING 7
649#define IMAGE_FILE_MACHINE_VALUE 8
650#define IMAGE_FILE_THREAD_LOCAL_STORAGE 9
651#define IMAGE_FILE_CALLBACK_DIRECTORY 10
653#define IMAGE_DOS_SIGNATURE 0x5A4D
654#define IMAGE_OS2_SIGNATURE 0x454E
655#define IMAGE_OS2_SIGNATURE_LE 0x454C
656#define IMAGE_VXD_SIGNATURE 0x454C
657#define IMAGE_NT_SIGNATURE 0x00004550
658#define IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x10b
659#define IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x20b
661#define IMAGE_NT_OPTIONAL_HDR_MAGIC IMAGE_NT_OPTIONAL_HDR64_MAGIC
663#define IMAGE_NT_OPTIONAL_HDR_MAGIC IMAGE_NT_OPTIONAL_HDR32_MAGIC
665#define IMAGE_ROM_OPTIONAL_HDR_MAGIC 0x107
666#define IMAGE_SEPARATE_DEBUG_SIGNATURE 0x4944
667#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16
668#define IMAGE_SIZEOF_ROM_OPTIONAL_HEADER 56
669#define IMAGE_SIZEOF_STD_OPTIONAL_HEADER 28
670#define IMAGE_SIZEOF_NT_OPTIONAL_HEADER 224
671#define IMAGE_SIZEOF_SHORT_NAME 8
672#define IMAGE_SIZEOF_SECTION_HEADER 40
673#define IMAGE_SIZEOF_SYMBOL 18
674#define IMAGE_SIZEOF_AUX_SYMBOL 18
675#define IMAGE_SIZEOF_RELOCATION 10
676#define IMAGE_SIZEOF_BASE_RELOCATION 8
677#define IMAGE_SIZEOF_LINENUMBER 6
678#define IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR 60
679#define SIZEOF_RFPO_DATA 16
681#define IMAGE_SUBSYSTEM_UNKNOWN 0
682#define IMAGE_SUBSYSTEM_NATIVE 1
683#define IMAGE_SUBSYSTEM_WINDOWS_GUI 2
684#define IMAGE_SUBSYSTEM_WINDOWS_CUI 3
685#define IMAGE_SUBSYSTEM_OS2_CUI 5
686#define IMAGE_SUBSYSTEM_POSIX_CUI 7
687#define IMAGE_SUBSYSTEM_NATIVE_WINDOWS 8
688#define IMAGE_SUBSYSTEM_WINDOWS_CE_GUI 9
689#define IMAGE_SUBSYSTEM_EFI_APPLICATION 10
690#define IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11
691#define IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12
692#define IMAGE_SUBSYSTEM_EFI_ROM 13
693#define IMAGE_SUBSYSTEM_XBOX 14
695#define IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE 0x0040
696#define IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY 0x0080
697#define IMAGE_DLLCHARACTERISTICS_NX_COMPAT 0x0100
698#define IMAGE_DLLCHARACTERISTICS_NO_ISOLATION 0x0200
699#define IMAGE_DLLCHARACTERISTICS_NO_SEH 0x0400
700#define IMAGE_DLLCHARACTERISTICS_NO_BIND 0x0800
701#define IMAGE_DLLCHARACTERISTICS_WDM_DRIVER 0x2000
702#define IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE 0x8000
703#define IMAGE_FIRST_SECTION(h) ((PIMAGE_SECTION_HEADER) ((ULONG_PTR)h+FIELD_OFFSET(IMAGE_NT_HEADERS,OptionalHeader)+((PIMAGE_NT_HEADERS)(h))->FileHeader.SizeOfOptionalHeader))
704#define IMAGE_DIRECTORY_ENTRY_EXPORT 0
705#define IMAGE_DIRECTORY_ENTRY_IMPORT 1
706#define IMAGE_DIRECTORY_ENTRY_RESOURCE 2
707#define IMAGE_DIRECTORY_ENTRY_EXCEPTION 3
708#define IMAGE_DIRECTORY_ENTRY_SECURITY 4
709#define IMAGE_DIRECTORY_ENTRY_BASERELOC 5
710#define IMAGE_DIRECTORY_ENTRY_DEBUG 6
711#define IMAGE_DIRECTORY_ENTRY_COPYRIGHT 7
712#define IMAGE_DIRECTORY_ENTRY_GLOBALPTR 8
713#define IMAGE_DIRECTORY_ENTRY_TLS 9
714#define IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG 10
715#define IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT 11
716#define IMAGE_DIRECTORY_ENTRY_IAT 12
717#define IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT 13
718#define IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR 14
719#define IMAGE_SCN_TYPE_REG 0
720#define IMAGE_SCN_TYPE_DSECT 1
722#define IMAGE_SCN_TYPE_GROUP 4
723#define IMAGE_SCN_TYPE_NO_PAD 8
724#define IMAGE_SCN_CNT_CODE 32
725#define IMAGE_SCN_CNT_INITIALIZED_DATA 64
726#define IMAGE_SCN_CNT_UNINITIALIZED_DATA 128
727#define IMAGE_SCN_LNK_OTHER 256
728#define IMAGE_SCN_LNK_INFO 512
729#define IMAGE_SCN_LNK_REMOVE 2048
730#define IMAGE_SCN_LNK_COMDAT 4096
731#define IMAGE_SCN_MEM_FARDATA 0x8000
732#define IMAGE_SCN_MEM_PURGEABLE 0x20000
733#define IMAGE_SCN_MEM_16BIT 0x20000
734#define IMAGE_SCN_MEM_LOCKED 0x40000
735#define IMAGE_SCN_MEM_PRELOAD 0x80000
736#define IMAGE_SCN_ALIGN_1BYTES 0x100000
737#define IMAGE_SCN_ALIGN_2BYTES 0x200000
738#define IMAGE_SCN_ALIGN_4BYTES 0x300000
739#define IMAGE_SCN_ALIGN_8BYTES 0x400000
740#define IMAGE_SCN_ALIGN_16BYTES 0x500000
741#define IMAGE_SCN_ALIGN_32BYTES 0x600000
742#define IMAGE_SCN_ALIGN_64BYTES 0x700000
743#define IMAGE_SCN_LNK_NRELOC_OVFL 0x1000000
744#define IMAGE_SCN_MEM_DISCARDABLE 0x2000000
745#define IMAGE_SCN_MEM_NOT_CACHED 0x4000000
746#define IMAGE_SCN_MEM_NOT_PAGED 0x8000000
747#define IMAGE_SCN_MEM_SHARED 0x10000000
748#define IMAGE_SCN_MEM_EXECUTE 0x20000000
749#define IMAGE_SCN_MEM_READ 0x40000000
750#define IMAGE_SCN_MEM_WRITE 0x80000000
751#define IMAGE_SYM_UNDEFINED 0
752#define IMAGE_SYM_ABSOLUTE (-1)
753#define IMAGE_SYM_DEBUG (-2)
754#define IMAGE_SYM_TYPE_NULL 0
755#define IMAGE_SYM_TYPE_VOID 1
756#define IMAGE_SYM_TYPE_CHAR 2
757#define IMAGE_SYM_TYPE_SHORT 3
758#define IMAGE_SYM_TYPE_INT 4
759#define IMAGE_SYM_TYPE_LONG 5
760#define IMAGE_SYM_TYPE_FLOAT 6
761#define IMAGE_SYM_TYPE_DOUBLE 7
762#define IMAGE_SYM_TYPE_STRUCT 8
763#define IMAGE_SYM_TYPE_UNION 9
764#define IMAGE_SYM_TYPE_ENUM 10
765#define IMAGE_SYM_TYPE_MOE 11
766#define IMAGE_SYM_TYPE_BYTE 12
767#define IMAGE_SYM_TYPE_WORD 13
768#define IMAGE_SYM_TYPE_UINT 14
769#define IMAGE_SYM_TYPE_DWORD 15
770#define IMAGE_SYM_TYPE_PCODE 32768
771#define IMAGE_SYM_DTYPE_NULL 0
772#define IMAGE_SYM_DTYPE_POINTER 1
773#define IMAGE_SYM_DTYPE_FUNCTION 2
774#define IMAGE_SYM_DTYPE_ARRAY 3
775#define IMAGE_SYM_CLASS_END_OF_FUNCTION (-1)
776#define IMAGE_SYM_CLASS_NULL 0
777#define IMAGE_SYM_CLASS_AUTOMATIC 1
778#define IMAGE_SYM_CLASS_EXTERNAL 2
779#define IMAGE_SYM_CLASS_STATIC 3
780#define IMAGE_SYM_CLASS_REGISTER 4
781#define IMAGE_SYM_CLASS_EXTERNAL_DEF 5
782#define IMAGE_SYM_CLASS_LABEL 6
783#define IMAGE_SYM_CLASS_UNDEFINED_LABEL 7
784#define IMAGE_SYM_CLASS_MEMBER_OF_STRUCT 8
785#define IMAGE_SYM_CLASS_ARGUMENT 9
786#define IMAGE_SYM_CLASS_STRUCT_TAG 10
787#define IMAGE_SYM_CLASS_MEMBER_OF_UNION 11
788#define IMAGE_SYM_CLASS_UNION_TAG 12
789#define IMAGE_SYM_CLASS_TYPE_DEFINITION 13
790#define IMAGE_SYM_CLASS_UNDEFINED_STATIC 14
791#define IMAGE_SYM_CLASS_ENUM_TAG 15
792#define IMAGE_SYM_CLASS_MEMBER_OF_ENUM 16
793#define IMAGE_SYM_CLASS_REGISTER_PARAM 17
794#define IMAGE_SYM_CLASS_BIT_FIELD 18
795#define IMAGE_SYM_CLASS_FAR_EXTERNAL 68
796#define IMAGE_SYM_CLASS_BLOCK 100
797#define IMAGE_SYM_CLASS_FUNCTION 101
798#define IMAGE_SYM_CLASS_END_OF_STRUCT 102
799#define IMAGE_SYM_CLASS_FILE 103
800#define IMAGE_SYM_CLASS_SECTION 104
801#define IMAGE_SYM_CLASS_WEAK_EXTERNAL 105
802#define IMAGE_COMDAT_SELECT_NODUPLICATES 1
803#define IMAGE_COMDAT_SELECT_ANY 2
804#define IMAGE_COMDAT_SELECT_SAME_SIZE 3
805#define IMAGE_COMDAT_SELECT_EXACT_MATCH 4
806#define IMAGE_COMDAT_SELECT_ASSOCIATIVE 5
807#define IMAGE_COMDAT_SELECT_LARGEST 6
808#define IMAGE_COMDAT_SELECT_NEWEST 7
809#define IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY 1
810#define IMAGE_WEAK_EXTERN_SEARCH_LIBRARY 2
811#define IMAGE_WEAK_EXTERN_SEARCH_ALIAS 3
812#define IMAGE_REL_I386_ABSOLUTE 0
813#define IMAGE_REL_I386_DIR16 1
814#define IMAGE_REL_I386_REL16 2
815#define IMAGE_REL_I386_DIR32 6
816#define IMAGE_REL_I386_DIR32NB 7
817#define IMAGE_REL_I386_SEG12 9
818#define IMAGE_REL_I386_SECTION 10
819#define IMAGE_REL_I386_SECREL 11
820#define IMAGE_REL_I386_REL32 20
821#define IMAGE_REL_MIPS_ABSOLUTE 0
822#define IMAGE_REL_MIPS_REFHALF 1
823#define IMAGE_REL_MIPS_REFWORD 2
824#define IMAGE_REL_MIPS_JMPADDR 3
825#define IMAGE_REL_MIPS_REFHI 4
826#define IMAGE_REL_MIPS_REFLO 5
827#define IMAGE_REL_MIPS_GPREL 6
828#define IMAGE_REL_MIPS_LITERAL 7
829#define IMAGE_REL_MIPS_SECTION 10
830#define IMAGE_REL_MIPS_SECREL 11
831#define IMAGE_REL_MIPS_SECRELLO 12
832#define IMAGE_REL_MIPS_SECRELHI 13
833#define IMAGE_REL_MIPS_REFWORDNB 34
834#define IMAGE_REL_MIPS_PAIR 35
835#define IMAGE_REL_ALPHA_ABSOLUTE 0
836#define IMAGE_REL_ALPHA_REFLONG 1
837#define IMAGE_REL_ALPHA_REFQUAD 2
838#define IMAGE_REL_ALPHA_GPREL32 3
839#define IMAGE_REL_ALPHA_LITERAL 4
840#define IMAGE_REL_ALPHA_LITUSE 5
841#define IMAGE_REL_ALPHA_GPDISP 6
842#define IMAGE_REL_ALPHA_BRADDR 7
843#define IMAGE_REL_ALPHA_HINT 8
844#define IMAGE_REL_ALPHA_INLINE_REFLONG 9
845#define IMAGE_REL_ALPHA_REFHI 10
846#define IMAGE_REL_ALPHA_REFLO 11
847#define IMAGE_REL_ALPHA_PAIR 12
848#define IMAGE_REL_ALPHA_MATCH 13
849#define IMAGE_REL_ALPHA_SECTION 14
850#define IMAGE_REL_ALPHA_SECREL 15
851#define IMAGE_REL_ALPHA_REFLONGNB 16
852#define IMAGE_REL_ALPHA_SECRELLO 17
853#define IMAGE_REL_ALPHA_SECRELHI 18
854#define IMAGE_REL_PPC_ABSOLUTE 0
855#define IMAGE_REL_PPC_ADDR64 1
856#define IMAGE_REL_PPC_ADDR32 2
857#define IMAGE_REL_PPC_ADDR24 3
858#define IMAGE_REL_PPC_ADDR16 4
859#define IMAGE_REL_PPC_ADDR14 5
860#define IMAGE_REL_PPC_REL24 6
861#define IMAGE_REL_PPC_REL14 7
862#define IMAGE_REL_PPC_TOCREL16 8
863#define IMAGE_REL_PPC_TOCREL14 9
864#define IMAGE_REL_PPC_ADDR32NB 10
865#define IMAGE_REL_PPC_SECREL 11
866#define IMAGE_REL_PPC_SECTION 12
867#define IMAGE_REL_PPC_IFGLUE 13
868#define IMAGE_REL_PPC_IMGLUE 14
869#define IMAGE_REL_PPC_SECREL16 15
870#define IMAGE_REL_PPC_REFHI 16
871#define IMAGE_REL_PPC_REFLO 17
872#define IMAGE_REL_PPC_PAIR 18
873#define IMAGE_REL_PPC_TYPEMASK 255
874#define IMAGE_REL_PPC_NEG 256
875#define IMAGE_REL_PPC_BRTAKEN 512
876#define IMAGE_REL_PPC_BRNTAKEN 1024
877#define IMAGE_REL_PPC_TOCDEFN 2048
878#define IMAGE_REL_BASED_ABSOLUTE 0
879#define IMAGE_REL_BASED_HIGH 1
880#define IMAGE_REL_BASED_LOW 2
881#define IMAGE_REL_BASED_HIGHLOW 3
882#define IMAGE_REL_BASED_HIGHADJ 4
883#define IMAGE_REL_BASED_MIPS_JMPADDR 5
884#define IMAGE_REL_BASED_MIPS_JMPADDR16 9
885#define IMAGE_REL_BASED_IA64_IMM64 9
886#define IMAGE_REL_BASED_DIR64 10
887#define IMAGE_ARCHIVE_START_SIZE 8
888#define IMAGE_ARCHIVE_START "!<arch>\n"
889#define IMAGE_ARCHIVE_END "`\n"
890#define IMAGE_ARCHIVE_PAD "\n"
891#define IMAGE_ARCHIVE_LINKER_MEMBER "/ "
892#define IMAGE_ARCHIVE_LONGNAMES_MEMBER "// "
893#define IMAGE_RESOURCE_NAME_IS_STRING 0x80000000
894#define IMAGE_RESOURCE_DATA_IS_DIRECTORY 0x80000000
895#define IMAGE_DEBUG_TYPE_UNKNOWN 0
896#define IMAGE_DEBUG_TYPE_COFF 1
897#define IMAGE_DEBUG_TYPE_CODEVIEW 2
898#define IMAGE_DEBUG_TYPE_FPO 3
899#define IMAGE_DEBUG_TYPE_MISC 4
900#define IMAGE_DEBUG_TYPE_EXCEPTION 5
901#define IMAGE_DEBUG_TYPE_FIXUP 6
902#define IMAGE_DEBUG_TYPE_OMAP_TO_SRC 7
903#define IMAGE_DEBUG_TYPE_OMAP_FROM_SRC 8
907#define FRAME_NONFPO 3
908#define IMAGE_DEBUG_MISC_EXENAME 1
909#define N_BTMASK 0x000F
910#define N_TMASK 0x0030
911#define N_TMASK1 0x00C0
912#define N_TMASK2 0x00F0
915#define IS_TEXT_UNICODE_ASCII16 1
916#define IS_TEXT_UNICODE_REVERSE_ASCII16 16
917#define IS_TEXT_UNICODE_STATISTICS 2
918#define IS_TEXT_UNICODE_REVERSE_STATISTICS 32
919#define IS_TEXT_UNICODE_CONTROLS 4
920#define IS_TEXT_UNICODE_REVERSE_CONTROLS 64
921#define IS_TEXT_UNICODE_SIGNATURE 8
922#define IS_TEXT_UNICODE_REVERSE_SIGNATURE 128
923#define IS_TEXT_UNICODE_ILLEGAL_CHARS 256
924#define IS_TEXT_UNICODE_ODD_LENGTH 512
925#define IS_TEXT_UNICODE_DBCS_LEADBYTE 1024
926#define IS_TEXT_UNICODE_NULL_BYTES 4096
927#define IS_TEXT_UNICODE_UNICODE_MASK 15
928#define IS_TEXT_UNICODE_REVERSE_MASK 240
929#define IS_TEXT_UNICODE_NOT_UNICODE_MASK 3840
930#define IS_TEXT_UNICODE_NOT_ASCII_MASK 61440
931#define SERVICE_KERNEL_DRIVER 1
932#define SERVICE_FILE_SYSTEM_DRIVER 2
933#define SERVICE_ADAPTER 4
934#define SERVICE_RECOGNIZER_DRIVER 8
935#define SERVICE_DRIVER (SERVICE_KERNEL_DRIVER|SERVICE_FILE_SYSTEM_DRIVER|SERVICE_RECOGNIZER_DRIVER)
936#define SERVICE_WIN32_OWN_PROCESS 16
937#define SERVICE_WIN32_SHARE_PROCESS 32
938#define SERVICE_WIN32 (SERVICE_WIN32_OWN_PROCESS|SERVICE_WIN32_SHARE_PROCESS)
939#define SERVICE_INTERACTIVE_PROCESS 256
940#define SERVICE_TYPE_ALL (SERVICE_WIN32|SERVICE_ADAPTER|SERVICE_DRIVER|SERVICE_INTERACTIVE_PROCESS)
941#define SERVICE_BOOT_START 0
942#define SERVICE_SYSTEM_START 1
943#define SERVICE_AUTO_START 2
944#define SERVICE_DEMAND_START 3
945#define SERVICE_DISABLED 4
946#define SERVICE_ERROR_IGNORE 0
947#define SERVICE_ERROR_NORMAL 1
948#define SERVICE_ERROR_SEVERE 2
949#define SERVICE_ERROR_CRITICAL 3
951#define DLL_PROCESS_DETACH 0
952#define DLL_PROCESS_ATTACH 1
953#define DLL_THREAD_ATTACH 2
954#define DLL_THREAD_DETACH 3
956#define DLL_WINE_PREATTACH 8
958#define TAPE_ABSOLUTE_POSITION 0
959#define TAPE_LOGICAL_POSITION 1
960#define TAPE_PSEUDO_LOGICAL_POSITION 2
962#define TAPE_ABSOLUTE_BLOCK 1
963#define TAPE_LOGICAL_BLOCK 2
964#define TAPE_PSEUDO_LOGICAL_BLOCK 3
965#define TAPE_SPACE_END_OF_DATA 4
966#define TAPE_SPACE_RELATIVE_BLOCKS 5
967#define TAPE_SPACE_FILEMARKS 6
968#define TAPE_SPACE_SEQUENTIAL_FMKS 7
969#define TAPE_SPACE_SETMARKS 8
970#define TAPE_SPACE_SEQUENTIAL_SMKS 9
971#define TAPE_DRIVE_FIXED 1
972#define TAPE_DRIVE_SELECT 2
973#define TAPE_DRIVE_INITIATOR 4
974#define TAPE_DRIVE_ERASE_SHORT 16
975#define TAPE_DRIVE_ERASE_LONG 32
976#define TAPE_DRIVE_ERASE_BOP_ONLY 64
977#define TAPE_DRIVE_ERASE_IMMEDIATE 128
978#define TAPE_DRIVE_TAPE_CAPACITY 256
979#define TAPE_DRIVE_TAPE_REMAINING 512
980#define TAPE_DRIVE_FIXED_BLOCK 1024
981#define TAPE_DRIVE_VARIABLE_BLOCK 2048
982#define TAPE_DRIVE_WRITE_PROTECT 4096
983#define TAPE_DRIVE_EOT_WZ_SIZE 8192
984#define TAPE_DRIVE_ECC 0x10000
985#define TAPE_DRIVE_COMPRESSION 0x20000
986#define TAPE_DRIVE_PADDING 0x40000
987#define TAPE_DRIVE_REPORT_SMKS 0x80000
988#define TAPE_DRIVE_GET_ABSOLUTE_BLK 0x100000
989#define TAPE_DRIVE_GET_LOGICAL_BLK 0x200000
990#define TAPE_DRIVE_SET_EOT_WZ_SIZE 0x400000
991#define TAPE_DRIVE_EJECT_MEDIA 0x1000000
992#define TAPE_DRIVE_CLEAN_REQUESTS 0x2000000
993#define TAPE_DRIVE_SET_CMP_BOP_ONLY 0x4000000
994#define TAPE_DRIVE_RESERVED_BIT 0x80000000
995#define TAPE_DRIVE_LOAD_UNLOAD 0x80000001
996#define TAPE_DRIVE_TENSION 0x80000002
997#define TAPE_DRIVE_LOCK_UNLOCK 0x80000004
998#define TAPE_DRIVE_REWIND_IMMEDIATE 0x80000008
999#define TAPE_DRIVE_SET_BLOCK_SIZE 0x80000010
1000#define TAPE_DRIVE_LOAD_UNLD_IMMED 0x80000020
1001#define TAPE_DRIVE_TENSION_IMMED 0x80000040
1002#define TAPE_DRIVE_LOCK_UNLK_IMMED 0x80000080
1003#define TAPE_DRIVE_SET_ECC 0x80000100
1004#define TAPE_DRIVE_SET_COMPRESSION 0x80000200
1005#define TAPE_DRIVE_SET_PADDING 0x80000400
1006#define TAPE_DRIVE_SET_REPORT_SMKS 0x80000800
1007#define TAPE_DRIVE_ABSOLUTE_BLK 0x80001000
1008#define TAPE_DRIVE_ABS_BLK_IMMED 0x80002000
1009#define TAPE_DRIVE_LOGICAL_BLK 0x80004000
1010#define TAPE_DRIVE_LOG_BLK_IMMED 0x80008000
1011#define TAPE_DRIVE_END_OF_DATA 0x80010000
1012#define TAPE_DRIVE_RELATIVE_BLKS 0x80020000
1013#define TAPE_DRIVE_FILEMARKS 0x80040000
1014#define TAPE_DRIVE_SEQUENTIAL_FMKS 0x80080000
1015#define TAPE_DRIVE_SETMARKS 0x80100000
1016#define TAPE_DRIVE_SEQUENTIAL_SMKS 0x80200000
1017#define TAPE_DRIVE_REVERSE_POSITION 0x80400000
1018#define TAPE_DRIVE_SPACE_IMMEDIATE 0x80800000
1019#define TAPE_DRIVE_WRITE_SETMARKS 0x81000000
1020#define TAPE_DRIVE_WRITE_FILEMARKS 0x82000000
1021#define TAPE_DRIVE_WRITE_SHORT_FMKS 0x84000000
1022#define TAPE_DRIVE_WRITE_LONG_FMKS 0x88000000
1023#define TAPE_DRIVE_WRITE_MARK_IMMED 0x90000000
1024#define TAPE_DRIVE_FORMAT 0xA0000000
1025#define TAPE_DRIVE_FORMAT_IMMEDIATE 0xC0000000
1026#define TAPE_DRIVE_HIGH_FEATURES 0x80000000
1027#define TAPE_FIXED_PARTITIONS 0
1028#define TAPE_INITIATOR_PARTITIONS 2
1029#define TAPE_SELECT_PARTITIONS 1
1030#define TAPE_FILEMARKS 1
1031#define TAPE_LONG_FILEMARKS 3
1032#define TAPE_SETMARKS 0
1033#define TAPE_SHORT_FILEMARKS 2
1034#define TAPE_ERASE_LONG 1
1035#define TAPE_ERASE_SHORT 0
1037#define TAPE_UNLOAD 1
1038#define TAPE_TENSION 2
1040#define TAPE_UNLOCK 4
1041#define TAPE_FORMAT 5
1042#if (_WIN32_WINNT >= 0x0500)
1043#define VER_MINORVERSION 0x0000001
1044#define VER_MAJORVERSION 0x0000002
1045#define VER_BUILDNUMBER 0x0000004
1046#define VER_PLATFORMID 0x0000008
1047#define VER_SERVICEPACKMINOR 0x0000010
1048#define VER_SERVICEPACKMAJOR 0x0000020
1049#define VER_SUITENAME 0x0000040
1050#define VER_PRODUCT_TYPE 0x0000080
1052#define VER_GREATER 2
1053#define VER_GREATER_EQUAL 3
1055#define VER_LESS_EQUAL 5
1060#define VER_PLATFORM_WIN32s 0
1061#define VER_PLATFORM_WIN32_WINDOWS 1
1062#define VER_PLATFORM_WIN32_NT 2
1063#define VER_NT_WORKSTATION 1
1064#define VER_NT_DOMAIN_CONTROLLER 2
1065#define VER_NT_SERVER 3
1067#define WT_EXECUTEDEFAULT 0x00000000
1068#define WT_EXECUTEINIOTHREAD 0x00000001
1069#define WT_EXECUTEINUITHREAD 0x00000002
1070#define WT_EXECUTEINWAITTHREAD 0x00000004
1071#define WT_EXECUTEONLYONCE 0x00000008
1072#define WT_EXECUTELONGFUNCTION 0x00000010
1073#define WT_EXECUTEINTIMERTHREAD 0x00000020
1074#define WT_EXECUTEINPERSISTENTIOTHREAD 0x00000040
1075#define WT_EXECUTEINPERSISTENTTHREAD 0x00000080
1076#define WT_TRANSFER_IMPERSONATION 0x00000100
1077#define WT_SET_MAX_THREADPOOL_THREADS(flags,limit) ((flags)|=(limit)<<16)
1079#if (_WIN32_WINNT >= 0x0501)
1080#define ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION 1
1081#define ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION 2
1082#define ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION 3
1083#define ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION 4
1084#define ACTIVATION_CONTEXT_SECTION_COM_INTERFACE_REDIRECTION 5
1085#define ACTIVATION_CONTEXT_SECTION_COM_TYPE_LIBRARY_REDIRECTION 6
1086#define ACTIVATION_CONTEXT_SECTION_COM_PROGID_REDIRECTION 7
1087#define ACTIVATION_CONTEXT_SECTION_CLR_SURROGATES 9
1088#define ACTIVATION_CONTEXT_SECTION_APPLICATION_SETTINGS 10
1089#define ACTIVATION_CONTEXT_SECTION_COMPATIBILITY_INFO 11
1091#define BTYPE(x) ((x)&N_BTMASK)
1092#define ISPTR(x) (((x)&N_TMASK)==(IMAGE_SYM_DTYPE_POINTER<<N_BTSHFT))
1093#define ISFCN(x) (((x)&N_TMASK)==(IMAGE_SYM_DTYPE_FUNCTION<<N_BTSHFT))
1094#define ISARY(x) (((x)&N_TMASK)==(IMAGE_SYM_DTYPE_ARRAY<<N_BTSHFT))
1095#define ISTAG(x) ((x)==IMAGE_SYM_CLASS_STRUCT_TAG||(x)==IMAGE_SYM_CLASS_UNION_TAG||(x)==IMAGE_SYM_CLASS_ENUM_TAG)
1096#define INCREF(x) ((((x)&~N_BTMASK)<<N_TSHIFT)|(IMAGE_SYM_DTYPE_POINTER<<N_BTSHFT)|((x)&N_BTMASK))
1097#define DECREF(x) ((((x)>>N_TSHIFT)&~N_BTMASK)|((x)&N_BTMASK))
1098#define TLS_MINIMUM_AVAILABLE 64
1099#define FLS_MAXIMUM_AVAILABLE 128
1100#define REPARSE_GUID_DATA_BUFFER_HEADER_SIZE FIELD_OFFSET(REPARSE_GUID_DATA_BUFFER, GenericReparseBuffer)
1101#define MAXIMUM_REPARSE_DATA_BUFFER_SIZE 16384
1102#define IO_REPARSE_TAG_RESERVED_ZERO 0
1103#define IO_REPARSE_TAG_RESERVED_ONE 1
1104#define IO_REPARSE_TAG_RESERVED_RANGE IO_REPARSE_TAG_RESERVED_ONE
1105#define IsReparseTagMicrosoft(x) ((x)&0x80000000)
1106#define IsReparseTagHighLatency(x) ((x)&0x40000000)
1107#define IsReparseTagNameSurrogate(x) ((x)&0x20000000)
1108#define IO_REPARSE_TAG_VALID_VALUES 0xE000FFFF
1109#define IsReparseTagValid(x) (!((x)&~IO_REPARSE_TAG_VALID_VALUES)&&((x)>IO_REPARSE_TAG_RESERVED_RANGE))
1110#define IO_REPARSE_TAG_SYMBOLIC_LINK IO_REPARSE_TAG_RESERVED_ZERO
1111#define IO_REPARSE_TAG_MOUNT_POINT 0xA0000003
1112#define IO_REPARSE_TAG_SYMLINK 0xA000000CL
1114#define RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO 0x01000000
1115#define RTL_CRITICAL_SECTION_FLAG_DYNAMIC_SPIN 0x02000000
1116#define RTL_CRITICAL_SECTION_FLAG_STATIC_INIT 0x04000000
1117#define RTL_CRITICAL_SECTION_FLAG_RESOURCE_TYPE 0x08000000
1118#define RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO 0x10000000
1119#define RTL_CRITICAL_SECTION_ALL_FLAG_BITS 0xFF000000
1120#define RTL_CRITICAL_SECTION_FLAG_RESERVED \
1121 (RTL_CRITICAL_SECTION_ALL_FLAG_BITS & \
1122 (~(RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO | \
1123 RTL_CRITICAL_SECTION_FLAG_DYNAMIC_SPIN | \
1124 RTL_CRITICAL_SECTION_FLAG_STATIC_INIT | \
1125 RTL_CRITICAL_SECTION_FLAG_RESOURCE_TYPE | \
1126 RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO)))
1131# warning _GUID_DEFINED is deprecated, use GUID_DEFINED instead
1134#if ! (defined _GUID_DEFINED || defined GUID_DEFINED)
1136typedef struct _GUID {
1137 unsigned long Data1;
1138 unsigned short Data2;
1139 unsigned short Data3;
1140 unsigned char Data4[8];
1159#ifndef _LDT_ENTRY_DEFINED
1160#define _LDT_ENTRY_DEFINED
1191#define SIZE_OF_80387_REGISTERS 80
1192#define CONTEXT_i386 0x10000
1193#define CONTEXT_i486 0x10000
1194#define CONTEXT_CONTROL (CONTEXT_i386|0x00000001L)
1195#define CONTEXT_INTEGER (CONTEXT_i386|0x00000002L)
1196#define CONTEXT_SEGMENTS (CONTEXT_i386|0x00000004L)
1197#define CONTEXT_FLOATING_POINT (CONTEXT_i386|0x00000008L)
1198#define CONTEXT_DEBUG_REGISTERS (CONTEXT_i386|0x00000010L)
1199#define CONTEXT_EXTENDED_REGISTERS (CONTEXT_i386|0x00000020L)
1200#define CONTEXT_FULL (CONTEXT_CONTROL|CONTEXT_INTEGER|CONTEXT_SEGMENTS)
1201#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS | \
1202 CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS | \
1203 CONTEXT_EXTENDED_REGISTERS)
1204#define MAXIMUM_SUPPORTED_EXTENSION 512
1206#define EXCEPTION_READ_FAULT 0
1207#define EXCEPTION_WRITE_FAULT 1
1208#define EXCEPTION_EXECUTE_FAULT 8
1249#elif defined(_AMD64_)
1251#define CONTEXT_AMD64 0x100000
1253#if !defined(RC_INVOKED)
1254#define CONTEXT_CONTROL (CONTEXT_AMD64 | 0x1L)
1255#define CONTEXT_INTEGER (CONTEXT_AMD64 | 0x2L)
1256#define CONTEXT_SEGMENTS (CONTEXT_AMD64 | 0x4L)
1257#define CONTEXT_FLOATING_POINT (CONTEXT_AMD64 | 0x8L)
1258#define CONTEXT_DEBUG_REGISTERS (CONTEXT_AMD64 | 0x10L)
1260#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT)
1261#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS | CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS)
1263#define CONTEXT_EXCEPTION_ACTIVE 0x8000000
1264#define CONTEXT_SERVICE_ACTIVE 0x10000000
1265#define CONTEXT_EXCEPTION_REQUEST 0x40000000
1266#define CONTEXT_EXCEPTION_REPORTING 0x80000000
1269#define INITIAL_MXCSR 0x1f80
1270#define INITIAL_FPCSR 0x027f
1271#define EXCEPTION_READ_FAULT 0
1272#define EXCEPTION_WRITE_FAULT 1
1273#define EXCEPTION_EXECUTE_FAULT 8
1280typedef struct _XMM_SAVE_AREA32 {
1294 M128A FloatRegisters[8];
1295 M128A XmmRegisters[16];
1375 M128A VectorRegister[26];
1387typedef struct _KNONVOLATILE_CONTEXT_POINTERS {
1389 PM128A FloatingContext[16];
1431} KNONVOLATILE_CONTEXT_POINTERS, *PKNONVOLATILE_CONTEXT_POINTERS;
1433#define UNW_FLAG_NHANDLER 0x0
1434#define UNW_FLAG_EHANDLER 0x1
1435#define UNW_FLAG_UHANDLER 0x2
1436#define UNW_FLAG_CHAININFO 0x4
1437#define UNW_FLAG_NO_EPILOGUE 0x80000000UL
1439#define RUNTIME_FUNCTION_INDIRECT 0x1
1447#define UNWIND_HISTORY_TABLE_SIZE 12
1449typedef struct _UNWIND_HISTORY_TABLE_ENTRY
1453} UNWIND_HISTORY_TABLE_ENTRY, *PUNWIND_HISTORY_TABLE_ENTRY;
1455typedef struct _UNWIND_HISTORY_TABLE
1464 UNWIND_HISTORY_TABLE_ENTRY
Entry[UNWIND_HISTORY_TABLE_SIZE];
1465} UNWIND_HISTORY_TABLE, *PUNWIND_HISTORY_TABLE;
1470GET_RUNTIME_FUNCTION_CALLBACK(
1473typedef GET_RUNTIME_FUNCTION_CALLBACK *PGET_RUNTIME_FUNCTION_CALLBACK;
1478OUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK(
1483typedef OUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK *POUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK;
1488(*PEXCEPTION_FILTER) (
1494(*PTERMINATION_HANDLER) (
1513typedef struct _SCOPE_TABLE_AMD64
1520 DWORD HandlerAddress;
1523} SCOPE_TABLE_AMD64, *PSCOPE_TABLE_AMD64;
1524typedef SCOPE_TABLE_AMD64 SCOPE_TABLE, *PSCOPE_TABLE;
1526#define OUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK_EXPORT_NAME "OutOfProcessFunctionTableCallback"
1547 PGET_RUNTIME_FUNCTION_CALLBACK
Callback,
1549 PCWSTR OutOfProcessCallbackDll);
1575 _Inout_opt_ PKNONVOLATILE_CONTEXT_POINTERS ContextPointers);
1586 _In_opt_ PUNWIND_HISTORY_TABLE HistoryTable);
1589#define CONTEXT_CONTROL 1L
1590#define CONTEXT_FLOATING_POINT 2L
1591#define CONTEXT_INTEGER 4L
1592#define CONTEXT_DEBUG_REGISTERS 8L
1593#define CONTEXT_FULL (CONTEXT_CONTROL|CONTEXT_FLOATING_POINT|CONTEXT_INTEGER)
1682#elif defined(_ALPHA_)
1683#define CONTEXT_ALPHA 0x20000
1684#define CONTEXT_CONTROL (CONTEXT_ALPHA|1L)
1685#define CONTEXT_FLOATING_POINT (CONTEXT_ALPHA|2L)
1686#define CONTEXT_INTEGER (CONTEXT_ALPHA|4L)
1687#define CONTEXT_FULL (CONTEXT_CONTROL|CONTEXT_FLOATING_POINT|CONTEXT_INTEGER)
1763typedef struct _DEBUG_REGISTERS {
1776} DEBUG_REGISTERS, *PDEBUG_REGISTERS;
1780#define CONTEXT_SH3 0x00000040
1781#define CONTEXT_SH4 0x000000c0
1784#define CONTEXT_CONTROL (CONTEXT_SH3 | 0x00000001L)
1785#define CONTEXT_INTEGER (CONTEXT_SH3 | 0x00000002L)
1786#define CONTEXT_DEBUG_REGISTERS (CONTEXT_SH3 | 0x00000008L)
1787#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_DEBUG_REGISTERS)
1789#define CONTEXT_CONTROL (CONTEXT_SH4 | 0x00000001L)
1790#define CONTEXT_INTEGER (CONTEXT_SH4 | 0x00000002L)
1791#define CONTEXT_DEBUG_REGISTERS (CONTEXT_SH4 | 0x00000008L)
1792#define CONTEXT_FLOATING_POINT (CONTEXT_SH4 | 0x00000004L)
1793#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_DEBUG_REGISTERS | CONTEXT_FLOATING_POINT)
1859#if !defined(SH3e) && !defined(SH4)
1861 DEBUG_REGISTERS DebugRegisters;
1872#elif defined(_MIPS_)
1876#define CONTEXT_R4000 0x00010000
1878#define CONTEXT_CONTROL (CONTEXT_R4000 | 0x00000001L)
1879#define CONTEXT_FLOATING_POINT (CONTEXT_R4000 | 0x00000002L)
1880#define CONTEXT_INTEGER (CONTEXT_R4000 | 0x00000004L)
1882#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER)
2023#define PAGE_SIZE 0x1000
2028#define CONTEXT_ARM 0x200000L
2029#define CONTEXT_CONTROL (CONTEXT_ARM | 0x00000001L)
2030#define CONTEXT_INTEGER (CONTEXT_ARM | 0x00000002L)
2031#define CONTEXT_FLOATING_POINT (CONTEXT_ARM | 0x00000004L)
2032#define CONTEXT_DEBUG_REGISTERS (CONTEXT_ARM | 0x00000008L)
2033#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT)
2035#define EXCEPTION_READ_FAULT 0
2036#define EXCEPTION_WRITE_FAULT 1
2037#define EXCEPTION_EXECUTE_FAULT 8
2039typedef struct _NEON128
2045#define ARM_MAX_BREAKPOINTS 8
2046#define ARM_MAX_WATCHPOINTS 1
2107typedef struct _IMAGE_ARM_RUNTIME_FUNCTION_ENTRY
2116 DWORD FunctionLength : 11;
2123 DWORD StackAdjust : 10;
2126} IMAGE_ARM_RUNTIME_FUNCTION_ENTRY, *PIMAGE_ARM_RUNTIME_FUNCTION_ENTRY;
2129typedef struct _SCOPE_TABLE_ARM
2136 DWORD HandlerAddress;
2139} SCOPE_TABLE_ARM, *PSCOPE_TABLE_ARM;
2140typedef SCOPE_TABLE_ARM SCOPE_TABLE, *PSCOPE_TABLE;
2159#elif defined(_ARM64_)
2161#define CONTEXT_ARM64 0x00400000L
2162#define CONTEXT_CONTROL (CONTEXT_ARM64 | 0x1L)
2163#define CONTEXT_INTEGER (CONTEXT_ARM64 | 0x2L)
2164#define CONTEXT_FLOATING_POINT (CONTEXT_ARM64 | 0x4L)
2165#define CONTEXT_DEBUG_REGISTERS (CONTEXT_ARM64 | 0x8L)
2166#define CONTEXT_X18 (CONTEXT_ARM64 | 0x10L)
2167#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT)
2170#define EXCEPTION_READ_FAULT 0
2171#define EXCEPTION_WRITE_FAULT 1
2172#define EXCEPTION_EXECUTE_FAULT 8
2185#define ARM64_MAX_BREAKPOINTS 8
2186#define ARM64_MAX_WATCHPOINTS 2
2261typedef struct _IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY {
2267 DWORD FunctionLength : 11;
2272 DWORD FrameSize : 9;
2275} IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY, * PIMAGE_ARM64_RUNTIME_FUNCTION_ENTRY;
2278typedef struct _SCOPE_TABLE_ARM64 {
2284 DWORD HandlerAddress;
2287} SCOPE_TABLE_ARM64, *PSCOPE_TABLE_ARM64;
2288typedef SCOPE_TABLE_ARM64 SCOPE_TABLE, *PSCOPE_TABLE;
2305#error "undefined processor type"
2310#define WOW64_CONTEXT_i386 0x00010000
2311#define WOW64_CONTEXT_i486 0x00010000
2312#define WOW64_CONTEXT_CONTROL (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000001))
2313#define WOW64_CONTEXT_INTEGER (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000002))
2314#define WOW64_CONTEXT_SEGMENTS (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000004))
2315#define WOW64_CONTEXT_FLOATING_POINT (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000008))
2316#define WOW64_CONTEXT_DEBUG_REGISTERS (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000010))
2317#define WOW64_CONTEXT_EXTENDED_REGISTERS (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000020))
2318#define WOW64_CONTEXT_FULL (WOW64_CONTEXT_CONTROL | WOW64_CONTEXT_INTEGER | WOW64_CONTEXT_SEGMENTS)
2319#define WOW64_CONTEXT_ALL (WOW64_CONTEXT_CONTROL | WOW64_CONTEXT_INTEGER | \
2320 WOW64_CONTEXT_SEGMENTS | WOW64_CONTEXT_FLOATING_POINT | \
2321 WOW64_CONTEXT_DEBUG_REGISTERS | WOW64_CONTEXT_EXTENDED_REGISTERS)
2323#define WOW64_CONTEXT_XSTATE (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000040))
2325#define WOW64_CONTEXT_EXCEPTION_ACTIVE 0x08000000
2326#define WOW64_CONTEXT_SERVICE_ACTIVE 0x10000000
2327#define WOW64_CONTEXT_EXCEPTION_REQUEST 0x40000000
2328#define WOW64_CONTEXT_EXCEPTION_REPORTING 0x80000000
2330#define WOW64_SIZE_OF_80387_REGISTERS 80
2331#define WOW64_MAXIMUM_SUPPORTED_EXTENSION 512
2346#include "pshpack4.h"
2378#define EXCEPTION_MAXIMUM_PARAMETERS 15
2379#define EXCEPTION_NONCONTINUABLE 0x01
2380#define EXCEPTION_UNWINDING 0x02
2381#define EXCEPTION_EXIT_UNWIND 0x04
2382#define EXCEPTION_STACK_INVALID 0x08
2383#define EXCEPTION_NESTED_CALL 0x10
2384#define EXCEPTION_TARGET_UNWIND 0x20
2385#define EXCEPTION_COLLIDED_UNWIND 0x40
2386#define EXCEPTION_UNWIND (EXCEPTION_UNWINDING | EXCEPTION_EXIT_UNWIND | \
2387 EXCEPTION_TARGET_UNWIND | EXCEPTION_COLLIDED_UNWIND)
2389#define IS_UNWINDING(Flag) ((Flag & EXCEPTION_UNWIND) != 0)
2390#define IS_DISPATCHING(Flag) ((Flag & EXCEPTION_UNWIND) == 0)
2391#define IS_TARGET_UNWIND(Flag) (Flag & EXCEPTION_TARGET_UNWIND)
2432#define SECURITY_MIN_SID_SIZE (sizeof(SID))
2436typedef
struct _SYSTEM_AUDIT_OBJECT_ACE {
2441 GUID InheritedObjectType;
2667#ifndef _SLIST_HEADER_
2668#define _SLIST_HEADER_
2676typedef struct _SLIST_ENTRY32 {
2711typedef union _SLIST_HEADER32{
2722#define SLIST_ENTRY SINGLE_LIST_ENTRY
2723#define _SLIST_ENTRY _SINGLE_LIST_ENTRY
2724#define PSLIST_ENTRY PSINGLE_LIST_ENTRY
2782#define RTL_CONDITION_VARIABLE_INIT {0}
2783#define RTL_CONDITION_VARIABLE_LOCKMODE_SHARED 0x1
2801#include "pshpack8.h"
2845#define RTL_SRWLOCK_INIT {0}
2857#define EVENTLOG_SEQUENTIAL_READ 1
2858#define EVENTLOG_SEEK_READ 2
2859#define EVENTLOG_FORWARDS_READ 4
2860#define EVENTLOG_BACKWARDS_READ 8
2862#define EVENTLOG_SUCCESS 0
2863#define EVENTLOG_ERROR_TYPE 1
2864#define EVENTLOG_WARNING_TYPE 2
2865#define EVENTLOG_INFORMATION_TYPE 4
2866#define EVENTLOG_AUDIT_SUCCESS 8
2867#define EVENTLOG_AUDIT_FAILURE 16
2946#include <pshpack2.h>
3202#include <pshpack2.h>
3287#ifndef __IMAGE_COR20_HEADER_DEFINED__
3288#define __IMAGE_COR20_HEADER_DEFINED__
3383#include <pshpack8.h>
3403#define IMAGE_ORDINAL_FLAG64 0x8000000000000000ULL
3404#define IMAGE_ORDINAL_FLAG32 0x80000000
3405#define IMAGE_ORDINAL64(Ordinal) (Ordinal & 0xffff)
3406#define IMAGE_ORDINAL32(Ordinal) (Ordinal & 0xffff)
3407#define IMAGE_SNAP_BY_ORDINAL64(Ordinal) ((Ordinal & IMAGE_ORDINAL_FLAG64)!=0)
3408#define IMAGE_SNAP_BY_ORDINAL32(Ordinal) ((Ordinal & IMAGE_ORDINAL_FLAG32)!=0)
3432#define IMAGE_ORDINAL_FLAG IMAGE_ORDINAL_FLAG64
3433#define IMAGE_ORDINAL(Ordinal) IMAGE_ORDINAL64(Ordinal)
3436#define IMAGE_SNAP_BY_ORDINAL(Ordinal) IMAGE_SNAP_BY_ORDINAL64(Ordinal)
3440#define IMAGE_ORDINAL_FLAG IMAGE_ORDINAL_FLAG32
3441#define IMAGE_ORDINAL(Ordinal) IMAGE_ORDINAL32(Ordinal)
3444#define IMAGE_SNAP_BY_ORDINAL(Ordinal) IMAGE_SNAP_BY_ORDINAL32(Ordinal)
3733#define JOB_OBJECT_LIMIT_WORKINGSET 0x0001
3734#define JOB_OBJECT_LIMIT_PROCESS_TIME 0x0002
3735#define JOB_OBJECT_LIMIT_JOB_TIME 0x0004
3736#define JOB_OBJECT_LIMIT_ACTIVE_PROCESS 0x0008
3737#define JOB_OBJECT_LIMIT_AFFINITY 0x0010
3738#define JOB_OBJECT_LIMIT_PRIORITY_CLASS 0x0020
3739#define JOB_OBJECT_LIMIT_PRESERVE_JOB_TIME 0x0040
3740#define JOB_OBJECT_LIMIT_SCHEDULING_CLASS 0x0080
3741#define JOB_OBJECT_LIMIT_PROCESS_MEMORY 0x0100
3742#define JOB_OBJECT_LIMIT_JOB_MEMORY 0x0200
3743#define JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION 0x0400
3744#define JOB_OBJECT_LIMIT_BREAKAWAY_OK 0x0800
3745#define JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK 0x1000
3746#define JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE 0x2000
3749#define JOB_OBJECT_UILIMIT_HANDLES 0x0001
3750#define JOB_OBJECT_UILIMIT_READCLIPBOARD 0x0002
3751#define JOB_OBJECT_UILIMIT_WRITECLIPBOARD 0x0004
3752#define JOB_OBJECT_UILIMIT_SYSTEMPARAMETERS 0x0008
3753#define JOB_OBJECT_UILIMIT_DISPLAYSETTINGS 0x0010
3754#define JOB_OBJECT_UILIMIT_GLOBALATOMS 0x0020
3755#define JOB_OBJECT_UILIMIT_DESKTOP 0x0040
3756#define JOB_OBJECT_UILIMIT_EXITWINDOWS 0x0080
3759#define JOB_OBJECT_SECURITY_NO_ADMIN 0x0001
3760#define JOB_OBJECT_SECURITY_RESTRICTED_TOKEN 0x0002
3761#define JOB_OBJECT_SECURITY_ONLY_TOKEN 0x0004
3762#define JOB_OBJECT_SECURITY_FILTER_TOKENS 0x0008
3765#define JOB_OBJECT_TERMINATE_AT_END_OF_JOB 0
3766#define JOB_OBJECT_POST_AT_END_OF_JOB 1
3768#define JOB_OBJECT_MSG_END_OF_JOB_TIME 1
3769#define JOB_OBJECT_MSG_END_OF_PROCESS_TIME 2
3770#define JOB_OBJECT_MSG_ACTIVE_PROCESS_LIMIT 3
3771#define JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO 4
3772#define JOB_OBJECT_MSG_NEW_PROCESS 6
3773#define JOB_OBJECT_MSG_EXIT_PROCESS 7
3774#define JOB_OBJECT_MSG_ABNORMAL_EXIT_PROCESS 8
3775#define JOB_OBJECT_MSG_PROCESS_MEMORY_LIMIT 9
3776#define JOB_OBJECT_MSG_JOB_MEMORY_LIMIT 10
3778#define JOB_OBJECT_ASSIGN_PROCESS 1
3779#define JOB_OBJECT_SET_ATTRIBUTES 2
3780#define JOB_OBJECT_QUERY 4
3781#define JOB_OBJECT_TERMINATE 8
3782#define JOB_OBJECT_SET_SECURITY_ATTRIBUTES 16
3783#define JOB_OBJECT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|31)