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