2 * Win32 definitions for Windows NT
4 * Copyright 1996 Alexandre Julliard
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 */
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
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
37 #define ANYSIZE_ARRAY 1
41 #define MINSHORT 0x8000
42 #define MAXSHORT 0x7fff
43 #define MINLONG 0x80000000
44 #define MAXLONG 0x7fffffff
46 #define MAXWORD 0xffff
47 #define MAXDWORD 0xffffffff
49 #define FIELD_OFFSET(type, field) \
50 ((LONG)(INT)&(((type *)0)->field))
52 #define CONTAINING_RECORD(address, type, field) \
53 ((type *)((PCHAR)(address) - (PCHAR)(&((type *)0)->field)))
58 typedef BOOLEAN *PBOOLEAN;
60 typedef struct _LIST_ENTRY {
61 struct _LIST_ENTRY *Flink;
62 struct _LIST_ENTRY *Blink;
63 } LIST_ENTRY, *PLIST_ENTRY;
65 typedef struct _SINGLE_LIST_ENTRY {
66 struct _SINGLE_LIST_ENTRY *Next;
67 } SINGLE_LIST_ENTRY, *PSINGLE_LIST_ENTRY;
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
81 #define HEAP_WINE_SEGPTR 0x01000000 /* Not a Win32 flag */
82 #define HEAP_WINE_CODESEG 0x02000000 /* Not a Win32 flag */
83 #define HEAP_WINE_CODE16SEG 0x04000000 /* Not a Win32 flag */
85 /* Processor feature flags. */
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
94 /* The Win32 register context */
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)
105 #define SIZE_OF_80387_REGISTERS 80
116 BYTE RegisterArea[SIZE_OF_80387_REGISTERS];
118 } FLOATING_SAVE_AREA;
124 /* These are selected by CONTEXT_DEBUG_REGISTERS */
132 /* These are selected by CONTEXT_FLOATING_POINT */
133 FLOATING_SAVE_AREA FloatSave;
135 /* These are selected by CONTEXT_SEGMENTS */
141 /* These are selected by CONTEXT_INTEGER */
149 /* These are selected by CONTEXT_CONTROL */
156 } CONTEXT, *PCONTEXT;
158 typedef HANDLE *PHANDLE;
162 /* Macros for easier access to context registers */
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)
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)
179 #define EFL_reg(context) ((context)->EFlags)
180 #define EIP_reg(context) ((context)->Eip)
181 #define ESP_reg(context) ((context)->Esp)
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))
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))
200 #define IP_reg(context) (*(WORD*)&EIP_reg(context))
201 #define SP_reg(context) (*(WORD*)&ESP_reg(context))
203 #define FL_reg(context) (*(WORD*)&EFL_reg(context))
205 #define SET_CFLAG(context) (EFL_reg(context) |= 0x0001)
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)
210 #define ISV86(context) (EFL_reg(context) & 0x00020000)
211 #define V86BASE(context) ((context)->Dr7) /* ugly */
213 #endif /* __WINE__ */
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
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
271 #define MAXIMUM_WAIT_OBJECTS 64
272 #define MAXIMUM_SUSPEND_COUNT 127
276 * Return values from the actual exception handlers
279 #define ExceptionContinueExecution 0
280 #define ExceptionContinueSearch 1
281 #define ExceptionNestedException 2
282 #define ExceptionCollidedUnwind 3
285 * Return values from filters in except() and from UnhandledExceptionFilter
288 #define EXCEPTION_EXECUTE_HANDLER 1
289 #define EXCEPTION_CONTINUE_SEARCH 0
290 #define EXCEPTION_CONTINUE_EXECUTION -1
293 * From OS/2 2.0 exception handling
294 * Win32 seems to use the same flags as ExceptionFlags in an EXCEPTION_RECORD
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
303 #define EXCEPTION_CONTINUABLE 0
304 #define EXCEPTION_NONCONTINUABLE EH_NONCONTINUABLE
307 * The exception record used by Win32 to give additional information
308 * about exception to exception handlers.
311 #define EXCEPTION_MAXIMUM_PARAMETERS 15
313 typedef struct __EXCEPTION_RECORD
316 DWORD ExceptionFlags;
317 struct __EXCEPTION_RECORD *ExceptionRecord;
319 LPVOID ExceptionAddress;
320 DWORD NumberParameters;
321 DWORD ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
322 } EXCEPTION_RECORD, *PEXCEPTION_RECORD;
325 * The exception pointers structure passed to exception filters
326 * in except() and the UnhandledExceptionFilter().
329 typedef struct _EXCEPTION_POINTERS
331 PEXCEPTION_RECORD ExceptionRecord;
332 PCONTEXT ContextRecord;
333 } EXCEPTION_POINTERS, *PEXCEPTION_POINTERS;
338 * function pointer to a exception filter
341 typedef LONG (CALLBACK *PTOP_LEVEL_EXCEPTION_FILTER)(PEXCEPTION_POINTERS ExceptionInfo);
342 typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER;
344 DWORD WINAPI UnhandledExceptionFilter( PEXCEPTION_POINTERS epointers );
345 LPTOP_LEVEL_EXCEPTION_FILTER
346 WINAPI SetUnhandledExceptionFilter( LPTOP_LEVEL_EXCEPTION_FILTER filter );
349 * Here follows typedefs for security and tokens.
353 * First a constant for the following typdefs.
356 #define ANYSIZE_ARRAY 1
358 /* FIXME: Orphan. What does it point to? */
359 typedef PVOID PACCESS_TOKEN;
362 * TOKEN_INFORMATION_CLASS
365 typedef enum _TOKEN_INFORMATION_CLASS {
374 TokenImpersonationLevel,
376 } TOKEN_INFORMATION_CLASS;
378 #ifndef _SECURITY_DEFINED
379 #define _SECURITY_DEFINED
381 #include "pshpack1.h"
385 } SID_IDENTIFIER_AUTHORITY,*PSID_IDENTIFIER_AUTHORITY,*LPSID_IDENTIFIER_AUTHORITY;
387 typedef struct _SID {
389 BYTE SubAuthorityCount;
390 SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
391 DWORD SubAuthority[1];
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 */
403 typedef struct _ACL {
411 /* SECURITY_DESCRIPTOR */
412 #define SECURITY_DESCRIPTOR_REVISION 1
413 #define SECURITY_DESCRIPTOR_REVISION1 1
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
424 typedef DWORD SECURITY_INFORMATION;
425 typedef WORD SECURITY_DESCRIPTOR_CONTROL;
427 /* The security descriptor structure */
431 SECURITY_DESCRIPTOR_CONTROL Control;
436 } SECURITY_DESCRIPTOR, *PSECURITY_DESCRIPTOR;
438 #define SECURITY_DESCRIPTOR_MIN_LENGTH (sizeof(SECURITY_DESCRIPTOR))
442 #endif /* _SECURITY_DEFINED */
444 #include "pshpack1.h"
450 typedef struct _SID_AND_ATTRIBUTES {
453 } SID_AND_ATTRIBUTES ;
459 typedef struct _TOKEN_USER {
460 SID_AND_ATTRIBUTES User;
467 typedef struct _TOKEN_GROUPS {
469 SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY];
473 * LUID_AND_ATTRIBUTES
476 typedef struct _LARGE_INTEGER
480 } LARGE_INTEGER, *LPLARGE_INTEGER, *PLARGE_INTEGER;
482 typedef struct _ULARGE_INTEGER
486 } ULARGE_INTEGER, *LPULARGE_INTEGER, *PULARGE_INTEGER;
489 * Locally Unique Identifier
492 typedef LARGE_INTEGER LUID,*PLUID;
494 typedef struct _LUID_AND_ATTRIBUTES {
497 } LUID_AND_ATTRIBUTES;
503 typedef struct _TOKEN_PRIVILEGES {
504 DWORD PrivilegeCount;
505 LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY];
506 } TOKEN_PRIVILEGES, *PTOKEN_PRIVILEGES;
512 typedef struct _TOKEN_OWNER {
517 * TOKEN_PRIMARY_GROUP
520 typedef struct _TOKEN_PRIMARY_GROUP {
522 } TOKEN_PRIMARY_GROUP;
529 typedef struct _TOKEN_DEFAULT_DACL {
531 } TOKEN_DEFAULT_DACL;
537 typedef struct _TOKEN_SOURCE {
539 LUID SourceIdentifier;
546 typedef enum tagTOKEN_TYPE {
552 * SECURITY_IMPERSONATION_LEVEL
555 typedef enum _SECURITY_IMPERSONATION_LEVEL {
557 SecurityIdentification,
558 SecurityImpersonation,
560 } SECURITY_IMPERSONATION_LEVEL;
563 typedef BOOLEAN SECURITY_CONTEXT_TRACKING_MODE,
564 * PSECURITY_CONTEXT_TRACKING_MODE;
569 typedef struct _SECURITY_QUALITY_OF_SERVICE {
571 SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
572 SECURITY_CONTEXT_TRACKING_MODE ContextTrackingMode;
574 } SECURITY_QUALITY_OF_SERVICE, *PSECURITY_QUALITY_OF_SERVICE;
580 typedef struct _TOKEN_STATISTICS {
582 LUID AuthenticationId;
583 LARGE_INTEGER ExpirationTime;
584 TOKEN_TYPE TokenType;
585 SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
586 DWORD DynamicCharged;
587 DWORD DynamicAvailable;
589 DWORD PrivilegeCount;
597 #define ACL_REVISION 2
599 #define ACL_REVISION1 1
600 #define ACL_REVISION2 2
602 /* ACEs, directly starting after an ACL */
603 typedef struct _ACE_HEADER {
607 } ACE_HEADER,*PACE_HEADER;
610 #define ACCESS_ALLOWED_ACE_TYPE 0
611 #define ACCESS_DENIED_ACE_TYPE 1
612 #define SYSTEM_AUDIT_ACE_TYPE 2
613 #define SYSTEM_ALARM_ACE_TYPE 3
615 /* inherit AceFlags */
616 #define OBJECT_INHERIT_ACE 0x01
617 #define CONTAINER_INHERIT_ACE 0x02
618 #define NO_PROPAGATE_INHERIT_ACE 0x04
619 #define INHERIT_ONLY_ACE 0x08
620 #define VALID_INHERIT_FLAGS 0x0F
622 /* AceFlags mask for what events we (should) audit */
623 #define SUCCESSFUL_ACCESS_ACE_FLAG 0x40
624 #define FAILED_ACCESS_ACE_FLAG 0x80
626 /* different ACEs depending on AceType
627 * SidStart marks the begin of a SID
628 * so the thing finally looks like this:
633 typedef struct _ACCESS_ALLOWED_ACE {
637 } ACCESS_ALLOWED_ACE,*PACCESS_ALLOWED_ACE;
639 typedef struct _ACCESS_DENIED_ACE {
643 } ACCESS_DENIED_ACE,*PACCESS_DENIED_ACE;
645 typedef struct _SYSTEM_AUDIT_ACE {
649 } SYSTEM_AUDIT_ACE,*PSYSTEM_AUDIT_ACE;
651 typedef struct _SYSTEM_ALARM_ACE {
655 } SYSTEM_ALARM_ACE,*PSYSTEM_ALARM_ACE;
657 typedef enum tagSID_NAME_USE {
662 SidTypeWellKnownGroup,
663 SidTypeDeletedAccount,
666 } SID_NAME_USE,*PSID_NAME_USE;
670 #define DELETE 0x00010000
671 #define READ_CONTROL 0x00020000
672 #define WRITE_DAC 0x00040000
673 #define WRITE_OWNER 0x00080000
674 #define SYNCHRONIZE 0x00100000
675 #define STANDARD_RIGHTS_REQUIRED 0x000f0000
677 #define STANDARD_RIGHTS_READ READ_CONTROL
678 #define STANDARD_RIGHTS_WRITE READ_CONTROL
679 #define STANDARD_RIGHTS_EXECUTE READ_CONTROL
681 #define STANDARD_RIGHTS_ALL 0x001f0000
683 #define SPECIFIC_RIGHTS_ALL 0x0000ffff
685 #define GENERIC_READ 0x80000000
686 #define GENERIC_WRITE 0x40000000
687 #define GENERIC_EXECUTE 0x20000000
688 #define GENERIC_ALL 0x10000000
690 #define EVENT_MODIFY_STATE 0x0002
691 #define EVENT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
693 #define SEMAPHORE_MODIFY_STATE 0x0002
694 #define SEMAPHORE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
696 #define MUTEX_MODIFY_STATE 0x0001
697 #define MUTEX_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x1)
699 #define PROCESS_TERMINATE 0x0001
700 #define PROCESS_CREATE_THREAD 0x0002
701 #define PROCESS_VM_OPERATION 0x0008
702 #define PROCESS_VM_READ 0x0010
703 #define PROCESS_VM_WRITE 0x0020
704 #define PROCESS_DUP_HANDLE 0x0040
705 #define PROCESS_CREATE_PROCESS 0x0080
706 #define PROCESS_SET_QUOTA 0x0100
707 #define PROCESS_SET_INFORMATION 0x0200
708 #define PROCESS_QUERY_INFORMATION 0x0400
709 #define PROCESS_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0xfff)
711 #define THREAD_TERMINATE 0x0001
712 #define THREAD_SUSPEND_RESUME 0x0002
713 #define THREAD_GET_CONTEXT 0x0008
714 #define THREAD_SET_CONTEXT 0x0010
715 #define THREAD_SET_INFORMATION 0x0020
716 #define THREAD_QUERY_INFORMATION 0x0040
717 #define THREAD_SET_THREAD_TOKEN 0x0080
718 #define THREAD_IMPERSONATE 0x0100
719 #define THREAD_DIRECT_IMPERSONATION 0x0200
720 #define THREAD_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3ff)
722 #define THREAD_BASE_PRIORITY_LOWRT 15
723 #define THREAD_BASE_PRIORITY_MAX 2
724 #define THREAD_BASE_PRIORITY_MIN -2
725 #define THREAD_BASE_PRIORITY_IDLE -15
727 #define FILE_READ_DATA 0x0001 /* file & pipe */
728 #define FILE_LIST_DIRECTORY 0x0001 /* directory */
729 #define FILE_WRITE_DATA 0x0002 /* file & pipe */
730 #define FILE_ADD_FILE 0x0002 /* directory */
731 #define FILE_APPEND_DATA 0x0004 /* file */
732 #define FILE_ADD_SUBDIRECTORY 0x0004 /* directory */
733 #define FILE_CREATE_PIPE_INSTANCE 0x0004 /* named pipe */
734 #define FILE_READ_EA 0x0008 /* file & directory */
735 #define FILE_READ_PROPERTIES FILE_READ_EA
736 #define FILE_WRITE_EA 0x0010 /* file & directory */
737 #define FILE_WRITE_PROPERTIES FILE_WRITE_EA
738 #define FILE_EXECUTE 0x0020 /* file */
739 #define FILE_TRAVERSE 0x0020 /* directory */
740 #define FILE_DELETE_CHILD 0x0040 /* directory */
741 #define FILE_READ_ATTRIBUTES 0x0080 /* all */
742 #define FILE_WRITE_ATTRIBUTES 0x0100 /* all */
743 #define FILE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x1ff)
745 #define FILE_GENERIC_READ (STANDARD_RIGHTS_READ | FILE_READ_DATA | \
746 FILE_READ_ATTRIBUTES | FILE_READ_EA | \
748 #define FILE_GENERIC_WRITE (STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA | \
749 FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | \
750 FILE_APPEND_DATA | SYNCHRONIZE)
751 #define FILE_GENERIC_EXECUTE (STANDARD_RIGHTS_EXECUTE | FILE_EXECUTE | \
752 FILE_READ_ATTRIBUTES | SYNCHRONIZE)
755 /* File attribute flags
757 #define FILE_SHARE_READ 0x00000001L
758 #define FILE_SHARE_WRITE 0x00000002L
759 #define FILE_SHARE_DELETE 0x00000004L
760 #define FILE_ATTRIBUTE_READONLY 0x00000001L
761 #define FILE_ATTRIBUTE_HIDDEN 0x00000002L
762 #define FILE_ATTRIBUTE_SYSTEM 0x00000004L
763 #define FILE_ATTRIBUTE_LABEL 0x00000008L /* Not in Windows API */
764 #define FILE_ATTRIBUTE_DIRECTORY 0x00000010L
765 #define FILE_ATTRIBUTE_ARCHIVE 0x00000020L
766 #define FILE_ATTRIBUTE_NORMAL 0x00000080L
767 #define FILE_ATTRIBUTE_TEMPORARY 0x00000100L
768 #define FILE_ATTRIBUTE_ATOMIC_WRITE 0x00000200L
769 #define FILE_ATTRIBUTE_XACTION_WRITE 0x00000400L
770 #define FILE_ATTRIBUTE_COMPRESSED 0x00000800L
771 #define FILE_ATTRIBUTE_OFFLINE 0x00001000L
773 /* File alignments (NT) */
774 #define FILE_BYTE_ALIGNMENT 0x00000000
775 #define FILE_WORD_ALIGNMENT 0x00000001
776 #define FILE_LONG_ALIGNMENT 0x00000003
777 #define FILE_QUAD_ALIGNMENT 0x00000007
778 #define FILE_OCTA_ALIGNMENT 0x0000000f
779 #define FILE_32_BYTE_ALIGNMENT 0x0000001f
780 #define FILE_64_BYTE_ALIGNMENT 0x0000003f
781 #define FILE_128_BYTE_ALIGNMENT 0x0000007f
782 #define FILE_256_BYTE_ALIGNMENT 0x000000ff
783 #define FILE_512_BYTE_ALIGNMENT 0x000001ff
785 /* Registry security values */
786 #define OWNER_SECURITY_INFORMATION 0x00000001
787 #define GROUP_SECURITY_INFORMATION 0x00000002
788 #define DACL_SECURITY_INFORMATION 0x00000004
789 #define SACL_SECURITY_INFORMATION 0x00000008
793 #endif /* __WINE_WINNT_H */