annotate loader/wine/winnt.h @ 36748:a31e7824ef36

Remove pointless casts and obfuscated array indexing.
author reimar
date Sat, 15 Feb 2014 17:24:29 +0000
parents cb4e9c35fa0c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2 * Win32 definitions for Windows NT
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
3 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
4 * Copyright 1996 Alexandre Julliard
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
5 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
6
26045
a8ea87c71d18 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25794
diff changeset
7 #ifndef MPLAYER_WINNT_H
a8ea87c71d18 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25794
diff changeset
8 #define MPLAYER_WINNT_H
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
9
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
10 #include "windef.h"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
11
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
12 #ifndef RC_INVOKED
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
13 #include <string.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
14 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
15
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
16 #include "pshpack1.h"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
17 /* Defines */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
18
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
19 /* Argument 1 passed to the DllEntryProc. */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
20 #define DLL_PROCESS_DETACH 0 /* detach process (unload library) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
21 #define DLL_PROCESS_ATTACH 1 /* attach process (load library) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
22 #define DLL_THREAD_ATTACH 2 /* attach new thread */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
23 #define DLL_THREAD_DETACH 3 /* detach thread */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
24
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
25
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
26 /* u.x.wProcessorArchitecture (NT) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
27 #define PROCESSOR_ARCHITECTURE_INTEL 0
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
28 #define PROCESSOR_ARCHITECTURE_MIPS 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
29 #define PROCESSOR_ARCHITECTURE_ALPHA 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
30 #define PROCESSOR_ARCHITECTURE_PPC 3
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
31 #define PROCESSOR_ARCHITECTURE_SHX 4
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
32 #define PROCESSOR_ARCHITECTURE_ARM 5
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
33 #define PROCESSOR_ARCHITECTURE_UNKNOWN 0xFFFF
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
34
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
35 /* dwProcessorType */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
36 #define PROCESSOR_INTEL_386 386
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
37 #define PROCESSOR_INTEL_486 486
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
38 #define PROCESSOR_INTEL_PENTIUM 586
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
39 #define PROCESSOR_INTEL_860 860
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
40 #define PROCESSOR_MIPS_R2000 2000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
41 #define PROCESSOR_MIPS_R3000 3000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
42 #define PROCESSOR_MIPS_R4000 4000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
43 #define PROCESSOR_ALPHA_21064 21064
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
44 #define PROCESSOR_PPC_601 601
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
45 #define PROCESSOR_PPC_603 603
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
46 #define PROCESSOR_PPC_604 604
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
47 #define PROCESSOR_PPC_620 620
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
48 #define PROCESSOR_HITACHI_SH3 10003
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
49 #define PROCESSOR_HITACHI_SH3E 10004
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
50 #define PROCESSOR_HITACHI_SH4 10005
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
51 #define PROCESSOR_MOTOROLA_821 821
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
52 #define PROCESSOR_SHx_SH3 103
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
53 #define PROCESSOR_SHx_SH4 104
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
54 #define PROCESSOR_STRONGARM 2577
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
55 #define PROCESSOR_ARM720 1824 /* 0x720 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
56 #define PROCESSOR_ARM820 2080 /* 0x820 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
57 #define PROCESSOR_ARM920 2336 /* 0x920 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
58 #define PROCESSOR_ARM_7TDMI 70001
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
59
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
60 #define ANYSIZE_ARRAY 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
61
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
62 #define MINCHAR 0x80
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
63 #define MAXCHAR 0x7f
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
64 #define MINSHORT 0x8000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
65 #define MAXSHORT 0x7fff
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
66 #define MINLONG 0x80000000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
67 #define MAXLONG 0x7fffffff
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
68 #define MAXBYTE 0xff
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
69 #define MAXWORD 0xffff
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
70 #define MAXDWORD 0xffffffff
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
71
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
72 #define FIELD_OFFSET(type, field) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
73 ((LONG)(INT)&(((type *)0)->field))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
74
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
75 #define CONTAINING_RECORD(address, type, field) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
76 ((type *)((PCHAR)(address) - (PCHAR)(&((type *)0)->field)))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
77
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
78 /* Types */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
79
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
80 /* TCHAR data types definitions for Winelib. */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
81 /* These types are _not_ defined for the emulator, because they */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
82 /* depend on the UNICODE macro that only exists in user's code. */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
83
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
84 # ifdef UNICODE
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
85 typedef WCHAR TCHAR, *PTCHAR;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
86 typedef LPWSTR PTSTR, LPTSTR;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
87 typedef LPCWSTR PCTSTR, LPCTSTR;
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
88 #define TEXT(string) L##string /*probably wrong */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
89 # else /* UNICODE */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
90 typedef char TCHAR, *PTCHAR;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
91 typedef LPSTR PTSTR, LPTSTR;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
92 typedef LPCSTR PCTSTR, LPCTSTR;
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
93 #define TEXT(string) string
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
94 # endif /* UNICODE */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
95
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
96 typedef BYTE BOOLEAN;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
97 typedef BOOLEAN *PBOOLEAN;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
98
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
99 typedef struct LIST_ENTRY {
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
100 struct LIST_ENTRY *Flink;
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
101 struct LIST_ENTRY *Blink;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
102 } LIST_ENTRY, *PLIST_ENTRY;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
103
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
104 typedef struct SINGLE_LIST_ENTRY {
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
105 struct SINGLE_LIST_ENTRY *Next;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
106 } SINGLE_LIST_ENTRY, *PSINGLE_LIST_ENTRY;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
107
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
108 /* Heap flags */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
109
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
110 #define HEAP_NO_SERIALIZE 0x00000001
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
111 #define HEAP_GROWABLE 0x00000002
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
112 #define HEAP_GENERATE_EXCEPTIONS 0x00000004
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
113 #define HEAP_ZERO_MEMORY 0x00000008
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
114 #define HEAP_REALLOC_IN_PLACE_ONLY 0x00000010
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
115 #define HEAP_TAIL_CHECKING_ENABLED 0x00000020
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
116 #define HEAP_FREE_CHECKING_ENABLED 0x00000040
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
117 #define HEAP_DISABLE_COALESCE_ON_FREE 0x00000080
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
118 #define HEAP_CREATE_ALIGN_16 0x00010000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
119 #define HEAP_CREATE_ENABLE_TRACING 0x00020000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
120 #define HEAP_WINE_SEGPTR 0x01000000 /* Not a Win32 flag */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
121 #define HEAP_WINE_CODESEG 0x02000000 /* Not a Win32 flag */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
122 #define HEAP_WINE_CODE16SEG 0x04000000 /* Not a Win32 flag */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
123 #define HEAP_WINE_SHARED 0x08000000 /* Not a Win32 flag */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
124
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
125 /* Processor feature flags. */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
126 #define PF_FLOATING_POINT_PRECISION_ERRATA 0
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
127 #define PF_FLOATING_POINT_EMULATED 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
128 #define PF_COMPARE_EXCHANGE_DOUBLE 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
129 #define PF_MMX_INSTRUCTIONS_AVAILABLE 3
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
130 #define PF_PPC_MOVEMEM_64BIT_OK 4
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
131 #define PF_ALPHA_BYTE_INSTRUCTIONS 5
2568
e96d8e8f0c8f new Processor Features
alex
parents: 1337
diff changeset
132 /* based on wine-20010510 -- alex */
e96d8e8f0c8f new Processor Features
alex
parents: 1337
diff changeset
133 #define PF_XMMI_INSTRUCTIONS_AVAILABLE 6
e96d8e8f0c8f new Processor Features
alex
parents: 1337
diff changeset
134 #define PF_AMD3D_INSTRUCTIONS_AVAILABLE 7
e96d8e8f0c8f new Processor Features
alex
parents: 1337
diff changeset
135 #define PF_RDTSC_INSTRUCTION_AVAILABLE 8
16632
bdc49c9c419e Several minor fixes: Correctly advertise SSE and SSE2 instruction sets,
reimar
parents: 5233
diff changeset
136 #define PF_XMMI64_INSTRUCTIONS_AVAILABLE 10
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
137
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
138 /* The Win32 register context */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
139
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
140 /* CONTEXT is the CPU-dependent context; it should be used */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
141 /* wherever a platform-specific context is needed (e.g. exception */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
142 /* handling, Win32 register functions). */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
143
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
144 /* CONTEXT86 is the i386-specific context; it should be used */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
145 /* wherever only a 386 context makes sense (e.g. DOS interrupts, */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
146 /* Win16 register functions), so that this code can be compiled */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
147 /* on all platforms. */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
148
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
149 #define SIZE_OF_80387_REGISTERS 80
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
150
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
151 typedef struct FLOATING_SAVE_AREA
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
152 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
153 DWORD ControlWord;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
154 DWORD StatusWord;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
155 DWORD TagWord;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
156 DWORD ErrorOffset;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
157 DWORD ErrorSelector;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
158 DWORD DataOffset;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
159 DWORD DataSelector;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
160 BYTE RegisterArea[SIZE_OF_80387_REGISTERS];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
161 DWORD Cr0NpxState;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
162 } FLOATING_SAVE_AREA, *PFLOATING_SAVE_AREA;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
163
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
164 typedef struct CONTEXT86
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
165 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
166 DWORD ContextFlags;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
167
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
168 /* These are selected by CONTEXT_DEBUG_REGISTERS */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
169 DWORD Dr0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
170 DWORD Dr1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
171 DWORD Dr2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
172 DWORD Dr3;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
173 DWORD Dr6;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
174 DWORD Dr7;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
175
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
176 /* These are selected by CONTEXT_FLOATING_POINT */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
177 FLOATING_SAVE_AREA FloatSave;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
178
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
179 /* These are selected by CONTEXT_SEGMENTS */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
180 DWORD SegGs;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
181 DWORD SegFs;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
182 DWORD SegEs;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
183 DWORD SegDs;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
184
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
185 /* These are selected by CONTEXT_INTEGER */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
186 DWORD Edi;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
187 DWORD Esi;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
188 DWORD Ebx;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
189 DWORD Edx;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
190 DWORD Ecx;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
191 DWORD Eax;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
192
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
193 /* These are selected by CONTEXT_CONTROL */
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
194 DWORD Ebp;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
195 DWORD Eip;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
196 DWORD SegCs;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
197 DWORD EFlags;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
198 DWORD Esp;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
199 DWORD SegSs;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
200 } CONTEXT86;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
201
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
202 #define CONTEXT_X86 0x00010000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
203 #define CONTEXT_i386 CONTEXT_X86
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
204 #define CONTEXT_i486 CONTEXT_X86
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
205
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
206 #define CONTEXT86_CONTROL (CONTEXT_i386 | 0x0001) /* SS:SP, CS:IP, FLAGS, BP */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
207 #define CONTEXT86_INTEGER (CONTEXT_i386 | 0x0002) /* AX, BX, CX, DX, SI, DI */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
208 #define CONTEXT86_SEGMENTS (CONTEXT_i386 | 0x0004) /* DS, ES, FS, GS */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
209 #define CONTEXT86_FLOATING_POINT (CONTEXT_i386 | 0x0008L) /* 387 state */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
210 #define CONTEXT86_DEBUG_REGISTERS (CONTEXT_i386 | 0x0010L) /* DB 0-3,6,7 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
211 #define CONTEXT86_FULL (CONTEXT86_CONTROL | CONTEXT86_INTEGER | CONTEXT86_SEGMENTS)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
212
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
213 /* i386 context definitions */
30252
cb4e9c35fa0c Use ARCH_X86_32 instead of the compiler-specific __i386__
reimar
parents: 30127
diff changeset
214 #if ARCH_X86_32
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
215
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
216 #define CONTEXT_CONTROL CONTEXT86_CONTROL
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
217 #define CONTEXT_INTEGER CONTEXT86_INTEGER
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
218 #define CONTEXT_SEGMENTS CONTEXT86_SEGMENTS
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
219 #define CONTEXT_FLOATING_POINT CONTEXT86_FLOATING_POINT
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
220 #define CONTEXT_DEBUG_REGISTERS CONTEXT86_DEBUG_REGISTERS
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
221 #define CONTEXT_FULL CONTEXT86_FULL
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
222
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
223 typedef CONTEXT86 CONTEXT;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
224
30252
cb4e9c35fa0c Use ARCH_X86_32 instead of the compiler-specific __i386__
reimar
parents: 30127
diff changeset
225 #endif /* ARCH_X86_32 */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
226
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
227 /* Alpha context definitions */
1337
421999eb6b9c MPlayer doesn't compile on linux/alpha
jkeil
parents: 1
diff changeset
228 #if defined(_ALPHA_) || defined(__alpha__)
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
229
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
230 #define CONTEXT_ALPHA 0x00020000
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
231
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
232 #define CONTEXT_CONTROL (CONTEXT_ALPHA | 0x00000001L)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
233 #define CONTEXT_FLOATING_POINT (CONTEXT_ALPHA | 0x00000002L)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
234 #define CONTEXT_INTEGER (CONTEXT_ALPHA | 0x00000004L)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
235 #define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
236
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
237 typedef struct CONTEXT
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
238 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
239 /* selected by CONTEXT_FLOATING_POINT */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
240 ULONGLONG FltF0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
241 ULONGLONG FltF1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
242 ULONGLONG FltF2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
243 ULONGLONG FltF3;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
244 ULONGLONG FltF4;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
245 ULONGLONG FltF5;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
246 ULONGLONG FltF6;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
247 ULONGLONG FltF7;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
248 ULONGLONG FltF8;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
249 ULONGLONG FltF9;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
250 ULONGLONG FltF10;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
251 ULONGLONG FltF11;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
252 ULONGLONG FltF12;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
253 ULONGLONG FltF13;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
254 ULONGLONG FltF14;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
255 ULONGLONG FltF15;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
256 ULONGLONG FltF16;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
257 ULONGLONG FltF17;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
258 ULONGLONG FltF18;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
259 ULONGLONG FltF19;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
260 ULONGLONG FltF20;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
261 ULONGLONG FltF21;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
262 ULONGLONG FltF22;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
263 ULONGLONG FltF23;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
264 ULONGLONG FltF24;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
265 ULONGLONG FltF25;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
266 ULONGLONG FltF26;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
267 ULONGLONG FltF27;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
268 ULONGLONG FltF28;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
269 ULONGLONG FltF29;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
270 ULONGLONG FltF30;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
271 ULONGLONG FltF31;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
272
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
273 /* selected by CONTEXT_INTEGER */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
274 ULONGLONG IntV0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
275 ULONGLONG IntT0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
276 ULONGLONG IntT1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
277 ULONGLONG IntT2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
278 ULONGLONG IntT3;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
279 ULONGLONG IntT4;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
280 ULONGLONG IntT5;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
281 ULONGLONG IntT6;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
282 ULONGLONG IntT7;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
283 ULONGLONG IntS0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
284 ULONGLONG IntS1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
285 ULONGLONG IntS2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
286 ULONGLONG IntS3;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
287 ULONGLONG IntS4;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
288 ULONGLONG IntS5;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
289 ULONGLONG IntFp;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
290 ULONGLONG IntA0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
291 ULONGLONG IntA1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
292 ULONGLONG IntA2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
293 ULONGLONG IntA3;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
294 ULONGLONG IntA4;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
295 ULONGLONG IntA5;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
296 ULONGLONG IntT8;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
297 ULONGLONG IntT9;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
298 ULONGLONG IntT10;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
299 ULONGLONG IntT11;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
300 ULONGLONG IntRa;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
301 ULONGLONG IntT12;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
302 ULONGLONG IntAt;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
303 ULONGLONG IntGp;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
304 ULONGLONG IntSp;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
305 ULONGLONG IntZero;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
306
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
307 /* selected by CONTEXT_FLOATING_POINT */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
308 ULONGLONG Fpcr;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
309 ULONGLONG SoftFpcr;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
310
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
311 /* selected by CONTEXT_CONTROL */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
312 ULONGLONG Fir;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
313 DWORD Psr;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
314 DWORD ContextFlags;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
315 DWORD Fill[4];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
316 } CONTEXT;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
317
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
318 #define QUAD_PSR_OFFSET HighSoftFpcr
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
319 #define QUAD_FLAGS_OFFSET HighFir
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
320
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
321 #endif /* _ALPHA_ */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
322
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
323 /* Mips context definitions */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
324 #ifdef _MIPS_
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
325
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
326 #define CONTEXT_R4000 0x00010000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
327
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
328 #define CONTEXT_CONTROL (CONTEXT_R4000 | 0x00000001)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
329 #define CONTEXT_FLOATING_POINT (CONTEXT_R4000 | 0x00000002)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
330 #define CONTEXT_INTEGER (CONTEXT_R4000 | 0x00000004)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
331
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
332 #define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
333
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
334 typedef struct CONTEXT
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
335 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
336 DWORD Argument[4];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
337 /* These are selected by CONTEXT_FLOATING_POINT */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
338 DWORD FltF0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
339 DWORD FltF1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
340 DWORD FltF2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
341 DWORD FltF3;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
342 DWORD FltF4;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
343 DWORD FltF5;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
344 DWORD FltF6;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
345 DWORD FltF7;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
346 DWORD FltF8;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
347 DWORD FltF9;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
348 DWORD FltF10;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
349 DWORD FltF11;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
350 DWORD FltF12;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
351 DWORD FltF13;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
352 DWORD FltF14;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
353 DWORD FltF15;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
354 DWORD FltF16;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
355 DWORD FltF17;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
356 DWORD FltF18;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
357 DWORD FltF19;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
358 DWORD FltF20;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
359 DWORD FltF21;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
360 DWORD FltF22;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
361 DWORD FltF23;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
362 DWORD FltF24;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
363 DWORD FltF25;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
364 DWORD FltF26;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
365 DWORD FltF27;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
366 DWORD FltF28;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
367 DWORD FltF29;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
368 DWORD FltF30;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
369 DWORD FltF31;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
370
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
371 /* These are selected by CONTEXT_INTEGER */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
372 DWORD IntZero;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
373 DWORD IntAt;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
374 DWORD IntV0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
375 DWORD IntV1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
376 DWORD IntA0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
377 DWORD IntA1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
378 DWORD IntA2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
379 DWORD IntA3;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
380 DWORD IntT0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
381 DWORD IntT1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
382 DWORD IntT2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
383 DWORD IntT3;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
384 DWORD IntT4;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
385 DWORD IntT5;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
386 DWORD IntT6;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
387 DWORD IntT7;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
388 DWORD IntS0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
389 DWORD IntS1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
390 DWORD IntS2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
391 DWORD IntS3;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
392 DWORD IntS4;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
393 DWORD IntS5;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
394 DWORD IntS6;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
395 DWORD IntS7;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
396 DWORD IntT8;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
397 DWORD IntT9;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
398 DWORD IntK0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
399 DWORD IntK1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
400 DWORD IntGp;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
401 DWORD IntSp;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
402 DWORD IntS8;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
403 DWORD IntRa;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
404 DWORD IntLo;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
405 DWORD IntHi;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
406
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
407 /* These are selected by CONTEXT_FLOATING_POINT */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
408 DWORD Fsr;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
409
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
410 /* These are selected by CONTEXT_CONTROL */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
411 DWORD Fir;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
412 DWORD Psr;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
413
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
414 DWORD ContextFlags;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
415 DWORD Fill[2];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
416 } CONTEXT;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
417
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
418 #endif /* _MIPS_ */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
419
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
420 /* PowerPC context definitions */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
421 #ifdef __PPC__
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
422
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
423 #define CONTEXT_CONTROL 0x0001
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
424 #define CONTEXT_FLOATING_POINT 0x0002
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
425 #define CONTEXT_INTEGER 0x0004
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
426 #define CONTEXT_DEBUG_REGISTERS 0x0008
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
427 #define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
428
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
429 typedef struct
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
430 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
431 /* These are selected by CONTEXT_FLOATING_POINT */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
432 double Fpr0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
433 double Fpr1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
434 double Fpr2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
435 double Fpr3;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
436 double Fpr4;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
437 double Fpr5;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
438 double Fpr6;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
439 double Fpr7;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
440 double Fpr8;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
441 double Fpr9;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
442 double Fpr10;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
443 double Fpr11;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
444 double Fpr12;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
445 double Fpr13;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
446 double Fpr14;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
447 double Fpr15;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
448 double Fpr16;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
449 double Fpr17;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
450 double Fpr18;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
451 double Fpr19;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
452 double Fpr20;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
453 double Fpr21;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
454 double Fpr22;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
455 double Fpr23;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
456 double Fpr24;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
457 double Fpr25;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
458 double Fpr26;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
459 double Fpr27;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
460 double Fpr28;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
461 double Fpr29;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
462 double Fpr30;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
463 double Fpr31;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
464 double Fpscr;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
465
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
466 /* These are selected by CONTEXT_INTEGER */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
467 DWORD Gpr0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
468 DWORD Gpr1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
469 DWORD Gpr2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
470 DWORD Gpr3;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
471 DWORD Gpr4;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
472 DWORD Gpr5;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
473 DWORD Gpr6;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
474 DWORD Gpr7;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
475 DWORD Gpr8;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
476 DWORD Gpr9;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
477 DWORD Gpr10;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
478 DWORD Gpr11;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
479 DWORD Gpr12;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
480 DWORD Gpr13;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
481 DWORD Gpr14;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
482 DWORD Gpr15;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
483 DWORD Gpr16;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
484 DWORD Gpr17;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
485 DWORD Gpr18;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
486 DWORD Gpr19;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
487 DWORD Gpr20;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
488 DWORD Gpr21;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
489 DWORD Gpr22;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
490 DWORD Gpr23;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
491 DWORD Gpr24;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
492 DWORD Gpr25;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
493 DWORD Gpr26;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
494 DWORD Gpr27;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
495 DWORD Gpr28;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
496 DWORD Gpr29;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
497 DWORD Gpr30;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
498 DWORD Gpr31;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
499
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
500 DWORD Cr;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
501 DWORD Xer;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
502
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
503 /* These are selected by CONTEXT_CONTROL */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
504 DWORD Msr;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
505 DWORD Iar;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
506 DWORD Lr;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
507 DWORD Ctr;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
508
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
509 DWORD ContextFlags;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
510 DWORD Fill[3];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
511
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
512 /* These are selected by CONTEXT_DEBUG_REGISTERS */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
513 DWORD Dr0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
514 DWORD Dr1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
515 DWORD Dr2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
516 DWORD Dr3;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
517 DWORD Dr4;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
518 DWORD Dr5;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
519 DWORD Dr6;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
520 DWORD Dr7;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
521 } CONTEXT;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
522
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
523 typedef struct STACK_FRAME_HEADER
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
524 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
525 DWORD BackChain;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
526 DWORD GlueSaved1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
527 DWORD GlueSaved2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
528 DWORD Reserved1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
529 DWORD Spare1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
530 DWORD Spare2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
531
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
532 DWORD Parameter0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
533 DWORD Parameter1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
534 DWORD Parameter2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
535 DWORD Parameter3;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
536 DWORD Parameter4;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
537 DWORD Parameter5;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
538 DWORD Parameter6;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
539 DWORD Parameter7;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
540 } STACK_FRAME_HEADER,*PSTACK_FRAME_HEADER;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
541
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
542 #endif /* __PPC__ */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
543
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
544 #ifdef __sparc__
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
545
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
546 /*
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
547 * FIXME:
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
548 *
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
549 * There is no official CONTEXT structure defined for the SPARC
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
550 * architecture, so I just made one up.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
551 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
552 * This structure is valid only for 32-bit SPARC architectures,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
553 * not for 64-bit SPARC.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
554 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
555 * Note that this structure contains only the 'top-level' registers;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
556 * the rest of the register window chain is not visible.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
557 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
558 * The layout follows the Solaris 'prgregset_t' structure.
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
559 *
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
560 */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
561
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
562 #define CONTEXT_SPARC 0x10000000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
563
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
564 #define CONTEXT_CONTROL (CONTEXT_SPARC | 0x00000001)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
565 #define CONTEXT_FLOATING_POINT (CONTEXT_SPARC | 0x00000002)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
566 #define CONTEXT_INTEGER (CONTEXT_SPARC | 0x00000004)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
567
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
568 #define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
569
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
570 typedef struct CONTEXT
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
571 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
572 DWORD ContextFlags;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
573
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
574 /* These are selected by CONTEXT_INTEGER */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
575 DWORD g0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
576 DWORD g1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
577 DWORD g2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
578 DWORD g3;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
579 DWORD g4;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
580 DWORD g5;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
581 DWORD g6;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
582 DWORD g7;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
583 DWORD o0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
584 DWORD o1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
585 DWORD o2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
586 DWORD o3;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
587 DWORD o4;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
588 DWORD o5;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
589 DWORD o6;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
590 DWORD o7;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
591 DWORD l0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
592 DWORD l1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
593 DWORD l2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
594 DWORD l3;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
595 DWORD l4;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
596 DWORD l5;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
597 DWORD l6;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
598 DWORD l7;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
599 DWORD i0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
600 DWORD i1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
601 DWORD i2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
602 DWORD i3;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
603 DWORD i4;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
604 DWORD i5;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
605 DWORD i6;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
606 DWORD i7;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
607
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
608 /* These are selected by CONTEXT_CONTROL */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
609 DWORD psr;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
610 DWORD pc;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
611 DWORD npc;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
612 DWORD y;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
613 DWORD wim;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
614 DWORD tbr;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
615
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
616 /* FIXME: floating point registers missing */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
617
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
618 } CONTEXT;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
619
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
620 #endif /* __sparc__ */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
621
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
622 #if !defined(CONTEXT_FULL) && !defined(RC_INVOKED)
30127
774aa6f7399e Several hacks to fix compilation of tvi_dshow on MinGW64.
reimar
parents: 29263
diff changeset
623 #warning You need to define a CONTEXT for your CPU
774aa6f7399e Several hacks to fix compilation of tvi_dshow on MinGW64.
reimar
parents: 29263
diff changeset
624 typedef void CONTEXT;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
625 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
626
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
627 typedef CONTEXT *PCONTEXT;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
628 typedef HANDLE *PHANDLE;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
629
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
630 /* Macros for easier access to i386 context registers */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
631
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
632 #define EAX_reg(context) ((context)->Eax)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
633 #define EBX_reg(context) ((context)->Ebx)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
634 #define ECX_reg(context) ((context)->Ecx)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
635 #define EDX_reg(context) ((context)->Edx)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
636 #define ESI_reg(context) ((context)->Esi)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
637 #define EDI_reg(context) ((context)->Edi)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
638 #define EBP_reg(context) ((context)->Ebp)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
639
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
640 #define CS_reg(context) ((context)->SegCs)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
641 #define DS_reg(context) ((context)->SegDs)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
642 #define ES_reg(context) ((context)->SegEs)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
643 #define FS_reg(context) ((context)->SegFs)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
644 #define GS_reg(context) ((context)->SegGs)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
645 #define SS_reg(context) ((context)->SegSs)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
646
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
647 #define EFL_reg(context) ((context)->EFlags)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
648 #define EIP_reg(context) ((context)->Eip)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
649 #define ESP_reg(context) ((context)->Esp)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
650
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
651 #define AX_reg(context) (*(WORD*)&EAX_reg(context))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
652 #define BX_reg(context) (*(WORD*)&EBX_reg(context))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
653 #define CX_reg(context) (*(WORD*)&ECX_reg(context))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
654 #define DX_reg(context) (*(WORD*)&EDX_reg(context))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
655 #define SI_reg(context) (*(WORD*)&ESI_reg(context))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
656 #define DI_reg(context) (*(WORD*)&EDI_reg(context))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
657 #define BP_reg(context) (*(WORD*)&EBP_reg(context))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
658
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
659 #define AL_reg(context) (*(BYTE*)&EAX_reg(context))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
660 #define AH_reg(context) (*((BYTE*)&EAX_reg(context)+1))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
661 #define BL_reg(context) (*(BYTE*)&EBX_reg(context))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
662 #define BH_reg(context) (*((BYTE*)&EBX_reg(context)+1))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
663 #define CL_reg(context) (*(BYTE*)&ECX_reg(context))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
664 #define CH_reg(context) (*((BYTE*)&ECX_reg(context)+1))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
665 #define DL_reg(context) (*(BYTE*)&EDX_reg(context))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
666 #define DH_reg(context) (*((BYTE*)&EDX_reg(context)+1))
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
667
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
668 #define SET_CFLAG(context) (EFL_reg(context) |= 0x0001)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
669 #define RESET_CFLAG(context) (EFL_reg(context) &= ~0x0001)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
670 #define SET_ZFLAG(context) (EFL_reg(context) |= 0x0040)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
671 #define RESET_ZFLAG(context) (EFL_reg(context) &= ~0x0040)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
672
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
673 #define ISV86(context) (EFL_reg(context) & 0x00020000)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
674 #define V86BASE(context) ((context)->Dr7) /* ugly */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
675
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
676
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
677 /* Macros to retrieve the current context */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
678
30252
cb4e9c35fa0c Use ARCH_X86_32 instead of the compiler-specific __i386__
reimar
parents: 30127
diff changeset
679 #if ARCH_X86_32
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
680
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
681 #ifdef NEED_UNDERSCORE_PREFIX
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
682 # define ASM_NAME(name) "_" name
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
683 #else
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
684 # define ASM_NAME(name) name
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
685 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
686
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
687 #ifdef __GNUC__
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
688 # define ASM_GLOBAL_FUNC(name,code) \
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
689 __asm__( ".align 4\n\t" \
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
690 ".globl " ASM_NAME(#name) "\n\t" \
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
691 ".type " ASM_NAME(#name) ",@function\n" \
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
692 ASM_NAME(#name) ":\n\t" \
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
693 code );
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
694 #else /* __GNUC__ */
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
695 # define ASM_GLOBAL_FUNC(name,code) \
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
696 void asm_dummy_##name(void) { \
27754
08d18fe9da52 Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents: 26045
diff changeset
697 __asm__( ".align 4\n\t" \
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
698 ".globl " ASM_NAME(#name) "\n\t" \
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
699 ".type " ASM_NAME(#name) ",@function\n" \
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
700 ASM_NAME(#name) ":\n\t" \
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
701 code ); \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
702 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
703 #endif /* __GNUC__ */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
704
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
705 #define DEFINE_REGS_ENTRYPOINT( name, fn, args ) \
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
706 ASM_GLOBAL_FUNC( name, \
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
707 "call " ASM_NAME("CALL32_Regs") "\n\t" \
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
708 ".long " ASM_NAME(#fn) "\n\t" \
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
709 ".byte " #args ", " #args )
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
710 #define DEFINE_REGS_ENTRYPOINT_0( name, fn ) \
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
711 DEFINE_REGS_ENTRYPOINT( name, fn, 0 )
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
712 #define DEFINE_REGS_ENTRYPOINT_1( name, fn, t1 ) \
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
713 DEFINE_REGS_ENTRYPOINT( name, fn, 4 )
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
714 #define DEFINE_REGS_ENTRYPOINT_2( name, fn, t1, t2 ) \
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
715 DEFINE_REGS_ENTRYPOINT( name, fn, 8 )
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
716 #define DEFINE_REGS_ENTRYPOINT_3( name, fn, t1, t2, t3 ) \
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
717 DEFINE_REGS_ENTRYPOINT( name, fn, 12 )
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
718 #define DEFINE_REGS_ENTRYPOINT_4( name, fn, t1, t2, t3, t4 ) \
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
719 DEFINE_REGS_ENTRYPOINT( name, fn, 16 )
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
720
30252
cb4e9c35fa0c Use ARCH_X86_32 instead of the compiler-specific __i386__
reimar
parents: 30127
diff changeset
721 #endif /* ARCH_X86_32 */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
722
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
723 #ifdef __sparc__
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
724 /* FIXME: use getcontext() to retrieve full context */
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
725 #define GET_CONTEXT \
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
726 CONTEXT context; \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
727 do { memset(&context, 0, sizeof(CONTEXT)); \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
728 context.ContextFlags = CONTEXT_CONTROL; \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
729 context.pc = (DWORD)__builtin_return_address(0); \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
730 } while (0)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
731
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
732 #define DEFINE_REGS_ENTRYPOINT_0( name, fn ) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
733 void WINAPI name ( void ) \
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
734 { GET_CONTEXT; fn( &context ); }
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
735 #define DEFINE_REGS_ENTRYPOINT_1( name, fn, t1 ) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
736 void WINAPI name ( t1 a1 ) \
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
737 { GET_CONTEXT; fn( a1, &context ); }
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
738 #define DEFINE_REGS_ENTRYPOINT_2( name, fn, t1, t2 ) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
739 void WINAPI name ( t1 a1, t2 a2 ) \
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
740 { GET_CONTEXT; fn( a1, a2, &context ); }
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
741 #define DEFINE_REGS_ENTRYPOINT_3( name, fn, t1, t2, t3 ) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
742 void WINAPI name ( t1 a1, t2 a2, t3 a3 ) \
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
743 { GET_CONTEXT; fn( a1, a2, a3, &context ); }
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
744 #define DEFINE_REGS_ENTRYPOINT_4( name, fn, t1, t2, t3, t4 ) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
745 void WINAPI name ( t1 a1, t2 a2, t3 a3, t4 a4 ) \
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
746 { GET_CONTEXT; fn( a1, a2, a3, a4, &context ); }
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
747
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
748 #endif /* __sparc__ */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
749
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
750 #ifndef DEFINE_REGS_ENTRYPOINT_0
30127
774aa6f7399e Several hacks to fix compilation of tvi_dshow on MinGW64.
reimar
parents: 29263
diff changeset
751 #warning You need to define DEFINE_REGS_ENTRYPOINT macros for your CPU
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
752 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
753
30252
cb4e9c35fa0c Use ARCH_X86_32 instead of the compiler-specific __i386__
reimar
parents: 30127
diff changeset
754 #if ARCH_X86_32
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
755 # define GET_IP(context) ((LPVOID)(context)->Eip)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
756 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
757 #ifdef __sparc__
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
758 # define GET_IP(context) ((LPVOID)(context)->pc)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
759 #endif
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
760
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
761 #if !defined(GET_IP) && !defined(RC_INVOKED)
30127
774aa6f7399e Several hacks to fix compilation of tvi_dshow on MinGW64.
reimar
parents: 29263
diff changeset
762 #warning You must define GET_IP for this CPU
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
763 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
764
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
765 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
766 * Exception codes
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
767 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
768
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
769 #define STATUS_SUCCESS 0x00000000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
770 #define STATUS_WAIT_0 0x00000000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
771 #define STATUS_ABANDONED_WAIT_0 0x00000080
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
772 #define STATUS_USER_APC 0x000000C0
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
773 #define STATUS_TIMEOUT 0x00000102
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
774 #define STATUS_PENDING 0x00000103
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
775
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
776 #define STATUS_GUARD_PAGE_VIOLATION 0x80000001
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
777 #define STATUS_DATATYPE_MISALIGNMENT 0x80000002
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
778 #define STATUS_BREAKPOINT 0x80000003
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
779 #define STATUS_SINGLE_STEP 0x80000004
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
780 #define STATUS_BUFFER_OVERFLOW 0x80000005
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
781 #define STATUS_NO_MORE_FILES 0x80000006
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
782 #define STATUS_WAKE_SYSTEM_DEBUGGER 0x80000007
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
783
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
784 #define STATUS_HANDLES_CLOSED 0x8000000A
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
785 #define STATUS_NO_INHERITANCE 0x8000000B
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
786 #define STATUS_GUID_SUBSTITUTION_MADE 0x8000000C
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
787 #define STATUS_PARTIAL_COPY 0x8000000D
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
788 #define STATUS_DEVICE_PAPER_EMPTY 0x8000000E
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
789 #define STATUS_DEVICE_POWERED_OFF 0x8000000F
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
790 #define STATUS_DEVICE_OFF_LINE 0x80000010
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
791 #define STATUS_DEVICE_BUSY 0x80000011
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
792 #define STATUS_NO_MORE_EAS 0x80000012
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
793 #define STATUS_INVALID_EA_NAME 0x80000013
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
794 #define STATUS_EA_LIST_INCONSISTENT 0x80000014
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
795 #define STATUS_INVALID_EA_FLAG 0x80000015
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
796 #define STATUS_VERIFY_REQUIRED 0x80000016
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
797 #define STATUS_EXTRANEOUS_INFORMATION 0x80000017
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
798 #define STATUS_RXACT_COMMIT_NECESSARY 0x80000018
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
799 #define STATUS_NO_MORE_ENTRIES 0x8000001A
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
800 #define STATUS_FILEMARK_DETECTED 0x8000001B
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
801 #define STATUS_MEDIA_CHANGED 0x8000001C
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
802 #define STATUS_BUS_RESET 0x8000001D
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
803 #define STATUS_END_OF_MEDIA 0x8000001E
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
804 #define STATUS_BEGINNING_OF_MEDIA 0x8000001F
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
805 #define STATUS_MEDIA_CHECK 0x80000020
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
806 #define STATUS_SETMARK_DETECTED 0x80000021
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
807 #define STATUS_NO_DATA_DETECTED 0x80000022
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
808 #define STATUS_REDIRECTOR_HAS_OPEN_HANDLES 0x80000023
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
809 #define STATUS_SERVER_HAS_OPEN_HANDLES 0x80000024
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
810 #define STATUS_ALREADY_DISCONNECTED 0x80000025
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
811 #define STATUS_LONGJUMP 0x80000026
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
812
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
813 #define STATUS_UNSUCCESSFUL 0xC0000001
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
814 #define STATUS_NOT_IMPLEMENTED 0xC0000002
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
815 #define STATUS_INVALID_INFO_CLASS 0xC0000003
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
816 #define STATUS_INFO_LENGTH_MISMATCH 0xC0000004
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
817 #define STATUS_ACCESS_VIOLATION 0xC0000005
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
818 #define STATUS_IN_PAGE_ERROR 0xC0000006
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
819 #define STATUS_PAGEFILE_QUOTA 0xC0000007
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
820 #define STATUS_INVALID_HANDLE 0xC0000008
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
821 #define STATUS_BAD_INITIAL_STACK 0xC0000009
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
822 #define STATUS_BAD_INITIAL_PC 0xC000000A
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
823 #define STATUS_INVALID_CID 0xC000000B
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
824 #define STATUS_TIMER_NOT_CANCELED 0xC000000C
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
825 #define STATUS_INVALID_PARAMETER 0xC000000D
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
826 #define STATUS_NO_SUCH_DEVICE 0xC000000E
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
827 #define STATUS_NO_SUCH_FILE 0xC000000F
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
828 #define STATUS_INVALID_DEVICE_REQUEST 0xC0000010
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
829 #define STATUS_END_OF_FILE 0xC0000011
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
830 #define STATUS_WRONG_VOLUME 0xC0000012
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
831 #define STATUS_NO_MEDIA_IN_DEVICE 0xC0000013
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
832 #define STATUS_UNRECOGNIZED_MEDIA 0xC0000014
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
833 #define STATUS_NONEXISTENT_SECTOR 0xC0000015
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
834 #define STATUS_MORE_PROCESSING_REQUIRED 0xC0000016
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
835 #define STATUS_NO_MEMORY 0xC0000017
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
836 #define STATUS_CONFLICTING_ADDRESSES 0xC0000018
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
837 #define STATUS_NOT_MAPPED_VIEW 0xC0000019
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
838 #define STATUS_UNABLE_TO_FREE_VM 0xC000001A
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
839 #define STATUS_UNABLE_TO_DELETE_SECTION 0xC000001B
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
840 #define STATUS_INVALID_SYSTEM_SERVICE 0xC000001C
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
841 #define STATUS_ILLEGAL_INSTRUCTION 0xC000001D
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
842 #define STATUS_INVALID_LOCK_SEQUENCE 0xC000001E
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
843 #define STATUS_INVALID_VIEW_SIZE 0xC000001F
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
844 #define STATUS_INVALID_FILE_FOR_SECTION 0xC0000020
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
845 #define STATUS_ALREADY_COMMITTED 0xC0000021
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
846 #define STATUS_ACCESS_DENIED 0xC0000022
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
847 #define STATUS_BUFFER_TOO_SMALL 0xC0000023
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
848 #define STATUS_OBJECT_TYPE_MISMATCH 0xC0000024
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
849 #define STATUS_NONCONTINUABLE_EXCEPTION 0xC0000025
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
850 #define STATUS_INVALID_DISPOSITION 0xC0000026
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
851 #define STATUS_UNWIND 0xC0000027
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
852 #define STATUS_BAD_STACK 0xC0000028
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
853 #define STATUS_INVALID_UNWIND_TARGET 0xC0000029
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
854 #define STATUS_NOT_LOCKED 0xC000002A
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
855 #define STATUS_PARITY_ERROR 0xC000002B
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
856 #define STATUS_UNABLE_TO_DECOMMIT_VM 0xC000002C
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
857 #define STATUS_NOT_COMMITTED 0xC000002D
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
858 #define STATUS_INVALID_PORT_ATTRIBUTES 0xC000002E
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
859 #define STATUS_PORT_MESSAGE_TOO_LONG 0xC000002F
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
860 #define STATUS_INVALID_PARAMETER_MIX 0xC0000030
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
861 #define STATUS_INVALID_QUOTA_LOWER 0xC0000031
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
862 #define STATUS_DISK_CORRUPT_ERROR 0xC0000032
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
863 #define STATUS_OBJECT_NAME_INVALID 0xC0000033
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
864 #define STATUS_OBJECT_NAME_NOT_FOUND 0xC0000034
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
865 #define STATUS_OBJECT_NAME_COLLISION 0xC0000035
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
866 #define STATUS_PORT_DISCONNECTED 0xC0000037
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
867 #define STATUS_DEVICE_ALREADY_ATTACHED 0xC0000038
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
868 #define STATUS_OBJECT_PATH_INVALID 0xC0000039
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
869 #define STATUS_OBJECT_PATH_NOT_FOUND 0xC000003A
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
870 #define STATUS_PATH_SYNTAX_BAD 0xC000003B
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
871 #define STATUS_DATA_OVERRUN 0xC000003C
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
872 #define STATUS_DATA_LATE_ERROR 0xC000003D
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
873 #define STATUS_DATA_ERROR 0xC000003E
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
874 #define STATUS_CRC_ERROR 0xC000003F
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
875 #define STATUS_SECTION_TOO_BIG 0xC0000040
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
876 #define STATUS_PORT_CONNECTION_REFUSED 0xC0000041
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
877 #define STATUS_INVALID_PORT_HANDLE 0xC0000042
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
878 #define STATUS_SHARING_VIOLATION 0xC0000043
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
879 #define STATUS_QUOTA_EXCEEDED 0xC0000044
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
880 #define STATUS_INVALID_PAGE_PROTECTION 0xC0000045
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
881 #define STATUS_MUTANT_NOT_OWNED 0xC0000046
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
882 #define STATUS_SEMAPHORE_LIMIT_EXCEEDED 0xC0000047
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
883 #define STATUS_PORT_ALREADY_SET 0xC0000048
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
884 #define STATUS_SUSPEND_COUNT_EXCEEDED 0xC000004A
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
885 #define STATUS_LOCK_NOT_GRANTED 0xC0000054 /* FIXME: not sure */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
886 #define STATUS_FILE_LOCK_CONFLICT 0xC0000055 /* FIXME: not sure */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
887 #define STATUS_UNKNOWN_REVISION 0xC0000058
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
888 #define STATUS_INVALID_SECURITY_DESCR 0xC0000079
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
889 #define STATUS_DISK_FULL 0xC000007F
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
890 #define STATUS_SECTION_NOT_EXTENDED 0xC0000087
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
891 #define STATUS_ARRAY_BOUNDS_EXCEEDED 0xC000008C
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
892 #define STATUS_FLOAT_DENORMAL_OPERAND 0xC000008D
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
893 #define STATUS_FLOAT_DIVIDE_BY_ZERO 0xC000008E
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
894 #define STATUS_FLOAT_INEXACT_RESULT 0xC000008F
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
895 #define STATUS_FLOAT_INVALID_OPERATION 0xC0000090
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
896 #define STATUS_FLOAT_OVERFLOW 0xC0000091
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
897 #define STATUS_FLOAT_STACK_CHECK 0xC0000092
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
898 #define STATUS_FLOAT_UNDERFLOW 0xC0000093
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
899 #define STATUS_INTEGER_DIVIDE_BY_ZERO 0xC0000094
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
900 #define STATUS_INTEGER_OVERFLOW 0xC0000095
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
901 #define STATUS_PRIVILEGED_INSTRUCTION 0xC0000096
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
902 #define STATUS_MEDIA_WRITE_PROTECTED 0XC00000A2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
903 #define STATUS_INVALID_PARAMETER_2 0xC00000F0
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
904 #define STATUS_STACK_OVERFLOW 0xC00000FD
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
905 #define STATUS_DIRECTORY_NOT_EMPTY 0xC0000101
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
906 #define STATUS_TOO_MANY_OPENED_FILES 0xC000011F
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
907 #define STATUS_CONTROL_C_EXIT 0xC000013A
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
908 #define STATUS_PIPE_BROKEN 0xC000014B
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
909 #define STATUS_NOT_REGISTRY_FILE 0xC000015C
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
910 #define STATUS_PARTITION_FAILURE 0xC0000172
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
911 #define STATUS_INVALID_BLOCK_LENGTH 0xC0000173
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
912 #define STATUS_DEVICE_NOT_PARTITIONED 0xC0000174
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
913 #define STATUS_UNABLE_TO_LOCK_MEDIA 0xC0000175
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
914 #define STATUS_UNABLE_TO_UNLOAD_MEDIA 0xC0000176
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
915 #define STATUS_EOM_OVERFLOW 0xC0000177
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
916 #define STATUS_NO_MEDIA 0xC0000178
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
917 #define STATUS_NO_SUCH_MEMBER 0xC000017A
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
918 #define STATUS_INVALID_MEMBER 0xC000017B
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
919 #define STATUS_KEY_DELETED 0xC000017C
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
920 #define STATUS_NO_LOG_SPACE 0xC000017D
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
921 #define STATUS_TOO_MANY_SIDS 0xC000017E
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
922 #define STATUS_LM_CROSS_ENCRYPTION_REQUIRED 0xC000017F
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
923 #define STATUS_KEY_HAS_CHILDREN 0xC0000180
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
924 #define STATUS_CHILD_MUST_BE_VOLATILE 0xC0000181
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
925 #define STATUS_DEVICE_CONFIGURATION_ERROR0xC0000182
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
926 #define STATUS_DRIVER_INTERNAL_ERROR 0xC0000183
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
927 #define STATUS_INVALID_DEVICE_STATE 0xC0000184
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
928 #define STATUS_IO_DEVICE_ERROR 0xC0000185
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
929 #define STATUS_DEVICE_PROTOCOL_ERROR 0xC0000186
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
930 #define STATUS_BACKUP_CONTROLLER 0xC0000187
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
931 #define STATUS_LOG_FILE_FULL 0xC0000188
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
932 #define STATUS_TOO_LATE 0xC0000189
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
933 #define STATUS_NO_TRUST_LSA_SECRET 0xC000018A
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
934 #define STATUS_NO_TRUST_SAM_ACCOUNT 0xC000018B
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
935 #define STATUS_TRUSTED_DOMAIN_FAILURE 0xC000018C
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
936 #define STATUS_TRUSTED_RELATIONSHIP_FAILURE 0xC000018D
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
937 #define STATUS_EVENTLOG_FILE_CORRUPT 0xC000018E
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
938 #define STATUS_EVENTLOG_CANT_START 0xC000018F
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
939 #define STATUS_TRUST_FAILURE 0xC0000190
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
940 #define STATUS_MUTANT_LIMIT_EXCEEDED 0xC0000191
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
941 #define STATUS_NETLOGON_NOT_STARTED 0xC0000192
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
942 #define STATUS_ACCOUNT_EXPIRED 0xC0000193
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
943 #define STATUS_POSSIBLE_DEADLOCK 0xC0000194
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
944 #define STATUS_NETWORK_CREDENTIAL_CONFLICT 0xC0000195
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
945 #define STATUS_REMOTE_SESSION_LIMIT 0xC0000196
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
946 #define STATUS_EVENTLOG_FILE_CHANGED 0xC0000197
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
947 #define STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT 0xC0000198
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
948 #define STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT 0xC0000199
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
949 #define STATUS_NOLOGON_SERVER_TRUST_ACCOUNT 0xC000019A
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
950 #define STATUS_DOMAIN_TRUST_INCONSISTENT 0xC000019B
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
951 #define STATUS_FS_DRIVER_REQUIRED 0xC000019C
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
952
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
953 #define STATUS_RESOURCE_LANG_NOT_FOUND 0xC0000204
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
954
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
955 #define MAXIMUM_WAIT_OBJECTS 64
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
956 #define MAXIMUM_SUSPEND_COUNT 127
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
957
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
958
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
959 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
960 * Return values from the actual exception handlers
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
961 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
962
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
963 #define ExceptionContinueExecution 0
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
964 #define ExceptionContinueSearch 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
965 #define ExceptionNestedException 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
966 #define ExceptionCollidedUnwind 3
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
967
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
968 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
969 * Return values from filters in except() and from UnhandledExceptionFilter
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
970 */
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
971
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
972 #define EXCEPTION_EXECUTE_HANDLER 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
973 #define EXCEPTION_CONTINUE_SEARCH 0
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
974 #define EXCEPTION_CONTINUE_EXECUTION -1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
975
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
976 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
977 * From OS/2 2.0 exception handling
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
978 * Win32 seems to use the same flags as ExceptionFlags in an EXCEPTION_RECORD
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
979 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
980
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
981 #define EH_NONCONTINUABLE 0x01
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
982 #define EH_UNWINDING 0x02
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
983 #define EH_EXIT_UNWIND 0x04
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
984 #define EH_STACK_INVALID 0x08
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
985 #define EH_NESTED_CALL 0x10
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
986
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
987 #define EXCEPTION_CONTINUABLE 0
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
988 #define EXCEPTION_NONCONTINUABLE EH_NONCONTINUABLE
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
989
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
990 /*
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
991 * The exception record used by Win32 to give additional information
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
992 * about exception to exception handlers.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
993 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
994
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
995 #define EXCEPTION_MAXIMUM_PARAMETERS 15
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
996
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
997 typedef struct EXCEPTION_RECORD
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
998 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
999 DWORD ExceptionCode;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1000 DWORD ExceptionFlags;
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1001 struct EXCEPTION_RECORD *ExceptionRecord;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1002
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1003 LPVOID ExceptionAddress;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1004 DWORD NumberParameters;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1005 DWORD ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1006 } EXCEPTION_RECORD, *PEXCEPTION_RECORD;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1007
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1008 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1009 * The exception pointers structure passed to exception filters
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1010 * in except() and the UnhandledExceptionFilter().
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1011 */
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
1012
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1013 typedef struct EXCEPTION_POINTERS
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1014 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1015 PEXCEPTION_RECORD ExceptionRecord;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1016 PCONTEXT ContextRecord;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1017 } EXCEPTION_POINTERS, *PEXCEPTION_POINTERS;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1018
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1019
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1020 /*
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
1021 * The exception frame, used for registering exception handlers
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
1022 * Win32 cares only about this, but compilers generally emit
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1023 * larger exception frames for their own use.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1024 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1025
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1026 struct EXCEPTION_FRAME;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1027
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1028 typedef DWORD (*PEXCEPTION_HANDLER)(PEXCEPTION_RECORD, struct EXCEPTION_FRAME*,
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1029 PCONTEXT, struct EXCEPTION_FRAME **);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1030
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1031 typedef struct EXCEPTION_FRAME
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1032 {
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1033 struct EXCEPTION_FRAME *Prev;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1034 PEXCEPTION_HANDLER Handler;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1035 } EXCEPTION_FRAME, *PEXCEPTION_FRAME;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1036
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1037 #include "poppack.h"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1038
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1039 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1040 * function pointer to a exception filter
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1041 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1042
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1043 typedef LONG CALLBACK (*PTOP_LEVEL_EXCEPTION_FILTER)(PEXCEPTION_POINTERS ExceptionInfo);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1044 typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1045
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1046 DWORD WINAPI UnhandledExceptionFilter( PEXCEPTION_POINTERS epointers );
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1047 LPTOP_LEVEL_EXCEPTION_FILTER
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1048 WINAPI SetUnhandledExceptionFilter( LPTOP_LEVEL_EXCEPTION_FILTER filter );
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1049
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1050 /* status values for ContinueDebugEvent */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1051 #define DBG_CONTINUE 0x00010002
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1052 #define DBG_TERMINATE_THREAD 0x40010003
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1053 #define DBG_TERMINATE_PROCESS 0x40010004
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1054 #define DBG_CONTROL_C 0x40010005
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1055 #define DBG_CONTROL_BREAK 0x40010008
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1056 #define DBG_EXCEPTION_NOT_HANDLED 0x80010001
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1057
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1058 typedef struct NT_TIB
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1059 {
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1060 struct EXCEPTION_REGISTRATION_RECORD *ExceptionList;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1061 PVOID StackBase;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1062 PVOID StackLimit;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1063 PVOID SubSystemTib;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1064 union {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1065 PVOID FiberData;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1066 DWORD Version;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1067 } DUMMYUNIONNAME;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1068 PVOID ArbitraryUserPointer;
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1069 struct NT_TIB *Self;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1070 } NT_TIB, *PNT_TIB;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1071
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1072 struct TEB;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1073 /*
30252
cb4e9c35fa0c Use ARCH_X86_32 instead of the compiler-specific __i386__
reimar
parents: 30127
diff changeset
1074 #if ARCH_X86_32 && defined(__GNUC__)
28051
9e739bdb049c Get rid of pointless 'extern' keywords.
diego
parents: 27754
diff changeset
1075 inline struct TEB * WINAPI NtCurrentTeb(void);
9e739bdb049c Get rid of pointless 'extern' keywords.
diego
parents: 27754
diff changeset
1076 inline struct TEB * WINAPI NtCurrentTeb(void)
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1077 {
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1078 struct TEB *teb;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1079 __asm__(".byte 0x64\n\tmovl (0x18),%0" : "=r" (teb));
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1080 return teb;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1081 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1082 #else
28051
9e739bdb049c Get rid of pointless 'extern' keywords.
diego
parents: 27754
diff changeset
1083 struct TEB * WINAPI NtCurrentTeb(void);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1084 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1085 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1086
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1087 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1088 * File formats definitions
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1089 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1090
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1091 typedef struct IMAGE_DOS_HEADER {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1092 WORD e_magic; /* 00: MZ Header signature */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1093 WORD e_cblp; /* 02: Bytes on last page of file */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1094 WORD e_cp; /* 04: Pages in file */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1095 WORD e_crlc; /* 06: Relocations */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1096 WORD e_cparhdr; /* 08: Size of header in paragraphs */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1097 WORD e_minalloc; /* 0a: Minimum extra paragraphs needed */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1098 WORD e_maxalloc; /* 0c: Maximum extra paragraphs needed */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1099 WORD e_ss; /* 0e: Initial (relative) SS value */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1100 WORD e_sp; /* 10: Initial SP value */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1101 WORD e_csum; /* 12: Checksum */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1102 WORD e_ip; /* 14: Initial IP value */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1103 WORD e_cs; /* 16: Initial (relative) CS value */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1104 WORD e_lfarlc; /* 18: File address of relocation table */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1105 WORD e_ovno; /* 1a: Overlay number */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1106 WORD e_res[4]; /* 1c: Reserved words */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1107 WORD e_oemid; /* 24: OEM identifier (for e_oeminfo) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1108 WORD e_oeminfo; /* 26: OEM information; e_oemid specific */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1109 WORD e_res2[10]; /* 28: Reserved words */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1110 DWORD e_lfanew; /* 3c: Offset to extended header */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1111 } IMAGE_DOS_HEADER, *PIMAGE_DOS_HEADER;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1112
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1113 #define IMAGE_DOS_SIGNATURE 0x5A4D /* MZ */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1114 #define IMAGE_OS2_SIGNATURE 0x454E /* NE */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1115 #define IMAGE_OS2_SIGNATURE_LE 0x454C /* LE */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1116 #define IMAGE_OS2_SIGNATURE_LX 0x584C /* LX */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1117 #define IMAGE_VXD_SIGNATURE 0x454C /* LE */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1118 #define IMAGE_NT_SIGNATURE 0x00004550 /* PE00 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1119
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1120 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1121 * This is the Windows executable (NE) header.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1122 * the name IMAGE_OS2_HEADER is misleading, but in the SDK this way.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1123 */
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
1124 typedef struct
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1125 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1126 WORD ne_magic; /* 00 NE signature 'NE' */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1127 BYTE ne_ver; /* 02 Linker version number */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1128 BYTE ne_rev; /* 03 Linker revision number */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1129 WORD ne_enttab; /* 04 Offset to entry table relative to NE */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1130 WORD ne_cbenttab; /* 06 Length of entry table in bytes */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1131 LONG ne_crc; /* 08 Checksum */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1132 WORD ne_flags; /* 0c Flags about segments in this file */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1133 WORD ne_autodata; /* 0e Automatic data segment number */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1134 WORD ne_heap; /* 10 Initial size of local heap */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1135 WORD ne_stack; /* 12 Initial size of stack */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1136 DWORD ne_csip; /* 14 Initial CS:IP */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1137 DWORD ne_sssp; /* 18 Initial SS:SP */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1138 WORD ne_cseg; /* 1c # of entries in segment table */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1139 WORD ne_cmod; /* 1e # of entries in module reference tab. */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1140 WORD ne_cbnrestab; /* 20 Length of nonresident-name table */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1141 WORD ne_segtab; /* 22 Offset to segment table */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1142 WORD ne_rsrctab; /* 24 Offset to resource table */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1143 WORD ne_restab; /* 26 Offset to resident-name table */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1144 WORD ne_modtab; /* 28 Offset to module reference table */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1145 WORD ne_imptab; /* 2a Offset to imported name table */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1146 DWORD ne_nrestab; /* 2c Offset to nonresident-name table */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1147 WORD ne_cmovent; /* 30 # of movable entry points */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1148 WORD ne_align; /* 32 Logical sector alignment shift count */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1149 WORD ne_cres; /* 34 # of resource segments */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1150 BYTE ne_exetyp; /* 36 Flags indicating target OS */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1151 BYTE ne_flagsothers; /* 37 Additional information flags */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1152 WORD fastload_offset; /* 38 Offset to fast load area (should be ne_pretthunks)*/
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1153 WORD fastload_length; /* 3a Length of fast load area (should be ne_psegrefbytes) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1154 WORD ne_swaparea; /* 3c Reserved by Microsoft */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1155 WORD ne_expver; /* 3e Expected Windows version number */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1156 } IMAGE_OS2_HEADER,*PIMAGE_OS2_HEADER;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1157
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1158 typedef struct IMAGE_VXD_HEADER {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1159 WORD e32_magic;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1160 BYTE e32_border;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1161 BYTE e32_worder;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1162 DWORD e32_level;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1163 WORD e32_cpu;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1164 WORD e32_os;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1165 DWORD e32_ver;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1166 DWORD e32_mflags;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1167 DWORD e32_mpages;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1168 DWORD e32_startobj;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1169 DWORD e32_eip;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1170 DWORD e32_stackobj;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1171 DWORD e32_esp;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1172 DWORD e32_pagesize;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1173 DWORD e32_lastpagesize;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1174 DWORD e32_fixupsize;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1175 DWORD e32_fixupsum;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1176 DWORD e32_ldrsize;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1177 DWORD e32_ldrsum;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1178 DWORD e32_objtab;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1179 DWORD e32_objcnt;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1180 DWORD e32_objmap;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1181 DWORD e32_itermap;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1182 DWORD e32_rsrctab;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1183 DWORD e32_rsrccnt;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1184 DWORD e32_restab;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1185 DWORD e32_enttab;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1186 DWORD e32_dirtab;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1187 DWORD e32_dircnt;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1188 DWORD e32_fpagetab;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1189 DWORD e32_frectab;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1190 DWORD e32_impmod;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1191 DWORD e32_impmodcnt;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1192 DWORD e32_impproc;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1193 DWORD e32_pagesum;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1194 DWORD e32_datapage;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1195 DWORD e32_preload;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1196 DWORD e32_nrestab;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1197 DWORD e32_cbnrestab;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1198 DWORD e32_nressum;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1199 DWORD e32_autodata;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1200 DWORD e32_debuginfo;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1201 DWORD e32_debuglen;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1202 DWORD e32_instpreload;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1203 DWORD e32_instdemand;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1204 DWORD e32_heapsize;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1205 BYTE e32_res3[12];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1206 DWORD e32_winresoff;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1207 DWORD e32_winreslen;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1208 WORD e32_devid;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1209 WORD e32_ddkver;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1210 } IMAGE_VXD_HEADER, *PIMAGE_VXD_HEADER;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1211
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1212
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1213 /* These defines describe the meanings of the bits in the Characteristics
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1214 field */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1215
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1216 #define IMAGE_FILE_RELOCS_STRIPPED 0x0001 /* No relocation info */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1217 #define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1218 #define IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1219 #define IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1220 #define IMAGE_FILE_16BIT_MACHINE 0x0040
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1221 #define IMAGE_FILE_BYTES_REVERSED_LO 0x0080
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1222 #define IMAGE_FILE_32BIT_MACHINE 0x0100
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1223 #define IMAGE_FILE_DEBUG_STRIPPED 0x0200
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1224 #define IMAGE_FILE_SYSTEM 0x1000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1225 #define IMAGE_FILE_DLL 0x2000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1226 #define IMAGE_FILE_BYTES_REVERSED_HI 0x8000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1227
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1228 /* These are the settings of the Machine field. */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1229 #define IMAGE_FILE_MACHINE_UNKNOWN 0
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1230 #define IMAGE_FILE_MACHINE_I860 0x14d
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1231 #define IMAGE_FILE_MACHINE_I386 0x14c
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1232 #define IMAGE_FILE_MACHINE_R3000 0x162
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1233 #define IMAGE_FILE_MACHINE_R4000 0x166
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1234 #define IMAGE_FILE_MACHINE_R10000 0x168
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1235 #define IMAGE_FILE_MACHINE_ALPHA 0x184
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
1236 #define IMAGE_FILE_MACHINE_POWERPC 0x1F0
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1237
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1238 #define IMAGE_SIZEOF_FILE_HEADER 20
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1239
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1240 /* Possible Magic values */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1241 #define IMAGE_NT_OPTIONAL_HDR_MAGIC 0x10b
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1242 #define IMAGE_ROM_OPTIONAL_HDR_MAGIC 0x107
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1243
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1244 /* These are indexes into the DataDirectory array */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1245 #define IMAGE_FILE_EXPORT_DIRECTORY 0
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1246 #define IMAGE_FILE_IMPORT_DIRECTORY 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1247 #define IMAGE_FILE_RESOURCE_DIRECTORY 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1248 #define IMAGE_FILE_EXCEPTION_DIRECTORY 3
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1249 #define IMAGE_FILE_SECURITY_DIRECTORY 4
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1250 #define IMAGE_FILE_BASE_RELOCATION_TABLE 5
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1251 #define IMAGE_FILE_DEBUG_DIRECTORY 6
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1252 #define IMAGE_FILE_DESCRIPTION_STRING 7
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1253 #define IMAGE_FILE_MACHINE_VALUE 8 /* Mips */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1254 #define IMAGE_FILE_THREAD_LOCAL_STORAGE 9
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1255 #define IMAGE_FILE_CALLBACK_DIRECTORY 10
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1256
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1257 /* Directory Entries, indices into the DataDirectory array */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1258
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1259 #define IMAGE_DIRECTORY_ENTRY_EXPORT 0
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1260 #define IMAGE_DIRECTORY_ENTRY_IMPORT 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1261 #define IMAGE_DIRECTORY_ENTRY_RESOURCE 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1262 #define IMAGE_DIRECTORY_ENTRY_EXCEPTION 3
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1263 #define IMAGE_DIRECTORY_ENTRY_SECURITY 4
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1264 #define IMAGE_DIRECTORY_ENTRY_BASERELOC 5
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1265 #define IMAGE_DIRECTORY_ENTRY_DEBUG 6
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1266 #define IMAGE_DIRECTORY_ENTRY_COPYRIGHT 7
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1267 #define IMAGE_DIRECTORY_ENTRY_GLOBALPTR 8 /* (MIPS GP) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1268 #define IMAGE_DIRECTORY_ENTRY_TLS 9
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1269 #define IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG 10
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1270 #define IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT 11
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1271 #define IMAGE_DIRECTORY_ENTRY_IAT 12 /* Import Address Table */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1272 #define IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT 13
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1273 #define IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR 14
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1274
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1275 /* Subsystem Values */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1276
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1277 #define IMAGE_SUBSYSTEM_UNKNOWN 0
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1278 #define IMAGE_SUBSYSTEM_NATIVE 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1279 #define IMAGE_SUBSYSTEM_WINDOWS_GUI 2 /* Windows GUI subsystem */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1280 #define IMAGE_SUBSYSTEM_WINDOWS_CUI 3 /* Windows character subsystem*/
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1281 #define IMAGE_SUBSYSTEM_OS2_CUI 5
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1282 #define IMAGE_SUBSYSTEM_POSIX_CUI 7
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1283
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1284 typedef struct IMAGE_FILE_HEADER {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1285 WORD Machine;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1286 WORD NumberOfSections;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1287 DWORD TimeDateStamp;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1288 DWORD PointerToSymbolTable;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1289 DWORD NumberOfSymbols;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1290 WORD SizeOfOptionalHeader;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1291 WORD Characteristics;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1292 } IMAGE_FILE_HEADER, *PIMAGE_FILE_HEADER;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1293
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1294 typedef struct IMAGE_DATA_DIRECTORY {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1295 DWORD VirtualAddress;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1296 DWORD Size;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1297 } IMAGE_DATA_DIRECTORY, *PIMAGE_DATA_DIRECTORY;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1298
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1299 #define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1300
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1301 typedef struct IMAGE_OPTIONAL_HEADER {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1302
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1303 /* Standard fields */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1304
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1305 WORD Magic;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1306 BYTE MajorLinkerVersion;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1307 BYTE MinorLinkerVersion;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1308 DWORD SizeOfCode;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1309 DWORD SizeOfInitializedData;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1310 DWORD SizeOfUninitializedData;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1311 DWORD AddressOfEntryPoint;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1312 DWORD BaseOfCode;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1313 DWORD BaseOfData;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1314
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1315 /* NT additional fields */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1316
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1317 DWORD ImageBase;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1318 DWORD SectionAlignment;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1319 DWORD FileAlignment;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1320 WORD MajorOperatingSystemVersion;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1321 WORD MinorOperatingSystemVersion;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1322 WORD MajorImageVersion;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1323 WORD MinorImageVersion;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1324 WORD MajorSubsystemVersion;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1325 WORD MinorSubsystemVersion;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1326 DWORD Win32VersionValue;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1327 DWORD SizeOfImage;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1328 DWORD SizeOfHeaders;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1329 DWORD CheckSum;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1330 WORD Subsystem;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1331 WORD DllCharacteristics;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1332 DWORD SizeOfStackReserve;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1333 DWORD SizeOfStackCommit;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1334 DWORD SizeOfHeapReserve;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1335 DWORD SizeOfHeapCommit;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1336 DWORD LoaderFlags;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1337 DWORD NumberOfRvaAndSizes;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1338 IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1339 } IMAGE_OPTIONAL_HEADER, *PIMAGE_OPTIONAL_HEADER;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1340
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1341 typedef struct IMAGE_NT_HEADERS {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1342 DWORD Signature;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1343 IMAGE_FILE_HEADER FileHeader;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1344 IMAGE_OPTIONAL_HEADER OptionalHeader;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1345 } IMAGE_NT_HEADERS, *PIMAGE_NT_HEADERS;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1346
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1347 #define IMAGE_SIZEOF_SHORT_NAME 8
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1348
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1349 typedef struct IMAGE_SECTION_HEADER {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1350 BYTE Name[IMAGE_SIZEOF_SHORT_NAME];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1351 union {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1352 DWORD PhysicalAddress;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1353 DWORD VirtualSize;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1354 } Misc;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1355 DWORD VirtualAddress;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1356 DWORD SizeOfRawData;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1357 DWORD PointerToRawData;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1358 DWORD PointerToRelocations;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1359 DWORD PointerToLinenumbers;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1360 WORD NumberOfRelocations;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1361 WORD NumberOfLinenumbers;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1362 DWORD Characteristics;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1363 } IMAGE_SECTION_HEADER, *PIMAGE_SECTION_HEADER;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1364
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1365 #define IMAGE_SIZEOF_SECTION_HEADER 40
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1366
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1367 #define IMAGE_FIRST_SECTION(ntheader) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1368 ((PIMAGE_SECTION_HEADER)((LPBYTE)&((PIMAGE_NT_HEADERS)(ntheader))->OptionalHeader + \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1369 ((PIMAGE_NT_HEADERS)(ntheader))->FileHeader.SizeOfOptionalHeader))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1370
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1371 /* These defines are for the Characteristics bitfield. */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1372 /* #define IMAGE_SCN_TYPE_REG 0x00000000 - Reserved */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1373 /* #define IMAGE_SCN_TYPE_DSECT 0x00000001 - Reserved */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1374 /* #define IMAGE_SCN_TYPE_NOLOAD 0x00000002 - Reserved */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1375 /* #define IMAGE_SCN_TYPE_GROUP 0x00000004 - Reserved */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1376 /* #define IMAGE_SCN_TYPE_NO_PAD 0x00000008 - Reserved */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1377 /* #define IMAGE_SCN_TYPE_COPY 0x00000010 - Reserved */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1378
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1379 #define IMAGE_SCN_CNT_CODE 0x00000020
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1380 #define IMAGE_SCN_CNT_INITIALIZED_DATA 0x00000040
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1381 #define IMAGE_SCN_CNT_UNINITIALIZED_DATA 0x00000080
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1382
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
1383 #define IMAGE_SCN_LNK_OTHER 0x00000100
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
1384 #define IMAGE_SCN_LNK_INFO 0x00000200
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1385 /* #define IMAGE_SCN_TYPE_OVER 0x00000400 - Reserved */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1386 #define IMAGE_SCN_LNK_REMOVE 0x00000800
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1387 #define IMAGE_SCN_LNK_COMDAT 0x00001000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1388
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1389 /* 0x00002000 - Reserved */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1390 /* #define IMAGE_SCN_MEM_PROTECTED 0x00004000 - Obsolete */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1391 #define IMAGE_SCN_MEM_FARDATA 0x00008000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1392
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1393 /* #define IMAGE_SCN_MEM_SYSHEAP 0x00010000 - Obsolete */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1394 #define IMAGE_SCN_MEM_PURGEABLE 0x00020000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1395 #define IMAGE_SCN_MEM_16BIT 0x00020000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1396 #define IMAGE_SCN_MEM_LOCKED 0x00040000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1397 #define IMAGE_SCN_MEM_PRELOAD 0x00080000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1398
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1399 #define IMAGE_SCN_ALIGN_1BYTES 0x00100000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1400 #define IMAGE_SCN_ALIGN_2BYTES 0x00200000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1401 #define IMAGE_SCN_ALIGN_4BYTES 0x00300000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1402 #define IMAGE_SCN_ALIGN_8BYTES 0x00400000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1403 #define IMAGE_SCN_ALIGN_16BYTES 0x00500000 /* Default */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1404 #define IMAGE_SCN_ALIGN_32BYTES 0x00600000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1405 #define IMAGE_SCN_ALIGN_64BYTES 0x00700000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1406 /* 0x00800000 - Unused */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1407
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1408 #define IMAGE_SCN_LNK_NRELOC_OVFL 0x01000000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1409
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1410
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1411 #define IMAGE_SCN_MEM_DISCARDABLE 0x02000000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1412 #define IMAGE_SCN_MEM_NOT_CACHED 0x04000000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1413 #define IMAGE_SCN_MEM_NOT_PAGED 0x08000000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1414 #define IMAGE_SCN_MEM_SHARED 0x10000000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1415 #define IMAGE_SCN_MEM_EXECUTE 0x20000000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1416 #define IMAGE_SCN_MEM_READ 0x40000000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1417 #define IMAGE_SCN_MEM_WRITE 0x80000000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1418
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1419 #include "pshpack2.h"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1420
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1421 typedef struct IMAGE_SYMBOL {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1422 union {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1423 BYTE ShortName[8];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1424 struct {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1425 DWORD Short;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1426 DWORD Long;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1427 } Name;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1428 DWORD LongName[2];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1429 } N;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1430 DWORD Value;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1431 SHORT SectionNumber;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1432 WORD Type;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1433 BYTE StorageClass;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1434 BYTE NumberOfAuxSymbols;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1435 } IMAGE_SYMBOL;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1436 typedef IMAGE_SYMBOL *PIMAGE_SYMBOL;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1437
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1438 #define IMAGE_SIZEOF_SYMBOL 18
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1439
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1440 typedef struct IMAGE_LINENUMBER {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1441 union {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1442 DWORD SymbolTableIndex;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1443 DWORD VirtualAddress;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1444 } Type;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1445 WORD Linenumber;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1446 } IMAGE_LINENUMBER;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1447 typedef IMAGE_LINENUMBER *PIMAGE_LINENUMBER;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1448
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1449 #define IMAGE_SIZEOF_LINENUMBER 6
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1450
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1451 typedef union IMAGE_AUX_SYMBOL {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1452 struct {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1453 DWORD TagIndex;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1454 union {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1455 struct {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1456 WORD Linenumber;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1457 WORD Size;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1458 } LnSz;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1459 DWORD TotalSize;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1460 } Misc;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1461 union {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1462 struct {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1463 DWORD PointerToLinenumber;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1464 DWORD PointerToNextFunction;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1465 } Function;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1466 struct {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1467 WORD Dimension[4];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1468 } Array;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1469 } FcnAry;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1470 WORD TvIndex;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1471 } Sym;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1472 struct {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1473 BYTE Name[IMAGE_SIZEOF_SYMBOL];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1474 } File;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1475 struct {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1476 DWORD Length;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1477 WORD NumberOfRelocations;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1478 WORD NumberOfLinenumbers;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1479 DWORD CheckSum;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1480 SHORT Number;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1481 BYTE Selection;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1482 } Section;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1483 } IMAGE_AUX_SYMBOL;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1484 typedef IMAGE_AUX_SYMBOL *PIMAGE_AUX_SYMBOL;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1485
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1486 #define IMAGE_SIZEOF_AUX_SYMBOL 18
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1487
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1488 #include "poppack.h"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1489
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1490 #define IMAGE_SYM_UNDEFINED (SHORT)0
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1491 #define IMAGE_SYM_ABSOLUTE (SHORT)-1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1492 #define IMAGE_SYM_DEBUG (SHORT)-2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1493
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1494 #define IMAGE_SYM_TYPE_NULL 0x0000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1495 #define IMAGE_SYM_TYPE_VOID 0x0001
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1496 #define IMAGE_SYM_TYPE_CHAR 0x0002
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1497 #define IMAGE_SYM_TYPE_SHORT 0x0003
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1498 #define IMAGE_SYM_TYPE_INT 0x0004
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1499 #define IMAGE_SYM_TYPE_LONG 0x0005
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1500 #define IMAGE_SYM_TYPE_FLOAT 0x0006
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1501 #define IMAGE_SYM_TYPE_DOUBLE 0x0007
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1502 #define IMAGE_SYM_TYPE_STRUCT 0x0008
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1503 #define IMAGE_SYM_TYPE_UNION 0x0009
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1504 #define IMAGE_SYM_TYPE_ENUM 0x000A
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1505 #define IMAGE_SYM_TYPE_MOE 0x000B
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1506 #define IMAGE_SYM_TYPE_BYTE 0x000C
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1507 #define IMAGE_SYM_TYPE_WORD 0x000D
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1508 #define IMAGE_SYM_TYPE_UINT 0x000E
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1509 #define IMAGE_SYM_TYPE_DWORD 0x000F
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1510 #define IMAGE_SYM_TYPE_PCODE 0x8000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1511
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1512 #define IMAGE_SYM_DTYPE_NULL 0
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1513 #define IMAGE_SYM_DTYPE_POINTER 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1514 #define IMAGE_SYM_DTYPE_FUNCTION 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1515 #define IMAGE_SYM_DTYPE_ARRAY 3
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1516
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1517 #define IMAGE_SYM_CLASS_END_OF_FUNCTION (BYTE )-1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1518 #define IMAGE_SYM_CLASS_NULL 0x0000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1519 #define IMAGE_SYM_CLASS_AUTOMATIC 0x0001
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1520 #define IMAGE_SYM_CLASS_EXTERNAL 0x0002
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1521 #define IMAGE_SYM_CLASS_STATIC 0x0003
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1522 #define IMAGE_SYM_CLASS_REGISTER 0x0004
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1523 #define IMAGE_SYM_CLASS_EXTERNAL_DEF 0x0005
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1524 #define IMAGE_SYM_CLASS_LABEL 0x0006
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1525 #define IMAGE_SYM_CLASS_UNDEFINED_LABEL 0x0007
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1526 #define IMAGE_SYM_CLASS_MEMBER_OF_STRUCT 0x0008
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1527 #define IMAGE_SYM_CLASS_ARGUMENT 0x0009
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1528 #define IMAGE_SYM_CLASS_STRUCT_TAG 0x000A
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1529 #define IMAGE_SYM_CLASS_MEMBER_OF_UNION 0x000B
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1530 #define IMAGE_SYM_CLASS_UNION_TAG 0x000C
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1531 #define IMAGE_SYM_CLASS_TYPE_DEFINITION 0x000D
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1532 #define IMAGE_SYM_CLASS_UNDEFINED_STATIC 0x000E
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1533 #define IMAGE_SYM_CLASS_ENUM_TAG 0x000F
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1534 #define IMAGE_SYM_CLASS_MEMBER_OF_ENUM 0x0010
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1535 #define IMAGE_SYM_CLASS_REGISTER_PARAM 0x0011
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1536 #define IMAGE_SYM_CLASS_BIT_FIELD 0x0012
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1537
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1538 #define IMAGE_SYM_CLASS_FAR_EXTERNAL 0x0044
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1539 #define IMAGE_SYM_CLASS_BLOCK 0x0064
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1540 #define IMAGE_SYM_CLASS_FUNCTION 0x0065
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1541 #define IMAGE_SYM_CLASS_END_OF_STRUCT 0x0066
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1542 #define IMAGE_SYM_CLASS_FILE 0x0067
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1543 #define IMAGE_SYM_CLASS_SECTION 0x0068
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1544 #define IMAGE_SYM_CLASS_WEAK_EXTERNAL 0x0069
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1545
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1546 #define N_BTMASK 0x000F
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1547 #define N_TMASK 0x0030
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1548 #define N_TMASK1 0x00C0
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1549 #define N_TMASK2 0x00F0
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1550 #define N_BTSHFT 4
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1551 #define N_TSHIFT 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1552
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1553 #define BTYPE(x) ((x) & N_BTMASK)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1554
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1555 #ifndef ISPTR
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1556 #define ISPTR(x) (((x) & N_TMASK) == (IMAGE_SYM_DTYPE_POINTER << N_BTSHFT))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1557 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1558
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1559 #ifndef ISFCN
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1560 #define ISFCN(x) (((x) & N_TMASK) == (IMAGE_SYM_DTYPE_FUNCTION << N_BTSHFT))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1561 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1562
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1563 #ifndef ISARY
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1564 #define ISARY(x) (((x) & N_TMASK) == (IMAGE_SYM_DTYPE_ARRAY << N_BTSHFT))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1565 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1566
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1567 #ifndef ISTAG
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1568 #define ISTAG(x) ((x)==IMAGE_SYM_CLASS_STRUCT_TAG || (x)==IMAGE_SYM_CLASS_UNION_TAG || (x)==IMAGE_SYM_CLASS_ENUM_TAG)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1569 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1570
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1571 #ifndef INCREF
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1572 #define INCREF(x) ((((x)&~N_BTMASK)<<N_TSHIFT)|(IMAGE_SYM_DTYPE_POINTER<<N_BTSHFT)|((x)&N_BTMASK))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1573 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1574 #ifndef DECREF
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1575 #define DECREF(x) ((((x)>>N_TSHIFT)&~N_BTMASK)|((x)&N_BTMASK))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1576 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1577
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1578 #define IMAGE_COMDAT_SELECT_NODUPLICATES 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1579 #define IMAGE_COMDAT_SELECT_ANY 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1580 #define IMAGE_COMDAT_SELECT_SAME_SIZE 3
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1581 #define IMAGE_COMDAT_SELECT_EXACT_MATCH 4
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1582 #define IMAGE_COMDAT_SELECT_ASSOCIATIVE 5
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1583 #define IMAGE_COMDAT_SELECT_LARGEST 6
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1584 #define IMAGE_COMDAT_SELECT_NEWEST 7
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1585
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1586 #define IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1587 #define IMAGE_WEAK_EXTERN_SEARCH_LIBRARY 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1588 #define IMAGE_WEAK_EXTERN_SEARCH_ALIAS 3
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1589
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1590 /* Export module directory */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1591
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1592 typedef struct IMAGE_EXPORT_DIRECTORY {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1593 DWORD Characteristics;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1594 DWORD TimeDateStamp;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1595 WORD MajorVersion;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1596 WORD MinorVersion;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1597 DWORD Name;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1598 DWORD Base;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1599 DWORD NumberOfFunctions;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1600 DWORD NumberOfNames;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1601 LPDWORD *AddressOfFunctions;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1602 LPDWORD *AddressOfNames;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1603 LPWORD *AddressOfNameOrdinals;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1604 } IMAGE_EXPORT_DIRECTORY,*PIMAGE_EXPORT_DIRECTORY;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1605
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1606 /* Import name entry */
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1607 typedef struct IMAGE_IMPORT_BY_NAME {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1608 WORD Hint;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1609 BYTE Name[1];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1610 } IMAGE_IMPORT_BY_NAME,*PIMAGE_IMPORT_BY_NAME;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1611
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1612 /* Import thunk */
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1613 typedef struct IMAGE_THUNK_DATA {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1614 union {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1615 LPBYTE ForwarderString;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1616 FARPROC Function;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1617 DWORD Ordinal;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1618 PIMAGE_IMPORT_BY_NAME AddressOfData;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1619 } u1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1620 } IMAGE_THUNK_DATA,*PIMAGE_THUNK_DATA;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1621
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1622 /* Import module directory */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1623
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1624 typedef struct IMAGE_IMPORT_DESCRIPTOR {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1625 union {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1626 DWORD Characteristics; /* 0 for terminating null import descriptor */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1627 PIMAGE_THUNK_DATA OriginalFirstThunk; /* RVA to original unbound IAT */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1628 } u;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1629 DWORD TimeDateStamp; /* 0 if not bound,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1630 * -1 if bound, and real date\time stamp
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1631 * in IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1632 * (new BIND)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1633 * otherwise date/time stamp of DLL bound to
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1634 * (Old BIND)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1635 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1636 DWORD ForwarderChain; /* -1 if no forwarders */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1637 DWORD Name;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1638 /* RVA to IAT (if bound this IAT has actual addresses) */
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
1639 PIMAGE_THUNK_DATA FirstThunk;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1640 } IMAGE_IMPORT_DESCRIPTOR,*PIMAGE_IMPORT_DESCRIPTOR;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1641
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1642 #define IMAGE_ORDINAL_FLAG 0x80000000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1643 #define IMAGE_SNAP_BY_ORDINAL(Ordinal) ((Ordinal & IMAGE_ORDINAL_FLAG) != 0)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1644 #define IMAGE_ORDINAL(Ordinal) (Ordinal & 0xffff)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1645
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1646 typedef struct IMAGE_BOUND_IMPORT_DESCRIPTOR
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1647 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1648 DWORD TimeDateStamp;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1649 WORD OffsetModuleName;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1650 WORD NumberOfModuleForwarderRefs;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1651 /* Array of zero or more IMAGE_BOUND_FORWARDER_REF follows */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1652 } IMAGE_BOUND_IMPORT_DESCRIPTOR, *PIMAGE_BOUND_IMPORT_DESCRIPTOR;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1653
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1654 typedef struct IMAGE_BOUND_FORWARDER_REF
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1655 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1656 DWORD TimeDateStamp;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1657 WORD OffsetModuleName;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1658 WORD Reserved;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1659 } IMAGE_BOUND_FORWARDER_REF, *PIMAGE_BOUND_FORWARDER_REF;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1660
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1661 typedef struct IMAGE_BASE_RELOCATION
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1662 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1663 DWORD VirtualAddress;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1664 DWORD SizeOfBlock;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1665 WORD TypeOffset[1];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1666 } IMAGE_BASE_RELOCATION,*PIMAGE_BASE_RELOCATION;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1667
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1668 typedef struct IMAGE_RELOCATION
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1669 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1670 union {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1671 DWORD VirtualAddress;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1672 DWORD RelocCount;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1673 } u;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1674 DWORD SymbolTableIndex;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1675 WORD Type;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1676 } IMAGE_RELOCATION;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1677 typedef IMAGE_RELOCATION *PIMAGE_RELOCATION;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1678
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1679 #define IMAGE_SIZEOF_RELOCATION 10
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1680
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1681 /* generic relocation types */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1682 #define IMAGE_REL_BASED_ABSOLUTE 0
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1683 #define IMAGE_REL_BASED_HIGH 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1684 #define IMAGE_REL_BASED_LOW 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1685 #define IMAGE_REL_BASED_HIGHLOW 3
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1686 #define IMAGE_REL_BASED_HIGHADJ 4
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1687 #define IMAGE_REL_BASED_MIPS_JMPADDR 5
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1688 #define IMAGE_REL_BASED_SECTION 6
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1689 #define IMAGE_REL_BASED_REL 7
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1690 #define IMAGE_REL_BASED_MIPS_JMPADDR16 9
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1691 #define IMAGE_REL_BASED_IA64_IMM64 9 /* yes, 9 too */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1692 #define IMAGE_REL_BASED_DIR64 10
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1693 #define IMAGE_REL_BASED_HIGH3ADJ 11
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1694
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1695 /* I386 relocation types */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1696 #define IMAGE_REL_I386_ABSOLUTE 0
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1697 #define IMAGE_REL_I386_DIR16 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1698 #define IMAGE_REL_I386_REL16 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1699 #define IMAGE_REL_I386_DIR32 6
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1700 #define IMAGE_REL_I386_DIR32NB 7
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1701 #define IMAGE_REL_I386_SEG12 9
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1702 #define IMAGE_REL_I386_SECTION 10
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1703 #define IMAGE_REL_I386_SECREL 11
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1704 #define IMAGE_REL_I386_REL32 20
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1705
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1706 /* MIPS relocation types */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1707 #define IMAGE_REL_MIPS_ABSOLUTE 0x0000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1708 #define IMAGE_REL_MIPS_REFHALF 0x0001
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1709 #define IMAGE_REL_MIPS_REFWORD 0x0002
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1710 #define IMAGE_REL_MIPS_JMPADDR 0x0003
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1711 #define IMAGE_REL_MIPS_REFHI 0x0004
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1712 #define IMAGE_REL_MIPS_REFLO 0x0005
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1713 #define IMAGE_REL_MIPS_GPREL 0x0006
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1714 #define IMAGE_REL_MIPS_LITERAL 0x0007
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1715 #define IMAGE_REL_MIPS_SECTION 0x000A
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1716 #define IMAGE_REL_MIPS_SECREL 0x000B
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1717 #define IMAGE_REL_MIPS_SECRELLO 0x000C
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1718 #define IMAGE_REL_MIPS_SECRELHI 0x000D
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1719 #define IMAGE_REL_MIPS_JMPADDR16 0x0010
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1720 #define IMAGE_REL_MIPS_REFWORDNB 0x0022
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1721 #define IMAGE_REL_MIPS_PAIR 0x0025
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1722
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1723 /* ALPHA relocation types */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1724 #define IMAGE_REL_ALPHA_ABSOLUTE 0x0000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1725 #define IMAGE_REL_ALPHA_REFLONG 0x0001
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1726 #define IMAGE_REL_ALPHA_REFQUAD 0x0002
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1727 #define IMAGE_REL_ALPHA_GPREL 0x0003
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1728 #define IMAGE_REL_ALPHA_LITERAL 0x0004
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1729 #define IMAGE_REL_ALPHA_LITUSE 0x0005
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1730 #define IMAGE_REL_ALPHA_GPDISP 0x0006
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1731 #define IMAGE_REL_ALPHA_BRADDR 0x0007
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1732 #define IMAGE_REL_ALPHA_HINT 0x0008
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1733 #define IMAGE_REL_ALPHA_INLINE_REFLONG 0x0009
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1734 #define IMAGE_REL_ALPHA_REFHI 0x000A
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1735 #define IMAGE_REL_ALPHA_REFLO 0x000B
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1736 #define IMAGE_REL_ALPHA_PAIR 0x000C
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1737 #define IMAGE_REL_ALPHA_MATCH 0x000D
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1738 #define IMAGE_REL_ALPHA_SECTION 0x000E
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1739 #define IMAGE_REL_ALPHA_SECREL 0x000F
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1740 #define IMAGE_REL_ALPHA_REFLONGNB 0x0010
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1741 #define IMAGE_REL_ALPHA_SECRELLO 0x0011
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1742 #define IMAGE_REL_ALPHA_SECRELHI 0x0012
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1743 #define IMAGE_REL_ALPHA_REFQ3 0x0013
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1744 #define IMAGE_REL_ALPHA_REFQ2 0x0014
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1745 #define IMAGE_REL_ALPHA_REFQ1 0x0015
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1746 #define IMAGE_REL_ALPHA_GPRELLO 0x0016
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1747 #define IMAGE_REL_ALPHA_GPRELHI 0x0017
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1748
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1749 /* PowerPC relocation types */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1750 #define IMAGE_REL_PPC_ABSOLUTE 0x0000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1751 #define IMAGE_REL_PPC_ADDR64 0x0001
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1752 #define IMAGE_REL_PPC_ADDR 0x0002
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1753 #define IMAGE_REL_PPC_ADDR24 0x0003
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1754 #define IMAGE_REL_PPC_ADDR16 0x0004
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1755 #define IMAGE_REL_PPC_ADDR14 0x0005
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1756 #define IMAGE_REL_PPC_REL24 0x0006
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1757 #define IMAGE_REL_PPC_REL14 0x0007
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1758 #define IMAGE_REL_PPC_TOCREL16 0x0008
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1759 #define IMAGE_REL_PPC_TOCREL14 0x0009
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1760 #define IMAGE_REL_PPC_ADDR32NB 0x000A
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1761 #define IMAGE_REL_PPC_SECREL 0x000B
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1762 #define IMAGE_REL_PPC_SECTION 0x000C
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1763 #define IMAGE_REL_PPC_IFGLUE 0x000D
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1764 #define IMAGE_REL_PPC_IMGLUE 0x000E
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1765 #define IMAGE_REL_PPC_SECREL16 0x000F
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1766 #define IMAGE_REL_PPC_REFHI 0x0010
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1767 #define IMAGE_REL_PPC_REFLO 0x0011
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1768 #define IMAGE_REL_PPC_PAIR 0x0012
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1769 #define IMAGE_REL_PPC_SECRELLO 0x0013
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1770 #define IMAGE_REL_PPC_SECRELHI 0x0014
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1771 #define IMAGE_REL_PPC_GPREL 0x0015
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1772 #define IMAGE_REL_PPC_TYPEMASK 0x00FF
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1773 /* modifier bits */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1774 #define IMAGE_REL_PPC_NEG 0x0100
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1775 #define IMAGE_REL_PPC_BRTAKEN 0x0200
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1776 #define IMAGE_REL_PPC_BRNTAKEN 0x0400
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1777 #define IMAGE_REL_PPC_TOCDEFN 0x0800
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1778
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1779 /* SH3 ? relocation type */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1780 #define IMAGE_REL_SH3_ABSOLUTE 0x0000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1781 #define IMAGE_REL_SH3_DIRECT16 0x0001
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1782 #define IMAGE_REL_SH3_DIRECT 0x0002
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1783 #define IMAGE_REL_SH3_DIRECT8 0x0003
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1784 #define IMAGE_REL_SH3_DIRECT8_WORD 0x0004
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1785 #define IMAGE_REL_SH3_DIRECT8_LONG 0x0005
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1786 #define IMAGE_REL_SH3_DIRECT4 0x0006
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1787 #define IMAGE_REL_SH3_DIRECT4_WORD 0x0007
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1788 #define IMAGE_REL_SH3_DIRECT4_LONG 0x0008
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1789 #define IMAGE_REL_SH3_PCREL8_WORD 0x0009
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1790 #define IMAGE_REL_SH3_PCREL8_LONG 0x000A
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1791 #define IMAGE_REL_SH3_PCREL12_WORD 0x000B
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1792 #define IMAGE_REL_SH3_STARTOF_SECTION 0x000C
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1793 #define IMAGE_REL_SH3_SIZEOF_SECTION 0x000D
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1794 #define IMAGE_REL_SH3_SECTION 0x000E
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1795 #define IMAGE_REL_SH3_SECREL 0x000F
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1796 #define IMAGE_REL_SH3_DIRECT32_NB 0x0010
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1797
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1798 /* ARM (Archimedes?) relocation types */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1799 #define IMAGE_REL_ARM_ABSOLUTE 0x0000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1800 #define IMAGE_REL_ARM_ADDR 0x0001
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1801 #define IMAGE_REL_ARM_ADDR32NB 0x0002
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1802 #define IMAGE_REL_ARM_BRANCH24 0x0003
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1803 #define IMAGE_REL_ARM_BRANCH11 0x0004
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1804 #define IMAGE_REL_ARM_SECTION 0x000E
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1805 #define IMAGE_REL_ARM_SECREL 0x000F
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1806
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1807 /* IA64 relocation types */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1808 #define IMAGE_REL_IA64_ABSOLUTE 0x0000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1809 #define IMAGE_REL_IA64_IMM14 0x0001
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1810 #define IMAGE_REL_IA64_IMM22 0x0002
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1811 #define IMAGE_REL_IA64_IMM64 0x0003
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1812 #define IMAGE_REL_IA64_DIR 0x0004
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1813 #define IMAGE_REL_IA64_DIR64 0x0005
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1814 #define IMAGE_REL_IA64_PCREL21B 0x0006
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1815 #define IMAGE_REL_IA64_PCREL21M 0x0007
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1816 #define IMAGE_REL_IA64_PCREL21F 0x0008
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1817 #define IMAGE_REL_IA64_GPREL22 0x0009
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1818 #define IMAGE_REL_IA64_LTOFF22 0x000A
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1819 #define IMAGE_REL_IA64_SECTION 0x000B
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1820 #define IMAGE_REL_IA64_SECREL22 0x000C
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1821 #define IMAGE_REL_IA64_SECREL64I 0x000D
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1822 #define IMAGE_REL_IA64_SECREL 0x000E
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1823 #define IMAGE_REL_IA64_LTOFF64 0x000F
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1824 #define IMAGE_REL_IA64_DIR32NB 0x0010
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1825 #define IMAGE_REL_IA64_RESERVED_11 0x0011
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1826 #define IMAGE_REL_IA64_RESERVED_12 0x0012
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1827 #define IMAGE_REL_IA64_RESERVED_13 0x0013
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1828 #define IMAGE_REL_IA64_RESERVED_14 0x0014
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1829 #define IMAGE_REL_IA64_RESERVED_15 0x0015
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1830 #define IMAGE_REL_IA64_RESERVED_16 0x0016
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1831 #define IMAGE_REL_IA64_ADDEND 0x001F
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1832
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1833 /* archive format */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1834
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1835 #define IMAGE_ARCHIVE_START_SIZE 8
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1836 #define IMAGE_ARCHIVE_START "!<arch>\n"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1837 #define IMAGE_ARCHIVE_END "`\n"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1838 #define IMAGE_ARCHIVE_PAD "\n"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1839 #define IMAGE_ARCHIVE_LINKER_MEMBER "/ "
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1840 #define IMAGE_ARCHIVE_LONGNAMES_MEMBER "// "
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1841
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1842 typedef struct IMAGE_ARCHIVE_MEMBER_HEADER
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1843 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1844 BYTE Name[16];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1845 BYTE Date[12];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1846 BYTE UserID[6];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1847 BYTE GroupID[6];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1848 BYTE Mode[8];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1849 BYTE Size[10];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1850 BYTE EndHeader[2];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1851 } IMAGE_ARCHIVE_MEMBER_HEADER, *PIMAGE_ARCHIVE_MEMBER_HEADER;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1852
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1853 #define IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR 60
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1854
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1855 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1856 * Resource directory stuff
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1857 */
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1858 typedef struct IMAGE_RESOURCE_DIRECTORY {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1859 DWORD Characteristics;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1860 DWORD TimeDateStamp;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1861 WORD MajorVersion;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1862 WORD MinorVersion;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1863 WORD NumberOfNamedEntries;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1864 WORD NumberOfIdEntries;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1865 /* IMAGE_RESOURCE_DIRECTORY_ENTRY DirectoryEntries[]; */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1866 } IMAGE_RESOURCE_DIRECTORY,*PIMAGE_RESOURCE_DIRECTORY;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1867
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1868 #define IMAGE_RESOURCE_NAME_IS_STRING 0x80000000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1869 #define IMAGE_RESOURCE_DATA_IS_DIRECTORY 0x80000000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1870
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1871 typedef struct IMAGE_RESOURCE_DIRECTORY_ENTRY {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1872 union {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1873 struct {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1874 unsigned NameOffset:31;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1875 unsigned NameIsString:1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1876 } s;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1877 DWORD Name;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1878 WORD Id;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1879 } u1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1880 union {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1881 DWORD OffsetToData;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1882 struct {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1883 unsigned OffsetToDirectory:31;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1884 unsigned DataIsDirectory:1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1885 } s;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1886 } u2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1887 } IMAGE_RESOURCE_DIRECTORY_ENTRY,*PIMAGE_RESOURCE_DIRECTORY_ENTRY;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1888
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1889
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1890 typedef struct IMAGE_RESOURCE_DIRECTORY_STRING {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1891 WORD Length;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1892 CHAR NameString[ 1 ];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1893 } IMAGE_RESOURCE_DIRECTORY_STRING,*PIMAGE_RESOURCE_DIRECTORY_STRING;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1894
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1895 typedef struct IMAGE_RESOURCE_DIR_STRING_U {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1896 WORD Length;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1897 WCHAR NameString[ 1 ];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1898 } IMAGE_RESOURCE_DIR_STRING_U,*PIMAGE_RESOURCE_DIR_STRING_U;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1899
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1900 typedef struct IMAGE_RESOURCE_DATA_ENTRY {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1901 DWORD OffsetToData;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1902 DWORD Size;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1903 DWORD CodePage;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1904 DWORD ResourceHandle;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1905 } IMAGE_RESOURCE_DATA_ENTRY,*PIMAGE_RESOURCE_DATA_ENTRY;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1906
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1907
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1908 typedef VOID CALLBACK (*PIMAGE_TLS_CALLBACK)(
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1909 LPVOID DllHandle,DWORD Reason,LPVOID Reserved
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1910 );
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1911
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1912 typedef struct IMAGE_TLS_DIRECTORY {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1913 DWORD StartAddressOfRawData;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1914 DWORD EndAddressOfRawData;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1915 LPDWORD AddressOfIndex;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1916 PIMAGE_TLS_CALLBACK *AddressOfCallBacks;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1917 DWORD SizeOfZeroFill;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1918 DWORD Characteristics;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1919 } IMAGE_TLS_DIRECTORY,*PIMAGE_TLS_DIRECTORY;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1920
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1921 typedef struct IMAGE_DEBUG_DIRECTORY {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1922 DWORD Characteristics;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1923 DWORD TimeDateStamp;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1924 WORD MajorVersion;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1925 WORD MinorVersion;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1926 DWORD Type;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1927 DWORD SizeOfData;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1928 DWORD AddressOfRawData;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1929 DWORD PointerToRawData;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1930 } IMAGE_DEBUG_DIRECTORY, *PIMAGE_DEBUG_DIRECTORY;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1931
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1932 #define IMAGE_DEBUG_TYPE_UNKNOWN 0
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1933 #define IMAGE_DEBUG_TYPE_COFF 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1934 #define IMAGE_DEBUG_TYPE_CODEVIEW 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1935 #define IMAGE_DEBUG_TYPE_FPO 3
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1936 #define IMAGE_DEBUG_TYPE_MISC 4
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1937 #define IMAGE_DEBUG_TYPE_EXCEPTION 5
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1938 #define IMAGE_DEBUG_TYPE_FIXUP 6
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1939 #define IMAGE_DEBUG_TYPE_OMAP_TO_SRC 7
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1940 #define IMAGE_DEBUG_TYPE_OMAP_FROM_SRC 8
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1941 #define IMAGE_DEBUG_TYPE_BORLAND 9
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1942 #define IMAGE_DEBUG_TYPE_RESERVED10 10
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1943
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1944 typedef struct IMAGE_COFF_SYMBOLS_HEADER {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1945 DWORD NumberOfSymbols;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1946 DWORD LvaToFirstSymbol;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1947 DWORD NumberOfLinenumbers;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1948 DWORD LvaToFirstLinenumber;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1949 DWORD RvaToFirstByteOfCode;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1950 DWORD RvaToLastByteOfCode;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1951 DWORD RvaToFirstByteOfData;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1952 DWORD RvaToLastByteOfData;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1953 } IMAGE_COFF_SYMBOLS_HEADER, *PIMAGE_COFF_SYMBOLS_HEADER;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1954
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1955 #define FRAME_FPO 0
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1956 #define FRAME_TRAP 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1957 #define FRAME_TSS 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1958 #define FRAME_NONFPO 3
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1959
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1960 typedef struct FPO_DATA {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1961 DWORD ulOffStart;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1962 DWORD cbProcSize;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1963 DWORD cdwLocals;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1964 WORD cdwParams;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1965 unsigned cbProlog : 8;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1966 unsigned cbRegs : 3;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1967 unsigned fHasSEH : 1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1968 unsigned fUseBP : 1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1969 unsigned reserved : 1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1970 unsigned cbFrame : 2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1971 } FPO_DATA, *PFPO_DATA;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1972
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1973 typedef struct IMAGE_LOAD_CONFIG_DIRECTORY {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1974 DWORD Characteristics;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1975 DWORD TimeDateStamp;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1976 WORD MajorVersion;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1977 WORD MinorVersion;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1978 DWORD GlobalFlagsClear;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1979 DWORD GlobalFlagsSet;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1980 DWORD CriticalSectionDefaultTimeout;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1981 DWORD DeCommitFreeBlockThreshold;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1982 DWORD DeCommitTotalFreeThreshold;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1983 PVOID LockPrefixTable;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1984 DWORD MaximumAllocationSize;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1985 DWORD VirtualMemoryThreshold;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1986 DWORD ProcessHeapFlags;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1987 DWORD ProcessAffinityMask;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1988 WORD CSDVersion;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1989 WORD Reserved1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1990 PVOID EditList;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1991 DWORD Reserved[1];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1992 } IMAGE_LOAD_CONFIG_DIRECTORY, *PIMAGE_LOAD_CONFIG_DIRECTORY;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1993
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
1994 typedef struct IMAGE_FUNCTION_ENTRY {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1995 DWORD StartingAddress;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1996 DWORD EndingAddress;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1997 DWORD EndOfPrologue;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1998 } IMAGE_FUNCTION_ENTRY, *PIMAGE_FUNCTION_ENTRY;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1999
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2000 /* This is the structure that appears at the very start of a .DBG file. */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2001
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
2002 typedef struct IMAGE_SEPARATE_DEBUG_HEADER {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2003 WORD Signature;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2004 WORD Flags;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2005 WORD Machine;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2006 WORD Characteristics;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2007 DWORD TimeDateStamp;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2008 DWORD CheckSum;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2009 DWORD ImageBase;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2010 DWORD SizeOfImage;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2011 DWORD NumberOfSections;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2012 DWORD ExportedNamesSize;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2013 DWORD DebugDirectorySize;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2014 DWORD SectionAlignment;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2015 DWORD Reserved[ 2 ];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2016 } IMAGE_SEPARATE_DEBUG_HEADER,*PIMAGE_SEPARATE_DEBUG_HEADER;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2017
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2018 #define IMAGE_SEPARATE_DEBUG_SIGNATURE 0x4944
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2019
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2020
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2021 typedef struct tagMESSAGE_RESOURCE_ENTRY {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2022 WORD Length;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2023 WORD Flags;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2024 BYTE Text[1];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2025 } MESSAGE_RESOURCE_ENTRY,*PMESSAGE_RESOURCE_ENTRY;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2026 #define MESSAGE_RESOURCE_UNICODE 0x0001
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2027
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2028 typedef struct tagMESSAGE_RESOURCE_BLOCK {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2029 DWORD LowId;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2030 DWORD HighId;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2031 DWORD OffsetToEntries;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2032 } MESSAGE_RESOURCE_BLOCK,*PMESSAGE_RESOURCE_BLOCK;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2033
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2034 typedef struct tagMESSAGE_RESOURCE_DATA {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2035 DWORD NumberOfBlocks;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2036 MESSAGE_RESOURCE_BLOCK Blocks[ 1 ];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2037 } MESSAGE_RESOURCE_DATA,*PMESSAGE_RESOURCE_DATA;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2038
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2039 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2040 * Here follows typedefs for security and tokens.
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2041 */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2042
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2043 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2044 * First a constant for the following typdefs.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2045 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2046
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2047 #define ANYSIZE_ARRAY 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2048
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2049 /* FIXME: Orphan. What does it point to? */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2050 typedef PVOID PACCESS_TOKEN;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2051
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2052 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2053 * TOKEN_INFORMATION_CLASS
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2054 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2055
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
2056 typedef enum TOKEN_INFORMATION_CLASS {
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2057 TokenUser = 1,
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2058 TokenGroups,
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2059 TokenPrivileges,
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2060 TokenOwner,
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2061 TokenPrimaryGroup,
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2062 TokenDefaultDacl,
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2063 TokenSource,
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2064 TokenType,
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2065 TokenImpersonationLevel,
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2066 TokenStatistics
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2067 } TOKEN_INFORMATION_CLASS;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2068
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
2069 #ifndef SECURITY_DEFINED
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
2070 #define SECURITY_DEFINED
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2071
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2072 #include "pshpack1.h"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2073
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2074 typedef DWORD ACCESS_MASK, *PACCESS_MASK;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2075
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
2076 typedef struct GENERIC_MAPPING {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2077 ACCESS_MASK GenericRead;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2078 ACCESS_MASK GenericWrite;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2079 ACCESS_MASK GenericExecute;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2080 ACCESS_MASK GenericAll;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2081 } GENERIC_MAPPING, *PGENERIC_MAPPING;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2082
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2083 #ifndef SID_IDENTIFIER_AUTHORITY_DEFINED
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2084 #define SID_IDENTIFIER_AUTHORITY_DEFINED
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2085 typedef struct {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2086 BYTE Value[6];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2087 } SID_IDENTIFIER_AUTHORITY,*PSID_IDENTIFIER_AUTHORITY,*LPSID_IDENTIFIER_AUTHORITY;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2088 #endif /* !defined(SID_IDENTIFIER_AUTHORITY_DEFINED) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2089
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2090 #ifndef SID_DEFINED
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2091 #define SID_DEFINED
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
2092 typedef struct SID {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2093 BYTE Revision;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2094 BYTE SubAuthorityCount;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2095 SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2096 DWORD SubAuthority[1];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2097 } SID,*PSID;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2098 #endif /* !defined(SID_DEFINED) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2099
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2100 #define SID_REVISION (1) /* Current revision */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2101 #define SID_MAX_SUB_AUTHORITIES (15) /* current max subauths */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2102 #define SID_RECOMMENDED_SUB_AUTHORITIES (1) /* recommended subauths */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2103
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2104
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2105 /*
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2106 * ACL
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2107 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2108
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2109 #define ACL_REVISION1 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2110 #define ACL_REVISION2 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2111 #define ACL_REVISION3 3
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2112 #define ACL_REVISION4 4
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2113
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2114 #define MIN_ACL_REVISION ACL_REVISION2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2115 #define MAX_ACL_REVISION ACL_REVISION4
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2116
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
2117 typedef struct ACL {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2118 BYTE AclRevision;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2119 BYTE Sbz1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2120 WORD AclSize;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2121 WORD AceCount;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2122 WORD Sbz2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2123 } ACL, *PACL;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2124
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2125 /* SECURITY_DESCRIPTOR */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2126 #define SECURITY_DESCRIPTOR_REVISION 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2127 #define SECURITY_DESCRIPTOR_REVISION1 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2128
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2129
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2130 #define SE_OWNER_DEFAULTED 0x0001
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2131 #define SE_GROUP_DEFAULTED 0x0002
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2132 #define SE_DACL_PRESENT 0x0004
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2133 #define SE_DACL_DEFAULTED 0x0008
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2134 #define SE_SACL_PRESENT 0x0010
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2135 #define SE_SACL_DEFAULTED 0x0020
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2136 #define SE_SELF_RELATIVE 0x8000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2137
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2138 typedef DWORD SECURITY_INFORMATION, *PSECURITY_INFORMATION;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2139 typedef WORD SECURITY_DESCRIPTOR_CONTROL, *PSECURITY_DESCRIPTOR_CONTROL;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2140
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2141 /* The security descriptor structure */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2142 typedef struct {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2143 BYTE Revision;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2144 BYTE Sbz1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2145 SECURITY_DESCRIPTOR_CONTROL Control;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2146 DWORD Owner;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2147 DWORD Group;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2148 DWORD Sacl;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2149 DWORD Dacl;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2150 } SECURITY_DESCRIPTOR_RELATIVE, *PISECURITY_DESCRIPTOR_RELATIVE;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2151
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2152 typedef struct {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2153 BYTE Revision;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2154 BYTE Sbz1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2155 SECURITY_DESCRIPTOR_CONTROL Control;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2156 PSID Owner;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2157 PSID Group;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2158 PACL Sacl;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2159 PACL Dacl;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2160 } SECURITY_DESCRIPTOR, *PSECURITY_DESCRIPTOR;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2161
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2162 #define SECURITY_DESCRIPTOR_MIN_LENGTH (sizeof(SECURITY_DESCRIPTOR))
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2163
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2164 #include "poppack.h"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2165
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
2166 #endif /* SECURITY_DEFINED */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2167
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2168 #include "pshpack1.h"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2169
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2170 /*
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2171 * SID_AND_ATTRIBUTES
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2172 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2173
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
2174 typedef struct SID_AND_ATTRIBUTES {
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2175 PSID Sid;
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2176 DWORD Attributes;
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2177 } SID_AND_ATTRIBUTES ;
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2178
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2179 /* security entities */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2180 #define SECURITY_NULL_RID (0x00000000L)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2181 #define SECURITY_WORLD_RID (0x00000000L)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2182 #define SECURITY_LOCAL_RID (0X00000000L)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2183
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2184 #define SECURITY_NULL_SID_AUTHORITY {0,0,0,0,0,0}
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2185
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2186 /* S-1-1 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2187 #define SECURITY_WORLD_SID_AUTHORITY {0,0,0,0,0,1}
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2188
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2189 /* S-1-2 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2190 #define SECURITY_LOCAL_SID_AUTHORITY {0,0,0,0,0,2}
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2191
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2192 /* S-1-3 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2193 #define SECURITY_CREATOR_SID_AUTHORITY {0,0,0,0,0,3}
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2194 #define SECURITY_CREATOR_OWNER_RID (0x00000000L)
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2195 #define SECURITY_CREATOR_GROUP_RID (0x00000001L)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2196 #define SECURITY_CREATOR_OWNER_SERVER_RID (0x00000002L)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2197 #define SECURITY_CREATOR_GROUP_SERVER_RID (0x00000003L)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2198
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2199 /* S-1-4 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2200 #define SECURITY_NON_UNIQUE_AUTHORITY {0,0,0,0,0,4}
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2201
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2202 /* S-1-5 */
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2203 #define SECURITY_NT_AUTHORITY {0,0,0,0,0,5}
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2204 #define SECURITY_DIALUP_RID 0x00000001L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2205 #define SECURITY_NETWORK_RID 0x00000002L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2206 #define SECURITY_BATCH_RID 0x00000003L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2207 #define SECURITY_INTERACTIVE_RID 0x00000004L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2208 #define SECURITY_LOGON_IDS_RID 0x00000005L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2209 #define SECURITY_SERVICE_RID 0x00000006L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2210 #define SECURITY_ANONYMOUS_LOGON_RID 0x00000007L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2211 #define SECURITY_PROXY_RID 0x00000008L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2212 #define SECURITY_ENTERPRISE_CONTROLLERS_RID 0x00000009L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2213 #define SECURITY_PRINCIPAL_SELF_RID 0x0000000AL
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2214 #define SECURITY_AUTHENTICATED_USER_RID 0x0000000BL
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2215 #define SECURITY_RESTRICTED_CODE_RID 0x0000000CL
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2216 #define SECURITY_TERMINAL_SERVER_RID 0x0000000DL
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2217 #define SECURITY_LOCAL_SYSTEM_RID 0x00000012L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2218 #define SECURITY_NT_NON_UNIQUE 0x00000015L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2219 #define SECURITY_BUILTIN_DOMAIN_RID 0x00000020L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2220
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2221 #define DOMAIN_GROUP_RID_ADMINS 0x00000200L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2222 #define DOMAIN_GROUP_RID_USERS 0x00000201L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2223 #define DOMAIN_GROUP_RID_GUESTS 0x00000202L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2224
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2225 #define DOMAIN_ALIAS_RID_ADMINS 0x00000220L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2226 #define DOMAIN_ALIAS_RID_USERS 0x00000221L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2227 #define DOMAIN_ALIAS_RID_GUESTS 0x00000222L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2228
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2229 #define SECURITY_SERVER_LOGON_RID SECURITY_ENTERPRISE_CONTROLLERS_RID
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2230
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2231 #define SECURITY_LOGON_IDS_RID_COUNT (3L)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2232
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2233 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2234 * TOKEN_USER
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2235 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2236
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
2237 typedef struct TOKEN_USER {
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2238 SID_AND_ATTRIBUTES User;
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2239 } TOKEN_USER;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2240
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2241 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2242 * TOKEN_GROUPS
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2243 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2244
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
2245 typedef struct TOKEN_GROUPS {
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2246 DWORD GroupCount;
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2247 SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY];
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2248 } TOKEN_GROUPS;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2249
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2250 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2251 * LUID_AND_ATTRIBUTES
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2252 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2253
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
2254 typedef union LARGE_INTEGER {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2255 struct {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2256 DWORD LowPart;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2257 LONG HighPart;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2258 } DUMMYSTRUCTNAME;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2259 LONGLONG QuadPart;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2260 } LARGE_INTEGER, *LPLARGE_INTEGER, *PLARGE_INTEGER;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2261
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
2262 typedef union ULARGE_INTEGER {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2263 struct {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2264 DWORD LowPart;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2265 LONG HighPart;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2266 } DUMMYSTRUCTNAME;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2267 LONGLONG QuadPart;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2268 } ULARGE_INTEGER, *LPULARGE_INTEGER, *PULARGE_INTEGER;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2269
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2270 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2271 * Locally Unique Identifier
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2272 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2273
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2274 typedef LARGE_INTEGER LUID,*PLUID;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2275
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
2276 typedef struct LUID_AND_ATTRIBUTES {
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2277 LUID Luid;
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2278 DWORD Attributes;
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2279 } LUID_AND_ATTRIBUTES;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2280
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2281 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2282 * PRIVILEGE_SET
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2283 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2284
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
2285 typedef struct PRIVILEGE_SET {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2286 DWORD PrivilegeCount;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2287 DWORD Control;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2288 LUID_AND_ATTRIBUTES Privilege[ANYSIZE_ARRAY];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2289 } PRIVILEGE_SET, *PPRIVILEGE_SET;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2290
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2291 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2292 * TOKEN_PRIVILEGES
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2293 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2294
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
2295 typedef struct TOKEN_PRIVILEGES {
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2296 DWORD PrivilegeCount;
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2297 LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY];
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2298 } TOKEN_PRIVILEGES, *PTOKEN_PRIVILEGES;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2299
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2300 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2301 * TOKEN_OWNER
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2302 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2303
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
2304 typedef struct TOKEN_OWNER {
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2305 PSID Owner;
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2306 } TOKEN_OWNER;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2307
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2308 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2309 * TOKEN_PRIMARY_GROUP
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2310 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2311
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
2312 typedef struct TOKEN_PRIMARY_GROUP {
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2313 PSID PrimaryGroup;
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2314 } TOKEN_PRIMARY_GROUP;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2315
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2316
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2317 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2318 * TOKEN_DEFAULT_DACL
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2319 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2320
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
2321 typedef struct TOKEN_DEFAULT_DACL {
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2322 PACL DefaultDacl;
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2323 } TOKEN_DEFAULT_DACL;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2324
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2325 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2326 * TOKEN_SOURCEL
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2327 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2328
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
2329 typedef struct TOKEN_SOURCE {
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2330 char Sourcename[8];
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2331 LUID SourceIdentifier;
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2332 } TOKEN_SOURCE;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2333
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2334 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2335 * TOKEN_TYPE
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2336 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2337
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2338 typedef enum tagTOKEN_TYPE {
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2339 TokenPrimary = 1,
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2340 TokenImpersonation
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2341 } TOKEN_TYPE;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2342
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2343 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2344 * SECURITY_IMPERSONATION_LEVEL
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2345 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2346
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
2347 typedef enum SECURITY_IMPERSONATION_LEVEL {
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2348 SecurityAnonymous,
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2349 SecurityIdentification,
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2350 SecurityImpersonation,
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2351 SecurityDelegation
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2352 } SECURITY_IMPERSONATION_LEVEL, *PSECURITY_IMPERSONATION_LEVEL;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2353
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2354
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2355 typedef BOOLEAN SECURITY_CONTEXT_TRACKING_MODE,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2356 * PSECURITY_CONTEXT_TRACKING_MODE;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2357 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2358 * Quality of Service
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2359 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2360
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
2361 typedef struct SECURITY_QUALITY_OF_SERVICE {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2362 DWORD Length;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2363 SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2364 SECURITY_CONTEXT_TRACKING_MODE ContextTrackingMode;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2365 WIN_BOOL EffectiveOnly;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2366 } SECURITY_QUALITY_OF_SERVICE, *PSECURITY_QUALITY_OF_SERVICE;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2367
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2368 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2369 * TOKEN_STATISTICS
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2370 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2371
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
2372 typedef struct TOKEN_STATISTICS {
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2373 LUID TokenId;
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2374 LUID AuthenticationId;
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2375 LARGE_INTEGER ExpirationTime;
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2376 TOKEN_TYPE TokenType;
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2377 SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2378 DWORD DynamicCharged;
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2379 DWORD DynamicAvailable;
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2380 DWORD GroupCount;
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2381 DWORD PrivilegeCount;
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2382 LUID ModifiedId;
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2383 } TOKEN_STATISTICS;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2384
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2385 /*
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2386 * ACLs of NT
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2387 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2388
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2389 #define ACL_REVISION 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2390
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2391 #define ACL_REVISION1 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2392 #define ACL_REVISION2 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2393
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2394 /* ACEs, directly starting after an ACL */
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
2395 typedef struct ACE_HEADER {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2396 BYTE AceType;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2397 BYTE AceFlags;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2398 WORD AceSize;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2399 } ACE_HEADER,*PACE_HEADER;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2400
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2401 /* AceType */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2402 #define ACCESS_ALLOWED_ACE_TYPE 0
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2403 #define ACCESS_DENIED_ACE_TYPE 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2404 #define SYSTEM_AUDIT_ACE_TYPE 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2405 #define SYSTEM_ALARM_ACE_TYPE 3
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2406
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2407 /* inherit AceFlags */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2408 #define OBJECT_INHERIT_ACE 0x01
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2409 #define CONTAINER_INHERIT_ACE 0x02
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2410 #define NO_PROPAGATE_INHERIT_ACE 0x04
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2411 #define INHERIT_ONLY_ACE 0x08
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2412 #define VALID_INHERIT_FLAGS 0x0F
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2413
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2414 /* AceFlags mask for what events we (should) audit */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2415 #define SUCCESSFUL_ACCESS_ACE_FLAG 0x40
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2416 #define FAILED_ACCESS_ACE_FLAG 0x80
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2417
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2418 /* different ACEs depending on AceType
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2419 * SidStart marks the begin of a SID
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2420 * so the thing finally looks like this:
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2421 * 0: ACE_HEADER
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2422 * 4: ACCESS_MASK
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2423 * 8... : SID
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2424 */
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
2425 typedef struct ACCESS_ALLOWED_ACE {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2426 ACE_HEADER Header;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2427 DWORD Mask;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2428 DWORD SidStart;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2429 } ACCESS_ALLOWED_ACE,*PACCESS_ALLOWED_ACE;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2430
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
2431 typedef struct ACCESS_DENIED_ACE {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2432 ACE_HEADER Header;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2433 DWORD Mask;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2434 DWORD SidStart;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2435 } ACCESS_DENIED_ACE,*PACCESS_DENIED_ACE;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2436
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
2437 typedef struct SYSTEM_AUDIT_ACE {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2438 ACE_HEADER Header;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2439 DWORD Mask;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2440 DWORD SidStart;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2441 } SYSTEM_AUDIT_ACE,*PSYSTEM_AUDIT_ACE;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2442
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
2443 typedef struct SYSTEM_ALARM_ACE {
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2444 ACE_HEADER Header;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2445 DWORD Mask;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2446 DWORD SidStart;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2447 } SYSTEM_ALARM_ACE,*PSYSTEM_ALARM_ACE;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2448
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2449 typedef enum tagSID_NAME_USE {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2450 SidTypeUser = 1,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2451 SidTypeGroup,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2452 SidTypeDomain,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2453 SidTypeAlias,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2454 SidTypeWellKnownGroup,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2455 SidTypeDeletedAccount,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2456 SidTypeInvalid,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2457 SidTypeUnknown
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2458 } SID_NAME_USE,*PSID_NAME_USE;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2459
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2460 /* Access rights */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2461
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2462 #define DELETE 0x00010000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2463 #define READ_CONTROL 0x00020000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2464 #define WRITE_DAC 0x00040000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2465 #define WRITE_OWNER 0x00080000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2466 #define SYNCHRONIZE 0x00100000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2467 #define STANDARD_RIGHTS_REQUIRED 0x000f0000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2468
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2469 #define STANDARD_RIGHTS_READ READ_CONTROL
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2470 #define STANDARD_RIGHTS_WRITE READ_CONTROL
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2471 #define STANDARD_RIGHTS_EXECUTE READ_CONTROL
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2472
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2473 #define STANDARD_RIGHTS_ALL 0x001f0000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2474
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2475 #define SPECIFIC_RIGHTS_ALL 0x0000ffff
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2476
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2477 #define GENERIC_READ 0x80000000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2478 #define GENERIC_WRITE 0x40000000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2479 #define GENERIC_EXECUTE 0x20000000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2480 #define GENERIC_ALL 0x10000000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2481
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2482 #define MAXIMUM_ALLOWED 0x02000000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2483 #define ACCESS_SYSTEM_SECURITY 0x01000000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2484
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2485 #define EVENT_MODIFY_STATE 0x0002
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2486 #define EVENT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2487
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2488 #define SEMAPHORE_MODIFY_STATE 0x0002
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2489 #define SEMAPHORE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2490
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2491 #define MUTEX_MODIFY_STATE 0x0001
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2492 #define MUTEX_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x1)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2493
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2494 #define PROCESS_TERMINATE 0x0001
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2495 #define PROCESS_CREATE_THREAD 0x0002
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2496 #define PROCESS_VM_OPERATION 0x0008
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2497 #define PROCESS_VM_READ 0x0010
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2498 #define PROCESS_VM_WRITE 0x0020
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2499 #define PROCESS_DUP_HANDLE 0x0040
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2500 #define PROCESS_CREATE_PROCESS 0x0080
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2501 #define PROCESS_SET_QUOTA 0x0100
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2502 #define PROCESS_SET_INFORMATION 0x0200
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2503 #define PROCESS_QUERY_INFORMATION 0x0400
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2504 #define PROCESS_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0xfff)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2505
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2506 #define THREAD_TERMINATE 0x0001
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2507 #define THREAD_SUSPEND_RESUME 0x0002
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2508 #define THREAD_GET_CONTEXT 0x0008
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2509 #define THREAD_SET_CONTEXT 0x0010
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2510 #define THREAD_SET_INFORMATION 0x0020
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2511 #define THREAD_QUERY_INFORMATION 0x0040
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2512 #define THREAD_SET_THREAD_TOKEN 0x0080
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2513 #define THREAD_IMPERSONATE 0x0100
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2514 #define THREAD_DIRECT_IMPERSONATION 0x0200
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2515 #define THREAD_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3ff)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2516
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2517 #define THREAD_BASE_PRIORITY_LOWRT 15
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
2518 #define THREAD_BASE_PRIORITY_MAX 2
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2519 #define THREAD_BASE_PRIORITY_MIN -2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2520 #define THREAD_BASE_PRIORITY_IDLE -15
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2521
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2522 #define FILE_READ_DATA 0x0001 /* file & pipe */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2523 #define FILE_LIST_DIRECTORY 0x0001 /* directory */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2524 #define FILE_WRITE_DATA 0x0002 /* file & pipe */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2525 #define FILE_ADD_FILE 0x0002 /* directory */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2526 #define FILE_APPEND_DATA 0x0004 /* file */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2527 #define FILE_ADD_SUBDIRECTORY 0x0004 /* directory */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2528 #define FILE_CREATE_PIPE_INSTANCE 0x0004 /* named pipe */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2529 #define FILE_READ_EA 0x0008 /* file & directory */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2530 #define FILE_READ_PROPERTIES FILE_READ_EA
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2531 #define FILE_WRITE_EA 0x0010 /* file & directory */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2532 #define FILE_WRITE_PROPERTIES FILE_WRITE_EA
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2533 #define FILE_EXECUTE 0x0020 /* file */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2534 #define FILE_TRAVERSE 0x0020 /* directory */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2535 #define FILE_DELETE_CHILD 0x0040 /* directory */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2536 #define FILE_READ_ATTRIBUTES 0x0080 /* all */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2537 #define FILE_WRITE_ATTRIBUTES 0x0100 /* all */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2538 #define FILE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x1ff)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2539
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2540 #define FILE_GENERIC_READ (STANDARD_RIGHTS_READ | FILE_READ_DATA | \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2541 FILE_READ_ATTRIBUTES | FILE_READ_EA | \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2542 SYNCHRONIZE)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2543 #define FILE_GENERIC_WRITE (STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA | \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2544 FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2545 FILE_APPEND_DATA | SYNCHRONIZE)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2546 #define FILE_GENERIC_EXECUTE (STANDARD_RIGHTS_EXECUTE | FILE_EXECUTE | \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2547 FILE_READ_ATTRIBUTES | SYNCHRONIZE)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2548
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2549
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2550 /* File attribute flags
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2551 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2552 #define FILE_SHARE_READ 0x00000001L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2553 #define FILE_SHARE_WRITE 0x00000002L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2554 #define FILE_SHARE_DELETE 0x00000004L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2555 #define FILE_ATTRIBUTE_READONLY 0x00000001L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2556 #define FILE_ATTRIBUTE_HIDDEN 0x00000002L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2557 #define FILE_ATTRIBUTE_SYSTEM 0x00000004L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2558 #define FILE_ATTRIBUTE_LABEL 0x00000008L /* Not in Windows API */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2559 #define FILE_ATTRIBUTE_DIRECTORY 0x00000010L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2560 #define FILE_ATTRIBUTE_ARCHIVE 0x00000020L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2561 #define FILE_ATTRIBUTE_NORMAL 0x00000080L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2562 #define FILE_ATTRIBUTE_TEMPORARY 0x00000100L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2563 #define FILE_ATTRIBUTE_ATOMIC_WRITE 0x00000200L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2564 #define FILE_ATTRIBUTE_XACTION_WRITE 0x00000400L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2565 #define FILE_ATTRIBUTE_COMPRESSED 0x00000800L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2566 #define FILE_ATTRIBUTE_OFFLINE 0x00001000L
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2567
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2568 /* File alignments (NT) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2569 #define FILE_BYTE_ALIGNMENT 0x00000000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2570 #define FILE_WORD_ALIGNMENT 0x00000001
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2571 #define FILE_LONG_ALIGNMENT 0x00000003
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2572 #define FILE_QUAD_ALIGNMENT 0x00000007
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2573 #define FILE_OCTA_ALIGNMENT 0x0000000f
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2574 #define FILE_32_BYTE_ALIGNMENT 0x0000001f
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2575 #define FILE_64_BYTE_ALIGNMENT 0x0000003f
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2576 #define FILE_128_BYTE_ALIGNMENT 0x0000007f
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2577 #define FILE_256_BYTE_ALIGNMENT 0x000000ff
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2578 #define FILE_512_BYTE_ALIGNMENT 0x000001ff
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2579
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2580 #define REG_NONE 0 /* no type */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2581 #define REG_SZ 1 /* string type (ASCII) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2582 #define REG_EXPAND_SZ 2 /* string, includes %ENVVAR% (expanded by caller) (ASCII) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2583 #define REG_BINARY 3 /* binary format, callerspecific */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2584 /* YES, REG_DWORD == REG_DWORD_LITTLE_ENDIAN */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2585 #define REG_DWORD 4 /* DWORD in little endian format */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2586 #define REG_DWORD_LITTLE_ENDIAN 4 /* DWORD in little endian format */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2587 #define REG_DWORD_BIG_ENDIAN 5 /* DWORD in big endian format */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2588 #define REG_LINK 6 /* symbolic link (UNICODE) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2589 #define REG_MULTI_SZ 7 /* multiple strings, delimited by \0, terminated by \0\0 (ASCII) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2590 #define REG_RESOURCE_LIST 8 /* resource list? huh? */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2591 #define REG_FULL_RESOURCE_DESCRIPTOR 9 /* full resource descriptor? huh? */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2592 #define REG_RESOURCE_REQUIREMENTS_LIST 10
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2593
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2594 /* ----------------------------- begin registry ----------------------------- */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2595
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2596 /* Registry security values */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2597 #define OWNER_SECURITY_INFORMATION 0x00000001
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2598 #define GROUP_SECURITY_INFORMATION 0x00000002
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2599 #define DACL_SECURITY_INFORMATION 0x00000004
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2600 #define SACL_SECURITY_INFORMATION 0x00000008
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2601
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2602 #define REG_OPTION_RESERVED 0x00000000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2603 #define REG_OPTION_NON_VOLATILE 0x00000000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2604 #define REG_OPTION_VOLATILE 0x00000001
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2605 #define REG_OPTION_CREATE_LINK 0x00000002
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2606 #define REG_OPTION_BACKUP_RESTORE 0x00000004 /* FIXME */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2607 #define REG_OPTION_OPEN_LINK 0x00000008
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2608 #define REG_LEGAL_OPTION (REG_OPTION_RESERVED| \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2609 REG_OPTION_NON_VOLATILE| \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2610 REG_OPTION_VOLATILE| \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2611 REG_OPTION_CREATE_LINK| \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2612 REG_OPTION_BACKUP_RESTORE| \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2613 REG_OPTION_OPEN_LINK)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2614
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2615
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2616 #define REG_CREATED_NEW_KEY 0x00000001
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2617 #define REG_OPENED_EXISTING_KEY 0x00000002
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2618
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2619 /* For RegNotifyChangeKeyValue */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2620 #define REG_NOTIFY_CHANGE_NAME 0x1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2621
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2622 #define KEY_QUERY_VALUE 0x00000001
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2623 #define KEY_SET_VALUE 0x00000002
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2624 #define KEY_CREATE_SUB_KEY 0x00000004
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2625 #define KEY_ENUMERATE_SUB_KEYS 0x00000008
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2626 #define KEY_NOTIFY 0x00000010
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2627 #define KEY_CREATE_LINK 0x00000020
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2628
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2629 #define KEY_READ ((STANDARD_RIGHTS_READ| \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2630 KEY_QUERY_VALUE| \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2631 KEY_ENUMERATE_SUB_KEYS| \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2632 KEY_NOTIFY) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2633 & (~SYNCHRONIZE) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2634 )
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2635 #define KEY_WRITE ((STANDARD_RIGHTS_WRITE| \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2636 KEY_SET_VALUE| \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2637 KEY_CREATE_SUB_KEY) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2638 & (~SYNCHRONIZE) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2639 )
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2640 #define KEY_EXECUTE ((KEY_READ) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2641 & (~SYNCHRONIZE)) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2642 )
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2643 #define KEY_ALL_ACCESS ((STANDARD_RIGHTS_ALL| \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2644 KEY_QUERY_VALUE| \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2645 KEY_SET_VALUE| \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2646 KEY_CREATE_SUB_KEY| \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2647 KEY_ENUMERATE_SUB_KEYS| \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2648 KEY_NOTIFY| \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2649 KEY_CREATE_LINK) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2650 & (~SYNCHRONIZE) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2651 )
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2652 /* ------------------------------ end registry ------------------------------ */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2653
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2654
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2655 #define RtlEqualMemory(Destination, Source, Length) (!memcmp((Destination),(Source),(Length)))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2656 #define RtlMoveMemory(Destination, Source, Length) memmove((Destination),(Source),(Length))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2657 #define RtlCopyMemory(Destination, Source, Length) memcpy((Destination),(Source),(Length))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2658 #define RtlFillMemory(Destination, Length, Fill) memset((Destination),(Fill),(Length))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2659 #define RtlZeroMemory(Destination, Length) memset((Destination),0,(Length))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2660
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2661 #include "poppack.h"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2662
26045
a8ea87c71d18 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25794
diff changeset
2663 #endif /* MPLAYER_WINNT_H */