"Fossies" - the Fresh Open Source Software Archive

Member "FreeBASIC-1.09.0-win64/inc/win/aclui.bi" (1 Jan 2022, 14703 Bytes) of package /windows/misc/FreeBASIC-1.09.0-win64.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Visual Basic source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

A hint: This file contains one or more very long lines, so maybe it is better readable using the pure text view mode that shows the contents as wrapped lines within the browser window.


    1 '' FreeBASIC binding for mingw-w64-v4.0.4
    2 ''
    3 '' based on the C header files:
    4 ''   This Software is provided under the Zope Public License (ZPL) Version 2.1.
    5 ''
    6 ''   Copyright (c) 2009, 2010 by the mingw-w64 project
    7 ''
    8 ''   See the AUTHORS file for the list of contributors to the mingw-w64 project.
    9 ''
   10 ''   This license has been certified as open source. It has also been designated
   11 ''   as GPL compatible by the Free Software Foundation (FSF).
   12 ''
   13 ''   Redistribution and use in source and binary forms, with or without
   14 ''   modification, are permitted provided that the following conditions are met:
   15 ''
   16 ''     1. Redistributions in source code must retain the accompanying copyright
   17 ''        notice, this list of conditions, and the following disclaimer.
   18 ''     2. Redistributions in binary form must reproduce the accompanying
   19 ''        copyright notice, this list of conditions, and the following disclaimer
   20 ''        in the documentation and/or other materials provided with the
   21 ''        distribution.
   22 ''     3. Names of the copyright holders must not be used to endorse or promote
   23 ''        products derived from this software without prior written permission
   24 ''        from the copyright holders.
   25 ''     4. The right to distribute this software or to use it for any purpose does
   26 ''        not give you the right to use Servicemarks (sm) or Trademarks (tm) of
   27 ''        the copyright holders.  Use of them is covered by separate agreement
   28 ''        with the copyright holders.
   29 ''     5. If any files are modified, you must cause the modified files to carry
   30 ''        prominent notices stating that you changed the files and the date of
   31 ''        any change.
   32 ''
   33 ''   Disclaimer
   34 ''
   35 ''   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
   36 ''   OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   37 ''   OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
   38 ''   EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
   39 ''   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   40 ''   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
   41 ''   OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
   42 ''   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
   43 ''   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
   44 ''   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   45 ''
   46 '' translated to FreeBASIC by:
   47 ''   Copyright © 2015 FreeBASIC development team
   48 
   49 #pragma once
   50 
   51 #inclib "aclui"
   52 
   53 #include once "winapifamily.bi"
   54 #include once "objbase.bi"
   55 #include once "commctrl.bi"
   56 #include once "accctrl.bi"
   57 #include once "authz.bi"
   58 
   59 extern "Windows"
   60 
   61 #define _ACLUI_H_
   62 
   63 type _SI_OBJECT_INFO
   64     dwFlags as DWORD
   65     hInstance as HINSTANCE
   66     pszServerName as LPWSTR
   67     pszObjectName as LPWSTR
   68     pszPageTitle as LPWSTR
   69     guidObjectType as GUID
   70 end type
   71 
   72 type SI_OBJECT_INFO as _SI_OBJECT_INFO
   73 type PSI_OBJECT_INFO as _SI_OBJECT_INFO ptr
   74 const SI_EDIT_PERMS = &h00000000
   75 const SI_EDIT_OWNER = &h00000001
   76 const SI_EDIT_AUDITS = &h00000002
   77 const SI_CONTAINER = &h00000004
   78 const SI_READONLY = &h00000008
   79 const SI_ADVANCED = &h00000010
   80 const SI_RESET = &h00000020
   81 const SI_OWNER_READONLY = &h00000040
   82 const SI_EDIT_PROPERTIES = &h00000080
   83 const SI_OWNER_RECURSE = &h00000100
   84 const SI_NO_ACL_PROTECT = &h00000200
   85 const SI_NO_TREE_APPLY = &h00000400
   86 const SI_PAGE_TITLE = &h00000800
   87 const SI_SERVER_IS_DC = &h00001000
   88 const SI_RESET_DACL_TREE = &h00004000
   89 const SI_RESET_SACL_TREE = &h00008000
   90 const SI_OBJECT_GUID = &h00010000
   91 const SI_EDIT_EFFECTIVE = &h00020000
   92 const SI_RESET_DACL = &h00040000
   93 const SI_RESET_SACL = &h00080000
   94 const SI_RESET_OWNER = &h00100000
   95 const SI_NO_ADDITIONAL_PERMISSION = &h00200000
   96 
   97 #if _WIN32_WINNT >= &h0600
   98     const SI_VIEW_ONLY = &h00400000
   99     const SI_PERMS_ELEVATION_REQUIRED = &h01000000
  100     const SI_AUDITS_ELEVATION_REQUIRED = &h02000000
  101     const SI_OWNER_ELEVATION_REQUIRED = &h04000000
  102 #endif
  103 
  104 #if _WIN32_WINNT = &h0602
  105     const SI_SCOPE_ELEVATION_REQUIRED = &h08000000
  106 #endif
  107 
  108 const SI_MAY_WRITE = &h10000000
  109 
  110 #if _WIN32_WINNT = &h0602
  111     const SI_ENABLE_EDIT_ATTRIBUTE_CONDITION = &h20000000
  112     const SI_ENABLE_CENTRAL_POLICY = &h40000000
  113     const SI_DISABLE_DENY_ACE = &h80000000
  114 #endif
  115 
  116 const SI_EDIT_ALL = (SI_EDIT_PERMS or SI_EDIT_OWNER) or SI_EDIT_AUDITS
  117 
  118 type _SI_ACCESS
  119     pguid as const GUID ptr
  120     mask as ACCESS_MASK
  121     pszName as LPCWSTR
  122     dwFlags as DWORD
  123 end type
  124 
  125 type SI_ACCESS as _SI_ACCESS
  126 type PSI_ACCESS as _SI_ACCESS ptr
  127 const SI_ACCESS_SPECIFIC = &h00010000
  128 const SI_ACCESS_GENERAL = &h00020000
  129 const SI_ACCESS_CONTAINER = &h00040000
  130 const SI_ACCESS_PROPERTY = &h00080000
  131 
  132 type _SI_INHERIT_TYPE
  133     pguid as const GUID ptr
  134     dwFlags as ULONG
  135     pszName as LPCWSTR
  136 end type
  137 
  138 type SI_INHERIT_TYPE as _SI_INHERIT_TYPE
  139 type PSI_INHERIT_TYPE as _SI_INHERIT_TYPE ptr
  140 
  141 type _SI_PAGE_TYPE as long
  142 enum
  143     SI_PAGE_PERM = 0
  144     SI_PAGE_ADVPERM
  145     SI_PAGE_AUDIT
  146     SI_PAGE_OWNER
  147     SI_PAGE_EFFECTIVE
  148 
  149     #if _WIN32_WINNT >= &h0600
  150         SI_PAGE_TAKEOWNERSHIP
  151     #endif
  152 
  153     #if _WIN32_WINNT = &h0602
  154         SI_PAGE_SHARE
  155     #endif
  156 end enum
  157 
  158 type SI_PAGE_TYPE as _SI_PAGE_TYPE
  159 
  160 type _SI_PAGE_ACTIVATED as long
  161 enum
  162     SI_SHOW_DEFAULT = 0
  163     SI_SHOW_PERM_ACTIVATED
  164     SI_SHOW_AUDIT_ACTIVATED
  165     SI_SHOW_OWNER_ACTIVATED
  166     SI_SHOW_EFFECTIVE_ACTIVATED
  167     SI_SHOW_SHARE_ACTIVATED
  168     SI_SHOW_CENTRAL_POLICY_ACTIVATED
  169 end enum
  170 
  171 type SI_PAGE_ACTIVATED as _SI_PAGE_ACTIVATED
  172 #define GET_PAGE_TYPE(X) cast(UINT, (X) and &h0000ffff)
  173 #define GET_ACTIVATION_TYPE(Y) cast(UINT, ((Y) shr 16) and &h0000ffff)
  174 #define COMBINE_PAGE_ACTIVATION(X, Y) cast(UINT, ((Y) shl 16) or X)
  175 const DOBJ_RES_CONT = &h00000001
  176 const DOBJ_RES_ROOT = &h00000002
  177 const DOBJ_VOL_NTACLS = &h00000004
  178 const DOBJ_COND_NTACLS = &h00000008
  179 const DOBJ_RIBBON_LAUNCH = &h00000010
  180 const PSPCB_SI_INITDIALOG = WM_USER + 1
  181 type ISecurityInformationVtbl as ISecurityInformationVtbl_
  182 
  183 type ISecurityInformation
  184     lpVtbl as ISecurityInformationVtbl ptr
  185 end type
  186 
  187 type ISecurityInformationVtbl_
  188     QueryInterface as function(byval This as ISecurityInformation ptr, byval riid as const IID const ptr, byval ppvObj as any ptr ptr) as HRESULT
  189     AddRef as function(byval This as ISecurityInformation ptr) as ULONG
  190     Release as function(byval This as ISecurityInformation ptr) as ULONG
  191     GetObjectInformation as function(byval This as ISecurityInformation ptr, byval pObjectInfo as PSI_OBJECT_INFO) as HRESULT
  192     GetSecurity as function(byval This as ISecurityInformation ptr, byval RequestedInformation as SECURITY_INFORMATION, byval ppSecurityDescriptor as PSECURITY_DESCRIPTOR ptr, byval fDefault as WINBOOL) as HRESULT
  193     SetSecurity as function(byval This as ISecurityInformation ptr, byval SecurityInformation as SECURITY_INFORMATION, byval pSecurityDescriptor as PSECURITY_DESCRIPTOR) as HRESULT
  194     GetAccessRights as function(byval This as ISecurityInformation ptr, byval pguidObjectType as const GUID ptr, byval dwFlags as DWORD, byval ppAccess as PSI_ACCESS ptr, byval pcAccesses as ULONG ptr, byval piDefaultAccess as ULONG ptr) as HRESULT
  195     MapGeneric as function(byval This as ISecurityInformation ptr, byval pguidObjectType as const GUID ptr, byval pAceFlags as UCHAR ptr, byval pMask as ACCESS_MASK ptr) as HRESULT
  196     GetInheritTypes as function(byval This as ISecurityInformation ptr, byval ppInheritTypes as PSI_INHERIT_TYPE ptr, byval pcInheritTypes as ULONG ptr) as HRESULT
  197     PropertySheetPageCallback as function(byval This as ISecurityInformation ptr, byval hwnd as HWND, byval uMsg as UINT, byval uPage as SI_PAGE_TYPE) as HRESULT
  198 end type
  199 
  200 type LPSECURITYINFO as ISecurityInformation ptr
  201 type ISecurityInformation2Vtbl as ISecurityInformation2Vtbl_
  202 
  203 type ISecurityInformation2
  204     lpVtbl as ISecurityInformation2Vtbl ptr
  205 end type
  206 
  207 type ISecurityInformation2Vtbl_
  208     QueryInterface as function(byval This as ISecurityInformation2 ptr, byval riid as const IID const ptr, byval ppvObj as any ptr ptr) as HRESULT
  209     AddRef as function(byval This as ISecurityInformation2 ptr) as ULONG
  210     Release as function(byval This as ISecurityInformation2 ptr) as ULONG
  211     IsDaclCanonical as function(byval This as ISecurityInformation2 ptr, byval pDacl as PACL) as WINBOOL
  212     LookupSids as function(byval This as ISecurityInformation2 ptr, byval cSids as ULONG, byval rgpSids as PSID ptr, byval ppdo as LPDATAOBJECT ptr) as HRESULT
  213 end type
  214 
  215 type LPSECURITYINFO2 as ISecurityInformation2 ptr
  216 #define CFSTR_ACLUI_SID_INFO_LIST __TEXT("CFSTR_ACLUI_SID_INFO_LIST")
  217 
  218 type _SID_INFO
  219     pSid as PSID
  220     pwzCommonName as PWSTR
  221     pwzClass as PWSTR
  222     pwzUPN as PWSTR
  223 end type
  224 
  225 type SID_INFO as _SID_INFO
  226 type PSID_INFO as _SID_INFO ptr
  227 
  228 type _SID_INFO_LIST
  229     cItems as ULONG
  230     aSidInfo(0 to 0) as SID_INFO
  231 end type
  232 
  233 type SID_INFO_LIST as _SID_INFO_LIST
  234 type PSID_INFO_LIST as _SID_INFO_LIST ptr
  235 type IEffectivePermissionVtbl as IEffectivePermissionVtbl_
  236 
  237 type IEffectivePermission
  238     lpVtbl as IEffectivePermissionVtbl ptr
  239 end type
  240 
  241 type IEffectivePermissionVtbl_
  242     QueryInterface as function(byval This as IEffectivePermission ptr, byval riid as const IID const ptr, byval ppvObj as any ptr ptr) as HRESULT
  243     AddRef as function(byval This as IEffectivePermission ptr) as ULONG
  244     Release as function(byval This as IEffectivePermission ptr) as ULONG
  245     GetEffectivePermission as function(byval This as IEffectivePermission ptr, byval pguidObjectType as const GUID ptr, byval pUserSid as PSID, byval pszServerName as LPCWSTR, byval pSD as PSECURITY_DESCRIPTOR, byval ppObjectTypeList as POBJECT_TYPE_LIST ptr, byval pcObjectTypeListLength as ULONG ptr, byval ppGrantedAccessList as PACCESS_MASK ptr, byval pcGrantedAccessListLength as ULONG ptr) as HRESULT
  246 end type
  247 
  248 type LPEFFECTIVEPERMISSION as IEffectivePermission ptr
  249 type ISecurityObjectTypeInfoVtbl as ISecurityObjectTypeInfoVtbl_
  250 
  251 type ISecurityObjectTypeInfo
  252     lpVtbl as ISecurityObjectTypeInfoVtbl ptr
  253 end type
  254 
  255 type ISecurityObjectTypeInfoVtbl_
  256     QueryInterface as function(byval This as ISecurityObjectTypeInfo ptr, byval riid as const IID const ptr, byval ppvObj as any ptr ptr) as HRESULT
  257     AddRef as function(byval This as ISecurityObjectTypeInfo ptr) as ULONG
  258     Release as function(byval This as ISecurityObjectTypeInfo ptr) as ULONG
  259     GetInheritSource as function(byval si as SECURITY_INFORMATION, byval pACL as PACL, byval ppInheritArray as PINHERITED_FROM ptr) as HRESULT
  260 end type
  261 
  262 type LPSecurityObjectTypeInfo as ISecurityObjectTypeInfo ptr
  263 
  264 #if _WIN32_WINNT >= &h0600
  265     type ISecurityInformation3Vtbl as ISecurityInformation3Vtbl_
  266 
  267     type ISecurityInformation3
  268         lpVtbl as ISecurityInformation3Vtbl ptr
  269     end type
  270 
  271     type ISecurityInformation3Vtbl_
  272         QueryInterface as function(byval This as ISecurityInformation3 ptr, byval riid as const IID const ptr, byval ppvObj as any ptr ptr) as HRESULT
  273         AddRef as function(byval This as ISecurityInformation3 ptr) as ULONG
  274         Release as function(byval This as ISecurityInformation3 ptr) as ULONG
  275         GetFullResourceName as function(byval This as ISecurityInformation3 ptr, byval ppszResourceName as LPWSTR ptr) as HRESULT
  276         OpenElevatedEditor as function(byval This as ISecurityInformation3 ptr, byval hWnd as HWND, byval uPage as SI_PAGE_TYPE) as HRESULT
  277     end type
  278 
  279     type LPSECURITYINFO3 as ISecurityInformation3 ptr
  280 #endif
  281 
  282 #if _WIN32_WINNT = &h0602
  283     type _SECURITY_OBJECT
  284         pwszName as PWSTR
  285         pData as PVOID
  286         cbData as DWORD
  287         pData2 as PVOID
  288         cbData2 as DWORD
  289         Id as DWORD
  290         fWellKnown as WINBOOLEAN
  291     end type
  292 
  293     type SECURITY_OBJECT as _SECURITY_OBJECT
  294     type PSECURITY_OBJECT as _SECURITY_OBJECT ptr
  295     const SECURITY_OBJECT_ID_OBJECT_SD = 1
  296     const SECURITY_OBJECT_ID_SHARE = 2
  297     const SECURITY_OBJECT_ID_CENTRAL_POLICY = 3
  298     const SECURITY_OBJECT_ID_CENTRAL_ACCESS_RULE = 4
  299 
  300     type _EFFPERM_RESULT_LIST
  301         fEvaluated as WINBOOLEAN
  302         cObjectTypeListLength as ULONG
  303         pObjectTypeList as OBJECT_TYPE_LIST ptr
  304         pGrantedAccessList as ACCESS_MASK ptr
  305     end type
  306 
  307     type EFFPERM_RESULT_LIST as _EFFPERM_RESULT_LIST
  308     type PEFFPERM_RESULT_LIST as _EFFPERM_RESULT_LIST ptr
  309     type ISecurityInformation4Vtbl as ISecurityInformation4Vtbl_
  310 
  311     type ISecurityInformation4
  312         lpVtbl as ISecurityInformation4Vtbl ptr
  313     end type
  314 
  315     type ISecurityInformation4Vtbl_
  316         QueryInterface as function(byval This as ISecurityInformation4 ptr, byval riid as const IID const ptr, byval ppvObj as any ptr ptr) as HRESULT
  317         AddRef as function(byval This as ISecurityInformation4 ptr) as ULONG
  318         Release as function(byval This as ISecurityInformation4 ptr) as ULONG
  319         GetSecondarySecurity as function(byval This as ISecurityInformation4 ptr, byval pSecurityObjects as PSECURITY_OBJECT ptr, byval pSecurityObjectCount as PULONG) as HRESULT
  320     end type
  321 
  322     type LPSECURITYINFO4 as ISecurityInformation4 ptr
  323     type IEffectivePermission2Vtbl as IEffectivePermission2Vtbl_
  324 
  325     type IEffectivePermission2
  326         lpVtbl as IEffectivePermission2Vtbl ptr
  327     end type
  328 
  329     type IEffectivePermission2Vtbl_
  330         QueryInterface as function(byval This as IEffectivePermission ptr, byval riid as const IID const ptr, byval ppvObj as any ptr ptr) as HRESULT
  331         AddRef as function(byval This as IEffectivePermission ptr) as ULONG
  332         Release as function(byval This as IEffectivePermission ptr) as ULONG
  333         ComputeEffectivePermissionWithSecondarySecurity as function(byval This as IEffectivePermission ptr, byval pSid as PSID, byval pDeviceSid as PSID, byval pszServerName as PCWSTR, byval pSecurityObjects as PSECURITY_OBJECT, byval dwSecurityObjectCount as DWORD, byval pUserGroups as PTOKEN_GROUPS, byval pAuthzUserGroupsOperations as PAUTHZ_SID_OPERATION, byval pDeviceGroups as PTOKEN_GROUPS, byval pAuthzDeviceGroupsOperations as PAUTHZ_SID_OPERATION, byval pAuthzUserClaims as PAUTHZ_SECURITY_ATTRIBUTES_INFORMATION, byval pAuthzUserClaimsOperations as PAUTHZ_SECURITY_ATTRIBUTE_OPERATION, byval pAuthzDeviceClaims as PAUTHZ_SECURITY_ATTRIBUTES_INFORMATION, byval pAuthzDeviceClaimsOperations as PAUTHZ_SECURITY_ATTRIBUTE_OPERATION, byval pEffpermResultLists as PEFFPERM_RESULT_LIST) as HRESULT
  334     end type
  335 
  336     type LPEFFECTIVEPERMISSION2 as IEffectivePermission2 ptr
  337 #endif
  338 
  339 extern IID_ISecurityInformation as const IID
  340 extern IID_ISecurityInformation2 as const IID
  341 extern IID_IEffectivePermission as const IID
  342 extern IID_ISecurityObjectTypeInfo as const IID
  343 
  344 #if _WIN32_WINNT >= &h0600
  345     extern IID_ISecurityInformation3 as const IID
  346 #endif
  347 
  348 #if _WIN32_WINNT = &h0602
  349     extern IID_ISecurityInformation4 as const IID
  350     extern IID_IEffectivePermission2 as const IID
  351 #endif
  352 
  353 declare function CreateSecurityPage(byval psi as LPSECURITYINFO) as HPROPSHEETPAGE
  354 declare function EditSecurity(byval hwndOwner as HWND, byval psi as LPSECURITYINFO) as WINBOOL
  355 
  356 #if _WIN32_WINNT >= &h0600
  357     declare function EditSecurityAdvanced(byval hwndOwner as HWND, byval psi as LPSECURITYINFO, byval uSIPage as SI_PAGE_TYPE) as HRESULT
  358 #endif
  359 
  360 end extern