jwaaclapi.pas 44 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333
  1. {******************************************************************************}
  2. { }
  3. { Access Control API interface Unit for Object Pascal }
  4. { }
  5. { Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
  6. { Corporation. All Rights Reserved. }
  7. { }
  8. { The original file is: aclapi.h, released June 2000. The original Pascal }
  9. { code is: AclApi.pas, released December 2000. The initial developer of the }
  10. { Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
  11. { }
  12. { Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
  13. { Marcel van Brakel. All Rights Reserved. }
  14. { }
  15. { Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
  16. { }
  17. { You may retrieve the latest version of this file at the Project JEDI }
  18. { APILIB home page, located at http://jedi-apilib.sourceforge.net }
  19. { }
  20. { The contents of this file are used with permission, subject to the Mozilla }
  21. { Public License Version 1.1 (the "License"); you may not use this file except }
  22. { in compliance with the License. You may obtain a copy of the License at }
  23. { http://www.mozilla.org/MPL/MPL-1.1.html }
  24. { }
  25. { Software distributed under the License is distributed on an "AS IS" basis, }
  26. { WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
  27. { the specific language governing rights and limitations under the License. }
  28. { }
  29. { Alternatively, the contents of this file may be used under the terms of the }
  30. { GNU Lesser General Public License (the "LGPL License"), in which case the }
  31. { provisions of the LGPL License are applicable instead of those above. }
  32. { If you wish to allow use of your version of this file only under the terms }
  33. { of the LGPL License and not to allow others to use your version of this file }
  34. { under the MPL, indicate your decision by deleting the provisions above and }
  35. { replace them with the notice and other provisions required by the LGPL }
  36. { License. If you do not delete the provisions above, a recipient may use }
  37. { your version of this file under either the MPL or the LGPL License. }
  38. { }
  39. { For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
  40. { }
  41. {******************************************************************************}
  42. // $Id: JwaAclApi.pas,v 1.9 2005/09/06 16:36:50 marquardt Exp $
  43. unit JwaAclApi;
  44. {$WEAKPACKAGEUNIT}
  45. {$HPPEMIT ''}
  46. {$HPPEMIT '#include "aclapi.h"'}
  47. {$HPPEMIT ''}
  48. {$I jediapilib.inc}
  49. interface
  50. uses
  51. JwaAccCtrl, JwaWindows;
  52. //
  53. // Progress Function:
  54. // Caller of tree operation implements this Progress function, then
  55. // passes its function pointer to tree operation.
  56. // Tree operation invokes Progress function to provide progress and error
  57. // information to the caller during the potentially long execution
  58. // of the tree operation. Tree operation provides the name of the object
  59. // last processed and the error status of the operation on that object.
  60. // Tree operation also passes the current InvokeSetting value.
  61. // Caller may change the InvokeSetting value, for example, from "Always"
  62. // to "Only On Error."
  63. //
  64. type
  65. FN_PROGRESS = procedure(
  66. pObjectName: LPWSTR; // name of object just processed
  67. Status: DWORD; // status of operation on object
  68. var pInvokeSetting: PPROG_INVOKE_SETTING; // Never, always,
  69. Args: PVOID; // Caller specific data
  70. SecuritySet: BOOL // Whether security was set
  71. ); stdcall;
  72. {$EXTERNALSYM FN_PROGRESS}
  73. TFnProgress = FN_PROGRESS;
  74. function SetEntriesInAclA(cCountOfExplicitEntries: ULONG;
  75. pListOfExplicitEntries: PEXPLICIT_ACCESS_A; OldAcl: PACL;
  76. var NewAcl: PACL): DWORD; stdcall;
  77. {$EXTERNALSYM SetEntriesInAclA}
  78. function SetEntriesInAclW(cCountOfExplicitEntries: ULONG;
  79. pListOfExplicitEntries: PEXPLICIT_ACCESS_W; OldAcl: PACL;
  80. var NewAcl: PACL): DWORD; stdcall;
  81. {$EXTERNALSYM SetEntriesInAclW}
  82. function SetEntriesInAcl(cCountOfExplicitEntries: ULONG;
  83. pListOfExplicitEntries: PEXPLICIT_ACCESS; OldAcl: PACL;
  84. var NewAcl: PACL): DWORD; stdcall;
  85. {$EXTERNALSYM SetEntriesInAcl}
  86. function GetExplicitEntriesFromAclA(pacl: PACL; var pcCountOfExplicitEntries: ULONG;
  87. var pListOfExplicitEntries: PEXPLICIT_ACCESS_A): DWORD; stdcall;
  88. {$EXTERNALSYM GetExplicitEntriesFromAclA}
  89. function GetExplicitEntriesFromAclW(pacl: PACL; var pcCountOfExplicitEntries: ULONG;
  90. var pListOfExplicitEntries: PEXPLICIT_ACCESS_W): DWORD; stdcall;
  91. {$EXTERNALSYM GetExplicitEntriesFromAclW}
  92. function GetExplicitEntriesFromAcl(pacl: PACL; var pcCountOfExplicitEntries: ULONG;
  93. var pListOfExplicitEntries: PEXPLICIT_ACCESS): DWORD; stdcall;
  94. {$EXTERNALSYM GetExplicitEntriesFromAcl}
  95. function GetEffectiveRightsFromAclA(pacl: PACL; pTrustee: PTRUSTEE_A;
  96. var pAccessRights: ACCESS_MASK): DWORD; stdcall;
  97. {$EXTERNALSYM GetEffectiveRightsFromAclA}
  98. function GetEffectiveRightsFromAclW(pacl: PACL; pTrustee: PTRUSTEE_W;
  99. var pAccessRights: ACCESS_MASK): DWORD; stdcall;
  100. {$EXTERNALSYM GetEffectiveRightsFromAclW}
  101. function GetEffectiveRightsFromAcl(pacl: PACL; pTrustee: PTRUSTEE;
  102. var pAccessRights: ACCESS_MASK): DWORD; stdcall;
  103. {$EXTERNALSYM GetEffectiveRightsFromAcl}
  104. function GetAuditedPermissionsFromAclA(pacl: PACL; pTrustee: PTRUSTEE_A;
  105. var pSuccessfulAuditedRights, pFailedAuditRights: ACCESS_MASK): DWORD; stdcall;
  106. {$EXTERNALSYM GetAuditedPermissionsFromAclA}
  107. function GetAuditedPermissionsFromAclW(pacl: PACL; pTrustee: PTRUSTEE_W;
  108. var pSuccessfulAuditedRights, pFailedAuditRights: ACCESS_MASK): DWORD; stdcall;
  109. {$EXTERNALSYM GetAuditedPermissionsFromAclW}
  110. function GetAuditedPermissionsFromAcl(pacl: PACL; pTrustee: PTRUSTEE;
  111. var pSuccessfulAuditedRights, pFailedAuditRights: ACCESS_MASK): DWORD; stdcall;
  112. {$EXTERNALSYM GetAuditedPermissionsFromAcl}
  113. function GetNamedSecurityInfoA(pObjectName: LPSTR; ObjectType: SE_OBJECT_TYPE;
  114. SecurityInfo: SECURITY_INFORMATION; ppsidOwner, ppsidGroup: PPSID; ppDacl,
  115. ppSacl: PPACL; var ppSecurityDescriptor: PSECURITY_DESCRIPTOR): DWORD; stdcall;
  116. {$EXTERNALSYM GetNamedSecurityInfoA}
  117. function GetNamedSecurityInfoW(pObjectName: LPWSTR; ObjectType: SE_OBJECT_TYPE;
  118. SecurityInfo: SECURITY_INFORMATION; ppsidOwner, ppsidGroup: PPSID; ppDacl,
  119. ppSacl: PPACL; var ppSecurityDescriptor: PSECURITY_DESCRIPTOR): DWORD; stdcall;
  120. {$EXTERNALSYM GetNamedSecurityInfoW}
  121. function GetNamedSecurityInfo(pObjectName: LPTSTR; ObjectType: SE_OBJECT_TYPE;
  122. SecurityInfo: SECURITY_INFORMATION; ppsidOwner, ppsidGroup: PPSID; ppDacl,
  123. ppSacl: PPACL; var ppSecurityDescriptor: PSECURITY_DESCRIPTOR): DWORD; stdcall;
  124. {$EXTERNALSYM GetNamedSecurityInfo}
  125. function GetSecurityInfo(handle: HANDLE; ObjectType: SE_OBJECT_TYPE;
  126. SecurityInfo: SECURITY_INFORMATION; ppsidOwner: PPSID; ppsidGroup: PPSID;
  127. ppDacl, ppSacl: PPACL; var ppSecurityDescriptor: PSECURITY_DESCRIPTOR): DWORD; stdcall;
  128. {$EXTERNALSYM GetSecurityInfo}
  129. function SetNamedSecurityInfoA(pObjectName: LPSTR; ObjectType: SE_OBJECT_TYPE;
  130. SecurityInfo: SECURITY_INFORMATION; psidOwner, psidGroup: PSID;
  131. pDacl, pSacl: PACL): DWORD; stdcall;
  132. {$EXTERNALSYM SetNamedSecurityInfoA}
  133. function SetNamedSecurityInfoW(pObjectName: LPWSTR; ObjectType: SE_OBJECT_TYPE;
  134. SecurityInfo: SECURITY_INFORMATION; psidOwner, psidGroup: PSID;
  135. pDacl, pSacl: PACL): DWORD; stdcall;
  136. {$EXTERNALSYM SetNamedSecurityInfoW}
  137. function SetNamedSecurityInfo(pObjectName: LPTSTR; ObjectType: SE_OBJECT_TYPE;
  138. SecurityInfo: SECURITY_INFORMATION; psidOwner, psidGroup: PSID;
  139. pDacl, pSacl: PACL): DWORD; stdcall;
  140. {$EXTERNALSYM SetNamedSecurityInfo}
  141. function SetSecurityInfo(handle: HANDLE; ObjectType: SE_OBJECT_TYPE;
  142. SecurityInfo: SECURITY_INFORMATION; psidOwner, psidGroup: PSID;
  143. pDacl, pSacl: PACL): DWORD; stdcall;
  144. {$EXTERNALSYM SetSecurityInfo}
  145. function GetInheritanceSourceA(pObjectName: LPSTR; ObjectType: SE_OBJECT_TYPE;
  146. SecurityInfo: SECURITY_INFORMATION; Container: BOOL; pObjectClassGuids: LPGUID;
  147. GuidCount: DWORD; pAcl: PACL; pfnArray: PFN_OBJECT_MGR_FUNCTS;
  148. pGenericMapping: PGENERIC_MAPPING; pInheritArray: PINHERITED_FROMA): DWORD; stdcall;
  149. {$EXTERNALSYM GetInheritanceSourceA}
  150. function GetInheritanceSourceW(pObjectName: LPWSTR; ObjectType: SE_OBJECT_TYPE;
  151. SecurityInfo: SECURITY_INFORMATION; Container: BOOL; pObjectClassGuids: LPGUID;
  152. GuidCount: DWORD; pAcl: PACL; pfnArray: PFN_OBJECT_MGR_FUNCTS;
  153. pGenericMapping: PGENERIC_MAPPING; pInheritArray: PINHERITED_FROMW): DWORD; stdcall;
  154. {$EXTERNALSYM GetInheritanceSourceW}
  155. function GetInheritanceSource(pObjectName: LPTSTR; ObjectType: SE_OBJECT_TYPE;
  156. SecurityInfo: SECURITY_INFORMATION; Container: BOOL; pObjectClassGuids: LPGUID;
  157. GuidCount: DWORD; pAcl: PACL; pfnArray: PFN_OBJECT_MGR_FUNCTS;
  158. pGenericMapping: PGENERIC_MAPPING; pInheritArray: PINHERITED_FROM): DWORD; stdcall;
  159. {$EXTERNALSYM GetInheritanceSource}
  160. function FreeInheritedFromArray(pInheritArray: PINHERITED_FROMW; AceCnt: USHORT;
  161. pfnArray: PFN_OBJECT_MGR_FUNCTS): DWORD; stdcall;
  162. {$EXTERNALSYM FreeInheritedFromArray}
  163. function TreeResetNamedSecurityInfoA(pObjectName: LPSTR; ObjectType: SE_OBJECT_TYPE;
  164. SecurityInfo: SECURITY_INFORMATION; pOwner, pGroup: PSID; pDacl, pSacl: PACL;
  165. KeepExplicit: BOOL; fnProgress: FN_PROGRESS; ProgressInvokeSetting: PROG_INVOKE_SETTING;
  166. Args: PVOID): DWORD; stdcall;
  167. {$EXTERNALSYM TreeResetNamedSecurityInfoA}
  168. function TreeResetNamedSecurityInfoW(pObjectName: LPWSTR; ObjectType: SE_OBJECT_TYPE;
  169. SecurityInfo: SECURITY_INFORMATION; pOwner, pGroup: PSID; pDacl, pSacl: PACL;
  170. KeepExplicit: BOOL; fnProgress: FN_PROGRESS; ProgressInvokeSetting: PROG_INVOKE_SETTING;
  171. Args: PVOID): DWORD; stdcall;
  172. {$EXTERNALSYM TreeResetNamedSecurityInfoW}
  173. function TreeResetNamedSecurityInfo(pObjectName: LPTSTR; ObjectType: SE_OBJECT_TYPE;
  174. SecurityInfo: SECURITY_INFORMATION; pOwner, pGroup: PSID; pDacl, pSacl: PACL;
  175. KeepExplicit: BOOL; fnProgress: FN_PROGRESS; ProgressInvokeSetting: PROG_INVOKE_SETTING;
  176. Args: PVOID): DWORD; stdcall;
  177. {$EXTERNALSYM TreeResetNamedSecurityInfo}
  178. //----------------------------------------------------------------------------
  179. // The following API are provided for trusted servers to use to
  180. // implement access control on their own objects.
  181. //----------------------------------------------------------------------------
  182. function BuildSecurityDescriptorA(pOwner: PTRUSTEE_A; pGroup: PTRUSTEE_A;
  183. cCountOfAccessEntries: ULONG; pListOfAccessEntries: PEXPLICIT_ACCESS_A;
  184. cCountOfAuditEntries: ULONG; pListOfAuditEntries: PEXPLICIT_ACCESS_A;
  185. pOldSD: PSECURITY_DESCRIPTOR; var pSizeNewSD: ULONG;
  186. var pNewSD: PSECURITY_DESCRIPTOR): DWORD; stdcall;
  187. {$EXTERNALSYM BuildSecurityDescriptorA}
  188. function BuildSecurityDescriptorW(pOwner: PTRUSTEE_W; pGroup: PTRUSTEE_W;
  189. cCountOfAccessEntries: ULONG; pListOfAccessEntries: PEXPLICIT_ACCESS_W;
  190. cCountOfAuditEntries: ULONG; pListOfAuditEntries: PEXPLICIT_ACCESS_W;
  191. pOldSD: PSECURITY_DESCRIPTOR; var pSizeNewSD: ULONG;
  192. var pNewSD: PSECURITY_DESCRIPTOR): DWORD; stdcall;
  193. {$EXTERNALSYM BuildSecurityDescriptorW}
  194. function BuildSecurityDescriptor(pOwner: PTRUSTEE; pGroup: PTRUSTEE;
  195. cCountOfAccessEntries: ULONG; pListOfAccessEntries: PEXPLICIT_ACCESS;
  196. cCountOfAuditEntries: ULONG; pListOfAuditEntries: PEXPLICIT_ACCESS;
  197. pOldSD: PSECURITY_DESCRIPTOR; var pSizeNewSD: ULONG;
  198. var pNewSD: PSECURITY_DESCRIPTOR): DWORD; stdcall;
  199. {$EXTERNALSYM BuildSecurityDescriptor}
  200. function LookupSecurityDescriptorPartsA(pOwner, pGroup: PPTRUSTEE_A;
  201. cCountOfAccessEntries: PULONG; pListOfAccessEntries: PEXPLICIT_ACCESS_A;
  202. cCountOfAuditEntries: PULONG; pListOfAuditEntries: PEXPLICIT_ACCESS_A;
  203. var pSD: SECURITY_DESCRIPTOR): DWORD; stdcall;
  204. {$EXTERNALSYM LookupSecurityDescriptorPartsA}
  205. function LookupSecurityDescriptorPartsW(pOwner, pGroup: PPTRUSTEE_W;
  206. cCountOfAccessEntries: PULONG; pListOfAccessEntries: PEXPLICIT_ACCESS_W;
  207. cCountOfAuditEntries: PULONG; pListOfAuditEntries: PEXPLICIT_ACCESS_W;
  208. var pSD: SECURITY_DESCRIPTOR): DWORD; stdcall;
  209. {$EXTERNALSYM LookupSecurityDescriptorPartsW}
  210. function LookupSecurityDescriptorParts(pOwner, pGroup: PPTRUSTEE;
  211. cCountOfAccessEntries: PULONG; pListOfAccessEntries: PEXPLICIT_ACCESS;
  212. cCountOfAuditEntries: PULONG; pListOfAuditEntries: PEXPLICIT_ACCESS;
  213. var pSD: SECURITY_DESCRIPTOR): DWORD; stdcall;
  214. {$EXTERNALSYM LookupSecurityDescriptorParts}
  215. //----------------------------------------------------------------------------
  216. // The following helper API are provided for building
  217. // access control structures.
  218. //----------------------------------------------------------------------------
  219. procedure BuildExplicitAccessWithNameA(pExplicitAccess: PEXPLICIT_ACCESS_A;
  220. pTrusteeName: LPSTR; AccessPermissions: DWORD; AccessMode: ACCESS_MODE;
  221. Inheritance: DWORD); stdcall;
  222. {$EXTERNALSYM BuildExplicitAccessWithNameA}
  223. procedure BuildExplicitAccessWithNameW(pExplicitAccess: PEXPLICIT_ACCESS_W;
  224. pTrusteeName: LPWSTR; AccessPermissions: DWORD; AccessMode: ACCESS_MODE;
  225. Inheritance: DWORD); stdcall;
  226. {$EXTERNALSYM BuildExplicitAccessWithNameW}
  227. procedure BuildExplicitAccessWithName(pExplicitAccess: PEXPLICIT_ACCESS;
  228. pTrusteeName: LPTSTR; AccessPermissions: DWORD; AccessMode: ACCESS_MODE;
  229. Inheritance: DWORD); stdcall;
  230. {$EXTERNALSYM BuildExplicitAccessWithName}
  231. procedure BuildImpersonateExplicitAccessWithNameA(pExplicitAccess: PEXPLICIT_ACCESS_A;
  232. pTrusteeName: LPSTR; pTrustee: PTRUSTEE_A; AccessPermissions: DWORD;
  233. AccessMode: ACCESS_MODE; Inheritance: DWORD); stdcall;
  234. {$EXTERNALSYM BuildImpersonateExplicitAccessWithNameA}
  235. procedure BuildImpersonateExplicitAccessWithNameW(pExplicitAccess: PEXPLICIT_ACCESS_W;
  236. pTrusteeName: LPWSTR; pTrustee: PTRUSTEE_W; AccessPermissions: DWORD;
  237. AccessMode: ACCESS_MODE; Inheritance: DWORD); stdcall;
  238. {$EXTERNALSYM BuildImpersonateExplicitAccessWithNameW}
  239. procedure BuildImpersonateExplicitAccessWithName(pExplicitAccess: PEXPLICIT_ACCESS;
  240. pTrusteeName: LPTSTR; pTrustee: PTRUSTEE; AccessPermissions: DWORD;
  241. AccessMode: ACCESS_MODE; Inheritance: DWORD); stdcall;
  242. {$EXTERNALSYM BuildImpersonateExplicitAccessWithName}
  243. procedure BuildTrusteeWithNameA(pTrustee: PTRUSTEE_A; pName: LPSTR); stdcall;
  244. {$EXTERNALSYM BuildTrusteeWithNameA}
  245. procedure BuildTrusteeWithNameW(pTrustee: PTRUSTEE_W; pName: LPWSTR); stdcall;
  246. {$EXTERNALSYM BuildTrusteeWithNameW}
  247. procedure BuildTrusteeWithName(pTrustee: PTRUSTEE; pName: LPTSTR); stdcall;
  248. {$EXTERNALSYM BuildTrusteeWithName}
  249. procedure BuildImpersonateTrusteeA(pTrustee: PTRUSTEE_A;
  250. pImpersonateTrustee: PTRUSTEE_A); stdcall;
  251. {$EXTERNALSYM BuildImpersonateTrusteeA}
  252. procedure BuildImpersonateTrusteeW(pTrustee: PTRUSTEE_W;
  253. pImpersonateTrustee: PTRUSTEE_W); stdcall;
  254. {$EXTERNALSYM BuildImpersonateTrusteeW}
  255. procedure BuildImpersonateTrustee(pTrustee: PTRUSTEE;
  256. pImpersonateTrustee: PTRUSTEE); stdcall;
  257. {$EXTERNALSYM BuildImpersonateTrustee}
  258. procedure BuildTrusteeWithSidA(pTrustee: PTRUSTEE_A; pSid: PSID); stdcall;
  259. {$EXTERNALSYM BuildTrusteeWithSidA}
  260. procedure BuildTrusteeWithSidW(pTrustee: PTRUSTEE_W; pSid: PSID); stdcall;
  261. {$EXTERNALSYM BuildTrusteeWithSidW}
  262. procedure BuildTrusteeWithSid(pTrustee: PTRUSTEE; pSid: PSID); stdcall;
  263. {$EXTERNALSYM BuildTrusteeWithSid}
  264. procedure BuildTrusteeWithObjectsAndSidA(pTrustee: PTRUSTEE_A;
  265. pObjSid: POBJECTS_AND_SID; pObjectGuid: PGUID; pInheritedObjectGuid: PGUID;
  266. pSid: PSID); stdcall;
  267. {$EXTERNALSYM BuildTrusteeWithObjectsAndSidA}
  268. procedure BuildTrusteeWithObjectsAndSidW(pTrustee: PTRUSTEE_W;
  269. pObjSid: POBJECTS_AND_SID; pObjectGuid: PGUID; pInheritedObjectGuid: PGUID;
  270. pSid: PSID); stdcall;
  271. {$EXTERNALSYM BuildTrusteeWithObjectsAndSidW}
  272. procedure BuildTrusteeWithObjectsAndSid(pTrustee: PTRUSTEE;
  273. pObjSid: POBJECTS_AND_SID; pObjectGuid: PGUID; pInheritedObjectGuid: PGUID;
  274. pSid: PSID); stdcall;
  275. {$EXTERNALSYM BuildTrusteeWithObjectsAndSid}
  276. procedure BuildTrusteeWithObjectsAndNameA(pTrustee: PTRUSTEE_A;
  277. pObjName: POBJECTS_AND_NAME_A; ObjectType: SE_OBJECT_TYPE;
  278. ObjectTypeName, InheritedObjectTypeName, Name: LPSTR); stdcall;
  279. {$EXTERNALSYM BuildTrusteeWithObjectsAndNameA}
  280. procedure BuildTrusteeWithObjectsAndNameW(pTrustee: PTRUSTEE_W;
  281. pObjName: POBJECTS_AND_NAME_W; ObjectType: SE_OBJECT_TYPE;
  282. ObjectTypeName, InheritedObjectTypeName, Name: LPWSTR); stdcall;
  283. {$EXTERNALSYM BuildTrusteeWithObjectsAndNameW}
  284. procedure BuildTrusteeWithObjectsAndName(pTrustee: PTRUSTEE;
  285. pObjName: POBJECTS_AND_NAME; ObjectType: SE_OBJECT_TYPE;
  286. ObjectTypeName, InheritedObjectTypeName, Name: LPTSTR); stdcall;
  287. {$EXTERNALSYM BuildTrusteeWithObjectsAndName}
  288. function GetTrusteeNameA(pTrustee: PTRUSTEE_A): LPSTR; stdcall;
  289. {$EXTERNALSYM GetTrusteeNameA}
  290. function GetTrusteeNameW(pTrustee: PTRUSTEE_W): LPWSTR; stdcall;
  291. {$EXTERNALSYM GetTrusteeNameW}
  292. function GetTrusteeName(pTrustee: PTRUSTEE): LPTSTR; stdcall;
  293. {$EXTERNALSYM GetTrusteeName}
  294. function GetTrusteeTypeA(pTrustee: PTRUSTEE_A): TRUSTEE_TYPE; stdcall;
  295. {$EXTERNALSYM GetTrusteeTypeA}
  296. function GetTrusteeTypeW(pTrustee: PTRUSTEE_W): TRUSTEE_TYPE; stdcall;
  297. {$EXTERNALSYM GetTrusteeTypeW}
  298. function GetTrusteeType(pTrustee: PTRUSTEE): TRUSTEE_TYPE; stdcall;
  299. {$EXTERNALSYM GetTrusteeType}
  300. function GetTrusteeFormA(pTrustee: PTRUSTEE_A): TRUSTEE_FORM; stdcall;
  301. {$EXTERNALSYM GetTrusteeFormA}
  302. function GetTrusteeFormW(pTrustee: PTRUSTEE_W): TRUSTEE_FORM; stdcall;
  303. {$EXTERNALSYM GetTrusteeFormW}
  304. function GetTrusteeForm(pTrustee: PTRUSTEE): TRUSTEE_FORM; stdcall;
  305. {$EXTERNALSYM GetTrusteeForm}
  306. function GetMultipleTrusteeOperationA(pTrustee: PTRUSTEE_A): MULTIPLE_TRUSTEE_OPERATION; stdcall;
  307. {$EXTERNALSYM GetMultipleTrusteeOperationA}
  308. function GetMultipleTrusteeOperationW(pTrustee: PTRUSTEE_W): MULTIPLE_TRUSTEE_OPERATION; stdcall;
  309. {$EXTERNALSYM GetMultipleTrusteeOperationW}
  310. function GetMultipleTrusteeOperation(pTrustee: PTRUSTEE): MULTIPLE_TRUSTEE_OPERATION; stdcall;
  311. {$EXTERNALSYM GetMultipleTrusteeOperation}
  312. function GetMultipleTrusteeA(pTrustee: PTRUSTEE_A): PTRUSTEE_A; stdcall;
  313. {$EXTERNALSYM GetMultipleTrusteeA}
  314. function GetMultipleTrusteeW(pTrustee: PTRUSTEE_W): PTRUSTEE_W; stdcall;
  315. {$EXTERNALSYM GetMultipleTrusteeW}
  316. function GetMultipleTrustee(pTrustee: PTRUSTEE): PTRUSTEE; stdcall;
  317. {$EXTERNALSYM GetMultipleTrustee}
  318. implementation
  319. uses
  320. JwaWinDLLNames;
  321. {$IFDEF DYNAMIC_LINK}
  322. var
  323. _SetEntriesInAclA: Pointer;
  324. function SetEntriesInAclA;
  325. begin
  326. GetProcedureAddress(_SetEntriesInAclA, aclapilib, 'SetEntriesInAclA');
  327. asm
  328. MOV ESP, EBP
  329. POP EBP
  330. JMP [_SetEntriesInAclA]
  331. end;
  332. end;
  333. var
  334. _SetEntriesInAclW: Pointer;
  335. function SetEntriesInAclW;
  336. begin
  337. GetProcedureAddress(_SetEntriesInAclW, aclapilib, 'SetEntriesInAclW');
  338. asm
  339. MOV ESP, EBP
  340. POP EBP
  341. JMP [_SetEntriesInAclW]
  342. end;
  343. end;
  344. var
  345. _SetEntriesInAcl: Pointer;
  346. function SetEntriesInAcl;
  347. begin
  348. GetProcedureAddress(_SetEntriesInAcl, aclapilib, 'SetEntriesInAcl' + AWSuffix);
  349. asm
  350. MOV ESP, EBP
  351. POP EBP
  352. JMP [_SetEntriesInAcl]
  353. end;
  354. end;
  355. var
  356. _GetExplicitEntriesFromAclA: Pointer;
  357. function GetExplicitEntriesFromAclA;
  358. begin
  359. GetProcedureAddress(_GetExplicitEntriesFromAclA, aclapilib, 'GetExplicitEntriesFromAclA');
  360. asm
  361. MOV ESP, EBP
  362. POP EBP
  363. JMP [_GetExplicitEntriesFromAclA]
  364. end;
  365. end;
  366. var
  367. _GetExplicitEntriesFromAclW: Pointer;
  368. function GetExplicitEntriesFromAclW;
  369. begin
  370. GetProcedureAddress(_GetExplicitEntriesFromAclW, aclapilib, 'GetExplicitEntriesFromAclW');
  371. asm
  372. MOV ESP, EBP
  373. POP EBP
  374. JMP [_GetExplicitEntriesFromAclW]
  375. end;
  376. end;
  377. var
  378. _GetExplicitEntriesFromAcl: Pointer;
  379. function GetExplicitEntriesFromAcl;
  380. begin
  381. GetProcedureAddress(_GetExplicitEntriesFromAcl, aclapilib, 'GetExplicitEntriesFromAcl' + AWSuffix);
  382. asm
  383. MOV ESP, EBP
  384. POP EBP
  385. JMP [_GetExplicitEntriesFromAcl]
  386. end;
  387. end;
  388. var
  389. _GetEffectiveRightsFromAclA: Pointer;
  390. function GetEffectiveRightsFromAclA;
  391. begin
  392. GetProcedureAddress(_GetEffectiveRightsFromAclA, aclapilib, 'GetEffectiveRightsFromAclA');
  393. asm
  394. MOV ESP, EBP
  395. POP EBP
  396. JMP [_GetEffectiveRightsFromAclA]
  397. end;
  398. end;
  399. var
  400. _GetEffectiveRightsFromAclW: Pointer;
  401. function GetEffectiveRightsFromAclW;
  402. begin
  403. GetProcedureAddress(_GetEffectiveRightsFromAclW, aclapilib, 'GetEffectiveRightsFromAclW');
  404. asm
  405. MOV ESP, EBP
  406. POP EBP
  407. JMP [_GetEffectiveRightsFromAclW]
  408. end;
  409. end;
  410. var
  411. _GetEffectiveRightsFromAcl: Pointer;
  412. function GetEffectiveRightsFromAcl;
  413. begin
  414. GetProcedureAddress(_GetEffectiveRightsFromAcl, aclapilib, 'GetEffectiveRightsFromAcl' + AWSuffix);
  415. asm
  416. MOV ESP, EBP
  417. POP EBP
  418. JMP [_GetEffectiveRightsFromAcl]
  419. end;
  420. end;
  421. var
  422. _GetAuditedPermissionsFromAclA: Pointer;
  423. function GetAuditedPermissionsFromAclA;
  424. begin
  425. GetProcedureAddress(_GetAuditedPermissionsFromAclA, aclapilib, 'GetAuditedPermissionsFromAclA');
  426. asm
  427. MOV ESP, EBP
  428. POP EBP
  429. JMP [_GetAuditedPermissionsFromAclA]
  430. end;
  431. end;
  432. var
  433. _GetAuditedPermissionsFromAclW: Pointer;
  434. function GetAuditedPermissionsFromAclW;
  435. begin
  436. GetProcedureAddress(_GetAuditedPermissionsFromAclW, aclapilib, 'GetAuditedPermissionsFromAclW');
  437. asm
  438. MOV ESP, EBP
  439. POP EBP
  440. JMP [_GetAuditedPermissionsFromAclW]
  441. end;
  442. end;
  443. var
  444. _GetAuditedPermissionsFromAcl: Pointer;
  445. function GetAuditedPermissionsFromAcl;
  446. begin
  447. GetProcedureAddress(_GetAuditedPermissionsFromAcl, aclapilib, 'GetAuditedPermissionsFromAcl' + AWSuffix);
  448. asm
  449. MOV ESP, EBP
  450. POP EBP
  451. JMP [_GetAuditedPermissionsFromAcl]
  452. end;
  453. end;
  454. var
  455. _GetNamedSecurityInfoA: Pointer;
  456. function GetNamedSecurityInfoA;
  457. begin
  458. GetProcedureAddress(_GetNamedSecurityInfoA, aclapilib, 'GetNamedSecurityInfoA');
  459. asm
  460. MOV ESP, EBP
  461. POP EBP
  462. JMP [_GetNamedSecurityInfoA]
  463. end;
  464. end;
  465. var
  466. _GetNamedSecurityInfoW: Pointer;
  467. function GetNamedSecurityInfoW;
  468. begin
  469. GetProcedureAddress(_GetNamedSecurityInfoW, aclapilib, 'GetNamedSecurityInfoW');
  470. asm
  471. MOV ESP, EBP
  472. POP EBP
  473. JMP [_GetNamedSecurityInfoW]
  474. end;
  475. end;
  476. var
  477. _GetNamedSecurityInfo: Pointer;
  478. function GetNamedSecurityInfo;
  479. begin
  480. GetProcedureAddress(_GetNamedSecurityInfo, aclapilib, 'GetNamedSecurityInfo' + AWSuffix);
  481. asm
  482. MOV ESP, EBP
  483. POP EBP
  484. JMP [_GetNamedSecurityInfo]
  485. end;
  486. end;
  487. var
  488. _GetSecurityInfo: Pointer;
  489. function GetSecurityInfo;
  490. begin
  491. GetProcedureAddress(_GetSecurityInfo, aclapilib, 'GetSecurityInfo');
  492. asm
  493. MOV ESP, EBP
  494. POP EBP
  495. JMP [_GetSecurityInfo]
  496. end;
  497. end;
  498. var
  499. _SetNamedSecurityInfoA: Pointer;
  500. function SetNamedSecurityInfoA;
  501. begin
  502. GetProcedureAddress(_SetNamedSecurityInfoA, aclapilib, 'SetNamedSecurityInfoA');
  503. asm
  504. MOV ESP, EBP
  505. POP EBP
  506. JMP [_SetNamedSecurityInfoA]
  507. end;
  508. end;
  509. var
  510. _SetNamedSecurityInfoW: Pointer;
  511. function SetNamedSecurityInfoW;
  512. begin
  513. GetProcedureAddress(_SetNamedSecurityInfoW, aclapilib, 'SetNamedSecurityInfoW');
  514. asm
  515. MOV ESP, EBP
  516. POP EBP
  517. JMP [_SetNamedSecurityInfoW]
  518. end;
  519. end;
  520. var
  521. _SetNamedSecurityInfo: Pointer;
  522. function SetNamedSecurityInfo;
  523. begin
  524. GetProcedureAddress(_SetNamedSecurityInfo, aclapilib, 'SetNamedSecurityInfo' + AWSuffix);
  525. asm
  526. MOV ESP, EBP
  527. POP EBP
  528. JMP [_SetNamedSecurityInfo]
  529. end;
  530. end;
  531. var
  532. _SetSecurityInfo: Pointer;
  533. function SetSecurityInfo;
  534. begin
  535. GetProcedureAddress(_SetSecurityInfo, aclapilib, 'SetSecurityInfo');
  536. asm
  537. MOV ESP, EBP
  538. POP EBP
  539. JMP [_SetSecurityInfo]
  540. end;
  541. end;
  542. var
  543. _GetInheritanceSourceA: Pointer;
  544. function GetInheritanceSourceA;
  545. begin
  546. GetProcedureAddress(_GetInheritanceSourceA, aclapilib, 'GetInheritanceSourceA');
  547. asm
  548. MOV ESP, EBP
  549. POP EBP
  550. JMP [_GetInheritanceSourceA]
  551. end;
  552. end;
  553. var
  554. _GetInheritanceSourceW: Pointer;
  555. function GetInheritanceSourceW;
  556. begin
  557. GetProcedureAddress(_GetInheritanceSourceW, aclapilib, 'GetInheritanceSourceW');
  558. asm
  559. MOV ESP, EBP
  560. POP EBP
  561. JMP [_GetInheritanceSourceW]
  562. end;
  563. end;
  564. var
  565. _GetInheritanceSource: Pointer;
  566. function GetInheritanceSource;
  567. begin
  568. GetProcedureAddress(_GetInheritanceSource, aclapilib, 'GetInheritanceSource' + AWSuffix);
  569. asm
  570. MOV ESP, EBP
  571. POP EBP
  572. JMP [_GetInheritanceSource]
  573. end;
  574. end;
  575. var
  576. _FreeInheritedFromArray: Pointer;
  577. function FreeInheritedFromArray;
  578. begin
  579. GetProcedureAddress(_FreeInheritedFromArray, aclapilib, 'FreeInheritedFromArray');
  580. asm
  581. MOV ESP, EBP
  582. POP EBP
  583. JMP [_FreeInheritedFromArray]
  584. end;
  585. end;
  586. var
  587. _TreeResetNamedSecurityInfoA: Pointer;
  588. function TreeResetNamedSecurityInfoA;
  589. begin
  590. GetProcedureAddress(_TreeResetNamedSecurityInfoA, aclapilib, 'TreeResetNamedSecurityInfoA');
  591. asm
  592. MOV ESP, EBP
  593. POP EBP
  594. JMP [_TreeResetNamedSecurityInfoA]
  595. end;
  596. end;
  597. var
  598. _TreeResetNamedSecurityInfoW: Pointer;
  599. function TreeResetNamedSecurityInfoW;
  600. begin
  601. GetProcedureAddress(_TreeResetNamedSecurityInfoW, aclapilib, 'TreeResetNamedSecurityInfoW');
  602. asm
  603. MOV ESP, EBP
  604. POP EBP
  605. JMP [_TreeResetNamedSecurityInfoW]
  606. end;
  607. end;
  608. var
  609. _TreeResetNamedSecurityInfo: Pointer;
  610. function TreeResetNamedSecurityInfo;
  611. begin
  612. GetProcedureAddress(_TreeResetNamedSecurityInfo, aclapilib, 'TreeResetNamedSecurityInfo' + AWSuffix);
  613. asm
  614. MOV ESP, EBP
  615. POP EBP
  616. JMP [_TreeResetNamedSecurityInfo]
  617. end;
  618. end;
  619. var
  620. _BuildSecurityDescriptorA: Pointer;
  621. function BuildSecurityDescriptorA;
  622. begin
  623. GetProcedureAddress(_BuildSecurityDescriptorA, aclapilib, 'BuildSecurityDescriptorA');
  624. asm
  625. MOV ESP, EBP
  626. POP EBP
  627. JMP [_BuildSecurityDescriptorA]
  628. end;
  629. end;
  630. var
  631. _BuildSecurityDescriptorW: Pointer;
  632. function BuildSecurityDescriptorW;
  633. begin
  634. GetProcedureAddress(_BuildSecurityDescriptorW, aclapilib, 'BuildSecurityDescriptorW');
  635. asm
  636. MOV ESP, EBP
  637. POP EBP
  638. JMP [_BuildSecurityDescriptorW]
  639. end;
  640. end;
  641. var
  642. _BuildSecurityDescriptor: Pointer;
  643. function BuildSecurityDescriptor;
  644. begin
  645. GetProcedureAddress(_BuildSecurityDescriptor, aclapilib, 'BuildSecurityDescriptor' + AWSuffix);
  646. asm
  647. MOV ESP, EBP
  648. POP EBP
  649. JMP [_BuildSecurityDescriptor]
  650. end;
  651. end;
  652. var
  653. _LookupSecurityDescriptorPartsA: Pointer;
  654. function LookupSecurityDescriptorPartsA;
  655. begin
  656. GetProcedureAddress(_LookupSecurityDescriptorPartsA, aclapilib, 'LookupSecurityDescriptorPartsA');
  657. asm
  658. MOV ESP, EBP
  659. POP EBP
  660. JMP [_LookupSecurityDescriptorPartsA]
  661. end;
  662. end;
  663. var
  664. _LookupSecurityDescriptorPartsW: Pointer;
  665. function LookupSecurityDescriptorPartsW;
  666. begin
  667. GetProcedureAddress(_LookupSecurityDescriptorPartsW, aclapilib, 'LookupSecurityDescriptorPartsW');
  668. asm
  669. MOV ESP, EBP
  670. POP EBP
  671. JMP [_LookupSecurityDescriptorPartsW]
  672. end;
  673. end;
  674. var
  675. _LookupSecurityDescriptorParts: Pointer;
  676. function LookupSecurityDescriptorParts;
  677. begin
  678. GetProcedureAddress(_LookupSecurityDescriptorParts, aclapilib, 'LookupSecurityDescriptorParts' + AWSuffix);
  679. asm
  680. MOV ESP, EBP
  681. POP EBP
  682. JMP [_LookupSecurityDescriptorParts]
  683. end;
  684. end;
  685. var
  686. _BuildExplicitAccessWithNameA: Pointer;
  687. procedure BuildExplicitAccessWithNameA;
  688. begin
  689. GetProcedureAddress(_BuildExplicitAccessWithNameA, aclapilib, 'BuildExplicitAccessWithNameA');
  690. asm
  691. MOV ESP, EBP
  692. POP EBP
  693. JMP [_BuildExplicitAccessWithNameA]
  694. end;
  695. end;
  696. var
  697. _BuildExplicitAccessWithNameW: Pointer;
  698. procedure BuildExplicitAccessWithNameW;
  699. begin
  700. GetProcedureAddress(_BuildExplicitAccessWithNameW, aclapilib, 'BuildExplicitAccessWithNameW');
  701. asm
  702. MOV ESP, EBP
  703. POP EBP
  704. JMP [_BuildExplicitAccessWithNameW]
  705. end;
  706. end;
  707. var
  708. _BuildExplicitAccessWithName: Pointer;
  709. procedure BuildExplicitAccessWithName;
  710. begin
  711. GetProcedureAddress(_BuildExplicitAccessWithName, aclapilib, 'BuildExplicitAccessWithName' + AWSuffix);
  712. asm
  713. MOV ESP, EBP
  714. POP EBP
  715. JMP [_BuildExplicitAccessWithName]
  716. end;
  717. end;
  718. var
  719. _BuildImpersonateExplAccWNA: Pointer;
  720. procedure BuildImpersonateExplicitAccessWithNameA;
  721. begin
  722. GetProcedureAddress(_BuildImpersonateExplAccWNA, aclapilib, 'BuildImpersonateExplicitAccessWithNameA');
  723. asm
  724. MOV ESP, EBP
  725. POP EBP
  726. JMP [_BuildImpersonateExplAccWNA]
  727. end;
  728. end;
  729. var
  730. _BuildImpersonateExplAccWNW: Pointer;
  731. procedure BuildImpersonateExplicitAccessWithNameW;
  732. begin
  733. GetProcedureAddress(_BuildImpersonateExplAccWNW, aclapilib, 'BuildImpersonateExplicitAccessWithNameW');
  734. asm
  735. MOV ESP, EBP
  736. POP EBP
  737. JMP [_BuildImpersonateExplAccWNW]
  738. end;
  739. end;
  740. var
  741. _BuildImpersonateExplAccWN: Pointer;
  742. procedure BuildImpersonateExplicitAccessWithName;
  743. begin
  744. GetProcedureAddress(_BuildImpersonateExplAccWN, aclapilib, 'BuildImpersonateExplicitAccessWithName' + AWSuffix);
  745. asm
  746. MOV ESP, EBP
  747. POP EBP
  748. JMP [_BuildImpersonateExplAccWN]
  749. end;
  750. end;
  751. var
  752. _BuildTrusteeWithNameA: Pointer;
  753. procedure BuildTrusteeWithNameA;
  754. begin
  755. GetProcedureAddress(_BuildTrusteeWithNameA, aclapilib, 'BuildTrusteeWithNameA');
  756. asm
  757. MOV ESP, EBP
  758. POP EBP
  759. JMP [_BuildTrusteeWithNameA]
  760. end;
  761. end;
  762. var
  763. _BuildTrusteeWithNameW: Pointer;
  764. procedure BuildTrusteeWithNameW;
  765. begin
  766. GetProcedureAddress(_BuildTrusteeWithNameW, aclapilib, 'BuildTrusteeWithNameW');
  767. asm
  768. MOV ESP, EBP
  769. POP EBP
  770. JMP [_BuildTrusteeWithNameW]
  771. end;
  772. end;
  773. var
  774. _BuildTrusteeWithName: Pointer;
  775. procedure BuildTrusteeWithName;
  776. begin
  777. GetProcedureAddress(_BuildTrusteeWithName, aclapilib, 'BuildTrusteeWithName' + AWSuffix);
  778. asm
  779. MOV ESP, EBP
  780. POP EBP
  781. JMP [_BuildTrusteeWithName]
  782. end;
  783. end;
  784. var
  785. _BuildImpersonateTrusteeA: Pointer;
  786. procedure BuildImpersonateTrusteeA;
  787. begin
  788. GetProcedureAddress(_BuildImpersonateTrusteeA, aclapilib, 'BuildImpersonateTrusteeA');
  789. asm
  790. MOV ESP, EBP
  791. POP EBP
  792. JMP [_BuildImpersonateTrusteeA]
  793. end;
  794. end;
  795. var
  796. _BuildImpersonateTrusteeW: Pointer;
  797. procedure BuildImpersonateTrusteeW;
  798. begin
  799. GetProcedureAddress(_BuildImpersonateTrusteeW, aclapilib, 'BuildImpersonateTrusteeW');
  800. asm
  801. MOV ESP, EBP
  802. POP EBP
  803. JMP [_BuildImpersonateTrusteeW]
  804. end;
  805. end;
  806. var
  807. _BuildImpersonateTrustee: Pointer;
  808. procedure BuildImpersonateTrustee;
  809. begin
  810. GetProcedureAddress(_BuildImpersonateTrustee, aclapilib, 'BuildImpersonateTrustee' + AWSuffix);
  811. asm
  812. MOV ESP, EBP
  813. POP EBP
  814. JMP [_BuildImpersonateTrustee]
  815. end;
  816. end;
  817. var
  818. _BuildTrusteeWithSidA: Pointer;
  819. procedure BuildTrusteeWithSidA;
  820. begin
  821. GetProcedureAddress(_BuildTrusteeWithSidA, aclapilib, 'BuildTrusteeWithSidA');
  822. asm
  823. MOV ESP, EBP
  824. POP EBP
  825. JMP [_BuildTrusteeWithSidA]
  826. end;
  827. end;
  828. var
  829. _BuildTrusteeWithSidW: Pointer;
  830. procedure BuildTrusteeWithSidW;
  831. begin
  832. GetProcedureAddress(_BuildTrusteeWithSidW, aclapilib, 'BuildTrusteeWithSidW');
  833. asm
  834. MOV ESP, EBP
  835. POP EBP
  836. JMP [_BuildTrusteeWithSidW]
  837. end;
  838. end;
  839. var
  840. _BuildTrusteeWithSid: Pointer;
  841. procedure BuildTrusteeWithSid;
  842. begin
  843. GetProcedureAddress(_BuildTrusteeWithSid, aclapilib, 'BuildTrusteeWithSid' + AWSuffix);
  844. asm
  845. MOV ESP, EBP
  846. POP EBP
  847. JMP [_BuildTrusteeWithSid]
  848. end;
  849. end;
  850. var
  851. _BuildTrusteeWithObjectsAndSidA: Pointer;
  852. procedure BuildTrusteeWithObjectsAndSidA;
  853. begin
  854. GetProcedureAddress(_BuildTrusteeWithObjectsAndSidA, aclapilib, 'BuildTrusteeWithObjectsAndSidA');
  855. asm
  856. MOV ESP, EBP
  857. POP EBP
  858. JMP [_BuildTrusteeWithObjectsAndSidA]
  859. end;
  860. end;
  861. var
  862. _BuildTrusteeWithObjectsAndSidW: Pointer;
  863. procedure BuildTrusteeWithObjectsAndSidW;
  864. begin
  865. GetProcedureAddress(_BuildTrusteeWithObjectsAndSidW, aclapilib, 'BuildTrusteeWithObjectsAndSidW');
  866. asm
  867. MOV ESP, EBP
  868. POP EBP
  869. JMP [_BuildTrusteeWithObjectsAndSidW]
  870. end;
  871. end;
  872. var
  873. _BuildTrusteeWithObjectsAndSid: Pointer;
  874. procedure BuildTrusteeWithObjectsAndSid;
  875. begin
  876. GetProcedureAddress(_BuildTrusteeWithObjectsAndSid, aclapilib, 'BuildTrusteeWithObjectsAndSid' + AWSuffix);
  877. asm
  878. MOV ESP, EBP
  879. POP EBP
  880. JMP [_BuildTrusteeWithObjectsAndSid]
  881. end;
  882. end;
  883. var
  884. _BuildTrusteeWithObjectsAndNameA: Pointer;
  885. procedure BuildTrusteeWithObjectsAndNameA;
  886. begin
  887. GetProcedureAddress(_BuildTrusteeWithObjectsAndNameA, aclapilib, 'BuildTrusteeWithObjectsAndNameA');
  888. asm
  889. MOV ESP, EBP
  890. POP EBP
  891. JMP [_BuildTrusteeWithObjectsAndNameA]
  892. end;
  893. end;
  894. var
  895. _BuildTrusteeWithObjectsAndNameW: Pointer;
  896. procedure BuildTrusteeWithObjectsAndNameW;
  897. begin
  898. GetProcedureAddress(_BuildTrusteeWithObjectsAndNameW, aclapilib, 'BuildTrusteeWithObjectsAndNameW');
  899. asm
  900. MOV ESP, EBP
  901. POP EBP
  902. JMP [_BuildTrusteeWithObjectsAndNameW]
  903. end;
  904. end;
  905. var
  906. _BuildTrusteeWithObjectsAndName: Pointer;
  907. procedure BuildTrusteeWithObjectsAndName;
  908. begin
  909. GetProcedureAddress(_BuildTrusteeWithObjectsAndName, aclapilib, 'BuildTrusteeWithObjectsAndName' + AWSuffix);
  910. asm
  911. MOV ESP, EBP
  912. POP EBP
  913. JMP [_BuildTrusteeWithObjectsAndName]
  914. end;
  915. end;
  916. var
  917. _GetTrusteeNameA: Pointer;
  918. function GetTrusteeNameA;
  919. begin
  920. GetProcedureAddress(_GetTrusteeNameA, aclapilib, 'GetTrusteeNameA');
  921. asm
  922. MOV ESP, EBP
  923. POP EBP
  924. JMP [_GetTrusteeNameA]
  925. end;
  926. end;
  927. var
  928. _GetTrusteeNameW: Pointer;
  929. function GetTrusteeNameW;
  930. begin
  931. GetProcedureAddress(_GetTrusteeNameW, aclapilib, 'GetTrusteeNameW');
  932. asm
  933. MOV ESP, EBP
  934. POP EBP
  935. JMP [_GetTrusteeNameW]
  936. end;
  937. end;
  938. var
  939. _GetTrusteeName: Pointer;
  940. function GetTrusteeName;
  941. begin
  942. GetProcedureAddress(_GetTrusteeName, aclapilib, 'GetTrusteeName' + AWSuffix);
  943. asm
  944. MOV ESP, EBP
  945. POP EBP
  946. JMP [_GetTrusteeName]
  947. end;
  948. end;
  949. var
  950. _GetTrusteeTypeA: Pointer;
  951. function GetTrusteeTypeA;
  952. begin
  953. GetProcedureAddress(_GetTrusteeTypeA, aclapilib, 'GetTrusteeTypeA');
  954. asm
  955. MOV ESP, EBP
  956. POP EBP
  957. JMP [_GetTrusteeTypeA]
  958. end;
  959. end;
  960. var
  961. _GetTrusteeTypeW: Pointer;
  962. function GetTrusteeTypeW;
  963. begin
  964. GetProcedureAddress(_GetTrusteeTypeW, aclapilib, 'GetTrusteeTypeW');
  965. asm
  966. MOV ESP, EBP
  967. POP EBP
  968. JMP [_GetTrusteeTypeW]
  969. end;
  970. end;
  971. var
  972. _GetTrusteeType: Pointer;
  973. function GetTrusteeType;
  974. begin
  975. GetProcedureAddress(_GetTrusteeType, aclapilib, 'GetTrusteeType' + AWSuffix);
  976. asm
  977. MOV ESP, EBP
  978. POP EBP
  979. JMP [_GetTrusteeType]
  980. end;
  981. end;
  982. var
  983. _GetTrusteeFormA: Pointer;
  984. function GetTrusteeFormA;
  985. begin
  986. GetProcedureAddress(_GetTrusteeFormA, aclapilib, 'GetTrusteeFormA');
  987. asm
  988. MOV ESP, EBP
  989. POP EBP
  990. JMP [_GetTrusteeFormA]
  991. end;
  992. end;
  993. var
  994. _GetTrusteeFormW: Pointer;
  995. function GetTrusteeFormW;
  996. begin
  997. GetProcedureAddress(_GetTrusteeFormW, aclapilib, 'GetTrusteeFormW');
  998. asm
  999. MOV ESP, EBP
  1000. POP EBP
  1001. JMP [_GetTrusteeFormW]
  1002. end;
  1003. end;
  1004. var
  1005. _GetTrusteeForm: Pointer;
  1006. function GetTrusteeForm;
  1007. begin
  1008. GetProcedureAddress(_GetTrusteeForm, aclapilib, 'GetTrusteeForm' + AWSuffix);
  1009. asm
  1010. MOV ESP, EBP
  1011. POP EBP
  1012. JMP [_GetTrusteeForm]
  1013. end;
  1014. end;
  1015. var
  1016. _GetMultipleTrusteeOperationA: Pointer;
  1017. function GetMultipleTrusteeOperationA;
  1018. begin
  1019. GetProcedureAddress(_GetMultipleTrusteeOperationA, aclapilib, 'GetMultipleTrusteeOperationA');
  1020. asm
  1021. MOV ESP, EBP
  1022. POP EBP
  1023. JMP [_GetMultipleTrusteeOperationA]
  1024. end;
  1025. end;
  1026. var
  1027. _GetMultipleTrusteeOperationW: Pointer;
  1028. function GetMultipleTrusteeOperationW;
  1029. begin
  1030. GetProcedureAddress(_GetMultipleTrusteeOperationW, aclapilib, 'GetMultipleTrusteeOperationW');
  1031. asm
  1032. MOV ESP, EBP
  1033. POP EBP
  1034. JMP [_GetMultipleTrusteeOperationW]
  1035. end;
  1036. end;
  1037. var
  1038. _GetMultipleTrusteeOperation: Pointer;
  1039. function GetMultipleTrusteeOperation;
  1040. begin
  1041. GetProcedureAddress(_GetMultipleTrusteeOperation, aclapilib, 'GetMultipleTrusteeOperation' + AWSuffix);
  1042. asm
  1043. MOV ESP, EBP
  1044. POP EBP
  1045. JMP [_GetMultipleTrusteeOperation]
  1046. end;
  1047. end;
  1048. var
  1049. _GetMultipleTrusteeA: Pointer;
  1050. function GetMultipleTrusteeA;
  1051. begin
  1052. GetProcedureAddress(_GetMultipleTrusteeA, aclapilib, 'GetMultipleTrusteeA');
  1053. asm
  1054. MOV ESP, EBP
  1055. POP EBP
  1056. JMP [_GetMultipleTrusteeA]
  1057. end;
  1058. end;
  1059. var
  1060. _GetMultipleTrusteeW: Pointer;
  1061. function GetMultipleTrusteeW;
  1062. begin
  1063. GetProcedureAddress(_GetMultipleTrusteeW, aclapilib, 'GetMultipleTrusteeW');
  1064. asm
  1065. MOV ESP, EBP
  1066. POP EBP
  1067. JMP [_GetMultipleTrusteeW]
  1068. end;
  1069. end;
  1070. var
  1071. _GetMultipleTrustee: Pointer;
  1072. function GetMultipleTrustee;
  1073. begin
  1074. GetProcedureAddress(_GetMultipleTrustee, aclapilib, 'GetMultipleTrustee' + AWSuffix);
  1075. asm
  1076. MOV ESP, EBP
  1077. POP EBP
  1078. JMP [_GetMultipleTrustee]
  1079. end;
  1080. end;
  1081. {$ELSE}
  1082. function SetEntriesInAclA; external aclapilib name 'SetEntriesInAclA';
  1083. function SetEntriesInAclW; external aclapilib name 'SetEntriesInAclW';
  1084. function SetEntriesInAcl; external aclapilib name 'SetEntriesInAcl' + AWSuffix;
  1085. function GetExplicitEntriesFromAclA; external aclapilib name 'GetExplicitEntriesFromAclA';
  1086. function GetExplicitEntriesFromAclW; external aclapilib name 'GetExplicitEntriesFromAclW';
  1087. function GetExplicitEntriesFromAcl; external aclapilib name 'GetExplicitEntriesFromAcl' + AWSuffix;
  1088. function GetEffectiveRightsFromAclA; external aclapilib name 'GetEffectiveRightsFromAclA';
  1089. function GetEffectiveRightsFromAclW; external aclapilib name 'GetEffectiveRightsFromAclW';
  1090. function GetEffectiveRightsFromAcl; external aclapilib name 'GetEffectiveRightsFromAcl' + AWSuffix;
  1091. function GetAuditedPermissionsFromAclA; external aclapilib name 'GetAuditedPermissionsFromAclA';
  1092. function GetAuditedPermissionsFromAclW; external aclapilib name 'GetAuditedPermissionsFromAclW';
  1093. function GetAuditedPermissionsFromAcl; external aclapilib name 'GetAuditedPermissionsFromAcl' + AWSuffix;
  1094. function GetNamedSecurityInfoA; external aclapilib name 'GetNamedSecurityInfoA';
  1095. function GetNamedSecurityInfoW; external aclapilib name 'GetNamedSecurityInfoW';
  1096. function GetNamedSecurityInfo; external aclapilib name 'GetNamedSecurityInfo' + AWSuffix;
  1097. function GetSecurityInfo; external aclapilib name 'GetSecurityInfo';
  1098. function SetNamedSecurityInfoA; external aclapilib name 'SetNamedSecurityInfoA';
  1099. function SetNamedSecurityInfoW; external aclapilib name 'SetNamedSecurityInfoW';
  1100. function SetNamedSecurityInfo; external aclapilib name 'SetNamedSecurityInfo' + AWSuffix;
  1101. function SetSecurityInfo; external aclapilib name 'SetSecurityInfo';
  1102. function GetInheritanceSourceA; external aclapilib name 'GetInheritanceSourceA';
  1103. function GetInheritanceSourceW; external aclapilib name 'GetInheritanceSourceW';
  1104. function GetInheritanceSource; external aclapilib name 'GetInheritanceSource' + AWSuffix;
  1105. function FreeInheritedFromArray; external aclapilib name 'FreeInheritedFromArray';
  1106. function TreeResetNamedSecurityInfoA; external aclapilib name 'TreeResetNamedSecurityInfoA';
  1107. function TreeResetNamedSecurityInfoW; external aclapilib name 'TreeResetNamedSecurityInfoW';
  1108. function TreeResetNamedSecurityInfo; external aclapilib name 'TreeResetNamedSecurityInfo' + AWSuffix;
  1109. function BuildSecurityDescriptorA; external aclapilib name 'BuildSecurityDescriptorA';
  1110. function BuildSecurityDescriptorW; external aclapilib name 'BuildSecurityDescriptorW';
  1111. function BuildSecurityDescriptor; external aclapilib name 'BuildSecurityDescriptor' + AWSuffix;
  1112. function LookupSecurityDescriptorPartsA; external aclapilib name 'LookupSecurityDescriptorPartsA';
  1113. function LookupSecurityDescriptorPartsW; external aclapilib name 'LookupSecurityDescriptorPartsW';
  1114. function LookupSecurityDescriptorParts; external aclapilib name 'LookupSecurityDescriptorParts' + AWSuffix;
  1115. procedure BuildExplicitAccessWithNameA; external aclapilib name 'BuildExplicitAccessWithNameA';
  1116. procedure BuildExplicitAccessWithNameW; external aclapilib name 'BuildExplicitAccessWithNameW';
  1117. procedure BuildExplicitAccessWithName; external aclapilib name 'BuildExplicitAccessWithName' + AWSuffix;
  1118. procedure BuildImpersonateExplicitAccessWithNameA; external aclapilib name 'BuildImpersonateExplicitAccessWithNameA';
  1119. procedure BuildImpersonateExplicitAccessWithNameW; external aclapilib name 'BuildImpersonateExplicitAccessWithNameW';
  1120. procedure BuildImpersonateExplicitAccessWithName; external aclapilib name 'BuildImpersonateExplicitAccessWithName' + AWSuffix;
  1121. procedure BuildTrusteeWithNameA; external aclapilib name 'BuildTrusteeWithNameA';
  1122. procedure BuildTrusteeWithNameW; external aclapilib name 'BuildTrusteeWithNameW';
  1123. procedure BuildTrusteeWithName; external aclapilib name 'BuildTrusteeWithName' + AWSuffix;
  1124. procedure BuildImpersonateTrusteeA; external aclapilib name 'BuildImpersonateTrusteeA';
  1125. procedure BuildImpersonateTrusteeW; external aclapilib name 'BuildImpersonateTrusteeW';
  1126. procedure BuildImpersonateTrustee; external aclapilib name 'BuildImpersonateTrustee' + AWSuffix;
  1127. procedure BuildTrusteeWithSidA; external aclapilib name 'BuildTrusteeWithSidA';
  1128. procedure BuildTrusteeWithSidW; external aclapilib name 'BuildTrusteeWithSidW';
  1129. procedure BuildTrusteeWithSid; external aclapilib name 'BuildTrusteeWithSid' + AWSuffix;
  1130. procedure BuildTrusteeWithObjectsAndSidA; external aclapilib name 'BuildTrusteeWithObjectsAndSidA';
  1131. procedure BuildTrusteeWithObjectsAndSidW; external aclapilib name 'BuildTrusteeWithObjectsAndSidW';
  1132. procedure BuildTrusteeWithObjectsAndSid; external aclapilib name 'BuildTrusteeWithObjectsAndSid' + AWSuffix;
  1133. procedure BuildTrusteeWithObjectsAndNameA; external aclapilib name 'BuildTrusteeWithObjectsAndNameA';
  1134. procedure BuildTrusteeWithObjectsAndNameW; external aclapilib name 'BuildTrusteeWithObjectsAndNameW';
  1135. procedure BuildTrusteeWithObjectsAndName; external aclapilib name 'BuildTrusteeWithObjectsAndName' + AWSuffix;
  1136. function GetTrusteeNameA; external aclapilib name 'GetTrusteeNameA';
  1137. function GetTrusteeNameW; external aclapilib name 'GetTrusteeNameW';
  1138. function GetTrusteeName; external aclapilib name 'GetTrusteeName' + AWSuffix;
  1139. function GetTrusteeTypeA; external aclapilib name 'GetTrusteeTypeA';
  1140. function GetTrusteeTypeW; external aclapilib name 'GetTrusteeTypeW';
  1141. function GetTrusteeType; external aclapilib name 'GetTrusteeType' + AWSuffix;
  1142. function GetTrusteeFormA; external aclapilib name 'GetTrusteeFormA';
  1143. function GetTrusteeFormW; external aclapilib name 'GetTrusteeFormW';
  1144. function GetTrusteeForm; external aclapilib name 'GetTrusteeForm' + AWSuffix;
  1145. function GetMultipleTrusteeOperationA; external aclapilib name 'GetMultipleTrusteeOperationA';
  1146. function GetMultipleTrusteeOperationW; external aclapilib name 'GetMultipleTrusteeOperationW';
  1147. function GetMultipleTrusteeOperation; external aclapilib name 'GetMultipleTrusteeOperation' + AWSuffix;
  1148. function GetMultipleTrusteeA; external aclapilib name 'GetMultipleTrusteeA';
  1149. function GetMultipleTrusteeW; external aclapilib name 'GetMultipleTrusteeW';
  1150. function GetMultipleTrustee; external aclapilib name 'GetMultipleTrustee' + AWSuffix;
  1151. {$ENDIF DYNAMIC_LINK}
  1152. end.