Alexandre Julliard | 329f068 | 1996-04-14 13:21:20 +0000 | [diff] [blame] | 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 | |
Michael Veksler | 17822f4 | 1999-02-09 15:46:25 +0000 | [diff] [blame] | 10 | #include "wintypes.h" |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 11 | |
Michael Veksler | 17822f4 | 1999-02-09 15:46:25 +0000 | [diff] [blame] | 12 | #pragma pack(1) |
Patrik Stridvall | 56d52aa | 1998-11-14 18:24:37 +0000 | [diff] [blame] | 13 | /* Defines */ |
| 14 | |
Michael Veksler | 17822f4 | 1999-02-09 15:46:25 +0000 | [diff] [blame] | 15 | /* Argument 1 passed to the DllEntryProc. */ |
| 16 | #define DLL_PROCESS_DETACH 0 /* detach process (unload library) */ |
| 17 | #define DLL_PROCESS_ATTACH 1 /* attach process (load library) */ |
| 18 | #define DLL_THREAD_ATTACH 2 /* attach new thread */ |
| 19 | #define DLL_THREAD_DETACH 3 /* detach thread */ |
| 20 | |
| 21 | |
| 22 | /* u.x.wProcessorArchitecture (NT) */ |
| 23 | #define PROCESSOR_ARCHITECTURE_INTEL 0 |
| 24 | #define PROCESSOR_ARCHITECTURE_MIPS 1 |
| 25 | #define PROCESSOR_ARCHITECTURE_ALPHA 2 |
| 26 | #define PROCESSOR_ARCHITECTURE_PPC 3 |
| 27 | #define PROCESSOR_ARCHITECTURE_UNKNOWN 0xFFFF |
| 28 | |
| 29 | /* dwProcessorType */ |
| 30 | #define PROCESSOR_INTEL_386 386 |
| 31 | #define PROCESSOR_INTEL_486 486 |
| 32 | #define PROCESSOR_INTEL_PENTIUM 586 |
| 33 | #define PROCESSOR_MIPS_R4000 4000 |
| 34 | #define PROCESSOR_ALPHA_21064 21064 |
| 35 | |
| 36 | |
Patrik Stridvall | 56d52aa | 1998-11-14 18:24:37 +0000 | [diff] [blame] | 37 | #define ANYSIZE_ARRAY 1 |
| 38 | |
Paul Quinn | ea1640f | 1999-03-10 18:03:53 +0000 | [diff] [blame^] | 39 | #define MINCHAR 0x80 |
| 40 | #define MAXCHAR 0x7f |
| 41 | #define MINSHORT 0x8000 |
| 42 | #define MAXSHORT 0x7fff |
| 43 | #define MINLONG 0x80000000 |
| 44 | #define MAXLONG 0x7fffffff |
| 45 | #define MAXBYTE 0xff |
| 46 | #define MAXWORD 0xffff |
| 47 | #define MAXDWORD 0xffffffff |
| 48 | |
Patrik Stridvall | 56d52aa | 1998-11-14 18:24:37 +0000 | [diff] [blame] | 49 | #define FIELD_OFFSET(type, field) \ |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 50 | ((LONG)(INT)&(((type *)0)->field)) |
Patrik Stridvall | 56d52aa | 1998-11-14 18:24:37 +0000 | [diff] [blame] | 51 | |
| 52 | #define CONTAINING_RECORD(address, type, field) \ |
| 53 | ((type *)((PCHAR)(address) - (PCHAR)(&((type *)0)->field))) |
| 54 | |
| 55 | /* Types */ |
| 56 | |
| 57 | typedef BYTE BOOLEAN; |
| 58 | typedef BOOLEAN *PBOOLEAN; |
| 59 | |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 60 | typedef struct _LIST_ENTRY { |
| 61 | struct _LIST_ENTRY *Flink; |
| 62 | struct _LIST_ENTRY *Blink; |
| 63 | } LIST_ENTRY, *PLIST_ENTRY; |
Patrik Stridvall | 56d52aa | 1998-11-14 18:24:37 +0000 | [diff] [blame] | 64 | |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 65 | typedef struct _SINGLE_LIST_ENTRY { |
| 66 | struct _SINGLE_LIST_ENTRY *Next; |
| 67 | } SINGLE_LIST_ENTRY, *PSINGLE_LIST_ENTRY; |
Patrik Stridvall | 56d52aa | 1998-11-14 18:24:37 +0000 | [diff] [blame] | 68 | |
Alexandre Julliard | 329f068 | 1996-04-14 13:21:20 +0000 | [diff] [blame] | 69 | /* Heap flags */ |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 70 | |
Alexandre Julliard | 329f068 | 1996-04-14 13:21:20 +0000 | [diff] [blame] | 71 | #define HEAP_NO_SERIALIZE 0x00000001 |
| 72 | #define HEAP_GROWABLE 0x00000002 |
| 73 | #define HEAP_GENERATE_EXCEPTIONS 0x00000004 |
| 74 | #define HEAP_ZERO_MEMORY 0x00000008 |
| 75 | #define HEAP_REALLOC_IN_PLACE_ONLY 0x00000010 |
| 76 | #define HEAP_TAIL_CHECKING_ENABLED 0x00000020 |
| 77 | #define HEAP_FREE_CHECKING_ENABLED 0x00000040 |
| 78 | #define HEAP_DISABLE_COALESCE_ON_FREE 0x00000080 |
| 79 | #define HEAP_CREATE_ALIGN_16 0x00010000 |
| 80 | #define HEAP_CREATE_ENABLE_TRACING 0x00020000 |
Alexandre Julliard | e2bfa4c | 1996-05-16 18:21:06 +0000 | [diff] [blame] | 81 | #define HEAP_WINE_SEGPTR 0x01000000 /* Not a Win32 flag */ |
| 82 | #define HEAP_WINE_CODESEG 0x02000000 /* Not a Win32 flag */ |
Ulrich Weigand | bf5f693 | 1998-10-11 19:12:16 +0000 | [diff] [blame] | 83 | #define HEAP_WINE_CODE16SEG 0x04000000 /* Not a Win32 flag */ |
Alexandre Julliard | 329f068 | 1996-04-14 13:21:20 +0000 | [diff] [blame] | 84 | |
Alexandre Julliard | 44ed71f | 1997-12-21 19:17:50 +0000 | [diff] [blame] | 85 | /* Processor feature flags. */ |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 86 | #define PF_FLOATING_POINT_PRECISION_ERRATA 0 |
| 87 | #define PF_FLOATING_POINT_EMULATED 1 |
| 88 | #define PF_COMPARE_EXCHANGE_DOUBLE 2 |
| 89 | #define PF_MMX_INSTRUCTIONS_AVAILABLE 3 |
| 90 | #define PF_PPC_MOVEMEM_64BIT_OK 4 |
| 91 | #define PF_ALPHA_BYTE_INSTRUCTIONS 5 |
| 92 | |
Alexandre Julliard | 44ed71f | 1997-12-21 19:17:50 +0000 | [diff] [blame] | 93 | |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 94 | /* The Win32 register context */ |
| 95 | |
| 96 | #define CONTEXT_i386 0x00010000 |
| 97 | #define CONTEXT_i486 CONTEXT_i386 |
| 98 | #define CONTEXT_CONTROL (CONTEXT_i386 | 0x0001) /* SS:SP, CS:IP, FLAGS, BP */ |
| 99 | #define CONTEXT_INTEGER (CONTEXT_i386 | 0x0002) /* AX, BX, CX, DX, SI, DI */ |
| 100 | #define CONTEXT_SEGMENTS (CONTEXT_i386 | 0x0004) /* DS, ES, FS, GS */ |
| 101 | #define CONTEXT_FLOATING_POINT (CONTEXT_i386 | 0x0008L) /* 387 state */ |
| 102 | #define CONTEXT_DEBUG_REGISTERS (CONTEXT_i386 | 0x0010L) /* DB 0-3,6,7 */ |
| 103 | #define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS) |
| 104 | |
| 105 | #define SIZE_OF_80387_REGISTERS 80 |
| 106 | |
| 107 | typedef struct |
| 108 | { |
| 109 | DWORD ControlWord; |
| 110 | DWORD StatusWord; |
| 111 | DWORD TagWord; |
| 112 | DWORD ErrorOffset; |
| 113 | DWORD ErrorSelector; |
| 114 | DWORD DataOffset; |
| 115 | DWORD DataSelector; |
| 116 | BYTE RegisterArea[SIZE_OF_80387_REGISTERS]; |
| 117 | DWORD Cr0NpxState; |
| 118 | } FLOATING_SAVE_AREA; |
| 119 | |
| 120 | typedef struct |
| 121 | { |
| 122 | DWORD ContextFlags; |
| 123 | |
| 124 | /* These are selected by CONTEXT_DEBUG_REGISTERS */ |
| 125 | DWORD Dr0; |
| 126 | DWORD Dr1; |
| 127 | DWORD Dr2; |
| 128 | DWORD Dr3; |
| 129 | DWORD Dr6; |
| 130 | DWORD Dr7; |
| 131 | |
| 132 | /* These are selected by CONTEXT_FLOATING_POINT */ |
| 133 | FLOATING_SAVE_AREA FloatSave; |
| 134 | |
| 135 | /* These are selected by CONTEXT_SEGMENTS */ |
| 136 | DWORD SegGs; |
| 137 | DWORD SegFs; |
| 138 | DWORD SegEs; |
| 139 | DWORD SegDs; |
| 140 | |
| 141 | /* These are selected by CONTEXT_INTEGER */ |
| 142 | DWORD Edi; |
| 143 | DWORD Esi; |
| 144 | DWORD Ebx; |
| 145 | DWORD Edx; |
| 146 | DWORD Ecx; |
| 147 | DWORD Eax; |
| 148 | |
| 149 | /* These are selected by CONTEXT_CONTROL */ |
| 150 | DWORD Ebp; |
| 151 | DWORD Eip; |
| 152 | DWORD SegCs; |
| 153 | DWORD EFlags; |
| 154 | DWORD Esp; |
| 155 | DWORD SegSs; |
| 156 | } CONTEXT, *PCONTEXT; |
| 157 | |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 158 | typedef HANDLE *PHANDLE; |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 159 | |
| 160 | #ifdef __WINE__ |
| 161 | |
| 162 | /* Macros for easier access to context registers */ |
| 163 | |
| 164 | #define EAX_reg(context) ((context)->Eax) |
| 165 | #define EBX_reg(context) ((context)->Ebx) |
| 166 | #define ECX_reg(context) ((context)->Ecx) |
| 167 | #define EDX_reg(context) ((context)->Edx) |
| 168 | #define ESI_reg(context) ((context)->Esi) |
| 169 | #define EDI_reg(context) ((context)->Edi) |
| 170 | #define EBP_reg(context) ((context)->Ebp) |
| 171 | |
| 172 | #define CS_reg(context) ((context)->SegCs) |
| 173 | #define DS_reg(context) ((context)->SegDs) |
| 174 | #define ES_reg(context) ((context)->SegEs) |
| 175 | #define FS_reg(context) ((context)->SegFs) |
| 176 | #define GS_reg(context) ((context)->SegGs) |
| 177 | #define SS_reg(context) ((context)->SegSs) |
| 178 | |
| 179 | #define EFL_reg(context) ((context)->EFlags) |
| 180 | #define EIP_reg(context) ((context)->Eip) |
| 181 | #define ESP_reg(context) ((context)->Esp) |
| 182 | |
| 183 | #define AX_reg(context) (*(WORD*)&EAX_reg(context)) |
| 184 | #define BX_reg(context) (*(WORD*)&EBX_reg(context)) |
| 185 | #define CX_reg(context) (*(WORD*)&ECX_reg(context)) |
| 186 | #define DX_reg(context) (*(WORD*)&EDX_reg(context)) |
| 187 | #define SI_reg(context) (*(WORD*)&ESI_reg(context)) |
| 188 | #define DI_reg(context) (*(WORD*)&EDI_reg(context)) |
| 189 | #define BP_reg(context) (*(WORD*)&EBP_reg(context)) |
| 190 | |
| 191 | #define AL_reg(context) (*(BYTE*)&EAX_reg(context)) |
| 192 | #define AH_reg(context) (*((BYTE*)&EAX_reg(context)+1)) |
| 193 | #define BL_reg(context) (*(BYTE*)&EBX_reg(context)) |
| 194 | #define BH_reg(context) (*((BYTE*)&EBX_reg(context)+1)) |
| 195 | #define CL_reg(context) (*(BYTE*)&ECX_reg(context)) |
| 196 | #define CH_reg(context) (*((BYTE*)&ECX_reg(context)+1)) |
| 197 | #define DL_reg(context) (*(BYTE*)&EDX_reg(context)) |
| 198 | #define DH_reg(context) (*((BYTE*)&EDX_reg(context)+1)) |
| 199 | |
| 200 | #define IP_reg(context) (*(WORD*)&EIP_reg(context)) |
| 201 | #define SP_reg(context) (*(WORD*)&ESP_reg(context)) |
| 202 | |
| 203 | #define FL_reg(context) (*(WORD*)&EFL_reg(context)) |
| 204 | |
| 205 | #define SET_CFLAG(context) (EFL_reg(context) |= 0x0001) |
Joseph Pranevich | 791cd6a | 1998-12-02 19:58:08 +0000 | [diff] [blame] | 206 | #define RESET_CFLAG(context) (EFL_reg(context) &= ~0x0001) |
| 207 | #define SET_ZFLAG(context) (EFL_reg(context) |= 0x0040) |
| 208 | #define RESET_ZFLAG(context) (EFL_reg(context) &= ~0x0040) |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 209 | |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 210 | #define ISV86(context) (EFL_reg(context) & 0x00020000) |
| 211 | #define V86BASE(context) ((context)->Dr7) /* ugly */ |
| 212 | |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 213 | #endif /* __WINE__ */ |
| 214 | |
Alexandre Julliard | 349a953 | 1997-02-02 19:01:52 +0000 | [diff] [blame] | 215 | /* |
| 216 | * Exception codes |
| 217 | */ |
| 218 | |
| 219 | #define STATUS_WAIT_0 0x00000000 |
| 220 | #define STATUS_ABANDONED_WAIT_0 0x00000080 |
| 221 | #define STATUS_USER_APC 0x000000C0 |
| 222 | #define STATUS_TIMEOUT 0x00000102 |
| 223 | #define STATUS_PENDING 0x00000103 |
| 224 | #define STATUS_DATATYPE_MISALIGNMENT 0x80000002 |
| 225 | #define STATUS_BREAKPOINT 0x80000003 |
| 226 | #define STATUS_SINGLE_STEP 0x80000004 |
| 227 | #define STATUS_ACCESS_VIOLATION 0xC0000005 |
| 228 | #define STATUS_IN_PAGE_ERROR 0xC0000006 |
| 229 | #define STATUS_NO_MEMORY 0xC0000017 |
| 230 | #define STATUS_ILLEGAL_INSTRUCTION 0xC000001D |
| 231 | #define STATUS_NONCONTINUABLE_EXCEPTION 0xC0000025 |
| 232 | #define STATUS_INVALID_DISPOSITION 0xC0000026 |
| 233 | #define STATUS_ARRAY_BOUNDS_EXCEEDED 0xC000008C |
| 234 | #define STATUS_FLOAT_DENORMAL_OPERAND 0xC000008D |
| 235 | #define STATUS_FLOAT_DIVIDE_BY_ZERO 0xC000008E |
| 236 | #define STATUS_FLOAT_INEXACT_RESULT 0xC000008F |
| 237 | #define STATUS_FLOAT_INVALID_OPERATION 0xC0000090 |
| 238 | #define STATUS_FLOAT_OVERFLOW 0xC0000091 |
| 239 | #define STATUS_FLOAT_STACK_CHECK 0xC0000092 |
| 240 | #define STATUS_FLOAT_UNDERFLOW 0xC0000093 |
| 241 | #define STATUS_INTEGER_DIVIDE_BY_ZERO 0xC0000094 |
| 242 | #define STATUS_INTEGER_OVERFLOW 0xC0000095 |
| 243 | #define STATUS_PRIVILEGED_INSTRUCTION 0xC0000096 |
| 244 | #define STATUS_STACK_OVERFLOW 0xC00000FD |
| 245 | #define STATUS_CONTROL_C_EXIT 0xC000013A |
| 246 | |
Alexandre Julliard | 2f07306 | 1999-02-21 18:27:28 +0000 | [diff] [blame] | 247 | #define EXCEPTION_ACCESS_VIOLATION STATUS_ACCESS_VIOLATION |
| 248 | #define EXCEPTION_DATATYPE_MISALIGNMENT STATUS_DATATYPE_MISALIGNMENT |
| 249 | #define EXCEPTION_BREAKPOINT STATUS_BREAKPOINT |
| 250 | #define EXCEPTION_SINGLE_STEP STATUS_SINGLE_STEP |
| 251 | #define EXCEPTION_ARRAY_BOUNDS_EXCEEDED STATUS_ARRAY_BOUNDS_EXCEEDED |
| 252 | #define EXCEPTION_FLT_DENORMAL_OPERAND STATUS_FLOAT_DENORMAL_OPERAND |
| 253 | #define EXCEPTION_FLT_DIVIDE_BY_ZERO STATUS_FLOAT_DIVIDE_BY_ZERO |
| 254 | #define EXCEPTION_FLT_INEXACT_RESULT STATUS_FLOAT_INEXACT_RESULT |
| 255 | #define EXCEPTION_FLT_INVALID_OPERATION STATUS_FLOAT_INVALID_OPERATION |
| 256 | #define EXCEPTION_FLT_OVERFLOW STATUS_FLOAT_OVERFLOW |
| 257 | #define EXCEPTION_FLT_STACK_CHECK STATUS_FLOAT_STACK_CHECK |
| 258 | #define EXCEPTION_FLT_UNDERFLOW STATUS_FLOAT_UNDERFLOW |
| 259 | #define EXCEPTION_INT_DIVIDE_BY_ZERO STATUS_INTEGER_DIVIDE_BY_ZERO |
| 260 | #define EXCEPTION_INT_OVERFLOW STATUS_INTEGER_OVERFLOW |
| 261 | #define EXCEPTION_PRIV_INSTRUCTION STATUS_PRIVILEGED_INSTRUCTION |
| 262 | #define EXCEPTION_IN_PAGE_ERROR STATUS_IN_PAGE_ERROR |
| 263 | #define EXCEPTION_ILLEGAL_INSTRUCTION STATUS_ILLEGAL_INSTRUCTION |
| 264 | #define EXCEPTION_NONCONTINUABLE_EXCEPTION STATUS_NONCONTINUABLE_EXCEPTION |
| 265 | #define EXCEPTION_STACK_OVERFLOW STATUS_STACK_OVERFLOW |
| 266 | #define EXCEPTION_INVALID_DISPOSITION STATUS_INVALID_DISPOSITION |
| 267 | #define EXCEPTION_GUARD_PAGE STATUS_GUARD_PAGE_VIOLATION |
| 268 | #define EXCEPTION_INVALID_HANDLE STATUS_INVALID_HANDLE |
| 269 | #define CONTROL_C_EXIT STATUS_CONTROL_C_EXIT |
Alexandre Julliard | 349a953 | 1997-02-02 19:01:52 +0000 | [diff] [blame] | 270 | |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 271 | #define MAXIMUM_WAIT_OBJECTS 64 |
| 272 | #define MAXIMUM_SUSPEND_COUNT 127 |
| 273 | |
| 274 | |
Alexandre Julliard | 349a953 | 1997-02-02 19:01:52 +0000 | [diff] [blame] | 275 | /* |
| 276 | * Return values from the actual exception handlers |
| 277 | */ |
| 278 | |
| 279 | #define ExceptionContinueExecution 0 |
| 280 | #define ExceptionContinueSearch 1 |
| 281 | #define ExceptionNestedException 2 |
| 282 | #define ExceptionCollidedUnwind 3 |
| 283 | |
| 284 | /* |
| 285 | * Return values from filters in except() and from UnhandledExceptionFilter |
| 286 | */ |
| 287 | |
| 288 | #define EXCEPTION_EXECUTE_HANDLER 1 |
| 289 | #define EXCEPTION_CONTINUE_SEARCH 0 |
| 290 | #define EXCEPTION_CONTINUE_EXECUTION -1 |
| 291 | |
| 292 | /* |
| 293 | * From OS/2 2.0 exception handling |
| 294 | * Win32 seems to use the same flags as ExceptionFlags in an EXCEPTION_RECORD |
| 295 | */ |
| 296 | |
| 297 | #define EH_NONCONTINUABLE 0x01 |
| 298 | #define EH_UNWINDING 0x02 |
| 299 | #define EH_EXIT_UNWIND 0x04 |
| 300 | #define EH_STACK_INVALID 0x08 |
| 301 | #define EH_NESTED_CALL 0x10 |
| 302 | |
| 303 | #define EXCEPTION_CONTINUABLE 0 |
| 304 | #define EXCEPTION_NONCONTINUABLE EH_NONCONTINUABLE |
| 305 | |
| 306 | /* |
| 307 | * The exception record used by Win32 to give additional information |
| 308 | * about exception to exception handlers. |
| 309 | */ |
| 310 | |
| 311 | #define EXCEPTION_MAXIMUM_PARAMETERS 15 |
| 312 | |
| 313 | typedef struct __EXCEPTION_RECORD |
| 314 | { |
| 315 | DWORD ExceptionCode; |
| 316 | DWORD ExceptionFlags; |
| 317 | struct __EXCEPTION_RECORD *ExceptionRecord; |
| 318 | |
| 319 | LPVOID ExceptionAddress; |
| 320 | DWORD NumberParameters; |
| 321 | DWORD ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]; |
| 322 | } EXCEPTION_RECORD, *PEXCEPTION_RECORD; |
| 323 | |
| 324 | /* |
| 325 | * The exception pointers structure passed to exception filters |
| 326 | * in except() and the UnhandledExceptionFilter(). |
| 327 | */ |
| 328 | |
| 329 | typedef struct _EXCEPTION_POINTERS |
| 330 | { |
| 331 | PEXCEPTION_RECORD ExceptionRecord; |
| 332 | PCONTEXT ContextRecord; |
| 333 | } EXCEPTION_POINTERS, *PEXCEPTION_POINTERS; |
| 334 | |
Michael Veksler | 17822f4 | 1999-02-09 15:46:25 +0000 | [diff] [blame] | 335 | |
| 336 | #pragma pack(4) |
Alexandre Julliard | 349a953 | 1997-02-02 19:01:52 +0000 | [diff] [blame] | 337 | /* |
| 338 | * function pointer to a exception filter |
| 339 | */ |
| 340 | |
Alexandre Julliard | 77b9918 | 1997-09-14 17:17:23 +0000 | [diff] [blame] | 341 | typedef LONG (CALLBACK *PTOP_LEVEL_EXCEPTION_FILTER)(PEXCEPTION_POINTERS ExceptionInfo); |
Alexandre Julliard | 349a953 | 1997-02-02 19:01:52 +0000 | [diff] [blame] | 342 | typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER; |
| 343 | |
Alexandre Julliard | 670cdc4 | 1997-08-24 16:00:30 +0000 | [diff] [blame] | 344 | DWORD WINAPI UnhandledExceptionFilter( PEXCEPTION_POINTERS epointers ); |
Alexandre Julliard | 349a953 | 1997-02-02 19:01:52 +0000 | [diff] [blame] | 345 | LPTOP_LEVEL_EXCEPTION_FILTER |
Alexandre Julliard | 670cdc4 | 1997-08-24 16:00:30 +0000 | [diff] [blame] | 346 | WINAPI SetUnhandledExceptionFilter( LPTOP_LEVEL_EXCEPTION_FILTER filter ); |
Alexandre Julliard | 349a953 | 1997-02-02 19:01:52 +0000 | [diff] [blame] | 347 | |
Alexandre Julliard | f90efa9 | 1998-06-14 15:24:15 +0000 | [diff] [blame] | 348 | /* |
| 349 | * Here follows typedefs for security and tokens. |
| 350 | */ |
| 351 | |
| 352 | /* |
| 353 | * First a constant for the following typdefs. |
| 354 | */ |
| 355 | |
| 356 | #define ANYSIZE_ARRAY 1 |
| 357 | |
Paul Quinn | ea1640f | 1999-03-10 18:03:53 +0000 | [diff] [blame^] | 358 | /* FIXME: Orphan. What does it point to? */ |
| 359 | typedef PVOID PACCESS_TOKEN; |
| 360 | |
Alexandre Julliard | f90efa9 | 1998-06-14 15:24:15 +0000 | [diff] [blame] | 361 | /* |
| 362 | * TOKEN_INFORMATION_CLASS |
| 363 | */ |
| 364 | |
| 365 | typedef enum _TOKEN_INFORMATION_CLASS { |
| 366 | TokenUser = 1, |
| 367 | TokenGroups, |
| 368 | TokenPrivileges, |
| 369 | TokenOwner, |
| 370 | TokenPrimaryGroup, |
| 371 | TokenDefaultDacl, |
| 372 | TokenSource, |
| 373 | TokenType, |
| 374 | TokenImpersonationLevel, |
| 375 | TokenStatistics |
| 376 | } TOKEN_INFORMATION_CLASS; |
| 377 | |
Francois Gouget | 87e385f | 1999-02-17 17:45:54 +0000 | [diff] [blame] | 378 | #ifndef _SECURITY_DEFINED |
| 379 | #define _SECURITY_DEFINED |
| 380 | |
Juergen Schmied | 3426d85 | 1999-02-19 16:29:05 +0000 | [diff] [blame] | 381 | #pragma pack (1) |
| 382 | |
Francois Gouget | 87e385f | 1999-02-17 17:45:54 +0000 | [diff] [blame] | 383 | typedef struct { |
| 384 | BYTE Value[6]; |
Paul Quinn | ea1640f | 1999-03-10 18:03:53 +0000 | [diff] [blame^] | 385 | } SID_IDENTIFIER_AUTHORITY,*PSID_IDENTIFIER_AUTHORITY,*LPSID_IDENTIFIER_AUTHORITY; |
Francois Gouget | 87e385f | 1999-02-17 17:45:54 +0000 | [diff] [blame] | 386 | |
| 387 | typedef struct _SID { |
| 388 | BYTE Revision; |
| 389 | BYTE SubAuthorityCount; |
| 390 | SID_IDENTIFIER_AUTHORITY IdentifierAuthority; |
| 391 | DWORD SubAuthority[1]; |
| 392 | } SID,*PSID; |
| 393 | |
Juergen Schmied | 7f0c5f3 | 1999-03-09 17:46:10 +0000 | [diff] [blame] | 394 | #define SID_REVISION (1) /* Current revision */ |
| 395 | #define SID_MAX_SUB_AUTHORITIES (15) /* current max subauths */ |
| 396 | #define SID_RECOMMENDED_SUB_AUTHORITIES (1) /* recommended subauths */ |
| 397 | |
| 398 | |
Francois Gouget | 87e385f | 1999-02-17 17:45:54 +0000 | [diff] [blame] | 399 | /* |
| 400 | * ACL |
| 401 | */ |
| 402 | |
| 403 | typedef struct _ACL { |
| 404 | BYTE AclRevision; |
| 405 | BYTE Sbz1; |
| 406 | WORD AclSize; |
| 407 | WORD AceCount; |
| 408 | WORD Sbz2; |
| 409 | } ACL, *PACL; |
| 410 | |
Juergen Schmied | 3426d85 | 1999-02-19 16:29:05 +0000 | [diff] [blame] | 411 | /* SECURITY_DESCRIPTOR */ |
| 412 | #define SECURITY_DESCRIPTOR_REVISION 1 |
| 413 | #define SECURITY_DESCRIPTOR_REVISION1 1 |
| 414 | |
| 415 | |
| 416 | #define SE_OWNER_DEFAULTED 0x0001 |
| 417 | #define SE_GROUP_DEFAULTED 0x0002 |
| 418 | #define SE_DACL_PRESENT 0x0004 |
| 419 | #define SE_DACL_DEFAULTED 0x0008 |
| 420 | #define SE_SACL_PRESENT 0x0010 |
| 421 | #define SE_SACL_DEFAULTED 0x0020 |
| 422 | #define SE_SELF_RELATIVE 0x8000 |
| 423 | |
| 424 | typedef DWORD SECURITY_INFORMATION; |
Francois Gouget | 87e385f | 1999-02-17 17:45:54 +0000 | [diff] [blame] | 425 | typedef WORD SECURITY_DESCRIPTOR_CONTROL; |
| 426 | |
| 427 | /* The security descriptor structure */ |
| 428 | typedef struct { |
| 429 | BYTE Revision; |
| 430 | BYTE Sbz1; |
| 431 | SECURITY_DESCRIPTOR_CONTROL Control; |
| 432 | PSID Owner; |
| 433 | PSID Group; |
| 434 | PACL Sacl; |
| 435 | PACL Dacl; |
| 436 | } SECURITY_DESCRIPTOR, *PSECURITY_DESCRIPTOR; |
| 437 | |
Juergen Schmied | 3426d85 | 1999-02-19 16:29:05 +0000 | [diff] [blame] | 438 | #define SECURITY_DESCRIPTOR_MIN_LENGTH (sizeof(SECURITY_DESCRIPTOR)) |
| 439 | |
Francois Gouget | 87e385f | 1999-02-17 17:45:54 +0000 | [diff] [blame] | 440 | #endif /* _SECURITY_DEFINED */ |
| 441 | |
Alexandre Julliard | f90efa9 | 1998-06-14 15:24:15 +0000 | [diff] [blame] | 442 | /* |
| 443 | * SID_AND_ATTRIBUTES |
| 444 | */ |
| 445 | |
| 446 | typedef struct _SID_AND_ATTRIBUTES { |
| 447 | PSID Sid; |
| 448 | DWORD Attributes; |
| 449 | } SID_AND_ATTRIBUTES ; |
| 450 | |
| 451 | /* |
| 452 | * TOKEN_USER |
| 453 | */ |
| 454 | |
| 455 | typedef struct _TOKEN_USER { |
| 456 | SID_AND_ATTRIBUTES User; |
| 457 | } TOKEN_USER; |
| 458 | |
| 459 | /* |
| 460 | * TOKEN_GROUPS |
| 461 | */ |
| 462 | |
| 463 | typedef struct _TOKEN_GROUPS { |
| 464 | DWORD GroupCount; |
| 465 | SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY]; |
| 466 | } TOKEN_GROUPS; |
| 467 | |
| 468 | /* |
| 469 | * LUID_AND_ATTRIBUTES |
| 470 | */ |
| 471 | |
Michael Veksler | 17822f4 | 1999-02-09 15:46:25 +0000 | [diff] [blame] | 472 | typedef struct _LARGE_INTEGER |
| 473 | { |
| 474 | DWORD LowPart; |
| 475 | LONG HighPart; |
Paul Quinn | ea1640f | 1999-03-10 18:03:53 +0000 | [diff] [blame^] | 476 | } LARGE_INTEGER, *LPLARGE_INTEGER, *PLARGE_INTEGER; |
Michael Veksler | 17822f4 | 1999-02-09 15:46:25 +0000 | [diff] [blame] | 477 | |
| 478 | typedef struct _ULARGE_INTEGER |
| 479 | { |
| 480 | DWORD LowPart; |
| 481 | DWORD HighPart; |
Paul Quinn | ea1640f | 1999-03-10 18:03:53 +0000 | [diff] [blame^] | 482 | } ULARGE_INTEGER, *LPULARGE_INTEGER, *PULARGE_INTEGER; |
Michael Veksler | 17822f4 | 1999-02-09 15:46:25 +0000 | [diff] [blame] | 483 | |
Paul Quinn | ea1640f | 1999-03-10 18:03:53 +0000 | [diff] [blame^] | 484 | /* |
| 485 | * Locally Unique Identifier |
| 486 | */ |
| 487 | |
| 488 | typedef LARGE_INTEGER LUID,*PLUID; |
Michael Veksler | 17822f4 | 1999-02-09 15:46:25 +0000 | [diff] [blame] | 489 | |
Alexandre Julliard | f90efa9 | 1998-06-14 15:24:15 +0000 | [diff] [blame] | 490 | typedef struct _LUID_AND_ATTRIBUTES { |
| 491 | LUID Luid; |
| 492 | DWORD Attributes; |
| 493 | } LUID_AND_ATTRIBUTES; |
| 494 | |
| 495 | /* |
| 496 | * TOKEN_PRIVILEGES |
| 497 | */ |
| 498 | |
| 499 | typedef struct _TOKEN_PRIVILEGES { |
| 500 | DWORD PrivilegeCount; |
| 501 | LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY]; |
Juergen Schmied | cdbdab7 | 1999-02-12 13:44:38 +0000 | [diff] [blame] | 502 | } TOKEN_PRIVILEGES, *PTOKEN_PRIVILEGES; |
Alexandre Julliard | f90efa9 | 1998-06-14 15:24:15 +0000 | [diff] [blame] | 503 | |
| 504 | /* |
| 505 | * TOKEN_OWNER |
| 506 | */ |
| 507 | |
| 508 | typedef struct _TOKEN_OWNER { |
| 509 | PSID Owner; |
| 510 | } TOKEN_OWNER; |
| 511 | |
| 512 | /* |
| 513 | * TOKEN_PRIMARY_GROUP |
| 514 | */ |
| 515 | |
| 516 | typedef struct _TOKEN_PRIMARY_GROUP { |
| 517 | PSID PrimaryGroup; |
| 518 | } TOKEN_PRIMARY_GROUP; |
| 519 | |
Paul Quinn | ea1640f | 1999-03-10 18:03:53 +0000 | [diff] [blame^] | 520 | |
Alexandre Julliard | f90efa9 | 1998-06-14 15:24:15 +0000 | [diff] [blame] | 521 | /* |
Alexandre Julliard | f90efa9 | 1998-06-14 15:24:15 +0000 | [diff] [blame] | 522 | * TOKEN_DEFAULT_DACL |
| 523 | */ |
| 524 | |
| 525 | typedef struct _TOKEN_DEFAULT_DACL { |
Juergen Schmied | cdbdab7 | 1999-02-12 13:44:38 +0000 | [diff] [blame] | 526 | PACL DefaultDacl; |
Alexandre Julliard | f90efa9 | 1998-06-14 15:24:15 +0000 | [diff] [blame] | 527 | } TOKEN_DEFAULT_DACL; |
| 528 | |
| 529 | /* |
| 530 | * TOKEN_SOURCEL |
| 531 | */ |
| 532 | |
| 533 | typedef struct _TOKEN_SOURCE { |
| 534 | char Sourcename[8]; |
| 535 | LUID SourceIdentifier; |
| 536 | } TOKEN_SOURCE; |
| 537 | |
| 538 | /* |
| 539 | * TOKEN_TYPE |
| 540 | */ |
| 541 | |
| 542 | typedef enum tagTOKEN_TYPE { |
| 543 | TokenPrimary = 1, |
| 544 | TokenImpersonation |
| 545 | } TOKEN_TYPE; |
| 546 | |
| 547 | /* |
| 548 | * SECURITY_IMPERSONATION_LEVEL |
| 549 | */ |
| 550 | |
| 551 | typedef enum _SECURITY_IMPERSONATION_LEVEL { |
| 552 | SecurityAnonymous, |
| 553 | SecurityIdentification, |
| 554 | SecurityImpersonation, |
| 555 | SecurityDelegation |
| 556 | } SECURITY_IMPERSONATION_LEVEL; |
| 557 | |
| 558 | |
Francois Gouget | 87e385f | 1999-02-17 17:45:54 +0000 | [diff] [blame] | 559 | |
Alexandre Julliard | f90efa9 | 1998-06-14 15:24:15 +0000 | [diff] [blame] | 560 | /* |
| 561 | * TOKEN_STATISTICS |
| 562 | */ |
| 563 | |
| 564 | typedef struct _TOKEN_STATISTICS { |
| 565 | LUID TokenId; |
| 566 | LUID AuthenticationId; |
| 567 | LARGE_INTEGER ExpirationTime; |
| 568 | TOKEN_TYPE TokenType; |
| 569 | SECURITY_IMPERSONATION_LEVEL ImpersonationLevel; |
| 570 | DWORD DynamicCharged; |
| 571 | DWORD DynamicAvailable; |
| 572 | DWORD GroupCount; |
| 573 | DWORD PrivilegeCount; |
| 574 | LUID ModifiedId; |
| 575 | } TOKEN_STATISTICS; |
| 576 | |
Juergen Schmied | 7f0c5f3 | 1999-03-09 17:46:10 +0000 | [diff] [blame] | 577 | /* |
| 578 | * ACLs of NT |
| 579 | */ |
| 580 | |
| 581 | #define ACL_REVISION 2 |
| 582 | |
| 583 | #define ACL_REVISION1 1 |
| 584 | #define ACL_REVISION2 2 |
| 585 | |
| 586 | /* ACEs, directly starting after an ACL */ |
| 587 | typedef struct _ACE_HEADER { |
| 588 | BYTE AceType; |
| 589 | BYTE AceFlags; |
| 590 | WORD AceSize; |
| 591 | } ACE_HEADER,*PACE_HEADER; |
| 592 | |
| 593 | /* AceType */ |
| 594 | #define ACCESS_ALLOWED_ACE_TYPE 0 |
| 595 | #define ACCESS_DENIED_ACE_TYPE 1 |
| 596 | #define SYSTEM_AUDIT_ACE_TYPE 2 |
| 597 | #define SYSTEM_ALARM_ACE_TYPE 3 |
| 598 | |
| 599 | /* inherit AceFlags */ |
| 600 | #define OBJECT_INHERIT_ACE 0x01 |
| 601 | #define CONTAINER_INHERIT_ACE 0x02 |
| 602 | #define NO_PROPAGATE_INHERIT_ACE 0x04 |
| 603 | #define INHERIT_ONLY_ACE 0x08 |
| 604 | #define VALID_INHERIT_FLAGS 0x0F |
| 605 | |
| 606 | /* AceFlags mask for what events we (should) audit */ |
| 607 | #define SUCCESSFUL_ACCESS_ACE_FLAG 0x40 |
| 608 | #define FAILED_ACCESS_ACE_FLAG 0x80 |
| 609 | |
| 610 | /* different ACEs depending on AceType |
| 611 | * SidStart marks the begin of a SID |
| 612 | * so the thing finally looks like this: |
| 613 | * 0: ACE_HEADER |
| 614 | * 4: ACCESS_MASK |
| 615 | * 8... : SID |
| 616 | */ |
| 617 | typedef struct _ACCESS_ALLOWED_ACE { |
| 618 | ACE_HEADER Header; |
| 619 | DWORD Mask; |
| 620 | DWORD SidStart; |
| 621 | } ACCESS_ALLOWED_ACE,*PACCESS_ALLOWED_ACE; |
| 622 | |
| 623 | typedef struct _ACCESS_DENIED_ACE { |
| 624 | ACE_HEADER Header; |
| 625 | DWORD Mask; |
| 626 | DWORD SidStart; |
| 627 | } ACCESS_DENIED_ACE,*PACCESS_DENIED_ACE; |
| 628 | |
| 629 | typedef struct _SYSTEM_AUDIT_ACE { |
| 630 | ACE_HEADER Header; |
| 631 | DWORD Mask; |
| 632 | DWORD SidStart; |
| 633 | } SYSTEM_AUDIT_ACE,*PSYSTEM_AUDIT_ACE; |
| 634 | |
| 635 | typedef struct _SYSTEM_ALARM_ACE { |
| 636 | ACE_HEADER Header; |
| 637 | DWORD Mask; |
| 638 | DWORD SidStart; |
| 639 | } SYSTEM_ALARM_ACE,*PSYSTEM_ALARM_ACE; |
| 640 | |
| 641 | typedef enum tagSID_NAME_USE { |
| 642 | SidTypeUser = 1, |
| 643 | SidTypeGroup, |
| 644 | SidTypeDomain, |
| 645 | SidTypeAlias, |
| 646 | SidTypeWellKnownGroup, |
| 647 | SidTypeDeletedAccount, |
| 648 | SidTypeInvalid, |
| 649 | SidTypeUnknown |
| 650 | } SID_NAME_USE,*PSID_NAME_USE; |
| 651 | |
Alexandre Julliard | 03468f7 | 1998-02-15 19:40:49 +0000 | [diff] [blame] | 652 | /* Access rights */ |
| 653 | |
| 654 | #define DELETE 0x00010000 |
| 655 | #define READ_CONTROL 0x00020000 |
| 656 | #define WRITE_DAC 0x00040000 |
| 657 | #define WRITE_OWNER 0x00080000 |
| 658 | #define SYNCHRONIZE 0x00100000 |
| 659 | #define STANDARD_RIGHTS_REQUIRED 0x000f0000 |
| 660 | |
| 661 | #define STANDARD_RIGHTS_READ READ_CONTROL |
| 662 | #define STANDARD_RIGHTS_WRITE READ_CONTROL |
| 663 | #define STANDARD_RIGHTS_EXECUTE READ_CONTROL |
| 664 | |
| 665 | #define STANDARD_RIGHTS_ALL 0x001f0000 |
| 666 | |
| 667 | #define SPECIFIC_RIGHTS_ALL 0x0000ffff |
| 668 | |
| 669 | #define GENERIC_READ 0x80000000 |
| 670 | #define GENERIC_WRITE 0x40000000 |
| 671 | #define GENERIC_EXECUTE 0x20000000 |
| 672 | #define GENERIC_ALL 0x10000000 |
| 673 | |
| 674 | #define EVENT_MODIFY_STATE 0x0002 |
| 675 | #define EVENT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3) |
| 676 | |
| 677 | #define SEMAPHORE_MODIFY_STATE 0x0002 |
| 678 | #define SEMAPHORE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3) |
| 679 | |
| 680 | #define MUTEX_MODIFY_STATE 0x0001 |
| 681 | #define MUTEX_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x1) |
| 682 | |
| 683 | #define PROCESS_TERMINATE 0x0001 |
| 684 | #define PROCESS_CREATE_THREAD 0x0002 |
| 685 | #define PROCESS_VM_OPERATION 0x0008 |
| 686 | #define PROCESS_VM_READ 0x0010 |
| 687 | #define PROCESS_VM_WRITE 0x0020 |
| 688 | #define PROCESS_DUP_HANDLE 0x0040 |
| 689 | #define PROCESS_CREATE_PROCESS 0x0080 |
| 690 | #define PROCESS_SET_QUOTA 0x0100 |
| 691 | #define PROCESS_SET_INFORMATION 0x0200 |
| 692 | #define PROCESS_QUERY_INFORMATION 0x0400 |
| 693 | #define PROCESS_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0xfff) |
| 694 | |
| 695 | #define THREAD_TERMINATE 0x0001 |
| 696 | #define THREAD_SUSPEND_RESUME 0x0002 |
| 697 | #define THREAD_GET_CONTEXT 0x0008 |
| 698 | #define THREAD_SET_CONTEXT 0x0010 |
| 699 | #define THREAD_SET_INFORMATION 0x0020 |
| 700 | #define THREAD_QUERY_INFORMATION 0x0040 |
| 701 | #define THREAD_SET_THREAD_TOKEN 0x0080 |
| 702 | #define THREAD_IMPERSONATE 0x0100 |
| 703 | #define THREAD_DIRECT_IMPERSONATION 0x0200 |
| 704 | #define THREAD_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3ff) |
| 705 | |
Paul Quinn | ea1640f | 1999-03-10 18:03:53 +0000 | [diff] [blame^] | 706 | #define THREAD_BASE_PRIORITY_LOWRT 15 |
| 707 | #define THREAD_BASE_PRIORITY_MAX 2 |
| 708 | #define THREAD_BASE_PRIORITY_MIN -2 |
| 709 | #define THREAD_BASE_PRIORITY_IDLE -15 |
| 710 | |
Alexandre Julliard | 03468f7 | 1998-02-15 19:40:49 +0000 | [diff] [blame] | 711 | #define FILE_READ_DATA 0x0001 /* file & pipe */ |
| 712 | #define FILE_LIST_DIRECTORY 0x0001 /* directory */ |
| 713 | #define FILE_WRITE_DATA 0x0002 /* file & pipe */ |
| 714 | #define FILE_ADD_FILE 0x0002 /* directory */ |
| 715 | #define FILE_APPEND_DATA 0x0004 /* file */ |
| 716 | #define FILE_ADD_SUBDIRECTORY 0x0004 /* directory */ |
| 717 | #define FILE_CREATE_PIPE_INSTANCE 0x0004 /* named pipe */ |
| 718 | #define FILE_READ_EA 0x0008 /* file & directory */ |
| 719 | #define FILE_READ_PROPERTIES FILE_READ_EA |
| 720 | #define FILE_WRITE_EA 0x0010 /* file & directory */ |
| 721 | #define FILE_WRITE_PROPERTIES FILE_WRITE_EA |
| 722 | #define FILE_EXECUTE 0x0020 /* file */ |
| 723 | #define FILE_TRAVERSE 0x0020 /* directory */ |
| 724 | #define FILE_DELETE_CHILD 0x0040 /* directory */ |
| 725 | #define FILE_READ_ATTRIBUTES 0x0080 /* all */ |
| 726 | #define FILE_WRITE_ATTRIBUTES 0x0100 /* all */ |
| 727 | #define FILE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x1ff) |
| 728 | |
| 729 | #define FILE_GENERIC_READ (STANDARD_RIGHTS_READ | FILE_READ_DATA | \ |
| 730 | FILE_READ_ATTRIBUTES | FILE_READ_EA | \ |
| 731 | SYNCHRONIZE) |
| 732 | #define FILE_GENERIC_WRITE (STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA | \ |
| 733 | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | \ |
| 734 | FILE_APPEND_DATA | SYNCHRONIZE) |
| 735 | #define FILE_GENERIC_EXECUTE (STANDARD_RIGHTS_EXECUTE | FILE_EXECUTE | \ |
| 736 | FILE_READ_ATTRIBUTES | SYNCHRONIZE) |
| 737 | |
Alexandre Julliard | a845b88 | 1998-06-01 10:44:35 +0000 | [diff] [blame] | 738 | |
Michael Veksler | 17822f4 | 1999-02-09 15:46:25 +0000 | [diff] [blame] | 739 | /* File attribute flags |
| 740 | */ |
| 741 | #define FILE_SHARE_READ 0x00000001L |
| 742 | #define FILE_SHARE_WRITE 0x00000002L |
| 743 | #define FILE_SHARE_DELETE 0x00000004L |
| 744 | #define FILE_ATTRIBUTE_READONLY 0x00000001L |
| 745 | #define FILE_ATTRIBUTE_HIDDEN 0x00000002L |
| 746 | #define FILE_ATTRIBUTE_SYSTEM 0x00000004L |
| 747 | #define FILE_ATTRIBUTE_LABEL 0x00000008L /* Not in Windows API */ |
| 748 | #define FILE_ATTRIBUTE_DIRECTORY 0x00000010L |
| 749 | #define FILE_ATTRIBUTE_ARCHIVE 0x00000020L |
| 750 | #define FILE_ATTRIBUTE_NORMAL 0x00000080L |
| 751 | #define FILE_ATTRIBUTE_TEMPORARY 0x00000100L |
| 752 | #define FILE_ATTRIBUTE_ATOMIC_WRITE 0x00000200L |
| 753 | #define FILE_ATTRIBUTE_XACTION_WRITE 0x00000400L |
| 754 | #define FILE_ATTRIBUTE_COMPRESSED 0x00000800L |
| 755 | #define FILE_ATTRIBUTE_OFFLINE 0x00001000L |
| 756 | |
| 757 | /* File alignments (NT) */ |
| 758 | #define FILE_BYTE_ALIGNMENT 0x00000000 |
| 759 | #define FILE_WORD_ALIGNMENT 0x00000001 |
| 760 | #define FILE_LONG_ALIGNMENT 0x00000003 |
| 761 | #define FILE_QUAD_ALIGNMENT 0x00000007 |
| 762 | #define FILE_OCTA_ALIGNMENT 0x0000000f |
| 763 | #define FILE_32_BYTE_ALIGNMENT 0x0000001f |
| 764 | #define FILE_64_BYTE_ALIGNMENT 0x0000003f |
| 765 | #define FILE_128_BYTE_ALIGNMENT 0x0000007f |
| 766 | #define FILE_256_BYTE_ALIGNMENT 0x000000ff |
| 767 | #define FILE_512_BYTE_ALIGNMENT 0x000001ff |
| 768 | |
Alexandre Julliard | a845b88 | 1998-06-01 10:44:35 +0000 | [diff] [blame] | 769 | /* Registry security values */ |
| 770 | #define OWNER_SECURITY_INFORMATION 0x00000001 |
| 771 | #define GROUP_SECURITY_INFORMATION 0x00000002 |
| 772 | #define DACL_SECURITY_INFORMATION 0x00000004 |
| 773 | #define SACL_SECURITY_INFORMATION 0x00000008 |
| 774 | |
Alexandre Julliard | 329f068 | 1996-04-14 13:21:20 +0000 | [diff] [blame] | 775 | #endif /* __WINE_WINNT_H */ |