comparison loader/wine/winnt.h @ 29263:0f1b5b68af32

whitespace cosmetics: Remove all trailing whitespace.
author diego
date Wed, 13 May 2009 02:58:57 +0000
parents 9e739bdb049c
children 774aa6f7399e
comparison
equal deleted inserted replaced
29262:7d545a6b8aff 29263:0f1b5b68af32
150 150
151 typedef struct FLOATING_SAVE_AREA 151 typedef struct FLOATING_SAVE_AREA
152 { 152 {
153 DWORD ControlWord; 153 DWORD ControlWord;
154 DWORD StatusWord; 154 DWORD StatusWord;
155 DWORD TagWord; 155 DWORD TagWord;
156 DWORD ErrorOffset; 156 DWORD ErrorOffset;
157 DWORD ErrorSelector; 157 DWORD ErrorSelector;
158 DWORD DataOffset; 158 DWORD DataOffset;
159 DWORD DataSelector; 159 DWORD DataSelector;
160 BYTE RegisterArea[SIZE_OF_80387_REGISTERS]; 160 BYTE RegisterArea[SIZE_OF_80387_REGISTERS];
161 DWORD Cr0NpxState; 161 DWORD Cr0NpxState;
162 } FLOATING_SAVE_AREA, *PFLOATING_SAVE_AREA; 162 } FLOATING_SAVE_AREA, *PFLOATING_SAVE_AREA;
163 163
164 typedef struct CONTEXT86 164 typedef struct CONTEXT86
178 178
179 /* These are selected by CONTEXT_SEGMENTS */ 179 /* These are selected by CONTEXT_SEGMENTS */
180 DWORD SegGs; 180 DWORD SegGs;
181 DWORD SegFs; 181 DWORD SegFs;
182 DWORD SegEs; 182 DWORD SegEs;
183 DWORD SegDs; 183 DWORD SegDs;
184 184
185 /* These are selected by CONTEXT_INTEGER */ 185 /* These are selected by CONTEXT_INTEGER */
186 DWORD Edi; 186 DWORD Edi;
187 DWORD Esi; 187 DWORD Esi;
188 DWORD Ebx; 188 DWORD Ebx;
189 DWORD Edx; 189 DWORD Edx;
190 DWORD Ecx; 190 DWORD Ecx;
191 DWORD Eax; 191 DWORD Eax;
192 192
193 /* These are selected by CONTEXT_CONTROL */ 193 /* These are selected by CONTEXT_CONTROL */
194 DWORD Ebp; 194 DWORD Ebp;
195 DWORD Eip; 195 DWORD Eip;
196 DWORD SegCs; 196 DWORD SegCs;
197 DWORD EFlags; 197 DWORD EFlags;
198 DWORD Esp; 198 DWORD Esp;
199 DWORD SegSs; 199 DWORD SegSs;
226 226
227 /* Alpha context definitions */ 227 /* Alpha context definitions */
228 #if defined(_ALPHA_) || defined(__alpha__) 228 #if defined(_ALPHA_) || defined(__alpha__)
229 229
230 #define CONTEXT_ALPHA 0x00020000 230 #define CONTEXT_ALPHA 0x00020000
231 231
232 #define CONTEXT_CONTROL (CONTEXT_ALPHA | 0x00000001L) 232 #define CONTEXT_CONTROL (CONTEXT_ALPHA | 0x00000001L)
233 #define CONTEXT_FLOATING_POINT (CONTEXT_ALPHA | 0x00000002L) 233 #define CONTEXT_FLOATING_POINT (CONTEXT_ALPHA | 0x00000002L)
234 #define CONTEXT_INTEGER (CONTEXT_ALPHA | 0x00000004L) 234 #define CONTEXT_INTEGER (CONTEXT_ALPHA | 0x00000004L)
235 #define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER) 235 #define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER)
236 236
541 541
542 #endif /* __PPC__ */ 542 #endif /* __PPC__ */
543 543
544 #ifdef __sparc__ 544 #ifdef __sparc__
545 545
546 /* 546 /*
547 * FIXME: 547 * FIXME:
548 * 548 *
549 * There is no official CONTEXT structure defined for the SPARC 549 * There is no official CONTEXT structure defined for the SPARC
550 * architecture, so I just made one up. 550 * architecture, so I just made one up.
551 * 551 *
552 * This structure is valid only for 32-bit SPARC architectures, 552 * This structure is valid only for 32-bit SPARC architectures,
553 * not for 64-bit SPARC. 553 * not for 64-bit SPARC.
554 * 554 *
555 * Note that this structure contains only the 'top-level' registers; 555 * Note that this structure contains only the 'top-level' registers;
556 * the rest of the register window chain is not visible. 556 * the rest of the register window chain is not visible.
557 * 557 *
558 * The layout follows the Solaris 'prgregset_t' structure. 558 * The layout follows the Solaris 'prgregset_t' structure.
559 * 559 *
560 */ 560 */
561 561
562 #define CONTEXT_SPARC 0x10000000 562 #define CONTEXT_SPARC 0x10000000
563 563
564 #define CONTEXT_CONTROL (CONTEXT_SPARC | 0x00000001) 564 #define CONTEXT_CONTROL (CONTEXT_SPARC | 0x00000001)
565 #define CONTEXT_FLOATING_POINT (CONTEXT_SPARC | 0x00000002) 565 #define CONTEXT_FLOATING_POINT (CONTEXT_SPARC | 0x00000002)
661 #define BH_reg(context) (*((BYTE*)&EBX_reg(context)+1)) 661 #define BH_reg(context) (*((BYTE*)&EBX_reg(context)+1))
662 #define CL_reg(context) (*(BYTE*)&ECX_reg(context)) 662 #define CL_reg(context) (*(BYTE*)&ECX_reg(context))
663 #define CH_reg(context) (*((BYTE*)&ECX_reg(context)+1)) 663 #define CH_reg(context) (*((BYTE*)&ECX_reg(context)+1))
664 #define DL_reg(context) (*(BYTE*)&EDX_reg(context)) 664 #define DL_reg(context) (*(BYTE*)&EDX_reg(context))
665 #define DH_reg(context) (*((BYTE*)&EDX_reg(context)+1)) 665 #define DH_reg(context) (*((BYTE*)&EDX_reg(context)+1))
666 666
667 #define SET_CFLAG(context) (EFL_reg(context) |= 0x0001) 667 #define SET_CFLAG(context) (EFL_reg(context) |= 0x0001)
668 #define RESET_CFLAG(context) (EFL_reg(context) &= ~0x0001) 668 #define RESET_CFLAG(context) (EFL_reg(context) &= ~0x0001)
669 #define SET_ZFLAG(context) (EFL_reg(context) |= 0x0040) 669 #define SET_ZFLAG(context) (EFL_reg(context) |= 0x0040)
670 #define RESET_ZFLAG(context) (EFL_reg(context) &= ~0x0040) 670 #define RESET_ZFLAG(context) (EFL_reg(context) &= ~0x0040)
671 671
754 # define GET_IP(context) ((LPVOID)(context)->Eip) 754 # define GET_IP(context) ((LPVOID)(context)->Eip)
755 #endif 755 #endif
756 #ifdef __sparc__ 756 #ifdef __sparc__
757 # define GET_IP(context) ((LPVOID)(context)->pc) 757 # define GET_IP(context) ((LPVOID)(context)->pc)
758 #endif 758 #endif
759 759
760 #if !defined(GET_IP) && !defined(RC_INVOKED) 760 #if !defined(GET_IP) && !defined(RC_INVOKED)
761 # error You must define GET_IP for this CPU 761 # error You must define GET_IP for this CPU
762 #endif 762 #endif
763 763
764 /* 764 /*
770 #define STATUS_ABANDONED_WAIT_0 0x00000080 770 #define STATUS_ABANDONED_WAIT_0 0x00000080
771 #define STATUS_USER_APC 0x000000C0 771 #define STATUS_USER_APC 0x000000C0
772 #define STATUS_TIMEOUT 0x00000102 772 #define STATUS_TIMEOUT 0x00000102
773 #define STATUS_PENDING 0x00000103 773 #define STATUS_PENDING 0x00000103
774 774
775 #define STATUS_GUARD_PAGE_VIOLATION 0x80000001 775 #define STATUS_GUARD_PAGE_VIOLATION 0x80000001
776 #define STATUS_DATATYPE_MISALIGNMENT 0x80000002 776 #define STATUS_DATATYPE_MISALIGNMENT 0x80000002
777 #define STATUS_BREAKPOINT 0x80000003 777 #define STATUS_BREAKPOINT 0x80000003
778 #define STATUS_SINGLE_STEP 0x80000004 778 #define STATUS_SINGLE_STEP 0x80000004
779 #define STATUS_BUFFER_OVERFLOW 0x80000005 779 #define STATUS_BUFFER_OVERFLOW 0x80000005
780 #define STATUS_NO_MORE_FILES 0x80000006 780 #define STATUS_NO_MORE_FILES 0x80000006
883 #define STATUS_SUSPEND_COUNT_EXCEEDED 0xC000004A 883 #define STATUS_SUSPEND_COUNT_EXCEEDED 0xC000004A
884 #define STATUS_LOCK_NOT_GRANTED 0xC0000054 /* FIXME: not sure */ 884 #define STATUS_LOCK_NOT_GRANTED 0xC0000054 /* FIXME: not sure */
885 #define STATUS_FILE_LOCK_CONFLICT 0xC0000055 /* FIXME: not sure */ 885 #define STATUS_FILE_LOCK_CONFLICT 0xC0000055 /* FIXME: not sure */
886 #define STATUS_UNKNOWN_REVISION 0xC0000058 886 #define STATUS_UNKNOWN_REVISION 0xC0000058
887 #define STATUS_INVALID_SECURITY_DESCR 0xC0000079 887 #define STATUS_INVALID_SECURITY_DESCR 0xC0000079
888 #define STATUS_DISK_FULL 0xC000007F 888 #define STATUS_DISK_FULL 0xC000007F
889 #define STATUS_SECTION_NOT_EXTENDED 0xC0000087 889 #define STATUS_SECTION_NOT_EXTENDED 0xC0000087
890 #define STATUS_ARRAY_BOUNDS_EXCEEDED 0xC000008C 890 #define STATUS_ARRAY_BOUNDS_EXCEEDED 0xC000008C
891 #define STATUS_FLOAT_DENORMAL_OPERAND 0xC000008D 891 #define STATUS_FLOAT_DENORMAL_OPERAND 0xC000008D
892 #define STATUS_FLOAT_DIVIDE_BY_ZERO 0xC000008E 892 #define STATUS_FLOAT_DIVIDE_BY_ZERO 0xC000008E
893 #define STATUS_FLOAT_INEXACT_RESULT 0xC000008F 893 #define STATUS_FLOAT_INEXACT_RESULT 0xC000008F
961 961
962 #define ExceptionContinueExecution 0 962 #define ExceptionContinueExecution 0
963 #define ExceptionContinueSearch 1 963 #define ExceptionContinueSearch 1
964 #define ExceptionNestedException 2 964 #define ExceptionNestedException 2
965 #define ExceptionCollidedUnwind 3 965 #define ExceptionCollidedUnwind 3
966 966
967 /* 967 /*
968 * Return values from filters in except() and from UnhandledExceptionFilter 968 * Return values from filters in except() and from UnhandledExceptionFilter
969 */ 969 */
970 970
971 #define EXCEPTION_EXECUTE_HANDLER 1 971 #define EXCEPTION_EXECUTE_HANDLER 1
972 #define EXCEPTION_CONTINUE_SEARCH 0 972 #define EXCEPTION_CONTINUE_SEARCH 0
973 #define EXCEPTION_CONTINUE_EXECUTION -1 973 #define EXCEPTION_CONTINUE_EXECUTION -1
974 974
975 /* 975 /*
983 #define EH_STACK_INVALID 0x08 983 #define EH_STACK_INVALID 0x08
984 #define EH_NESTED_CALL 0x10 984 #define EH_NESTED_CALL 0x10
985 985
986 #define EXCEPTION_CONTINUABLE 0 986 #define EXCEPTION_CONTINUABLE 0
987 #define EXCEPTION_NONCONTINUABLE EH_NONCONTINUABLE 987 #define EXCEPTION_NONCONTINUABLE EH_NONCONTINUABLE
988 988
989 /* 989 /*
990 * The exception record used by Win32 to give additional information 990 * The exception record used by Win32 to give additional information
991 * about exception to exception handlers. 991 * about exception to exception handlers.
992 */ 992 */
993 993
994 #define EXCEPTION_MAXIMUM_PARAMETERS 15 994 #define EXCEPTION_MAXIMUM_PARAMETERS 15
995 995
1006 1006
1007 /* 1007 /*
1008 * The exception pointers structure passed to exception filters 1008 * The exception pointers structure passed to exception filters
1009 * in except() and the UnhandledExceptionFilter(). 1009 * in except() and the UnhandledExceptionFilter().
1010 */ 1010 */
1011 1011
1012 typedef struct EXCEPTION_POINTERS 1012 typedef struct EXCEPTION_POINTERS
1013 { 1013 {
1014 PEXCEPTION_RECORD ExceptionRecord; 1014 PEXCEPTION_RECORD ExceptionRecord;
1015 PCONTEXT ContextRecord; 1015 PCONTEXT ContextRecord;
1016 } EXCEPTION_POINTERS, *PEXCEPTION_POINTERS; 1016 } EXCEPTION_POINTERS, *PEXCEPTION_POINTERS;
1017 1017
1018 1018
1019 /* 1019 /*
1020 * The exception frame, used for registering exception handlers 1020 * The exception frame, used for registering exception handlers
1021 * Win32 cares only about this, but compilers generally emit 1021 * Win32 cares only about this, but compilers generally emit
1022 * larger exception frames for their own use. 1022 * larger exception frames for their own use.
1023 */ 1023 */
1024 1024
1025 struct EXCEPTION_FRAME; 1025 struct EXCEPTION_FRAME;
1026 1026
1118 1118
1119 /* 1119 /*
1120 * This is the Windows executable (NE) header. 1120 * This is the Windows executable (NE) header.
1121 * the name IMAGE_OS2_HEADER is misleading, but in the SDK this way. 1121 * the name IMAGE_OS2_HEADER is misleading, but in the SDK this way.
1122 */ 1122 */
1123 typedef struct 1123 typedef struct
1124 { 1124 {
1125 WORD ne_magic; /* 00 NE signature 'NE' */ 1125 WORD ne_magic; /* 00 NE signature 'NE' */
1126 BYTE ne_ver; /* 02 Linker version number */ 1126 BYTE ne_ver; /* 02 Linker version number */
1127 BYTE ne_rev; /* 03 Linker revision number */ 1127 BYTE ne_rev; /* 03 Linker revision number */
1128 WORD ne_enttab; /* 04 Offset to entry table relative to NE */ 1128 WORD ne_enttab; /* 04 Offset to entry table relative to NE */
1230 #define IMAGE_FILE_MACHINE_I386 0x14c 1230 #define IMAGE_FILE_MACHINE_I386 0x14c
1231 #define IMAGE_FILE_MACHINE_R3000 0x162 1231 #define IMAGE_FILE_MACHINE_R3000 0x162
1232 #define IMAGE_FILE_MACHINE_R4000 0x166 1232 #define IMAGE_FILE_MACHINE_R4000 0x166
1233 #define IMAGE_FILE_MACHINE_R10000 0x168 1233 #define IMAGE_FILE_MACHINE_R10000 0x168
1234 #define IMAGE_FILE_MACHINE_ALPHA 0x184 1234 #define IMAGE_FILE_MACHINE_ALPHA 0x184
1235 #define IMAGE_FILE_MACHINE_POWERPC 0x1F0 1235 #define IMAGE_FILE_MACHINE_POWERPC 0x1F0
1236 1236
1237 #define IMAGE_SIZEOF_FILE_HEADER 20 1237 #define IMAGE_SIZEOF_FILE_HEADER 20
1238 1238
1239 /* Possible Magic values */ 1239 /* Possible Magic values */
1240 #define IMAGE_NT_OPTIONAL_HDR_MAGIC 0x10b 1240 #define IMAGE_NT_OPTIONAL_HDR_MAGIC 0x10b
1377 1377
1378 #define IMAGE_SCN_CNT_CODE 0x00000020 1378 #define IMAGE_SCN_CNT_CODE 0x00000020
1379 #define IMAGE_SCN_CNT_INITIALIZED_DATA 0x00000040 1379 #define IMAGE_SCN_CNT_INITIALIZED_DATA 0x00000040
1380 #define IMAGE_SCN_CNT_UNINITIALIZED_DATA 0x00000080 1380 #define IMAGE_SCN_CNT_UNINITIALIZED_DATA 0x00000080
1381 1381
1382 #define IMAGE_SCN_LNK_OTHER 0x00000100 1382 #define IMAGE_SCN_LNK_OTHER 0x00000100
1383 #define IMAGE_SCN_LNK_INFO 0x00000200 1383 #define IMAGE_SCN_LNK_INFO 0x00000200
1384 /* #define IMAGE_SCN_TYPE_OVER 0x00000400 - Reserved */ 1384 /* #define IMAGE_SCN_TYPE_OVER 0x00000400 - Reserved */
1385 #define IMAGE_SCN_LNK_REMOVE 0x00000800 1385 #define IMAGE_SCN_LNK_REMOVE 0x00000800
1386 #define IMAGE_SCN_LNK_COMDAT 0x00001000 1386 #define IMAGE_SCN_LNK_COMDAT 0x00001000
1387 1387
1388 /* 0x00002000 - Reserved */ 1388 /* 0x00002000 - Reserved */
1633 * (Old BIND) 1633 * (Old BIND)
1634 */ 1634 */
1635 DWORD ForwarderChain; /* -1 if no forwarders */ 1635 DWORD ForwarderChain; /* -1 if no forwarders */
1636 DWORD Name; 1636 DWORD Name;
1637 /* RVA to IAT (if bound this IAT has actual addresses) */ 1637 /* RVA to IAT (if bound this IAT has actual addresses) */
1638 PIMAGE_THUNK_DATA FirstThunk; 1638 PIMAGE_THUNK_DATA FirstThunk;
1639 } IMAGE_IMPORT_DESCRIPTOR,*PIMAGE_IMPORT_DESCRIPTOR; 1639 } IMAGE_IMPORT_DESCRIPTOR,*PIMAGE_IMPORT_DESCRIPTOR;
1640 1640
1641 #define IMAGE_ORDINAL_FLAG 0x80000000 1641 #define IMAGE_ORDINAL_FLAG 0x80000000
1642 #define IMAGE_SNAP_BY_ORDINAL(Ordinal) ((Ordinal & IMAGE_ORDINAL_FLAG) != 0) 1642 #define IMAGE_SNAP_BY_ORDINAL(Ordinal) ((Ordinal & IMAGE_ORDINAL_FLAG) != 0)
1643 #define IMAGE_ORDINAL(Ordinal) (Ordinal & 0xffff) 1643 #define IMAGE_ORDINAL(Ordinal) (Ordinal & 0xffff)
2035 MESSAGE_RESOURCE_BLOCK Blocks[ 1 ]; 2035 MESSAGE_RESOURCE_BLOCK Blocks[ 1 ];
2036 } MESSAGE_RESOURCE_DATA,*PMESSAGE_RESOURCE_DATA; 2036 } MESSAGE_RESOURCE_DATA,*PMESSAGE_RESOURCE_DATA;
2037 2037
2038 /* 2038 /*
2039 * Here follows typedefs for security and tokens. 2039 * Here follows typedefs for security and tokens.
2040 */ 2040 */
2041 2041
2042 /* 2042 /*
2043 * First a constant for the following typdefs. 2043 * First a constant for the following typdefs.
2044 */ 2044 */
2045 2045
2051 /* 2051 /*
2052 * TOKEN_INFORMATION_CLASS 2052 * TOKEN_INFORMATION_CLASS
2053 */ 2053 */
2054 2054
2055 typedef enum TOKEN_INFORMATION_CLASS { 2055 typedef enum TOKEN_INFORMATION_CLASS {
2056 TokenUser = 1, 2056 TokenUser = 1,
2057 TokenGroups, 2057 TokenGroups,
2058 TokenPrivileges, 2058 TokenPrivileges,
2059 TokenOwner, 2059 TokenOwner,
2060 TokenPrimaryGroup, 2060 TokenPrimaryGroup,
2061 TokenDefaultDacl, 2061 TokenDefaultDacl,
2062 TokenSource, 2062 TokenSource,
2063 TokenType, 2063 TokenType,
2064 TokenImpersonationLevel, 2064 TokenImpersonationLevel,
2065 TokenStatistics 2065 TokenStatistics
2066 } TOKEN_INFORMATION_CLASS; 2066 } TOKEN_INFORMATION_CLASS;
2067 2067
2068 #ifndef SECURITY_DEFINED 2068 #ifndef SECURITY_DEFINED
2069 #define SECURITY_DEFINED 2069 #define SECURITY_DEFINED
2070 2070
2071 #include "pshpack1.h" 2071 #include "pshpack1.h"
2099 #define SID_REVISION (1) /* Current revision */ 2099 #define SID_REVISION (1) /* Current revision */
2100 #define SID_MAX_SUB_AUTHORITIES (15) /* current max subauths */ 2100 #define SID_MAX_SUB_AUTHORITIES (15) /* current max subauths */
2101 #define SID_RECOMMENDED_SUB_AUTHORITIES (1) /* recommended subauths */ 2101 #define SID_RECOMMENDED_SUB_AUTHORITIES (1) /* recommended subauths */
2102 2102
2103 2103
2104 /* 2104 /*
2105 * ACL 2105 * ACL
2106 */ 2106 */
2107 2107
2108 #define ACL_REVISION1 1 2108 #define ACL_REVISION1 1
2109 #define ACL_REVISION2 2 2109 #define ACL_REVISION2 2
2110 #define ACL_REVISION3 3 2110 #define ACL_REVISION3 3
2156 PSID Group; 2156 PSID Group;
2157 PACL Sacl; 2157 PACL Sacl;
2158 PACL Dacl; 2158 PACL Dacl;
2159 } SECURITY_DESCRIPTOR, *PSECURITY_DESCRIPTOR; 2159 } SECURITY_DESCRIPTOR, *PSECURITY_DESCRIPTOR;
2160 2160
2161 #define SECURITY_DESCRIPTOR_MIN_LENGTH (sizeof(SECURITY_DESCRIPTOR)) 2161 #define SECURITY_DESCRIPTOR_MIN_LENGTH (sizeof(SECURITY_DESCRIPTOR))
2162 2162
2163 #include "poppack.h" 2163 #include "poppack.h"
2164 2164
2165 #endif /* SECURITY_DEFINED */ 2165 #endif /* SECURITY_DEFINED */
2166 2166
2167 #include "pshpack1.h" 2167 #include "pshpack1.h"
2168 2168
2169 /* 2169 /*
2170 * SID_AND_ATTRIBUTES 2170 * SID_AND_ATTRIBUTES
2171 */ 2171 */
2172 2172
2173 typedef struct SID_AND_ATTRIBUTES { 2173 typedef struct SID_AND_ATTRIBUTES {
2174 PSID Sid; 2174 PSID Sid;
2175 DWORD Attributes; 2175 DWORD Attributes;
2176 } SID_AND_ATTRIBUTES ; 2176 } SID_AND_ATTRIBUTES ;
2177 2177
2178 /* security entities */ 2178 /* security entities */
2179 #define SECURITY_NULL_RID (0x00000000L) 2179 #define SECURITY_NULL_RID (0x00000000L)
2180 #define SECURITY_WORLD_RID (0x00000000L) 2180 #define SECURITY_WORLD_RID (0x00000000L)
2181 #define SECURITY_LOCAL_RID (0X00000000L) 2181 #define SECURITY_LOCAL_RID (0X00000000L)
2182 2182
2188 /* S-1-2 */ 2188 /* S-1-2 */
2189 #define SECURITY_LOCAL_SID_AUTHORITY {0,0,0,0,0,2} 2189 #define SECURITY_LOCAL_SID_AUTHORITY {0,0,0,0,0,2}
2190 2190
2191 /* S-1-3 */ 2191 /* S-1-3 */
2192 #define SECURITY_CREATOR_SID_AUTHORITY {0,0,0,0,0,3} 2192 #define SECURITY_CREATOR_SID_AUTHORITY {0,0,0,0,0,3}
2193 #define SECURITY_CREATOR_OWNER_RID (0x00000000L) 2193 #define SECURITY_CREATOR_OWNER_RID (0x00000000L)
2194 #define SECURITY_CREATOR_GROUP_RID (0x00000001L) 2194 #define SECURITY_CREATOR_GROUP_RID (0x00000001L)
2195 #define SECURITY_CREATOR_OWNER_SERVER_RID (0x00000002L) 2195 #define SECURITY_CREATOR_OWNER_SERVER_RID (0x00000002L)
2196 #define SECURITY_CREATOR_GROUP_SERVER_RID (0x00000003L) 2196 #define SECURITY_CREATOR_GROUP_SERVER_RID (0x00000003L)
2197 2197
2198 /* S-1-4 */ 2198 /* S-1-4 */
2199 #define SECURITY_NON_UNIQUE_AUTHORITY {0,0,0,0,0,4} 2199 #define SECURITY_NON_UNIQUE_AUTHORITY {0,0,0,0,0,4}
2200 2200
2201 /* S-1-5 */ 2201 /* S-1-5 */
2202 #define SECURITY_NT_AUTHORITY {0,0,0,0,0,5} 2202 #define SECURITY_NT_AUTHORITY {0,0,0,0,0,5}
2203 #define SECURITY_DIALUP_RID 0x00000001L 2203 #define SECURITY_DIALUP_RID 0x00000001L
2204 #define SECURITY_NETWORK_RID 0x00000002L 2204 #define SECURITY_NETWORK_RID 0x00000002L
2205 #define SECURITY_BATCH_RID 0x00000003L 2205 #define SECURITY_BATCH_RID 0x00000003L
2206 #define SECURITY_INTERACTIVE_RID 0x00000004L 2206 #define SECURITY_INTERACTIVE_RID 0x00000004L
2207 #define SECURITY_LOGON_IDS_RID 0x00000005L 2207 #define SECURITY_LOGON_IDS_RID 0x00000005L
2232 /* 2232 /*
2233 * TOKEN_USER 2233 * TOKEN_USER
2234 */ 2234 */
2235 2235
2236 typedef struct TOKEN_USER { 2236 typedef struct TOKEN_USER {
2237 SID_AND_ATTRIBUTES User; 2237 SID_AND_ATTRIBUTES User;
2238 } TOKEN_USER; 2238 } TOKEN_USER;
2239 2239
2240 /* 2240 /*
2241 * TOKEN_GROUPS 2241 * TOKEN_GROUPS
2242 */ 2242 */
2243 2243
2244 typedef struct TOKEN_GROUPS { 2244 typedef struct TOKEN_GROUPS {
2245 DWORD GroupCount; 2245 DWORD GroupCount;
2246 SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY]; 2246 SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY];
2247 } TOKEN_GROUPS; 2247 } TOKEN_GROUPS;
2248 2248
2249 /* 2249 /*
2250 * LUID_AND_ATTRIBUTES 2250 * LUID_AND_ATTRIBUTES
2251 */ 2251 */
2252 2252
2271 */ 2271 */
2272 2272
2273 typedef LARGE_INTEGER LUID,*PLUID; 2273 typedef LARGE_INTEGER LUID,*PLUID;
2274 2274
2275 typedef struct LUID_AND_ATTRIBUTES { 2275 typedef struct LUID_AND_ATTRIBUTES {
2276 LUID Luid; 2276 LUID Luid;
2277 DWORD Attributes; 2277 DWORD Attributes;
2278 } LUID_AND_ATTRIBUTES; 2278 } LUID_AND_ATTRIBUTES;
2279 2279
2280 /* 2280 /*
2281 * PRIVILEGE_SET 2281 * PRIVILEGE_SET
2282 */ 2282 */
2283 2283
2290 /* 2290 /*
2291 * TOKEN_PRIVILEGES 2291 * TOKEN_PRIVILEGES
2292 */ 2292 */
2293 2293
2294 typedef struct TOKEN_PRIVILEGES { 2294 typedef struct TOKEN_PRIVILEGES {
2295 DWORD PrivilegeCount; 2295 DWORD PrivilegeCount;
2296 LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY]; 2296 LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY];
2297 } TOKEN_PRIVILEGES, *PTOKEN_PRIVILEGES; 2297 } TOKEN_PRIVILEGES, *PTOKEN_PRIVILEGES;
2298 2298
2299 /* 2299 /*
2300 * TOKEN_OWNER 2300 * TOKEN_OWNER
2301 */ 2301 */
2302 2302
2303 typedef struct TOKEN_OWNER { 2303 typedef struct TOKEN_OWNER {
2304 PSID Owner; 2304 PSID Owner;
2305 } TOKEN_OWNER; 2305 } TOKEN_OWNER;
2306 2306
2307 /* 2307 /*
2308 * TOKEN_PRIMARY_GROUP 2308 * TOKEN_PRIMARY_GROUP
2309 */ 2309 */
2310 2310
2311 typedef struct TOKEN_PRIMARY_GROUP { 2311 typedef struct TOKEN_PRIMARY_GROUP {
2312 PSID PrimaryGroup; 2312 PSID PrimaryGroup;
2313 } TOKEN_PRIMARY_GROUP; 2313 } TOKEN_PRIMARY_GROUP;
2314 2314
2315 2315
2316 /* 2316 /*
2317 * TOKEN_DEFAULT_DACL 2317 * TOKEN_DEFAULT_DACL
2318 */ 2318 */
2319 2319
2320 typedef struct TOKEN_DEFAULT_DACL { 2320 typedef struct TOKEN_DEFAULT_DACL {
2321 PACL DefaultDacl; 2321 PACL DefaultDacl;
2322 } TOKEN_DEFAULT_DACL; 2322 } TOKEN_DEFAULT_DACL;
2323 2323
2324 /* 2324 /*
2325 * TOKEN_SOURCEL 2325 * TOKEN_SOURCEL
2326 */ 2326 */
2327 2327
2328 typedef struct TOKEN_SOURCE { 2328 typedef struct TOKEN_SOURCE {
2329 char Sourcename[8]; 2329 char Sourcename[8];
2330 LUID SourceIdentifier; 2330 LUID SourceIdentifier;
2331 } TOKEN_SOURCE; 2331 } TOKEN_SOURCE;
2332 2332
2333 /* 2333 /*
2334 * TOKEN_TYPE 2334 * TOKEN_TYPE
2335 */ 2335 */
2336 2336
2337 typedef enum tagTOKEN_TYPE { 2337 typedef enum tagTOKEN_TYPE {
2338 TokenPrimary = 1, 2338 TokenPrimary = 1,
2339 TokenImpersonation 2339 TokenImpersonation
2340 } TOKEN_TYPE; 2340 } TOKEN_TYPE;
2341 2341
2342 /* 2342 /*
2343 * SECURITY_IMPERSONATION_LEVEL 2343 * SECURITY_IMPERSONATION_LEVEL
2344 */ 2344 */
2345 2345
2346 typedef enum SECURITY_IMPERSONATION_LEVEL { 2346 typedef enum SECURITY_IMPERSONATION_LEVEL {
2347 SecurityAnonymous, 2347 SecurityAnonymous,
2348 SecurityIdentification, 2348 SecurityIdentification,
2349 SecurityImpersonation, 2349 SecurityImpersonation,
2350 SecurityDelegation 2350 SecurityDelegation
2351 } SECURITY_IMPERSONATION_LEVEL, *PSECURITY_IMPERSONATION_LEVEL; 2351 } SECURITY_IMPERSONATION_LEVEL, *PSECURITY_IMPERSONATION_LEVEL;
2352 2352
2353 2353
2354 typedef BOOLEAN SECURITY_CONTEXT_TRACKING_MODE, 2354 typedef BOOLEAN SECURITY_CONTEXT_TRACKING_MODE,
2355 * PSECURITY_CONTEXT_TRACKING_MODE; 2355 * PSECURITY_CONTEXT_TRACKING_MODE;
2356 /* 2356 /*
2367 /* 2367 /*
2368 * TOKEN_STATISTICS 2368 * TOKEN_STATISTICS
2369 */ 2369 */
2370 2370
2371 typedef struct TOKEN_STATISTICS { 2371 typedef struct TOKEN_STATISTICS {
2372 LUID TokenId; 2372 LUID TokenId;
2373 LUID AuthenticationId; 2373 LUID AuthenticationId;
2374 LARGE_INTEGER ExpirationTime; 2374 LARGE_INTEGER ExpirationTime;
2375 TOKEN_TYPE TokenType; 2375 TOKEN_TYPE TokenType;
2376 SECURITY_IMPERSONATION_LEVEL ImpersonationLevel; 2376 SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
2377 DWORD DynamicCharged; 2377 DWORD DynamicCharged;
2378 DWORD DynamicAvailable; 2378 DWORD DynamicAvailable;
2379 DWORD GroupCount; 2379 DWORD GroupCount;
2380 DWORD PrivilegeCount; 2380 DWORD PrivilegeCount;
2381 LUID ModifiedId; 2381 LUID ModifiedId;
2382 } TOKEN_STATISTICS; 2382 } TOKEN_STATISTICS;
2383 2383
2384 /* 2384 /*
2385 * ACLs of NT 2385 * ACLs of NT
2386 */ 2386 */
2387 2387
2388 #define ACL_REVISION 2 2388 #define ACL_REVISION 2
2389 2389
2390 #define ACL_REVISION1 1 2390 #define ACL_REVISION1 1
2412 2412
2413 /* AceFlags mask for what events we (should) audit */ 2413 /* AceFlags mask for what events we (should) audit */
2414 #define SUCCESSFUL_ACCESS_ACE_FLAG 0x40 2414 #define SUCCESSFUL_ACCESS_ACE_FLAG 0x40
2415 #define FAILED_ACCESS_ACE_FLAG 0x80 2415 #define FAILED_ACCESS_ACE_FLAG 0x80
2416 2416
2417 /* different ACEs depending on AceType 2417 /* different ACEs depending on AceType
2418 * SidStart marks the begin of a SID 2418 * SidStart marks the begin of a SID
2419 * so the thing finally looks like this: 2419 * so the thing finally looks like this:
2420 * 0: ACE_HEADER 2420 * 0: ACE_HEADER
2421 * 4: ACCESS_MASK 2421 * 4: ACCESS_MASK
2422 * 8... : SID 2422 * 8... : SID
2511 #define THREAD_SET_THREAD_TOKEN 0x0080 2511 #define THREAD_SET_THREAD_TOKEN 0x0080
2512 #define THREAD_IMPERSONATE 0x0100 2512 #define THREAD_IMPERSONATE 0x0100
2513 #define THREAD_DIRECT_IMPERSONATION 0x0200 2513 #define THREAD_DIRECT_IMPERSONATION 0x0200
2514 #define THREAD_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3ff) 2514 #define THREAD_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3ff)
2515 2515
2516 #define THREAD_BASE_PRIORITY_LOWRT 15 2516 #define THREAD_BASE_PRIORITY_LOWRT 15
2517 #define THREAD_BASE_PRIORITY_MAX 2 2517 #define THREAD_BASE_PRIORITY_MAX 2
2518 #define THREAD_BASE_PRIORITY_MIN -2 2518 #define THREAD_BASE_PRIORITY_MIN -2
2519 #define THREAD_BASE_PRIORITY_IDLE -15 2519 #define THREAD_BASE_PRIORITY_IDLE -15
2520 2520
2521 #define FILE_READ_DATA 0x0001 /* file & pipe */ 2521 #define FILE_READ_DATA 0x0001 /* file & pipe */
2522 #define FILE_LIST_DIRECTORY 0x0001 /* directory */ 2522 #define FILE_LIST_DIRECTORY 0x0001 /* directory */