source: trunk/include/win/winnt.h@ 5200

Last change on this file since 5200 was 4834, checked in by sandervl, 25 years ago

update

File size: 48.5 KB
Line 
1/*
2 * Win32 definitions for Windows NT
3 *
4 * Copyright 1996 Alexandre Julliard
5 */
6
7#ifndef __WINE_WINNT_H
8#define __WINE_WINNT_H
9
10#include "windef.h"
11
12#include "pshpack1.h"
13/* Defines */
14
15#define UNREFERENCED_PARAMETER(a)
16
17/* Argument 1 passed to the DllEntryProc. */
18#define DLL_PROCESS_DETACH 0 /* detach process (unload library) */
19#define DLL_PROCESS_ATTACH 1 /* attach process (load library) */
20#define DLL_THREAD_ATTACH 2 /* attach new thread */
21#define DLL_THREAD_DETACH 3 /* detach thread */
22
23
24/* u.x.wProcessorArchitecture (NT) */
25#define PROCESSOR_ARCHITECTURE_INTEL 0
26#define PROCESSOR_ARCHITECTURE_MIPS 1
27#define PROCESSOR_ARCHITECTURE_ALPHA 2
28#define PROCESSOR_ARCHITECTURE_PPC 3
29#define PROCESSOR_ARCHITECTURE_SHX 4
30#define PROCESSOR_ARCHITECTURE_ARM 5
31#define PROCESSOR_ARCHITECTURE_UNKNOWN 0xFFFF
32
33/* dwProcessorType */
34#define PROCESSOR_INTEL_386 386
35#define PROCESSOR_INTEL_486 486
36#define PROCESSOR_INTEL_PENTIUM 586
37#define PROCESSOR_INTEL_860 860
38#define PROCESSOR_MIPS_R2000 2000
39#define PROCESSOR_MIPS_R3000 3000
40#define PROCESSOR_MIPS_R4000 4000
41#define PROCESSOR_ALPHA_21064 21064
42#define PROCESSOR_PPC_601 601
43#define PROCESSOR_PPC_603 603
44#define PROCESSOR_PPC_604 604
45#define PROCESSOR_PPC_620 620
46#define PROCESSOR_HITACHI_SH3 10003
47#define PROCESSOR_HITACHI_SH3E 10004
48#define PROCESSOR_HITACHI_SH4 10005
49#define PROCESSOR_MOTOROLA_821 821
50#define PROCESSOR_SHx_SH3 103
51#define PROCESSOR_SHx_SH4 104
52#define PROCESSOR_STRONGARM 2577
53#define PROCESSOR_ARM720 1824 /* 0x720 */
54#define PROCESSOR_ARM820 2080 /* 0x820 */
55#define PROCESSOR_ARM920 2336 /* 0x920 */
56#define PROCESSOR_ARM_7TDMI 70001
57
58#define ANYSIZE_ARRAY 1
59
60#define MINCHAR 0x80
61#define MAXCHAR 0x7f
62#define MINSHORT 0x8000
63#define MAXSHORT 0x7fff
64#define MINLONG 0x80000000
65#define MAXLONG 0x7fffffff
66#define MAXBYTE 0xff
67#define MAXWORD 0xffff
68#define MAXDWORD 0xffffffff
69
70#define FIELD_OFFSET(type, field) \
71 ((LONG)(INT)&(((type *)0)->field))
72
73#define CONTAINING_RECORD(address, type, field) \
74 ((type *)((PCHAR)(address) - (PCHAR)(&((type *)0)->field)))
75
76/* Types */
77
78/* TCHAR data types definitions for Winelib. */
79/* These types are _not_ defined for the emulator, because they */
80/* depend on the UNICODE macro that only exists in user's code. */
81
82#if !defined(__WINE__) && !defined(__WINE_WINDEF_H)
83# ifdef UNICODE
84typedef LPWSTR LPTSTR;
85typedef LPCWSTR LPCTSTR;
86#define __TEXT(string) L##string /*probably wrong */
87# else /* UNICODE */
88typedef LPSTR LPTSTR;
89typedef LPCSTR LPCTSTR;
90#define __TEXT(string) string
91# endif /* UNICODE */
92#endif /* __WINE__ */
93#define TEXT(quote) __TEXT(quote)
94
95typedef BYTE BOOLEAN;
96typedef BOOLEAN *PBOOLEAN;
97
98typedef struct _LIST_ENTRY {
99 struct _LIST_ENTRY *Flink;
100 struct _LIST_ENTRY *Blink;
101} LIST_ENTRY, *PLIST_ENTRY;
102
103typedef struct _SINGLE_LIST_ENTRY {
104 struct _SINGLE_LIST_ENTRY *Next;
105} SINGLE_LIST_ENTRY, *PSINGLE_LIST_ENTRY;
106
107/* Heap flags */
108
109#define HEAP_NO_SERIALIZE 0x00000001
110#define HEAP_GROWABLE 0x00000002
111#define HEAP_GENERATE_EXCEPTIONS 0x00000004
112#define HEAP_ZERO_MEMORY 0x00000008
113#define HEAP_REALLOC_IN_PLACE_ONLY 0x00000010
114#define HEAP_TAIL_CHECKING_ENABLED 0x00000020
115#define HEAP_FREE_CHECKING_ENABLED 0x00000040
116#define HEAP_DISABLE_COALESCE_ON_FREE 0x00000080
117#define HEAP_CREATE_ALIGN_16 0x00010000
118#define HEAP_CREATE_ENABLE_TRACING 0x00020000
119#define HEAP_WINE_SEGPTR 0x01000000 /* Not a Win32 flag */
120#define HEAP_WINE_CODESEG 0x02000000 /* Not a Win32 flag */
121#define HEAP_WINE_CODE16SEG 0x04000000 /* Not a Win32 flag */
122
123/* Processor feature flags. */
124#define PF_FLOATING_POINT_PRECISION_ERRATA 0
125#define PF_FLOATING_POINT_EMULATED 1
126#define PF_COMPARE_EXCHANGE_DOUBLE 2
127#define PF_MMX_INSTRUCTIONS_AVAILABLE 3
128#define PF_PPC_MOVEMEM_64BIT_OK 4
129#define PF_ALPHA_BYTE_INSTRUCTIONS 5
130
131
132/* The Win32 register context */
133
134/* CONTEXT is the CPU-dependent context; it should be used */
135/* wherever a platform-specific context is needed (e.g. exception */
136/* handling, Win32 register functions). */
137
138/* CONTEXT86 is the i386-specific context; it should be used */
139/* wherever only a 386 context makes sense (e.g. DOS interrupts, */
140/* Win16 register functions), so that this code can be compiled */
141/* on all platforms. */
142
143#define SIZE_OF_80387_REGISTERS 80
144
145typedef struct _FLOATING_SAVE_AREA
146{
147 DWORD ControlWord;
148 DWORD StatusWord;
149 DWORD TagWord;
150 DWORD ErrorOffset;
151 DWORD ErrorSelector;
152 DWORD DataOffset;
153 DWORD DataSelector;
154 BYTE RegisterArea[SIZE_OF_80387_REGISTERS];
155 DWORD Cr0NpxState;
156} FLOATING_SAVE_AREA, *PFLOATING_SAVE_AREA;
157
158typedef struct _CONTEXT86
159{
160 DWORD ContextFlags;
161
162 /* These are selected by CONTEXT_DEBUG_REGISTERS */
163 DWORD Dr0;
164 DWORD Dr1;
165 DWORD Dr2;
166 DWORD Dr3;
167 DWORD Dr6;
168 DWORD Dr7;
169
170 /* These are selected by CONTEXT_FLOATING_POINT */
171 FLOATING_SAVE_AREA FloatSave;
172
173 /* These are selected by CONTEXT_SEGMENTS */
174 DWORD SegGs;
175 DWORD SegFs;
176 DWORD SegEs;
177 DWORD SegDs;
178
179 /* These are selected by CONTEXT_INTEGER */
180 DWORD Edi;
181 DWORD Esi;
182 DWORD Ebx;
183 DWORD Edx;
184 DWORD Ecx;
185 DWORD Eax;
186
187 /* These are selected by CONTEXT_CONTROL */
188 DWORD Ebp;
189 DWORD Eip;
190 DWORD SegCs;
191 DWORD EFlags;
192 DWORD Esp;
193 DWORD SegSs;
194} CONTEXT86;
195
196#define CONTEXT_X86 0x00010000
197#define CONTEXT_i386 CONTEXT_X86
198#define CONTEXT_i486 CONTEXT_X86
199
200#define CONTEXT86_CONTROL (CONTEXT_i386 | 0x0001) /* SS:SP, CS:IP, FLAGS, BP */
201#define CONTEXT86_INTEGER (CONTEXT_i386 | 0x0002) /* AX, BX, CX, DX, SI, DI */
202#define CONTEXT86_SEGMENTS (CONTEXT_i386 | 0x0004) /* DS, ES, FS, GS */
203#define CONTEXT86_FLOATING_POINT (CONTEXT_i386 | 0x0008L) /* 387 state */
204#define CONTEXT86_DEBUG_REGISTERS (CONTEXT_i386 | 0x0010L) /* DB 0-3,6,7 */
205#define CONTEXT86_FULL (CONTEXT86_CONTROL | CONTEXT86_INTEGER | CONTEXT86_SEGMENTS)
206
207/* i386 context definitions */
208#ifdef __i386__
209
210#define CONTEXT_CONTROL CONTEXT86_CONTROL
211#define CONTEXT_INTEGER CONTEXT86_INTEGER
212#define CONTEXT_SEGMENTS CONTEXT86_SEGMENTS
213#define CONTEXT_FLOATING_POINT CONTEXT86_FLOATING_POINT
214#define CONTEXT_DEBUG_REGISTERS CONTEXT86_DEBUG_REGISTERS
215#define CONTEXT_FULL CONTEXT86_FULL
216
217typedef CONTEXT86 CONTEXT;
218
219#endif /* __i386__ */
220
221/* Alpha context definitions */
222#ifdef _ALPHA_
223
224#define CONTEXT_ALPHA 0x00020000
225
226#define CONTEXT_CONTROL (CONTEXT_ALPHA | 0x00000001L)
227#define CONTEXT_FLOATING_POINT (CONTEXT_ALPHA | 0x00000002L)
228#define CONTEXT_INTEGER (CONTEXT_ALPHA | 0x00000004L)
229#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER)
230
231typedef struct _CONTEXT
232{
233 /* selected by CONTEXT_FLOATING_POINT */
234 ULONGLONG FltF0;
235 ULONGLONG FltF1;
236 ULONGLONG FltF2;
237 ULONGLONG FltF3;
238 ULONGLONG FltF4;
239 ULONGLONG FltF5;
240 ULONGLONG FltF6;
241 ULONGLONG FltF7;
242 ULONGLONG FltF8;
243 ULONGLONG FltF9;
244 ULONGLONG FltF10;
245 ULONGLONG FltF11;
246 ULONGLONG FltF12;
247 ULONGLONG FltF13;
248 ULONGLONG FltF14;
249 ULONGLONG FltF15;
250 ULONGLONG FltF16;
251 ULONGLONG FltF17;
252 ULONGLONG FltF18;
253 ULONGLONG FltF19;
254 ULONGLONG FltF20;
255 ULONGLONG FltF21;
256 ULONGLONG FltF22;
257 ULONGLONG FltF23;
258 ULONGLONG FltF24;
259 ULONGLONG FltF25;
260 ULONGLONG FltF26;
261 ULONGLONG FltF27;
262 ULONGLONG FltF28;
263 ULONGLONG FltF29;
264 ULONGLONG FltF30;
265 ULONGLONG FltF31;
266
267 /* selected by CONTEXT_INTEGER */
268 ULONGLONG IntV0;
269 ULONGLONG IntT0;
270 ULONGLONG IntT1;
271 ULONGLONG IntT2;
272 ULONGLONG IntT3;
273 ULONGLONG IntT4;
274 ULONGLONG IntT5;
275 ULONGLONG IntT6;
276 ULONGLONG IntT7;
277 ULONGLONG IntS0;
278 ULONGLONG IntS1;
279 ULONGLONG IntS2;
280 ULONGLONG IntS3;
281 ULONGLONG IntS4;
282 ULONGLONG IntS5;
283 ULONGLONG IntFp;
284 ULONGLONG IntA0;
285 ULONGLONG IntA1;
286 ULONGLONG IntA2;
287 ULONGLONG IntA3;
288 ULONGLONG IntA4;
289 ULONGLONG IntA5;
290 ULONGLONG IntT8;
291 ULONGLONG IntT9;
292 ULONGLONG IntT10;
293 ULONGLONG IntT11;
294 ULONGLONG IntRa;
295 ULONGLONG IntT12;
296 ULONGLONG IntAt;
297 ULONGLONG IntGp;
298 ULONGLONG IntSp;
299 ULONGLONG IntZero;
300
301 /* selected by CONTEXT_FLOATING_POINT */
302 ULONGLONG Fpcr;
303 ULONGLONG SoftFpcr;
304
305 /* selected by CONTEXT_CONTROL */
306 ULONGLONG Fir;
307 DWORD Psr;
308 DWORD ContextFlags;
309 DWORD Fill[4];
310} CONTEXT;
311
312#define _QUAD_PSR_OFFSET HighSoftFpcr
313#define _QUAD_FLAGS_OFFSET HighFir
314
315#endif /* _ALPHA_ */
316
317/* Mips context definitions */
318#ifdef _MIPS_
319
320#define CONTEXT_R4000 0x00010000
321
322#define CONTEXT_CONTROL (CONTEXT_R4000 | 0x00000001)
323#define CONTEXT_FLOATING_POINT (CONTEXT_R4000 | 0x00000002)
324#define CONTEXT_INTEGER (CONTEXT_R4000 | 0x00000004)
325
326#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER)
327
328typedef struct _CONTEXT
329{
330 DWORD Argument[4];
331 /* These are selected by CONTEXT_FLOATING_POINT */
332 DWORD FltF0;
333 DWORD FltF1;
334 DWORD FltF2;
335 DWORD FltF3;
336 DWORD FltF4;
337 DWORD FltF5;
338 DWORD FltF6;
339 DWORD FltF7;
340 DWORD FltF8;
341 DWORD FltF9;
342 DWORD FltF10;
343 DWORD FltF11;
344 DWORD FltF12;
345 DWORD FltF13;
346 DWORD FltF14;
347 DWORD FltF15;
348 DWORD FltF16;
349 DWORD FltF17;
350 DWORD FltF18;
351 DWORD FltF19;
352 DWORD FltF20;
353 DWORD FltF21;
354 DWORD FltF22;
355 DWORD FltF23;
356 DWORD FltF24;
357 DWORD FltF25;
358 DWORD FltF26;
359 DWORD FltF27;
360 DWORD FltF28;
361 DWORD FltF29;
362 DWORD FltF30;
363 DWORD FltF31;
364
365 /* These are selected by CONTEXT_INTEGER */
366 DWORD IntZero;
367 DWORD IntAt;
368 DWORD IntV0;
369 DWORD IntV1;
370 DWORD IntA0;
371 DWORD IntA1;
372 DWORD IntA2;
373 DWORD IntA3;
374 DWORD IntT0;
375 DWORD IntT1;
376 DWORD IntT2;
377 DWORD IntT3;
378 DWORD IntT4;
379 DWORD IntT5;
380 DWORD IntT6;
381 DWORD IntT7;
382 DWORD IntS0;
383 DWORD IntS1;
384 DWORD IntS2;
385 DWORD IntS3;
386 DWORD IntS4;
387 DWORD IntS5;
388 DWORD IntS6;
389 DWORD IntS7;
390 DWORD IntT8;
391 DWORD IntT9;
392 DWORD IntK0;
393 DWORD IntK1;
394 DWORD IntGp;
395 DWORD IntSp;
396 DWORD IntS8;
397 DWORD IntRa;
398 DWORD IntLo;
399 DWORD IntHi;
400
401 /* These are selected by CONTEXT_FLOATING_POINT */
402 DWORD Fsr;
403
404 /* These are selected by CONTEXT_CONTROL */
405 DWORD Fir;
406 DWORD Psr;
407
408 DWORD ContextFlags;
409 DWORD Fill[2];
410} CONTEXT;
411
412#endif /* _MIPS_ */
413
414/* PowerPC context definitions */
415#ifdef __PPC__
416
417#define CONTEXT_CONTROL 0x0001
418#define CONTEXT_FLOATING_POINT 0x0002
419#define CONTEXT_INTEGER 0x0004
420#define CONTEXT_DEBUG_REGISTERS 0x0008
421#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER)
422
423typedef struct
424{
425 /* These are selected by CONTEXT_FLOATING_POINT */
426 double Fpr0;
427 double Fpr1;
428 double Fpr2;
429 double Fpr3;
430 double Fpr4;
431 double Fpr5;
432 double Fpr6;
433 double Fpr7;
434 double Fpr8;
435 double Fpr9;
436 double Fpr10;
437 double Fpr11;
438 double Fpr12;
439 double Fpr13;
440 double Fpr14;
441 double Fpr15;
442 double Fpr16;
443 double Fpr17;
444 double Fpr18;
445 double Fpr19;
446 double Fpr20;
447 double Fpr21;
448 double Fpr22;
449 double Fpr23;
450 double Fpr24;
451 double Fpr25;
452 double Fpr26;
453 double Fpr27;
454 double Fpr28;
455 double Fpr29;
456 double Fpr30;
457 double Fpr31;
458 double Fpscr;
459
460 /* These are selected by CONTEXT_INTEGER */
461 DWORD Gpr0;
462 DWORD Gpr1;
463 DWORD Gpr2;
464 DWORD Gpr3;
465 DWORD Gpr4;
466 DWORD Gpr5;
467 DWORD Gpr6;
468 DWORD Gpr7;
469 DWORD Gpr8;
470 DWORD Gpr9;
471 DWORD Gpr10;
472 DWORD Gpr11;
473 DWORD Gpr12;
474 DWORD Gpr13;
475 DWORD Gpr14;
476 DWORD Gpr15;
477 DWORD Gpr16;
478 DWORD Gpr17;
479 DWORD Gpr18;
480 DWORD Gpr19;
481 DWORD Gpr20;
482 DWORD Gpr21;
483 DWORD Gpr22;
484 DWORD Gpr23;
485 DWORD Gpr24;
486 DWORD Gpr25;
487 DWORD Gpr26;
488 DWORD Gpr27;
489 DWORD Gpr28;
490 DWORD Gpr29;
491 DWORD Gpr30;
492 DWORD Gpr31;
493
494 DWORD Cr;
495 DWORD Xer;
496
497 /* These are selected by CONTEXT_CONTROL */
498 DWORD Msr;
499 DWORD Iar;
500 DWORD Lr;
501 DWORD Ctr;
502
503 DWORD ContextFlags;
504 DWORD Fill[3];
505
506 /* These are selected by CONTEXT_DEBUG_REGISTERS */
507 DWORD Dr0;
508 DWORD Dr1;
509 DWORD Dr2;
510 DWORD Dr3;
511 DWORD Dr4;
512 DWORD Dr5;
513 DWORD Dr6;
514 DWORD Dr7;
515} CONTEXT;
516
517typedef struct _STACK_FRAME_HEADER
518{
519 DWORD BackChain;
520 DWORD GlueSaved1;
521 DWORD GlueSaved2;
522 DWORD Reserved1;
523 DWORD Spare1;
524 DWORD Spare2;
525
526 DWORD Parameter0;
527 DWORD Parameter1;
528 DWORD Parameter2;
529 DWORD Parameter3;
530 DWORD Parameter4;
531 DWORD Parameter5;
532 DWORD Parameter6;
533 DWORD Parameter7;
534} STACK_FRAME_HEADER,*PSTACK_FRAME_HEADER;
535
536#endif /* __PPC__ */
537
538#ifdef __sparc__
539
540/*
541 * FIXME:
542 *
543 * There is no official CONTEXT structure defined for the SPARC
544 * architecture, so I just made one up.
545 *
546 * This structure is valid only for 32-bit SPARC architectures,
547 * not for 64-bit SPARC.
548 *
549 * Note that this structure contains only the 'top-level' registers;
550 * the rest of the register window chain is not visible.
551 *
552 * The layout follows the Solaris 'prgregset_t' structure.
553 *
554 */
555
556#define CONTEXT_SPARC 0x10000000
557
558#define CONTEXT_CONTROL (CONTEXT_SPARC | 0x00000001)
559#define CONTEXT_FLOATING_POINT (CONTEXT_SPARC | 0x00000002)
560#define CONTEXT_INTEGER (CONTEXT_SPARC | 0x00000004)
561
562#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER)
563
564typedef struct _CONTEXT
565{
566 DWORD ContextFlags;
567
568 /* These are selected by CONTEXT_INTEGER */
569 DWORD g0;
570 DWORD g1;
571 DWORD g2;
572 DWORD g3;
573 DWORD g4;
574 DWORD g5;
575 DWORD g6;
576 DWORD g7;
577 DWORD o0;
578 DWORD o1;
579 DWORD o2;
580 DWORD o3;
581 DWORD o4;
582 DWORD o5;
583 DWORD o6;
584 DWORD o7;
585 DWORD l0;
586 DWORD l1;
587 DWORD l2;
588 DWORD l3;
589 DWORD l4;
590 DWORD l5;
591 DWORD l6;
592 DWORD l7;
593 DWORD i0;
594 DWORD i1;
595 DWORD i2;
596 DWORD i3;
597 DWORD i4;
598 DWORD i5;
599 DWORD i6;
600 DWORD i7;
601
602 /* These are selected by CONTEXT_CONTROL */
603 DWORD psr;
604 DWORD pc;
605 DWORD npc;
606 DWORD y;
607 DWORD wim;
608 DWORD tbr;
609
610 /* FIXME: floating point registers missing */
611
612} CONTEXT;
613
614#endif
615
616#if !defined(CONTEXT_FULL) && !defined(RC_INVOKED)
617#error You need to define a CONTEXT for your CPU
618#endif
619
620typedef CONTEXT *PCONTEXT;
621typedef HANDLE *PHANDLE;
622
623#ifdef __WINE__
624
625/* Macros for easier access to i386 context registers */
626
627#define EAX_reg(context) ((context)->Eax)
628#define EBX_reg(context) ((context)->Ebx)
629#define ECX_reg(context) ((context)->Ecx)
630#define EDX_reg(context) ((context)->Edx)
631#define ESI_reg(context) ((context)->Esi)
632#define EDI_reg(context) ((context)->Edi)
633#define EBP_reg(context) ((context)->Ebp)
634
635#define CS_reg(context) ((context)->SegCs)
636#define DS_reg(context) ((context)->SegDs)
637#define ES_reg(context) ((context)->SegEs)
638#define FS_reg(context) ((context)->SegFs)
639#define GS_reg(context) ((context)->SegGs)
640#define SS_reg(context) ((context)->SegSs)
641
642#define EFL_reg(context) ((context)->EFlags)
643#define EIP_reg(context) ((context)->Eip)
644#define ESP_reg(context) ((context)->Esp)
645
646#define AX_reg(context) (*(WORD*)&EAX_reg(context))
647#define BX_reg(context) (*(WORD*)&EBX_reg(context))
648#define CX_reg(context) (*(WORD*)&ECX_reg(context))
649#define DX_reg(context) (*(WORD*)&EDX_reg(context))
650#define SI_reg(context) (*(WORD*)&ESI_reg(context))
651#define DI_reg(context) (*(WORD*)&EDI_reg(context))
652#define BP_reg(context) (*(WORD*)&EBP_reg(context))
653
654#define AL_reg(context) (*(BYTE*)&EAX_reg(context))
655#define AH_reg(context) (*((BYTE*)&EAX_reg(context)+1))
656#define BL_reg(context) (*(BYTE*)&EBX_reg(context))
657#define BH_reg(context) (*((BYTE*)&EBX_reg(context)+1))
658#define CL_reg(context) (*(BYTE*)&ECX_reg(context))
659#define CH_reg(context) (*((BYTE*)&ECX_reg(context)+1))
660#define DL_reg(context) (*(BYTE*)&EDX_reg(context))
661#define DH_reg(context) (*((BYTE*)&EDX_reg(context)+1))
662
663#define SET_CFLAG(context) (EFL_reg(context) |= 0x0001)
664#define RESET_CFLAG(context) (EFL_reg(context) &= ~0x0001)
665#define SET_ZFLAG(context) (EFL_reg(context) |= 0x0040)
666#define RESET_ZFLAG(context) (EFL_reg(context) &= ~0x0040)
667
668#define ISV86(context) (EFL_reg(context) & 0x00020000)
669#define V86BASE(context) ((context)->Dr7) /* ugly */
670
671
672/* Macros to retrieve the current context */
673
674#ifdef __i386__
675#define _DEFINE_REGS_ENTRYPOINT( name, fn, args ) \
676 __asm__(".align 4\n\t" \
677 ".globl " #name "\n\t" \
678 ".type " #name ",@function\n\t" \
679 #name ":\n\t" \
680 "call CALL32_Regs\n\t" \
681 ".long " #fn "\n\t" \
682 ".byte " #args ", " #args "\n\t");
683
684#define DEFINE_REGS_ENTRYPOINT_0( name, fn ) \
685 _DEFINE_REGS_ENTRYPOINT( name, fn, 0 )
686#define DEFINE_REGS_ENTRYPOINT_1( name, fn, t1 ) \
687 _DEFINE_REGS_ENTRYPOINT( name, fn, 4 )
688#define DEFINE_REGS_ENTRYPOINT_2( name, fn, t1, t2 ) \
689 _DEFINE_REGS_ENTRYPOINT( name, fn, 8 )
690#define DEFINE_REGS_ENTRYPOINT_3( name, fn, t1, t2, t3 ) \
691 _DEFINE_REGS_ENTRYPOINT( name, fn, 12 )
692#define DEFINE_REGS_ENTRYPOINT_4( name, fn, t1, t2, t3, t4 ) \
693 _DEFINE_REGS_ENTRYPOINT( name, fn, 16 )
694
695#endif /* __i386__ */
696
697#ifdef __sparc__
698/* FIXME: use getcontext() to retrieve full context */
699#define _GET_CONTEXT \
700 CONTEXT context; \
701 do { memset(&context, 0, sizeof(CONTEXT)); \
702 context.ContextFlags = CONTEXT_CONTROL; \
703 context.pc = (DWORD)__builtin_return_address(0); \
704 } while (0)
705
706#define DEFINE_REGS_ENTRYPOINT_0( name, fn ) \
707 void WINAPI name ( void ) \
708 { _GET_CONTEXT; fn( &context ); }
709#define DEFINE_REGS_ENTRYPOINT_1( name, fn, t1 ) \
710 void WINAPI name ( t1 a1 ) \
711 { _GET_CONTEXT; fn( a1, &context ); }
712#define DEFINE_REGS_ENTRYPOINT_2( name, fn, t1, t2 ) \
713 void WINAPI name ( t1 a1, t2 a2 ) \
714 { _GET_CONTEXT; fn( a1, a2, &context ); }
715#define DEFINE_REGS_ENTRYPOINT_3( name, fn, t1, t2, t3 ) \
716 void WINAPI name ( t1 a1, t2 a2, t3 a3 ) \
717 { _GET_CONTEXT; fn( a1, a2, a3, &context ); }
718#define DEFINE_REGS_ENTRYPOINT_4( name, fn, t1, t2, t3, t4 ) \
719 void WINAPI name ( t1 a1, t2 a2, t3 a3, t4 a4 ) \
720 { _GET_CONTEXT; fn( a1, a2, a3, a4, &context ); }
721
722#endif /* __sparc__ */
723
724#ifndef DEFINE_REGS_ENTRYPOINT_0
725#error You need to define DEFINE_REGS_ENTRYPOINT macros for your CPU
726#endif
727
728#ifdef __i386__
729# define GET_IP(context) ((LPVOID)(context)->Eip)
730#endif
731#ifdef __sparc__
732# define GET_IP(context) ((LPVOID)(context)->pc)
733#endif
734
735#if !defined(GET_IP) && !defined(RC_INVOKED)
736# error You must define GET_IP for this CPU
737#endif
738
739#endif /* __WINE__ */
740
741/*
742 * Exception codes
743 */
744
745#define STATUS_SUCCESS 0x00000000
746#define STATUS_WAIT_0 0x00000000
747#define STATUS_ABANDONED_WAIT_0 0x00000080
748#define STATUS_USER_APC 0x000000C0
749#define STATUS_TIMEOUT 0x00000102
750#define STATUS_PENDING 0x00000103
751
752#define STATUS_GUARD_PAGE_VIOLATION 0x80000001
753#define STATUS_DATATYPE_MISALIGNMENT 0x80000002
754#define STATUS_BREAKPOINT 0x80000003
755#define STATUS_SINGLE_STEP 0x80000004
756#define STATUS_BUFFER_OVERFLOW 0x80000005
757#define STATUS_NO_MORE_FILES 0x80000006
758#define STATUS_WAKE_SYSTEM_DEBUGGER 0x80000007
759
760#define STATUS_HANDLES_CLOSED 0x8000000A
761#define STATUS_NO_INHERITANCE 0x8000000B
762#define STATUS_GUID_SUBSTITUTION_MADE 0x8000000C
763#define STATUS_PARTIAL_COPY 0x8000000D
764#define STATUS_DEVICE_PAPER_EMPTY 0x8000000E
765#define STATUS_DEVICE_POWERED_OFF 0x8000000F
766#define STATUS_DEVICE_OFF_LINE 0x80000010
767#define STATUS_DEVICE_BUSY 0x80000011
768#define STATUS_NO_MORE_EAS 0x80000012
769#define STATUS_INVALID_EA_NAME 0x80000013
770#define STATUS_EA_LIST_INCONSISTENT 0x80000014
771#define STATUS_INVALID_EA_FLAG 0x80000015
772#define STATUS_VERIFY_REQUIRED 0x80000016
773#define STATUS_EXTRANEOUS_INFORMATION 0x80000017
774#define STATUS_RXACT_COMMIT_NECESSARY 0x80000018
775#define STATUS_NO_MORE_ENTRIES 0x8000001A
776#define STATUS_FILEMARK_DETECTED 0x8000001B
777#define STATUS_MEDIA_CHANGED 0x8000001C
778#define STATUS_BUS_RESET 0x8000001D
779#define STATUS_END_OF_MEDIA 0x8000001E
780#define STATUS_BEGINNING_OF_MEDIA 0x8000001F
781#define STATUS_MEDIA_CHECK 0x80000020
782#define STATUS_SETMARK_DETECTED 0x80000021
783#define STATUS_NO_DATA_DETECTED 0x80000022
784#define STATUS_REDIRECTOR_HAS_OPEN_HANDLES 0x80000023
785#define STATUS_SERVER_HAS_OPEN_HANDLES 0x80000024
786#define STATUS_ALREADY_DISCONNECTED 0x80000025
787#define STATUS_LONGJUMP 0x80000026
788
789#define STATUS_UNSUCCESSFUL 0xC0000001
790#define STATUS_NOT_IMPLEMENTED 0xC0000002
791#define STATUS_INVALID_INFO_CLASS 0xC0000003
792#define STATUS_INFO_LENGTH_MISMATCH 0xC0000004
793#define STATUS_ACCESS_VIOLATION 0xC0000005
794#define STATUS_IN_PAGE_ERROR 0xC0000006
795#define STATUS_PAGEFILE_QUOTA 0xC0000007
796#define STATUS_INVALID_HANDLE 0xC0000008
797#define STATUS_BAD_INITIAL_STACK 0xC0000009
798#define STATUS_BAD_INITIAL_PC 0xC000000A
799#define STATUS_INVALID_CID 0xC000000B
800#define STATUS_TIMER_NOT_CANCELED 0xC000000C
801#define STATUS_INVALID_PARAMETER 0xC000000D
802#define STATUS_NO_SUCH_DEVICE 0xC000000E
803#define STATUS_NO_SUCH_FILE 0xC000000F
804#define STATUS_INVALID_DEVICE_REQUEST 0xC0000010
805#define STATUS_END_OF_FILE 0xC0000011
806#define STATUS_WRONG_VOLUME 0xC0000012
807#define STATUS_NO_MEDIA_IN_DEVICE 0xC0000013
808#define STATUS_UNRECOGNIZED_MEDIA 0xC0000014
809#define STATUS_NONEXISTENT_SECTOR 0xC0000015
810#define STATUS_MORE_PROCESSING_REQUIRED 0xC0000016
811#define STATUS_NO_MEMORY 0xC0000017
812#define STATUS_CONFLICTING_ADDRESSES 0xC0000018
813#define STATUS_NOT_MAPPED_VIEW 0xC0000019
814#define STATUS_UNABLE_TO_FREE_VM 0xC000001A
815#define STATUS_UNABLE_TO_DELETE_SECTION 0xC000001B
816#define STATUS_INVALID_SYSTEM_SERVICE 0xC000001C
817#define STATUS_ILLEGAL_INSTRUCTION 0xC000001D
818#define STATUS_INVALID_LOCK_SEQUENCE 0xC000001E
819#define STATUS_INVALID_VIEW_SIZE 0xC000001F
820#define STATUS_INVALID_FILE_FOR_SECTION 0xC0000020
821#define STATUS_ALREADY_COMMITTED 0xC0000021
822#define STATUS_ACCESS_DENIED 0xC0000022
823#define STATUS_BUFFER_TOO_SMALL 0xC0000023
824#define STATUS_OBJECT_TYPE_MISMATCH 0xC0000024
825#define STATUS_NONCONTINUABLE_EXCEPTION 0xC0000025
826#define STATUS_INVALID_DISPOSITION 0xC0000026
827#define STATUS_UNWIND 0xC0000027
828#define STATUS_BAD_STACK 0xC0000028
829#define STATUS_INVALID_UNWIND_TARGET 0xC0000029
830#define STATUS_NOT_LOCKED 0xC000002A
831#define STATUS_PARITY_ERROR 0xC000002B
832#define STATUS_UNABLE_TO_DECOMMIT_VM 0xC000002C
833#define STATUS_NOT_COMMITTED 0xC000002D
834#define STATUS_INVALID_PORT_ATTRIBUTES 0xC000002E
835#define STATUS_PORT_MESSAGE_TOO_LONG 0xC000002F
836#define STATUS_INVALID_PARAMETER_MIX 0xC0000030
837#define STATUS_INVALID_QUOTA_LOWER 0xC0000031
838#define STATUS_DISK_CORRUPT_ERROR 0xC0000032
839#define STATUS_OBJECT_NAME_INVALID 0xC0000033
840#define STATUS_OBJECT_NAME_NOT_FOUND 0xC0000034
841#define STATUS_OBJECT_NAME_COLLISION 0xC0000035
842#define STATUS_PORT_DISCONNECTED 0xC0000037
843#define STATUS_DEVICE_ALREADY_ATTACHED 0xC0000038
844#define STATUS_OBJECT_PATH_INVALID 0xC0000039
845#define STATUS_OBJECT_PATH_NOT_FOUND 0xC000003A
846#define STATUS_PATH_SYNTAX_BAD 0xC000003B
847#define STATUS_DATA_OVERRUN 0xC000003C
848#define STATUS_DATA_LATE_ERROR 0xC000003D
849#define STATUS_DATA_ERROR 0xC000003E
850#define STATUS_CRC_ERROR 0xC000003F
851#define STATUS_SECTION_TOO_BIG 0xC0000040
852#define STATUS_PORT_CONNECTION_REFUSED 0xC0000041
853#define STATUS_INVALID_PORT_HANDLE 0xC0000042
854#define STATUS_SHARING_VIOLATION 0xC0000043
855#define STATUS_QUOTA_EXCEEDED 0xC0000044
856#define STATUS_INVALID_PAGE_PROTECTION 0xC0000045
857#define STATUS_MUTANT_NOT_OWNED 0xC0000046
858#define STATUS_SEMAPHORE_LIMIT_EXCEEDED 0xC0000047
859#define STATUS_PORT_ALREADY_SET 0xC0000048
860#define STATUS_SUSPEND_COUNT_EXCEEDED 0xC000004A
861#define STATUS_LOCK_NOT_GRANTED 0xC0000054 /* FIXME: not sure */
862#define STATUS_FILE_LOCK_CONFLICT 0xC0000055 /* FIXME: not sure */
863#define STATUS_UNKNOWN_REVISION 0xC0000058
864#define STATUS_INVALID_SECURITY_DESCR 0xC0000079
865#define STATUS_DISK_FULL 0xC000007F
866#define STATUS_SECTION_NOT_EXTENDED 0xC0000087
867#define STATUS_ARRAY_BOUNDS_EXCEEDED 0xC000008C
868#define STATUS_FLOAT_DENORMAL_OPERAND 0xC000008D
869#define STATUS_FLOAT_DIVIDE_BY_ZERO 0xC000008E
870#define STATUS_FLOAT_INEXACT_RESULT 0xC000008F
871#define STATUS_FLOAT_INVALID_OPERATION 0xC0000090
872#define STATUS_FLOAT_OVERFLOW 0xC0000091
873#define STATUS_FLOAT_STACK_CHECK 0xC0000092
874#define STATUS_FLOAT_UNDERFLOW 0xC0000093
875#define STATUS_INTEGER_DIVIDE_BY_ZERO 0xC0000094
876#define STATUS_INTEGER_OVERFLOW 0xC0000095
877#define STATUS_PRIVILEGED_INSTRUCTION 0xC0000096
878#define STATUS_MEDIA_WRITE_PROTECTED 0XC00000A2
879#define STATUS_INVALID_PARAMETER_2 0xC00000F0
880#define STATUS_STACK_OVERFLOW 0xC00000FD
881#define STATUS_DIRECTORY_NOT_EMPTY 0xC0000101
882#define STATUS_TOO_MANY_OPENED_FILES 0xC000011F
883#define STATUS_CONTROL_C_EXIT 0xC000013A
884#define STATUS_PIPE_BROKEN 0xC000014B
885#define STATUS_NOT_REGISTRY_FILE 0xC000015C
886#define STATUS_PARTITION_FAILURE 0xC0000172
887#define STATUS_INVALID_BLOCK_LENGTH 0xC0000173
888#define STATUS_DEVICE_NOT_PARTITIONED 0xC0000174
889#define STATUS_UNABLE_TO_LOCK_MEDIA 0xC0000175
890#define STATUS_UNABLE_TO_UNLOAD_MEDIA 0xC0000176
891#define STATUS_EOM_OVERFLOW 0xC0000177
892#define STATUS_NO_MEDIA 0xC0000178
893#define STATUS_NO_SUCH_MEMBER 0xC000017A
894#define STATUS_INVALID_MEMBER 0xC000017B
895#define STATUS_KEY_DELETED 0xC000017C
896#define STATUS_NO_LOG_SPACE 0xC000017D
897#define STATUS_TOO_MANY_SIDS 0xC000017E
898#define STATUS_LM_CROSS_ENCRYPTION_REQUIRED 0xC000017F
899#define STATUS_KEY_HAS_CHILDREN 0xC0000180
900#define STATUS_CHILD_MUST_BE_VOLATILE 0xC0000181
901#define STATUS_DEVICE_CONFIGURATION_ERROR0xC0000182
902#define STATUS_DRIVER_INTERNAL_ERROR 0xC0000183
903#define STATUS_INVALID_DEVICE_STATE 0xC0000184
904#define STATUS_IO_DEVICE_ERROR 0xC0000185
905#define STATUS_DEVICE_PROTOCOL_ERROR 0xC0000186
906#define STATUS_BACKUP_CONTROLLER 0xC0000187
907#define STATUS_LOG_FILE_FULL 0xC0000188
908#define STATUS_TOO_LATE 0xC0000189
909#define STATUS_NO_TRUST_LSA_SECRET 0xC000018A
910#define STATUS_NO_TRUST_SAM_ACCOUNT 0xC000018B
911#define STATUS_TRUSTED_DOMAIN_FAILURE 0xC000018C
912#define STATUS_TRUSTED_RELATIONSHIP_FAILURE 0xC000018D
913#define STATUS_EVENTLOG_FILE_CORRUPT 0xC000018E
914#define STATUS_EVENTLOG_CANT_START 0xC000018F
915#define STATUS_TRUST_FAILURE 0xC0000190
916#define STATUS_MUTANT_LIMIT_EXCEEDED 0xC0000191
917#define STATUS_NETLOGON_NOT_STARTED 0xC0000192
918#define STATUS_ACCOUNT_EXPIRED 0xC0000193
919#define STATUS_POSSIBLE_DEADLOCK 0xC0000194
920#define STATUS_NETWORK_CREDENTIAL_CONFLICT 0xC0000195
921#define STATUS_REMOTE_SESSION_LIMIT 0xC0000196
922#define STATUS_EVENTLOG_FILE_CHANGED 0xC0000197
923#define STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT 0xC0000198
924#define STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT 0xC0000199
925#define STATUS_NOLOGON_SERVER_TRUST_ACCOUNT 0xC000019A
926#define STATUS_DOMAIN_TRUST_INCONSISTENT 0xC000019B
927#define STATUS_FS_DRIVER_REQUIRED 0xC000019C
928
929#define STATUS_RESOURCE_LANG_NOT_FOUND 0xC0000204
930
931#define MAXIMUM_WAIT_OBJECTS 64
932#define MAXIMUM_SUSPEND_COUNT 127
933
934#define EXCEPTION_ACCESS_VIOLATION STATUS_ACCESS_VIOLATION
935#define EXCEPTION_DATATYPE_MISALIGNMENT STATUS_DATATYPE_MISALIGNMENT
936#define EXCEPTION_BREAKPOINT STATUS_BREAKPOINT
937#define EXCEPTION_SINGLE_STEP STATUS_SINGLE_STEP
938#define EXCEPTION_ARRAY_BOUNDS_EXCEEDED STATUS_ARRAY_BOUNDS_EXCEEDED
939#define EXCEPTION_FLT_DENORMAL_OPERAND STATUS_FLOAT_DENORMAL_OPERAND
940#define EXCEPTION_FLT_DIVIDE_BY_ZERO STATUS_FLOAT_DIVIDE_BY_ZERO
941#define EXCEPTION_FLT_INEXACT_RESULT STATUS_FLOAT_INEXACT_RESULT
942#define EXCEPTION_FLT_INVALID_OPERATION STATUS_FLOAT_INVALID_OPERATION
943#define EXCEPTION_FLT_OVERFLOW STATUS_FLOAT_OVERFLOW
944#define EXCEPTION_FLT_STACK_CHECK STATUS_FLOAT_STACK_CHECK
945#define EXCEPTION_FLT_UNDERFLOW STATUS_FLOAT_UNDERFLOW
946#define EXCEPTION_INT_DIVIDE_BY_ZERO STATUS_INTEGER_DIVIDE_BY_ZERO
947#define EXCEPTION_INT_OVERFLOW STATUS_INTEGER_OVERFLOW
948#define EXCEPTION_PRIV_INSTRUCTION STATUS_PRIVILEGED_INSTRUCTION
949#define EXCEPTION_IN_PAGE_ERROR STATUS_IN_PAGE_ERROR
950#define EXCEPTION_ILLEGAL_INSTRUCTION STATUS_ILLEGAL_INSTRUCTION
951#define EXCEPTION_NONCONTINUABLE_EXCEPTION STATUS_NONCONTINUABLE_EXCEPTION
952#define EXCEPTION_STACK_OVERFLOW STATUS_STACK_OVERFLOW
953#define EXCEPTION_INVALID_DISPOSITION STATUS_INVALID_DISPOSITION
954#define EXCEPTION_GUARD_PAGE STATUS_GUARD_PAGE_VIOLATION
955#define EXCEPTION_INVALID_HANDLE STATUS_INVALID_HANDLE
956#define CONTROL_C_EXIT STATUS_CONTROL_C_EXIT
957
958/* Wine extension; Windows doesn't have a name for this code */
959#define EXCEPTION_CRITICAL_SECTION_WAIT 0xc0000194
960
961
962/*
963 * Return values from the actual exception handlers
964 */
965
966#define ExceptionContinueExecution 0
967#define ExceptionContinueSearch 1
968#define ExceptionNestedException 2
969#define ExceptionCollidedUnwind 3
970
971/*
972 * Return values from filters in except() and from UnhandledExceptionFilter
973 */
974
975#define EXCEPTION_EXECUTE_HANDLER 1
976#define EXCEPTION_CONTINUE_SEARCH 0
977#define EXCEPTION_CONTINUE_EXECUTION -1
978
979/*
980 * From OS/2 2.0 exception handling
981 * Win32 seems to use the same flags as ExceptionFlags in an EXCEPTION_RECORD
982 */
983
984#define EH_NONCONTINUABLE 0x01
985#define EH_UNWINDING 0x02
986#define EH_EXIT_UNWIND 0x04
987#define EH_STACK_INVALID 0x08
988#define EH_NESTED_CALL 0x10
989
990#define EXCEPTION_CONTINUABLE 0
991#define EXCEPTION_NONCONTINUABLE EH_NONCONTINUABLE
992
993/*
994 * The exception record used by Win32 to give additional information
995 * about exception to exception handlers.
996 */
997
998#define EXCEPTION_MAXIMUM_PARAMETERS 15
999
1000typedef struct __EXCEPTION_RECORD
1001{
1002 DWORD ExceptionCode;
1003 DWORD ExceptionFlags;
1004 struct __EXCEPTION_RECORD *ExceptionRecord;
1005
1006 LPVOID ExceptionAddress;
1007 DWORD NumberParameters;
1008 DWORD ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
1009} EXCEPTION_RECORD, *PEXCEPTION_RECORD;
1010
1011/*
1012 * The exception pointers structure passed to exception filters
1013 * in except() and the UnhandledExceptionFilter().
1014 */
1015
1016typedef struct _EXCEPTION_POINTERS
1017{
1018 PEXCEPTION_RECORD ExceptionRecord;
1019 PCONTEXT ContextRecord;
1020} EXCEPTION_POINTERS, *PEXCEPTION_POINTERS;
1021
1022
1023/*
1024 * The exception frame, used for registering exception handlers
1025 * Win32 cares only about this, but compilers generally emit
1026 * larger exception frames for their own use.
1027 */
1028
1029struct __EXCEPTION_FRAME;
1030
1031typedef DWORD (*PEXCEPTION_HANDLER)(PEXCEPTION_RECORD,struct __EXCEPTION_FRAME*,
1032 PCONTEXT,struct __EXCEPTION_FRAME **);
1033
1034typedef struct __EXCEPTION_FRAME
1035{
1036 struct __EXCEPTION_FRAME *Prev;
1037 PEXCEPTION_HANDLER Handler;
1038} EXCEPTION_FRAME, *PEXCEPTION_FRAME;
1039
1040#include "poppack.h"
1041
1042/*
1043 * function pointer to a exception filter
1044 */
1045
1046typedef LONG (* CALLBACK PTOP_LEVEL_EXCEPTION_FILTER)(PEXCEPTION_POINTERS ExceptionInfo);
1047typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER;
1048
1049DWORD WINAPI UnhandledExceptionFilter( PEXCEPTION_POINTERS epointers );
1050LPTOP_LEVEL_EXCEPTION_FILTER
1051WINAPI SetUnhandledExceptionFilter( LPTOP_LEVEL_EXCEPTION_FILTER filter );
1052
1053/* status values for ContinueDebugEvent */
1054#define DBG_CONTINUE 0x00010002
1055#define DBG_TERMINATE_THREAD 0x40010003
1056#define DBG_TERMINATE_PROCESS 0x40010004
1057#define DBG_CONTROL_C 0x40010005
1058#define DBG_CONTROL_BREAK 0x40010008
1059#define DBG_EXCEPTION_NOT_HANDLED 0x80010001
1060
1061struct _TEB;
1062
1063#ifdef __WINE__
1064
1065#ifndef __WIN32OS2__
1066#if defined(__i386__)
1067static inline struct _TEB * WINE_UNUSED __get_teb(void)
1068{
1069 struct _TEB *teb;
1070 __asm__(".byte 0x64\n\tmovl (0x18),%0" : "=r" (teb));
1071 return teb;
1072}
1073#elif defined(HAVE__LWP_CREATE)
1074extern void *_lwp_getprivate(void);
1075static inline struct _TEB * WINE_UNUSED __get_teb(void)
1076{
1077 return (struct _TEB *)_lwp_getprivate();
1078}
1079#else
1080#error NtCurrentTeb() not defined for this architecture!
1081#endif
1082
1083#define NtCurrentTeb() __get_teb()
1084
1085#else /* __WINE__ */
1086#define NtCurrentTeb GetThreadTEB
1087struct _TEB *WINAPI GetThreadTEB();
1088#endif
1089#endif //__WIN32OS2__
1090
1091/*
1092 * Here follows typedefs for security and tokens.
1093 */
1094
1095/*
1096 * First a constant for the following typdefs.
1097 */
1098
1099#define ANYSIZE_ARRAY 1
1100
1101/* FIXME: Orphan. What does it point to? */
1102typedef PVOID PACCESS_TOKEN;
1103
1104/*
1105 * TOKEN_INFORMATION_CLASS
1106 */
1107
1108typedef enum _TOKEN_INFORMATION_CLASS {
1109 TokenUser = 1,
1110 TokenGroups,
1111 TokenPrivileges,
1112 TokenOwner,
1113 TokenPrimaryGroup,
1114 TokenDefaultDacl,
1115 TokenSource,
1116 TokenType,
1117 TokenImpersonationLevel,
1118 TokenStatistics
1119} TOKEN_INFORMATION_CLASS;
1120
1121#ifndef _SECURITY_DEFINED
1122#define _SECURITY_DEFINED
1123
1124#include "pshpack1.h"
1125
1126typedef DWORD ACCESS_MASK, *PACCESS_MASK;
1127
1128typedef struct _GENERIC_MAPPING {
1129 ACCESS_MASK GenericRead;
1130 ACCESS_MASK GenericWrite;
1131 ACCESS_MASK GenericExecute;
1132 ACCESS_MASK GenericAll;
1133} GENERIC_MAPPING, *PGENERIC_MAPPING;
1134
1135#ifndef SID_IDENTIFIER_AUTHORITY_DEFINED
1136#define SID_IDENTIFIER_AUTHORITY_DEFINED
1137typedef struct {
1138 BYTE Value[6];
1139} SID_IDENTIFIER_AUTHORITY,*PSID_IDENTIFIER_AUTHORITY,*LPSID_IDENTIFIER_AUTHORITY;
1140#endif /* !defined(SID_IDENTIFIER_AUTHORITY_DEFINED) */
1141
1142#ifndef SID_DEFINED
1143#define SID_DEFINED
1144typedef struct _SID {
1145 BYTE Revision;
1146 BYTE SubAuthorityCount;
1147 SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
1148 DWORD SubAuthority[1];
1149} SID,*PSID;
1150#endif /* !defined(SID_DEFINED) */
1151
1152#define SID_REVISION (1) /* Current revision */
1153#define SID_MAX_SUB_AUTHORITIES (15) /* current max subauths */
1154#define SID_RECOMMENDED_SUB_AUTHORITIES (1) /* recommended subauths */
1155
1156
1157/*
1158 * ACL
1159 */
1160
1161#define ACL_REVISION1 1
1162#define ACL_REVISION2 2
1163#define ACL_REVISION3 3
1164#define ACL_REVISION4 4
1165
1166typedef enum _ACL_INFORMATION_CLASS {
1167 AclRevisionInformation = 1,
1168 AclSizeInformation
1169} ACL_INFORMATION_CLASS;
1170
1171typedef struct _ACL_REVISION_INFORMATION {
1172 DWORD AclRevision;
1173} ACL_REVISION_INFORMATION;
1174typedef ACL_REVISION_INFORMATION *PACL_REVISION_INFORMATION;
1175
1176typedef struct _ACL_SIZE_INFORMATION {
1177 DWORD AceCount;
1178 DWORD AclBytesInUse;
1179 DWORD AclBytesFree;
1180} ACL_SIZE_INFORMATION;
1181typedef ACL_SIZE_INFORMATION *PACL_SIZE_INFORMATION;
1182
1183#define MIN_ACL_REVISION ACL_REVISION2
1184#define MAX_ACL_REVISION ACL_REVISION4
1185
1186typedef struct _ACL {
1187 BYTE AclRevision;
1188 BYTE Sbz1;
1189 WORD AclSize;
1190 WORD AceCount;
1191 WORD Sbz2;
1192} ACL, *PACL;
1193
1194
1195/* SECURITY_DESCRIPTOR */
1196#define SECURITY_DESCRIPTOR_REVISION 1
1197#define SECURITY_DESCRIPTOR_REVISION1 1
1198
1199
1200#define SE_OWNER_DEFAULTED 0x0001
1201#define SE_GROUP_DEFAULTED 0x0002
1202#define SE_DACL_PRESENT 0x0004
1203#define SE_DACL_DEFAULTED 0x0008
1204#define SE_SACL_PRESENT 0x0010
1205#define SE_SACL_DEFAULTED 0x0020
1206#define SE_SELF_RELATIVE 0x8000
1207
1208typedef DWORD SECURITY_INFORMATION, *PSECURITY_INFORMATION;
1209typedef WORD SECURITY_DESCRIPTOR_CONTROL, *PSECURITY_DESCRIPTOR_CONTROL;
1210
1211/* The security descriptor structure */
1212typedef struct {
1213 BYTE Revision;
1214 BYTE Sbz1;
1215 SECURITY_DESCRIPTOR_CONTROL Control;
1216 DWORD Owner;
1217 DWORD Group;
1218 DWORD Sacl;
1219 DWORD Dacl;
1220} SECURITY_DESCRIPTOR_RELATIVE, *PISECURITY_DESCRIPTOR_RELATIVE;
1221
1222typedef struct {
1223 BYTE Revision;
1224 BYTE Sbz1;
1225 SECURITY_DESCRIPTOR_CONTROL Control;
1226 PSID Owner;
1227 PSID Group;
1228 PACL Sacl;
1229 PACL Dacl;
1230} SECURITY_DESCRIPTOR, *PSECURITY_DESCRIPTOR;
1231
1232#define SECURITY_DESCRIPTOR_MIN_LENGTH (sizeof(SECURITY_DESCRIPTOR))
1233
1234#include "poppack.h"
1235
1236#endif /* _SECURITY_DEFINED */
1237
1238#include "pshpack1.h"
1239
1240/*
1241 * SID_AND_ATTRIBUTES
1242 */
1243
1244typedef struct _SID_AND_ATTRIBUTES {
1245 PSID Sid;
1246 DWORD Attributes;
1247} SID_AND_ATTRIBUTES ;
1248
1249/* security entities */
1250#define SECURITY_NULL_RID (0x00000000L)
1251#define SECURITY_WORLD_RID (0x00000000L)
1252#define SECURITY_LOCAL_RID (0X00000000L)
1253
1254#define SECURITY_NULL_SID_AUTHORITY {0,0,0,0,0,0}
1255
1256/* S-1-1 */
1257#define SECURITY_WORLD_SID_AUTHORITY {0,0,0,0,0,1}
1258
1259/* S-1-2 */
1260#define SECURITY_LOCAL_SID_AUTHORITY {0,0,0,0,0,2}
1261
1262/* S-1-3 */
1263#define SECURITY_CREATOR_SID_AUTHORITY {0,0,0,0,0,3}
1264#define SECURITY_CREATOR_OWNER_RID (0x00000000L)
1265#define SECURITY_CREATOR_GROUP_RID (0x00000001L)
1266#define SECURITY_CREATOR_OWNER_SERVER_RID (0x00000002L)
1267#define SECURITY_CREATOR_GROUP_SERVER_RID (0x00000003L)
1268
1269/* S-1-4 */
1270#define SECURITY_NON_UNIQUE_AUTHORITY {0,0,0,0,0,4}
1271
1272/* S-1-5 */
1273#define SECURITY_NT_AUTHORITY {0,0,0,0,0,5}
1274#define SECURITY_DIALUP_RID 0x00000001L
1275#define SECURITY_NETWORK_RID 0x00000002L
1276#define SECURITY_BATCH_RID 0x00000003L
1277#define SECURITY_INTERACTIVE_RID 0x00000004L
1278#define SECURITY_LOGON_IDS_RID 0x00000005L
1279#define SECURITY_SERVICE_RID 0x00000006L
1280#define SECURITY_ANONYMOUS_LOGON_RID 0x00000007L
1281#define SECURITY_PROXY_RID 0x00000008L
1282#define SECURITY_ENTERPRISE_CONTROLLERS_RID 0x00000009L
1283#define SECURITY_PRINCIPAL_SELF_RID 0x0000000AL
1284#define SECURITY_AUTHENTICATED_USER_RID 0x0000000BL
1285#define SECURITY_RESTRICTED_CODE_RID 0x0000000CL
1286#define SECURITY_TERMINAL_SERVER_RID 0x0000000DL
1287#define SECURITY_LOCAL_SYSTEM_RID 0x00000012L
1288#define SECURITY_NT_NON_UNIQUE 0x00000015L
1289#define SECURITY_BUILTIN_DOMAIN_RID 0x00000020L
1290
1291#define DOMAIN_GROUP_RID_ADMINS 0x00000200L
1292#define DOMAIN_GROUP_RID_USERS 0x00000201L
1293#define DOMAIN_GROUP_RID_GUESTS 0x00000202L
1294
1295#define DOMAIN_ALIAS_RID_ADMINS 0x00000220L
1296#define DOMAIN_ALIAS_RID_USERS 0x00000221L
1297#define DOMAIN_ALIAS_RID_GUESTS 0x00000222L
1298
1299#define SECURITY_SERVER_LOGON_RID SECURITY_ENTERPRISE_CONTROLLERS_RID
1300
1301#define SECURITY_LOGON_IDS_RID_COUNT (3L)
1302
1303/*
1304 * TOKEN_USER
1305 */
1306
1307typedef struct _TOKEN_USER {
1308 SID_AND_ATTRIBUTES User;
1309} TOKEN_USER;
1310
1311/*
1312 * TOKEN_GROUPS
1313 */
1314
1315typedef struct _TOKEN_GROUPS {
1316 DWORD GroupCount;
1317 SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY];
1318} TOKEN_GROUPS, *PTOKEN_GROUPS;
1319
1320/*
1321 * LUID_AND_ATTRIBUTES
1322 */
1323#if defined(__WIN32OS2__) && !defined(WINE_LARGE_INTEGER)
1324typedef struct _LARGE_INTEGER {
1325 ULONG LowPart;
1326 LONG HighPart;
1327} LARGE_INTEGER, *LPLARGE_INTEGER, *PLARGE_INTEGER;
1328
1329typedef struct _ULARGE_INTEGER {
1330 ULONG LowPart;
1331 LONG HighPart;
1332} ULARGE_INTEGER, *LPULARGE_INTEGER, *PULARGE_INTEGER;
1333#else
1334typedef union _LARGE_INTEGER {
1335 struct {
1336 DWORD LowPart;
1337 LONG HighPart;
1338 } DUMMYSTRUCTNAME;
1339 LONGLONG QuadPart;
1340} LARGE_INTEGER, *LPLARGE_INTEGER, *PLARGE_INTEGER;
1341
1342typedef union _ULARGE_INTEGER {
1343 struct {
1344 DWORD LowPart;
1345 DWORD HighPart;
1346 } DUMMYSTRUCTNAME;
1347 ULONGLONG QuadPart;
1348} ULARGE_INTEGER, *LPULARGE_INTEGER, *PULARGE_INTEGER;
1349#endif
1350/*
1351 * Locally Unique Identifier
1352 */
1353
1354typedef LARGE_INTEGER LUID,*PLUID;
1355
1356typedef struct _LUID_AND_ATTRIBUTES {
1357 LUID Luid;
1358 DWORD Attributes;
1359} LUID_AND_ATTRIBUTES;
1360
1361/*
1362 * PRIVILEGE_SET
1363 */
1364
1365typedef struct _PRIVILEGE_SET {
1366 DWORD PrivilegeCount;
1367 DWORD Control;
1368 LUID_AND_ATTRIBUTES Privilege[ANYSIZE_ARRAY];
1369} PRIVILEGE_SET, *PPRIVILEGE_SET;
1370
1371/*
1372 * TOKEN_PRIVILEGES
1373 */
1374
1375typedef struct _TOKEN_PRIVILEGES {
1376 DWORD PrivilegeCount;
1377 LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY];
1378} TOKEN_PRIVILEGES, *PTOKEN_PRIVILEGES;
1379
1380/*
1381 * TOKEN_OWNER
1382 */
1383
1384typedef struct _TOKEN_OWNER {
1385 PSID Owner;
1386} TOKEN_OWNER;
1387
1388/*
1389 * TOKEN_PRIMARY_GROUP
1390 */
1391
1392typedef struct _TOKEN_PRIMARY_GROUP {
1393 PSID PrimaryGroup;
1394} TOKEN_PRIMARY_GROUP;
1395
1396
1397/*
1398 * TOKEN_DEFAULT_DACL
1399 */
1400
1401typedef struct _TOKEN_DEFAULT_DACL {
1402 PACL DefaultDacl;
1403} TOKEN_DEFAULT_DACL;
1404
1405/*
1406 * TOKEN_SOURCEL
1407 */
1408
1409typedef struct _TOKEN_SOURCE {
1410 char Sourcename[8];
1411 LUID SourceIdentifier;
1412} TOKEN_SOURCE;
1413
1414/*
1415 * TOKEN_TYPE
1416 */
1417
1418typedef enum tagTOKEN_TYPE {
1419 TokenPrimary = 1,
1420 TokenImpersonation
1421} TOKEN_TYPE;
1422
1423/*
1424 * SECURITY_IMPERSONATION_LEVEL
1425 */
1426
1427typedef enum _SECURITY_IMPERSONATION_LEVEL {
1428 SecurityAnonymous,
1429 SecurityIdentification,
1430 SecurityImpersonation,
1431 SecurityDelegation
1432} SECURITY_IMPERSONATION_LEVEL, *PSECURITY_IMPERSONATION_LEVEL;
1433
1434
1435typedef BOOLEAN SECURITY_CONTEXT_TRACKING_MODE,
1436 * PSECURITY_CONTEXT_TRACKING_MODE;
1437/*
1438 * Quality of Service
1439 */
1440
1441typedef struct _SECURITY_QUALITY_OF_SERVICE {
1442 DWORD Length;
1443 SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
1444 SECURITY_CONTEXT_TRACKING_MODE ContextTrackingMode;
1445 BOOL EffectiveOnly;
1446} SECURITY_QUALITY_OF_SERVICE, *PSECURITY_QUALITY_OF_SERVICE;
1447
1448/*
1449 * TOKEN_STATISTICS
1450 */
1451
1452typedef struct _TOKEN_STATISTICS {
1453 LUID TokenId;
1454 LUID AuthenticationId;
1455 LARGE_INTEGER ExpirationTime;
1456 TOKEN_TYPE TokenType;
1457 SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
1458 DWORD DynamicCharged;
1459 DWORD DynamicAvailable;
1460 DWORD GroupCount;
1461 DWORD PrivilegeCount;
1462 LUID ModifiedId;
1463} TOKEN_STATISTICS;
1464
1465/*
1466 * ACLs of NT
1467 */
1468
1469#define ACL_REVISION 2
1470
1471#define ACL_REVISION1 1
1472#define ACL_REVISION2 2
1473
1474/* ACEs, directly starting after an ACL */
1475typedef struct _ACE_HEADER {
1476 BYTE AceType;
1477 BYTE AceFlags;
1478 WORD AceSize;
1479} ACE_HEADER,*PACE_HEADER;
1480
1481/* AceType */
1482#define ACCESS_ALLOWED_ACE_TYPE 0
1483#define ACCESS_DENIED_ACE_TYPE 1
1484#define SYSTEM_AUDIT_ACE_TYPE 2
1485#define SYSTEM_ALARM_ACE_TYPE 3
1486
1487/* inherit AceFlags */
1488#define OBJECT_INHERIT_ACE 0x01
1489#define CONTAINER_INHERIT_ACE 0x02
1490#define NO_PROPAGATE_INHERIT_ACE 0x04
1491#define INHERIT_ONLY_ACE 0x08
1492#define VALID_INHERIT_FLAGS 0x0F
1493
1494/* AceFlags mask for what events we (should) audit */
1495#define SUCCESSFUL_ACCESS_ACE_FLAG 0x40
1496#define FAILED_ACCESS_ACE_FLAG 0x80
1497
1498/* different ACEs depending on AceType
1499 * SidStart marks the begin of a SID
1500 * so the thing finally looks like this:
1501 * 0: ACE_HEADER
1502 * 4: ACCESS_MASK
1503 * 8... : SID
1504 */
1505typedef struct _ACCESS_ALLOWED_ACE {
1506 ACE_HEADER Header;
1507 DWORD Mask;
1508 DWORD SidStart;
1509} ACCESS_ALLOWED_ACE,*PACCESS_ALLOWED_ACE;
1510
1511typedef struct _ACCESS_DENIED_ACE {
1512 ACE_HEADER Header;
1513 DWORD Mask;
1514 DWORD SidStart;
1515} ACCESS_DENIED_ACE,*PACCESS_DENIED_ACE;
1516
1517typedef struct _SYSTEM_AUDIT_ACE {
1518 ACE_HEADER Header;
1519 DWORD Mask;
1520 DWORD SidStart;
1521} SYSTEM_AUDIT_ACE,*PSYSTEM_AUDIT_ACE;
1522
1523typedef struct _SYSTEM_ALARM_ACE {
1524 ACE_HEADER Header;
1525 DWORD Mask;
1526 DWORD SidStart;
1527} SYSTEM_ALARM_ACE,*PSYSTEM_ALARM_ACE;
1528
1529typedef enum tagSID_NAME_USE {
1530 SidTypeUser = 1,
1531 SidTypeGroup,
1532 SidTypeDomain,
1533 SidTypeAlias,
1534 SidTypeWellKnownGroup,
1535 SidTypeDeletedAccount,
1536 SidTypeInvalid,
1537 SidTypeUnknown
1538} SID_NAME_USE,*PSID_NAME_USE;
1539
1540/* Access rights */
1541
1542#define DELETE 0x00010000
1543#define READ_CONTROL 0x00020000
1544#define WRITE_DAC 0x00040000
1545#define WRITE_OWNER 0x00080000
1546#define SYNCHRONIZE 0x00100000
1547#define STANDARD_RIGHTS_REQUIRED 0x000f0000
1548
1549#define STANDARD_RIGHTS_READ READ_CONTROL
1550#define STANDARD_RIGHTS_WRITE READ_CONTROL
1551#define STANDARD_RIGHTS_EXECUTE READ_CONTROL
1552
1553#define STANDARD_RIGHTS_ALL 0x001f0000
1554
1555#define SPECIFIC_RIGHTS_ALL 0x0000ffff
1556
1557#define GENERIC_READ 0x80000000
1558#define GENERIC_WRITE 0x40000000
1559#define GENERIC_EXECUTE 0x20000000
1560#define GENERIC_ALL 0x10000000
1561
1562#define MAXIMUM_ALLOWED 0x02000000
1563#define ACCESS_SYSTEM_SECURITY 0x01000000
1564
1565#define EVENT_MODIFY_STATE 0x0002
1566#define EVENT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
1567
1568#define SEMAPHORE_MODIFY_STATE 0x0002
1569#define SEMAPHORE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
1570
1571#define MUTEX_MODIFY_STATE 0x0001
1572#define MUTEX_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x1)
1573
1574#define PROCESS_TERMINATE 0x0001
1575#define PROCESS_CREATE_THREAD 0x0002
1576#define PROCESS_VM_OPERATION 0x0008
1577#define PROCESS_VM_READ 0x0010
1578#define PROCESS_VM_WRITE 0x0020
1579#define PROCESS_DUP_HANDLE 0x0040
1580#define PROCESS_CREATE_PROCESS 0x0080
1581#define PROCESS_SET_QUOTA 0x0100
1582#define PROCESS_SET_INFORMATION 0x0200
1583#define PROCESS_QUERY_INFORMATION 0x0400
1584#define PROCESS_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0xfff)
1585
1586#define THREAD_TERMINATE 0x0001
1587#define THREAD_SUSPEND_RESUME 0x0002
1588#define THREAD_GET_CONTEXT 0x0008
1589#define THREAD_SET_CONTEXT 0x0010
1590#define THREAD_SET_INFORMATION 0x0020
1591#define THREAD_QUERY_INFORMATION 0x0040
1592#define THREAD_SET_THREAD_TOKEN 0x0080
1593#define THREAD_IMPERSONATE 0x0100
1594#define THREAD_DIRECT_IMPERSONATION 0x0200
1595#define THREAD_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3ff)
1596
1597#define THREAD_BASE_PRIORITY_LOWRT 15
1598#define THREAD_BASE_PRIORITY_MAX 2
1599#define THREAD_BASE_PRIORITY_MIN -2
1600#define THREAD_BASE_PRIORITY_IDLE -15
1601
1602#define FILE_READ_DATA 0x0001 /* file & pipe */
1603#define FILE_LIST_DIRECTORY 0x0001 /* directory */
1604#define FILE_WRITE_DATA 0x0002 /* file & pipe */
1605#define FILE_ADD_FILE 0x0002 /* directory */
1606#define FILE_APPEND_DATA 0x0004 /* file */
1607#define FILE_ADD_SUBDIRECTORY 0x0004 /* directory */
1608#define FILE_CREATE_PIPE_INSTANCE 0x0004 /* named pipe */
1609#define FILE_READ_EA 0x0008 /* file & directory */
1610#define FILE_READ_PROPERTIES FILE_READ_EA
1611#define FILE_WRITE_EA 0x0010 /* file & directory */
1612#define FILE_WRITE_PROPERTIES FILE_WRITE_EA
1613#define FILE_EXECUTE 0x0020 /* file */
1614#define FILE_TRAVERSE 0x0020 /* directory */
1615#define FILE_DELETE_CHILD 0x0040 /* directory */
1616#define FILE_READ_ATTRIBUTES 0x0080 /* all */
1617#define FILE_WRITE_ATTRIBUTES 0x0100 /* all */
1618#define FILE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x1ff)
1619
1620#define FILE_GENERIC_READ (STANDARD_RIGHTS_READ | FILE_READ_DATA | \
1621 FILE_READ_ATTRIBUTES | FILE_READ_EA | \
1622 SYNCHRONIZE)
1623#define FILE_GENERIC_WRITE (STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA | \
1624 FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | \
1625 FILE_APPEND_DATA | SYNCHRONIZE)
1626#define FILE_GENERIC_EXECUTE (STANDARD_RIGHTS_EXECUTE | FILE_EXECUTE | \
1627 FILE_READ_ATTRIBUTES | SYNCHRONIZE)
1628
1629
1630/* File attribute flags
1631 */
1632#define FILE_SHARE_READ 0x00000001L
1633#define FILE_SHARE_WRITE 0x00000002L
1634#define FILE_SHARE_DELETE 0x00000004L
1635#define FILE_ATTRIBUTE_READONLY 0x00000001L
1636#define FILE_ATTRIBUTE_HIDDEN 0x00000002L
1637#define FILE_ATTRIBUTE_SYSTEM 0x00000004L
1638#define FILE_ATTRIBUTE_LABEL 0x00000008L /* Not in Windows API */
1639#define FILE_ATTRIBUTE_DIRECTORY 0x00000010L
1640#define FILE_ATTRIBUTE_ARCHIVE 0x00000020L
1641#define FILE_ATTRIBUTE_NORMAL 0x00000080L
1642#define FILE_ATTRIBUTE_TEMPORARY 0x00000100L
1643#define FILE_ATTRIBUTE_ATOMIC_WRITE 0x00000200L
1644#define FILE_ATTRIBUTE_XACTION_WRITE 0x00000400L
1645#define FILE_ATTRIBUTE_COMPRESSED 0x00000800L
1646#define FILE_ATTRIBUTE_OFFLINE 0x00001000L
1647
1648/* File alignments (NT) */
1649#define FILE_BYTE_ALIGNMENT 0x00000000
1650#define FILE_WORD_ALIGNMENT 0x00000001
1651#define FILE_LONG_ALIGNMENT 0x00000003
1652#define FILE_QUAD_ALIGNMENT 0x00000007
1653#define FILE_OCTA_ALIGNMENT 0x0000000f
1654#define FILE_32_BYTE_ALIGNMENT 0x0000001f
1655#define FILE_64_BYTE_ALIGNMENT 0x0000003f
1656#define FILE_128_BYTE_ALIGNMENT 0x0000007f
1657#define FILE_256_BYTE_ALIGNMENT 0x000000ff
1658#define FILE_512_BYTE_ALIGNMENT 0x000001ff
1659
1660/* Registry security values */
1661#define OWNER_SECURITY_INFORMATION 0x00000001
1662#define GROUP_SECURITY_INFORMATION 0x00000002
1663#define DACL_SECURITY_INFORMATION 0x00000004
1664#define SACL_SECURITY_INFORMATION 0x00000008
1665
1666#include "poppack.h"
1667
1668#endif /* __WINE_WINNT_H */
Note: See TracBrowser for help on using the repository browser.