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