Merge trunk HEAD (r46369)
[reactos.git] / reactos / base / applications / regedit / security.h
1 #ifndef _REGEXP_SECURITY_H
2 #define _REGEXP_SECURITY_H
3
4 BOOL
5 InitializeAclUiDll(VOID);
6
7 VOID
8 UnloadAclUiDll(VOID);
9
10 #define REGEDIT_IMPLEMENT_ISECURITYINFORMATION2 0
11
12 /******************************************************************************
13 ISecurityInformation
14 ******************************************************************************/
15
16 typedef struct ISecurityInformation *LPSECURITYINFORMATION;
17
18 typedef struct ifaceISecuritInformationVbtl ifaceISecurityInformationVbtl;
19 struct ifaceISecurityInformationVbtl
20 {
21 /* IUnknown */
22 HRESULT (STDMETHODCALLTYPE *QueryInterface)(struct ISecurityInformation *this,
23 REFIID iid,
24 PVOID *pvObject);
25 ULONG (STDMETHODCALLTYPE *AddRef)(struct ISecurityInformation *this);
26 ULONG (STDMETHODCALLTYPE *Release)(struct ISecurityInformation *this);
27
28 /* ISecurityInformation */
29 HRESULT (STDMETHODCALLTYPE *GetObjectInformation)(struct ISecurityInformation *this,
30 PSI_OBJECT_INFO pObjectInfo);
31 HRESULT (STDMETHODCALLTYPE *GetSecurity)(struct ISecurityInformation *this,
32 SECURITY_INFORMATION RequestedInformation,
33 PSECURITY_DESCRIPTOR* ppSecurityDescriptor,
34 BOOL fDefault);
35 HRESULT (STDMETHODCALLTYPE *SetSecurity)(struct ISecurityInformation *this,
36 SECURITY_INFORMATION RequestedInformation,
37 PSECURITY_DESCRIPTOR pSecurityDescriptor);
38 HRESULT (STDMETHODCALLTYPE *GetAccessRights)(struct ISecurityInformation *this,
39 const GUID* pguidObjectType,
40 DWORD dwFlags,
41 PSI_ACCESS* ppAccess,
42 ULONG* pcAccesses,
43 ULONG* piDefaultAccess);
44 HRESULT (STDMETHODCALLTYPE *MapGeneric)(struct ISecurityInformation *this,
45 const GUID* pguidObjectType,
46 UCHAR* pAceFlags,
47 ACCESS_MASK* pMask);
48 HRESULT (STDMETHODCALLTYPE *GetInheritTypes)(struct ISecurityInformation *this,
49 PSI_INHERIT_TYPE* ppInheritTypes,
50 ULONG* pcInheritTypes);
51 HRESULT (STDMETHODCALLTYPE *PropertySheetPageCallback)(struct ISecurityInformation *this,
52 HWND hwnd,
53 UINT uMsg,
54 SI_PAGE_TYPE uPage);
55 };
56
57 #if REGEDIT_IMPLEMENT_ISECURITYINFORMATION2
58 /******************************************************************************
59 ISecurityInformation2
60 ******************************************************************************/
61
62 typedef struct ISecurityInformation2 *LPSECURITYINFORMATION2;
63
64 typedef struct ifaceISecurityInformation2Vbtl ifaceISecurityInformation2Vbtl;
65 struct ifaceISecurityInformation2Vbtl
66 {
67 /* IUnknown */
68 HRESULT (STDMETHODCALLTYPE *QueryInterface)(struct ISecurityInformation2 *this,
69 REFIID iid,
70 PVOID *pvObject);
71 ULONG (STDMETHODCALLTYPE *AddRef)(struct ISecurityInformation2 *this);
72 ULONG (STDMETHODCALLTYPE *Release)(struct ISecurityInformation2 *this);
73
74 /* ISecurityInformation2 */
75 BOOL (STDMETHODCALLTYPE *IsDaclCanonical)(struct ISecurityInformation2 *this,
76 PACL pDacl);
77 HRESULT (STDMETHODCALLTYPE *LookupSids)(struct ISecurityInformation2 *this,
78 ULONG cSids,
79 PSID* rgpSids,
80 LPDATAOBJECT* ppdo);
81 };
82 #endif
83
84 /******************************************************************************
85 IEffectivePermission
86 ******************************************************************************/
87
88 typedef struct IEffectivePermission *LPEFFECTIVEPERMISSION;
89
90 typedef struct ifaceIEffectivePermissionVbtl ifaceIEffectivePermissionVbtl;
91 struct ifaceIEffectivePermissionVbtl
92 {
93 /* IUnknown */
94 HRESULT (STDMETHODCALLTYPE *QueryInterface)(struct IEffectivePermission *this,
95 REFIID iid,
96 PVOID *pvObject);
97 ULONG (STDMETHODCALLTYPE *AddRef)(struct IEffectivePermission *this);
98 ULONG (STDMETHODCALLTYPE *Release)(struct IEffectivePermission *this);
99
100 /* IEffectivePermission */
101 HRESULT (STDMETHODCALLTYPE *GetEffectivePermission)(struct IEffectivePermission *this,
102 const GUID* pguidObjectType,
103 PSID pUserSid,
104 LPCWSTR pszServerName,
105 PSECURITY_DESCRIPTOR pSD,
106 POBJECT_TYPE_LIST* ppObjectTypeList,
107 ULONG* pcObjectTypeListLength,
108 PACCESS_MASK* ppGrantedAccessList,
109 ULONG* pcGrantedAccessListLength);
110 };
111
112 /******************************************************************************
113 ISecurityObjectTypeInfo
114 ******************************************************************************/
115
116 typedef struct ISecurityObjectTypeInfo *LPSECURITYOBJECTTYPEINFO;
117
118 typedef struct ifaceISecurityObjectTypeInfoVbtl ifaceISecurityObjectTypeInfoVbtl;
119 struct ifaceISecurityObjectTypeInfoVbtl
120 {
121 /* IUnknown */
122 HRESULT (STDMETHODCALLTYPE *QueryInterface)(struct ISecurityObjectTypeInfo *this,
123 REFIID iid,
124 PVOID *pvObject);
125 ULONG (STDMETHODCALLTYPE *AddRef)(struct ISecurityObjectTypeInfo *this);
126 ULONG (STDMETHODCALLTYPE *Release)(struct ISecurityObjectTypeInfo *this);
127
128 /* ISecurityObjectTypeInfo */
129 HRESULT (STDMETHODCALLTYPE *GetInheritSource)(struct ISecurityObjectTypeInfo *this,
130 SECURITY_INFORMATION si,
131 PACL pACL,
132 PINHERITED_FROM* ppInheritArray);
133 };
134
135 /******************************************************************************
136 CRegKeySecurity
137 ******************************************************************************/
138
139 typedef struct _CRegKeySecurity
140 {
141 /* IUnknown fields and interfaces */
142 const struct ifaceISecurityInformationVbtl *lpISecurityInformationVtbl;
143 #if REGEDIT_IMPLEMENT_ISECURITYINFORMATION2
144 const struct ifaceISecurityInformation2Vbtl *lpISecurityInformation2Vtbl;
145 #endif
146 const struct ifaceIEffectivePermissionVbtl *lpIEffectivePermissionVtbl;
147 const struct ifaceISecurityObjectTypeInfoVbtl *lpISecurityObjectTypeInfoVtbl;
148 DWORD ref;
149
150 /* CRegKeySecurity fields */
151 SI_OBJECT_INFO ObjectInfo;
152 BOOL *Btn;
153 HKEY hRootKey;
154 TCHAR szRegKey[1];
155 } CRegKeySecurity, *PCRegKeySecurity;
156
157 #endif /* _REGEXP_SECURITY_H */
158
159 /* EOF */