Terminate and Stay Resident now a fixme because it shouldn't be a
[wine/multimedia.git] / include / ntdll.h
blob1791a6dc748790fd0588a3b610bf7dddc6ad3802
1 #ifndef __WINE_NTDLL_H
2 #define __WINE_NTDLL_H
3 /* ntdll.h
5 * contains NT internal defines that don't show on the Win32 API level
7 * Copyright 1997 Marcus Meissner
8 */
10 /* assumes windows.h already included */
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
16 /* Security Ids of NT */
18 /* Moved to windows.h
19 typedef struct {
20 BYTE Value[6];
21 } SID_IDENTIFIER_AUTHORITY,*PSID_IDENTIFIER_AUTHORITY,*LPSID_IDENTIFIER_AUTHORITY;
24 /* Moved to windows.h
25 typedef struct _SID {
26 BYTE Revision;
27 BYTE SubAuthorityCount;
28 SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
29 DWORD SubAuthority[1];
30 } SID,*PSID,*LPSID;
33 #define SID_REVISION (1) /* Current revision */
34 #define SID_MAX_SUB_AUTHORITIES (15) /* current max subauths */
35 #define SID_RECOMMENDED_SUB_AUTHORITIES (1) /* recommended subauths */
37 /* ACLs of NT */
39 #define ACL_REVISION 2
41 #define ACL_REVISION1 1
42 #define ACL_REVISION2 2
44 /* Moved to windows.h
45 typedef struct _ACL {
46 BYTE AclRevision;
47 BYTE Sbz1;
48 WORD AclSize;
49 WORD AceCount;
50 WORD Sbz2;
51 } ACL,*LPACL;
54 /* ACEs, directly starting after an ACL */
55 typedef struct _ACE_HEADER {
56 BYTE AceType;
57 BYTE AceFlags;
58 WORD AceSize;
59 } ACE_HEADER,*LPACE_HEADER;
61 /* AceType */
62 #define ACCESS_ALLOWED_ACE_TYPE 0
63 #define ACCESS_DENIED_ACE_TYPE 1
64 #define SYSTEM_AUDIT_ACE_TYPE 2
65 #define SYSTEM_ALARM_ACE_TYPE 3
67 /* inherit AceFlags */
68 #define OBJECT_INHERIT_ACE 0x01
69 #define CONTAINER_INHERIT_ACE 0x02
70 #define NO_PROPAGATE_INHERIT_ACE 0x04
71 #define INHERIT_ONLY_ACE 0x08
72 #define VALID_INHERIT_FLAGS 0x0F
74 /* AceFlags mask for what events we (should) audit */
75 #define SUCCESSFUL_ACCESS_ACE_FLAG 0x40
76 #define FAILED_ACCESS_ACE_FLAG 0x80
78 /* different ACEs depending on AceType
79 * SidStart marks the begin of a SID
80 * so the thing finally looks like this:
81 * 0: ACE_HEADER
82 * 4: ACCESS_MASK
83 * 8... : SID
85 typedef struct _ACCESS_ALLOWED_ACE {
86 ACE_HEADER Header;
87 DWORD Mask;
88 DWORD SidStart;
89 } ACCESS_ALLOWED_ACE,*LPACCESS_ALLOWED_ACE;
91 typedef struct _ACCESS_DENIED_ACE {
92 ACE_HEADER Header;
93 DWORD Mask;
94 DWORD SidStart;
95 } ACCESS_DENIED_ACE,*LPACCESS_DENIED_ACE;
97 typedef struct _SYSTEM_AUDIT_ACE {
98 ACE_HEADER Header;
99 DWORD Mask;
100 DWORD SidStart;
101 } SYSTEM_AUDIT_ACE,*LPSYSTEM_AUDIT_ACE;
103 typedef struct _SYSTEM_ALARM_ACE {
104 ACE_HEADER Header;
105 DWORD Mask;
106 DWORD SidStart;
107 } SYSTEM_ALARM_ACE,*LPSYSTEM_ALARM_ACE;
109 #define SECURITY_DESCRIPTOR_REVISION 1
110 #define SECURITY_DESCRIPTOR_REVISION1 1
113 typedef WORD SECURITY_DESCRIPTOR_CONTROL;
116 #define SE_OWNER_DEFAULTED 0x0001
117 #define SE_GROUP_DEFAULTED 0x0002
118 #define SE_DACL_PRESENT 0x0004
119 #define SE_DACL_DEFAULTED 0x0008
120 #define SE_SACL_PRESENT 0x0010
121 #define SE_SACL_DEFAULTED 0x0020
122 #define SE_SELF_RELATIVE 0x8000
124 /* This was moved to windows.h
125 typedef struct {
126 BYTE Revision;
127 BYTE Sbz1;
128 SECURITY_DESCRIPTOR_CONTROL Control;
129 LPSID Owner;
130 LPSID Group;
131 LPACL Sacl;
132 LPACL Dacl;
133 } SECURITY_DESCRIPTOR,*PSECURITY_DESCRIPTOR,*LPSECURITY_DESCRIPTOR;
136 typedef enum tagSID_NAME_USE {
137 SidTypeUser = 1,
138 SidTypeGroup,
139 SidTypeDomain,
140 SidTypeAlias,
141 SidTypeWellKnownGroup,
142 SidTypeDeletedAccount,
143 SidTypeInvalid,
144 SidTypeUnknown
145 } SID_NAME_USE,*PSID_NAME_USE,*LPSID_NAME_USE;
147 /* NT lowlevel Strings (handled by Rtl* functions in NTDLL)
148 * If they are zero terminated, Length does not include the terminating 0.
151 typedef struct _STRING {
152 UINT16 Length;
153 UINT16 MaximumLength;
154 LPSTR Buffer;
155 } STRING,*LPSTRING,ANSI_STRING,*LPANSI_STRING;
157 typedef struct _CSTRING {
158 UINT16 Length;
159 UINT16 MaximumLength;
160 LPCSTR Buffer;
161 } CSTRING,*LPCSTRING;
163 typedef struct _UNICODE_STRING {
164 UINT16 Length; /* bytes */
165 UINT16 MaximumLength; /* bytes */
166 LPWSTR Buffer;
167 } UNICODE_STRING,*LPUNICODE_STRING;
170 BOOL32 WINAPI IsValidSid(LPSID);
171 BOOL32 WINAPI EqualSid(LPSID,LPSID);
172 BOOL32 WINAPI EqualPrefixSid(LPSID,LPSID);
173 DWORD WINAPI GetSidLengthRequired(BYTE);
174 BOOL32 WINAPI AllocateAndInitializeSid(LPSID_IDENTIFIER_AUTHORITY,BYTE,DWORD,
175 DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,
176 DWORD,LPSID*);
177 VOID* WINAPI FreeSid(LPSID);
178 BOOL32 WINAPI InitializeSecurityDescriptor(SECURITY_DESCRIPTOR*,DWORD);
179 BOOL32 WINAPI InitializeSid(LPSID,LPSID_IDENTIFIER_AUTHORITY,BYTE);
180 DWORD* WINAPI GetSidSubAuthority(LPSID,DWORD);
181 BYTE * WINAPI GetSidSubAuthorityCount(LPSID);
182 DWORD WINAPI GetLengthSid(LPSID);
183 BOOL32 WINAPI CopySid(DWORD,LPSID,LPSID);
184 BOOL32 WINAPI LookupAccountSid32A(LPCSTR,PSID,LPCSTR,LPDWORD,LPCSTR,LPDWORD,
185 PSID_NAME_USE);
186 BOOL32 WINAPI LookupAccountSid32W(LPCWSTR,PSID,LPCWSTR,LPDWORD,LPCWSTR,LPDWORD,
187 PSID_NAME_USE);
188 LPSID_IDENTIFIER_AUTHORITY WINAPI GetSidIdentifierAuthority(LPSID);
190 #ifdef __cplusplus
192 #endif
194 #endif /* __WINE_NTDLL_H */