JwaAclApi.pas
上传用户:davidchvip
上传日期:2009-07-28
资源大小:1749k
文件大小:61k
源码类别:

Windows编程

开发平台:

Delphi

  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@chello.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 home    }
  18. { page, located at http://delphi-jedi.org or my personal homepage located at   }
  19. { http://members.chello.nl/m.vanbrakel2                                        }
  20. {                }
  21. { The contents of this file are used with permission, subject to the Mozilla   }
  22. { Public License Version 1.1 (the "License"); you may not use this file except }
  23. { in compliance with the License. You may obtain a copy of the License at      }
  24. { http://www.mozilla.org/MPL/MPL-1.1.html                                      }
  25. {                                                                              }
  26. { Software distributed under the License is distributed on an "AS IS" basis,   }
  27. { WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
  28. { the specific language governing rights and limitations under the License.    }
  29. {                                                                              }
  30. { Alternatively, the contents of this file may be used under the terms of the  }
  31. { GNU Lesser General Public License (the  "LGPL License"), in which case the   }
  32. { provisions of the LGPL License are applicable instead of those above.        }
  33. { If you wish to allow use of your version of this file only under the terms   }
  34. { of the LGPL License and not to allow others to use your version of this file }
  35. { under the MPL, indicate your decision by deleting  the provisions above and  }
  36. { replace  them with the notice and other provisions required by the LGPL      }
  37. { License.  If you do not delete the provisions above, a recipient may use     }
  38. { your version of this file under either the MPL or the LGPL License.          }
  39. {                 }
  40. { For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
  41. {                 }
  42. {******************************************************************************}
  43. unit JwaAclApi;
  44. {$WEAKPACKAGEUNIT}
  45. {$HPPEMIT ''}
  46. {$HPPEMIT '#include "aclapi.h"'}
  47. {$HPPEMIT ''}
  48. {$I WINDEFINES.INC}
  49. interface
  50. uses
  51.   JwaAccCtrl, JwaWinNT, JwaWinType;
  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. {$IFDEF UNICODE}
  83. function SetEntriesInAcl(cCountOfExplicitEntries: ULONG;
  84.   pListOfExplicitEntries: PEXPLICIT_ACCESS_W; OldAcl: PACL;
  85.   var NewAcl: PACL): DWORD; stdcall;
  86. {$EXTERNALSYM SetEntriesInAcl}
  87. {$ELSE}
  88. function SetEntriesInAcl(cCountOfExplicitEntries: ULONG;
  89.   pListOfExplicitEntries: PEXPLICIT_ACCESS_A; OldAcl: PACL;
  90.   var NewAcl: PACL): DWORD; stdcall;
  91. {$EXTERNALSYM SetEntriesInAcl}
  92. {$ENDIF}
  93. function GetExplicitEntriesFromAclA(pacl: PACL; var pcCountOfExplicitEntries: ULONG;
  94.   var pListOfExplicitEntries: PEXPLICIT_ACCESS_A): DWORD; stdcall;
  95. {$EXTERNALSYM GetExplicitEntriesFromAclA}
  96. function GetExplicitEntriesFromAclW(pacl: PACL; var pcCountOfExplicitEntries: ULONG;
  97.   var pListOfExplicitEntries: PEXPLICIT_ACCESS_W): DWORD; stdcall;
  98. {$EXTERNALSYM GetExplicitEntriesFromAclW}
  99. {$IFDEF UNICODE}
  100. function GetExplicitEntriesFromAcl(pacl: PACL; var pcCountOfExplicitEntries: ULONG;
  101.   var pListOfExplicitEntries: PEXPLICIT_ACCESS_W): DWORD; stdcall;
  102. {$EXTERNALSYM GetExplicitEntriesFromAcl}
  103. {$ELSE}
  104. function GetExplicitEntriesFromAcl(pacl: PACL; var pcCountOfExplicitEntries: ULONG;
  105.   var pListOfExplicitEntries: PEXPLICIT_ACCESS_A): DWORD; stdcall;
  106. {$EXTERNALSYM GetExplicitEntriesFromAcl}
  107. {$ENDIF}
  108. function GetEffectiveRightsFromAclA(pacl: PACL; pTrustee: PTRUSTEE_A;
  109.   var pAccessRights: ACCESS_MASK): DWORD; stdcall;
  110. {$EXTERNALSYM GetEffectiveRightsFromAclA}
  111. function GetEffectiveRightsFromAclW(pacl: PACL; pTrustee: PTRUSTEE_W;
  112.   var pAccessRights: ACCESS_MASK): DWORD; stdcall;
  113. {$EXTERNALSYM GetEffectiveRightsFromAclW}
  114. {$IFDEF UNICODE}
  115. function GetEffectiveRightsFromAcl(pacl: PACL; pTrustee: PTRUSTEE_W;
  116.   var pAccessRights: ACCESS_MASK): DWORD; stdcall;
  117. {$EXTERNALSYM GetEffectiveRightsFromAcl}
  118. {$ELSE}
  119. function GetEffectiveRightsFromAcl(pacl: PACL; pTrustee: PTRUSTEE_A;
  120.   var pAccessRights: ACCESS_MASK): DWORD; stdcall;
  121. {$EXTERNALSYM GetEffectiveRightsFromAcl}
  122. {$ENDIF}
  123. function GetAuditedPermissionsFromAclA(pacl: PACL; pTrustee: PTRUSTEE_A;
  124.   var pSuccessfulAuditedRights, pFailedAuditRights: ACCESS_MASK): DWORD; stdcall;
  125. {$EXTERNALSYM GetAuditedPermissionsFromAclA}
  126. function GetAuditedPermissionsFromAclW(pacl: PACL; pTrustee: PTRUSTEE_W;
  127.   var pSuccessfulAuditedRights, pFailedAuditRights: ACCESS_MASK): DWORD; stdcall;
  128. {$EXTERNALSYM GetAuditedPermissionsFromAclW}
  129. {$IFDEF UNICODE}
  130. function GetAuditedPermissionsFromAcl(pacl: PACL; pTrustee: PTRUSTEE_W;
  131.   var pSuccessfulAuditedRights, pFailedAuditRights: ACCESS_MASK): DWORD; stdcall;
  132. {$EXTERNALSYM GetAuditedPermissionsFromAcl}
  133. {$ELSE}
  134. function GetAuditedPermissionsFromAcl(pacl: PACL; pTrustee: PTRUSTEE_A;
  135.   var pSuccessfulAuditedRights, pFailedAuditRights: ACCESS_MASK): DWORD; stdcall;
  136. {$EXTERNALSYM GetAuditedPermissionsFromAcl}
  137. {$ENDIF}
  138. function GetNamedSecurityInfoA(pObjectName: LPSTR; ObjectType: SE_OBJECT_TYPE;
  139.   SecurityInfo: SECURITY_INFORMATION; ppsidOwner, ppsidGroup: PPSID; ppDacl,
  140.   ppSacl: PPACL; var ppSecurityDescriptor: PSECURITY_DESCRIPTOR): DWORD; stdcall;
  141. {$EXTERNALSYM GetNamedSecurityInfoA}
  142. function GetNamedSecurityInfoW(pObjectName: LPWSTR; ObjectType: SE_OBJECT_TYPE;
  143.   SecurityInfo: SECURITY_INFORMATION; ppsidOwner, ppsidGroup: PPSID; ppDacl,
  144.   ppSacl: PPACL; var ppSecurityDescriptor: PSECURITY_DESCRIPTOR): DWORD; stdcall;
  145. {$EXTERNALSYM GetNamedSecurityInfoW}
  146. {$IFDEF UNICODE}
  147. function GetNamedSecurityInfo(pObjectName: LPWSTR; ObjectType: SE_OBJECT_TYPE;
  148.   SecurityInfo: SECURITY_INFORMATION; ppsidOwner, ppsidGroup: PPSID; ppDacl,
  149.   ppSacl: PPACL; var ppSecurityDescriptor: PSECURITY_DESCRIPTOR): DWORD; stdcall;
  150. {$EXTERNALSYM GetNamedSecurityInfo}
  151. {$ELSE}
  152. function GetNamedSecurityInfo(pObjectName: LPSTR; ObjectType: SE_OBJECT_TYPE;
  153.   SecurityInfo: SECURITY_INFORMATION; ppsidOwner, ppsidGroup: PPSID; ppDacl,
  154.   ppSacl: PPACL; var ppSecurityDescriptor: PSECURITY_DESCRIPTOR): DWORD; stdcall;
  155. {$EXTERNALSYM GetNamedSecurityInfo}
  156. {$ENDIF}
  157. function GetSecurityInfo(handle: HANDLE; ObjectType: SE_OBJECT_TYPE;
  158.   SecurityInfo: SECURITY_INFORMATION; ppsidOwner: PPSID; ppsidGroup: PPSID;
  159.   ppDacl, ppSacl: PPACL; var ppSecurityDescriptor: PSECURITY_DESCRIPTOR): DWORD; stdcall;
  160. {$EXTERNALSYM GetSecurityInfo}
  161. function SetNamedSecurityInfoA(pObjectName: LPSTR; ObjectType: SE_OBJECT_TYPE;
  162.   SecurityInfo: SECURITY_INFORMATION; psidOwner, psidGroup: PSID;
  163.   pDacl, pSacl: PACL): DWORD; stdcall;
  164. {$EXTERNALSYM SetNamedSecurityInfoA}
  165. function SetNamedSecurityInfoW(pObjectName: LPWSTR; ObjectType: SE_OBJECT_TYPE;
  166.   SecurityInfo: SECURITY_INFORMATION; psidOwner, psidGroup: PSID;
  167.   pDacl, pSacl: PACL): DWORD; stdcall;
  168. {$EXTERNALSYM SetNamedSecurityInfoW}
  169. {$IFDEF UNICODE}
  170. function SetNamedSecurityInfo(pObjectName: LPWSTR; ObjectType: SE_OBJECT_TYPE;
  171.   SecurityInfo: SECURITY_INFORMATION; psidOwner, psidGroup: PSID;
  172.   pDacl, pSacl: PACL): DWORD; stdcall;
  173. {$EXTERNALSYM SetNamedSecurityInfo}
  174. {$ELSE}
  175. function SetNamedSecurityInfo(pObjectName: LPSTR; ObjectType: SE_OBJECT_TYPE;
  176.   SecurityInfo: SECURITY_INFORMATION; psidOwner, psidGroup: PSID;
  177.   pDacl, pSacl: PACL): DWORD; stdcall;
  178. {$EXTERNALSYM SetNamedSecurityInfo}
  179. {$ENDIF}
  180. function SetSecurityInfo(handle: HANDLE; ObjectType: SE_OBJECT_TYPE;
  181.   SecurityInfo: SECURITY_INFORMATION; psidOwner, psidGroup: PSID;
  182.   pDacl, pSacl: PACL): DWORD; stdcall;
  183. {$EXTERNALSYM SetSecurityInfo}
  184. function GetInheritanceSourceA(pObjectName: LPSTR; ObjectType: SE_OBJECT_TYPE;
  185.   SecurityInfo: SECURITY_INFORMATION; Container: BOOL; pObjectClassGuids: LPGUID;
  186.   GuidCount: DWORD; pAcl: PACL; pfnArray: PFN_OBJECT_MGR_FUNCTS;
  187.   pGenericMapping: PGENERIC_MAPPING; pInheritArray:  PINHERITED_FROMA): DWORD; stdcall;
  188. {$EXTERNALSYM GetInheritanceSourceA}
  189. function GetInheritanceSourceW(pObjectName: LPWSTR; ObjectType: SE_OBJECT_TYPE;
  190.   SecurityInfo: SECURITY_INFORMATION; Container: BOOL; pObjectClassGuids: LPGUID;
  191.   GuidCount: DWORD; pAcl: PACL; pfnArray: PFN_OBJECT_MGR_FUNCTS;
  192.   pGenericMapping: PGENERIC_MAPPING; pInheritArray:  PINHERITED_FROMW): DWORD; stdcall;
  193. {$EXTERNALSYM GetInheritanceSourceW}
  194. {$IFDEF UNICODE}
  195. function GetInheritanceSource(pObjectName: LPWSTR; ObjectType: SE_OBJECT_TYPE;
  196.   SecurityInfo: SECURITY_INFORMATION; Container: BOOL; pObjectClassGuids: LPGUID;
  197.   GuidCount: DWORD; pAcl: PACL; pfnArray: PFN_OBJECT_MGR_FUNCTS;
  198.   pGenericMapping: PGENERIC_MAPPING; pInheritArray:  PINHERITED_FROMW): DWORD; stdcall;
  199. {$EXTERNALSYM GetInheritanceSource}
  200. {$ELSE}
  201. function GetInheritanceSource(pObjectName: LPSTR; ObjectType: SE_OBJECT_TYPE;
  202.   SecurityInfo: SECURITY_INFORMATION; Container: BOOL; pObjectClassGuids: LPGUID;
  203.   GuidCount: DWORD; pAcl: PACL; pfnArray: PFN_OBJECT_MGR_FUNCTS;
  204.   pGenericMapping: PGENERIC_MAPPING; pInheritArray:  PINHERITED_FROMA): DWORD; stdcall;
  205. {$EXTERNALSYM GetInheritanceSource}
  206. {$ENDIF}
  207. function FreeInheritedFromArray(pInheritArray: PINHERITED_FROMW; AceCnt: USHORT;
  208.   pfnArray: PFN_OBJECT_MGR_FUNCTS): DWORD; stdcall;
  209. {$EXTERNALSYM FreeInheritedFromArray}
  210. function TreeResetNamedSecurityInfoA(pObjectName: LPSTR; ObjectType: SE_OBJECT_TYPE;
  211.   SecurityInfo: SECURITY_INFORMATION; pOwner, pGroup: PSID; pDacl, pSacl: PACL;
  212.   KeepExplicit: BOOL; fnProgress: FN_PROGRESS; ProgressInvokeSetting: PROG_INVOKE_SETTING;
  213.   Args: PVOID): DWORD; stdcall;
  214. {$EXTERNALSYM TreeResetNamedSecurityInfoA}
  215. function TreeResetNamedSecurityInfoW(pObjectName: LPWSTR; ObjectType: SE_OBJECT_TYPE;
  216.   SecurityInfo: SECURITY_INFORMATION; pOwner, pGroup: PSID; pDacl, pSacl: PACL;
  217.   KeepExplicit: BOOL; fnProgress: FN_PROGRESS; ProgressInvokeSetting: PROG_INVOKE_SETTING;
  218.   Args: PVOID): DWORD; stdcall;
  219. {$EXTERNALSYM TreeResetNamedSecurityInfoW}
  220. {$IFDEF UNICODE}
  221. function TreeResetNamedSecurityInfo(pObjectName: LPWSTR; ObjectType: SE_OBJECT_TYPE;
  222.   SecurityInfo: SECURITY_INFORMATION; pOwner, pGroup: PSID; pDacl, pSacl: PACL;
  223.   KeepExplicit: BOOL; fnProgress: FN_PROGRESS; ProgressInvokeSetting: PROG_INVOKE_SETTING;
  224.   Args: PVOID): DWORD; stdcall;
  225. {$EXTERNALSYM TreeResetNamedSecurityInfo}
  226. {$ELSE}
  227. function TreeResetNamedSecurityInfo(pObjectName: LPSTR; ObjectType: SE_OBJECT_TYPE;
  228.   SecurityInfo: SECURITY_INFORMATION; pOwner, pGroup: PSID; pDacl, pSacl: PACL;
  229.   KeepExplicit: BOOL; fnProgress: FN_PROGRESS; ProgressInvokeSetting: PROG_INVOKE_SETTING;
  230.   Args: PVOID): DWORD; stdcall;
  231. {$EXTERNALSYM TreeResetNamedSecurityInfo}
  232. {$ENDIF}
  233. //----------------------------------------------------------------------------
  234. // The following API are provided for trusted servers to use to
  235. // implement access control on their own objects.
  236. //----------------------------------------------------------------------------
  237. function BuildSecurityDescriptorA(pOwner: PTRUSTEE_A; pGroup: PTRUSTEE_A;
  238.   cCountOfAccessEntries: ULONG; pListOfAccessEntries: PEXPLICIT_ACCESS_A;
  239.   cCountOfAuditEntries: ULONG; pListOfAuditEntries: PEXPLICIT_ACCESS_A;
  240.   pOldSD: PSECURITY_DESCRIPTOR; var pSizeNewSD: ULONG;
  241.   var pNewSD: PSECURITY_DESCRIPTOR): DWORD; stdcall;
  242. {$EXTERNALSYM BuildSecurityDescriptorA}
  243. function BuildSecurityDescriptorW(pOwner: PTRUSTEE_W; pGroup: PTRUSTEE_W;
  244.   cCountOfAccessEntries: ULONG; pListOfAccessEntries: PEXPLICIT_ACCESS_W;
  245.   cCountOfAuditEntries: ULONG; pListOfAuditEntries: PEXPLICIT_ACCESS_W;
  246.   pOldSD: PSECURITY_DESCRIPTOR; var pSizeNewSD: ULONG;
  247.   var pNewSD: PSECURITY_DESCRIPTOR): DWORD; stdcall;
  248. {$EXTERNALSYM BuildSecurityDescriptorW}
  249. {$IFDEF UNICODE}
  250. function BuildSecurityDescriptor(pOwner: PTRUSTEE_W; pGroup: PTRUSTEE_W;
  251.   cCountOfAccessEntries: ULONG; pListOfAccessEntries: PEXPLICIT_ACCESS_W;
  252.   cCountOfAuditEntries: ULONG; pListOfAuditEntries: PEXPLICIT_ACCESS_W;
  253.   pOldSD: PSECURITY_DESCRIPTOR; var pSizeNewSD: ULONG;
  254.   var pNewSD: PSECURITY_DESCRIPTOR): DWORD; stdcall;
  255. {$EXTERNALSYM BuildSecurityDescriptor}
  256. {$ELSE}
  257. function BuildSecurityDescriptor(pOwner: PTRUSTEE_A; pGroup: PTRUSTEE_A;
  258.   cCountOfAccessEntries: ULONG; pListOfAccessEntries: PEXPLICIT_ACCESS_A;
  259.   cCountOfAuditEntries: ULONG; pListOfAuditEntries: PEXPLICIT_ACCESS_A;
  260.   pOldSD: PSECURITY_DESCRIPTOR; var pSizeNewSD: ULONG;
  261.   var pNewSD: PSECURITY_DESCRIPTOR): DWORD; stdcall;
  262. {$EXTERNALSYM BuildSecurityDescriptor}
  263. {$ENDIF}
  264. function LookupSecurityDescriptorPartsA(pOwner, pGroup: PPTRUSTEE_A;
  265.   cCountOfAccessEntries: PULONG; pListOfAccessEntries: PEXPLICIT_ACCESS_A;
  266.   cCountOfAuditEntries: PULONG; pListOfAuditEntries: PEXPLICIT_ACCESS_A;
  267.   var pSD: SECURITY_DESCRIPTOR): DWORD; stdcall;
  268. {$EXTERNALSYM LookupSecurityDescriptorPartsA}
  269. function LookupSecurityDescriptorPartsW(pOwner, pGroup: PPTRUSTEE_W;
  270.   cCountOfAccessEntries: PULONG; pListOfAccessEntries: PEXPLICIT_ACCESS_W;
  271.   cCountOfAuditEntries: PULONG; pListOfAuditEntries: PEXPLICIT_ACCESS_W;
  272.   var pSD: SECURITY_DESCRIPTOR): DWORD; stdcall;
  273. {$EXTERNALSYM LookupSecurityDescriptorPartsW}
  274. {$IFDEF UNICODE}
  275. function LookupSecurityDescriptorParts(pOwner, pGroup: PPTRUSTEE_W;
  276.   cCountOfAccessEntries: PULONG; pListOfAccessEntries: PEXPLICIT_ACCESS_W;
  277.   cCountOfAuditEntries: PULONG; pListOfAuditEntries: PEXPLICIT_ACCESS_W;
  278.   var pSD: SECURITY_DESCRIPTOR): DWORD; stdcall;
  279. {$EXTERNALSYM LookupSecurityDescriptorParts}
  280. {$ELSE}
  281. function LookupSecurityDescriptorParts(pOwner, pGroup: PPTRUSTEE_A;
  282.   cCountOfAccessEntries: PULONG; pListOfAccessEntries: PEXPLICIT_ACCESS_A;
  283.   cCountOfAuditEntries: PULONG; pListOfAuditEntries: PEXPLICIT_ACCESS_A;
  284.   var pSD: SECURITY_DESCRIPTOR): DWORD; stdcall;
  285. {$EXTERNALSYM LookupSecurityDescriptorParts}
  286. {$ENDIF}
  287. //----------------------------------------------------------------------------
  288. // The following helper API are provided for building
  289. // access control structures.
  290. //----------------------------------------------------------------------------
  291. procedure BuildExplicitAccessWithNameA(pExplicitAccess: PEXPLICIT_ACCESS_A;
  292.   pTrusteeName: LPSTR; AccessPermissions: DWORD; AccessMode: ACCESS_MODE;
  293.   Inheritance: DWORD); stdcall;
  294. {$EXTERNALSYM BuildExplicitAccessWithNameA}
  295. procedure BuildExplicitAccessWithNameW(pExplicitAccess: PEXPLICIT_ACCESS_W;
  296.   pTrusteeName: LPWSTR; AccessPermissions: DWORD; AccessMode: ACCESS_MODE;
  297.   Inheritance: DWORD); stdcall;
  298. {$EXTERNALSYM BuildExplicitAccessWithNameW}
  299. {$IFDEF UNICODE}
  300. procedure BuildExplicitAccessWithName(pExplicitAccess: PEXPLICIT_ACCESS_W;
  301.   pTrusteeName: LPWSTR; AccessPermissions: DWORD; AccessMode: ACCESS_MODE;
  302.   Inheritance: DWORD); stdcall;
  303. {$EXTERNALSYM BuildExplicitAccessWithName}
  304. {$ELSE}
  305. procedure BuildExplicitAccessWithName(pExplicitAccess: PEXPLICIT_ACCESS_A;
  306.   pTrusteeName: LPSTR; AccessPermissions: DWORD; AccessMode: ACCESS_MODE;
  307.   Inheritance: DWORD); stdcall;
  308. {$EXTERNALSYM BuildExplicitAccessWithName}
  309. {$ENDIF}
  310. procedure BuildImpersonateExplicitAccessWithNameA(pExplicitAccess: PEXPLICIT_ACCESS_A;
  311.   pTrusteeName: LPSTR; pTrustee: PTRUSTEE_A; AccessPermissions: DWORD;
  312.   AccessMode: ACCESS_MODE; Inheritance: DWORD); stdcall;
  313. {$EXTERNALSYM BuildImpersonateExplicitAccessWithNameA}
  314. procedure BuildImpersonateExplicitAccessWithNameW(pExplicitAccess: PEXPLICIT_ACCESS_W;
  315.   pTrusteeName: LPWSTR; pTrustee: PTRUSTEE_W; AccessPermissions: DWORD;
  316.   AccessMode: ACCESS_MODE; Inheritance: DWORD); stdcall;
  317. {$EXTERNALSYM BuildImpersonateExplicitAccessWithNameW}
  318. {$IFDEF UNICODE}
  319. procedure BuildImpersonateExplicitAccessWithName(pExplicitAccess: PEXPLICIT_ACCESS_W;
  320.   pTrusteeName: LPWSTR; pTrustee: PTRUSTEE_W; AccessPermissions: DWORD;
  321.   AccessMode: ACCESS_MODE; Inheritance: DWORD); stdcall;
  322. {$EXTERNALSYM BuildImpersonateExplicitAccessWithName}
  323. {$ELSE}
  324. procedure BuildImpersonateExplicitAccessWithName(pExplicitAccess: PEXPLICIT_ACCESS_A;
  325.   pTrusteeName: LPSTR; pTrustee: PTRUSTEE_A; AccessPermissions: DWORD;
  326.   AccessMode: ACCESS_MODE; Inheritance: DWORD); stdcall;
  327. {$EXTERNALSYM BuildImpersonateExplicitAccessWithName}
  328. {$ENDIF}
  329. procedure BuildTrusteeWithNameA(pTrustee: PTRUSTEE_A; pName: LPSTR); stdcall;
  330. {$EXTERNALSYM BuildTrusteeWithNameA}
  331. procedure BuildTrusteeWithNameW(pTrustee: PTRUSTEE_W; pName: LPWSTR); stdcall;
  332. {$EXTERNALSYM BuildTrusteeWithNameW}
  333. {$IFDEF UNICODE}
  334. procedure BuildTrusteeWithName(pTrustee: PTRUSTEE_W; pName: LPWSTR); stdcall;
  335. {$EXTERNALSYM BuildTrusteeWithName}
  336. {$ELSE}
  337. procedure BuildTrusteeWithName(pTrustee: PTRUSTEE_A; pName: LPSTR); stdcall;
  338. {$EXTERNALSYM BuildTrusteeWithName}
  339. {$ENDIF}
  340. procedure BuildImpersonateTrusteeA(pTrustee: PTRUSTEE_A;
  341.   pImpersonateTrustee: PTRUSTEE_A); stdcall;
  342. {$EXTERNALSYM BuildImpersonateTrusteeA}
  343. procedure BuildImpersonateTrusteeW(pTrustee: PTRUSTEE_W;
  344.   pImpersonateTrustee: PTRUSTEE_W); stdcall;
  345. {$EXTERNALSYM BuildImpersonateTrusteeW}
  346. {$IFDEF UNICODE}
  347. procedure BuildImpersonateTrustee(pTrustee: PTRUSTEE_W;
  348.   pImpersonateTrustee: PTRUSTEE_W); stdcall;
  349. {$EXTERNALSYM BuildImpersonateTrustee}
  350. {$ELSE}
  351. procedure BuildImpersonateTrustee(pTrustee: PTRUSTEE_A;
  352.   pImpersonateTrustee: PTRUSTEE_A); stdcall;
  353. {$EXTERNALSYM BuildImpersonateTrustee}
  354. {$ENDIF}
  355. procedure BuildTrusteeWithSidA(pTrustee: PTRUSTEE_A; pSid: PSID); stdcall;
  356. {$EXTERNALSYM BuildTrusteeWithSidA}
  357. procedure BuildTrusteeWithSidW(pTrustee: PTRUSTEE_W; pSid: PSID); stdcall;
  358. {$EXTERNALSYM BuildTrusteeWithSidW}
  359. {$IFDEF UNICODE}
  360. procedure BuildTrusteeWithSid(pTrustee: PTRUSTEE_W; pSid: PSID); stdcall;
  361. {$EXTERNALSYM BuildTrusteeWithSid}
  362. {$ELSE}
  363. procedure BuildTrusteeWithSid(pTrustee: PTRUSTEE_A; pSid: PSID); stdcall;
  364. {$EXTERNALSYM BuildTrusteeWithSid}
  365. {$ENDIF}
  366. procedure BuildTrusteeWithObjectsAndSidA(pTrustee: PTRUSTEE_A;
  367.   pObjSid: POBJECTS_AND_SID; pObjectGuid: PGUID; pInheritedObjectGuid: PGUID;
  368.   pSid: PSID); stdcall;
  369. {$EXTERNALSYM BuildTrusteeWithObjectsAndSidA}
  370. procedure BuildTrusteeWithObjectsAndSidW(pTrustee: PTRUSTEE_W;
  371.   pObjSid: POBJECTS_AND_SID; pObjectGuid: PGUID; pInheritedObjectGuid: PGUID;
  372.   pSid: PSID); stdcall;
  373. {$EXTERNALSYM BuildTrusteeWithObjectsAndSidW}
  374. {$IFDEF UNICODE}
  375. procedure BuildTrusteeWithObjectsAndSid(pTrustee: PTRUSTEE_W;
  376.   pObjSid: POBJECTS_AND_SID; pObjectGuid: PGUID; pInheritedObjectGuid: PGUID;
  377.   pSid: PSID); stdcall;
  378. {$EXTERNALSYM BuildTrusteeWithObjectsAndSid}
  379. {$ELSE}
  380. procedure BuildTrusteeWithObjectsAndSid(pTrustee: PTRUSTEE_A;
  381.   pObjSid: POBJECTS_AND_SID; pObjectGuid: PGUID; pInheritedObjectGuid: PGUID;
  382.   pSid: PSID); stdcall;
  383. {$EXTERNALSYM BuildTrusteeWithObjectsAndSid}
  384. {$ENDIF}
  385. procedure BuildTrusteeWithObjectsAndNameA(pTrustee: PTRUSTEE_A;
  386.   pObjName: POBJECTS_AND_NAME_A; ObjectType: SE_OBJECT_TYPE;
  387.   ObjectTypeName, InheritedObjectTypeName, Name: LPSTR); stdcall;
  388. {$EXTERNALSYM BuildTrusteeWithObjectsAndNameA}
  389. procedure BuildTrusteeWithObjectsAndNameW(pTrustee: PTRUSTEE_W;
  390.   pObjName: POBJECTS_AND_NAME_W; ObjectType: SE_OBJECT_TYPE;
  391.   ObjectTypeName, InheritedObjectTypeName, Name: LPWSTR); stdcall;
  392. {$EXTERNALSYM BuildTrusteeWithObjectsAndNameW}
  393. {$IFDEF UNICODE}
  394. procedure BuildTrusteeWithObjectsAndName(pTrustee: PTRUSTEE_W;
  395.   pObjName: POBJECTS_AND_NAME_W; ObjectType: SE_OBJECT_TYPE;
  396.   ObjectTypeName, InheritedObjectTypeName, Name: LPWSTR); stdcall;
  397. {$EXTERNALSYM BuildTrusteeWithObjectsAndName}
  398. {$ELSE}
  399. procedure BuildTrusteeWithObjectsAndName(pTrustee: PTRUSTEE_A;
  400.   pObjName: POBJECTS_AND_NAME_A; ObjectType: SE_OBJECT_TYPE;
  401.   ObjectTypeName, InheritedObjectTypeName, Name: LPSTR); stdcall;
  402. {$EXTERNALSYM BuildTrusteeWithObjectsAndName}
  403. {$ENDIF}
  404. function GetTrusteeNameA(pTrustee: PTRUSTEE_A): LPSTR; stdcall;
  405. {$EXTERNALSYM GetTrusteeNameA}
  406. function GetTrusteeNameW(pTrustee: PTRUSTEE_W): LPWSTR; stdcall;
  407. {$EXTERNALSYM GetTrusteeNameW}
  408. {$IFDEF UNICODE}
  409. function GetTrusteeName(pTrustee: PTRUSTEE_W): LPWSTR; stdcall;
  410. {$EXTERNALSYM GetTrusteeName}
  411. {$ELSE}
  412. function GetTrusteeName(pTrustee: PTRUSTEE_A): LPSTR; stdcall;
  413. {$EXTERNALSYM GetTrusteeName}
  414. {$ENDIF}
  415. function GetTrusteeTypeA(pTrustee: PTRUSTEE_A): TRUSTEE_TYPE; stdcall;
  416. {$EXTERNALSYM GetTrusteeTypeA}
  417. function GetTrusteeTypeW(pTrustee: PTRUSTEE_W): TRUSTEE_TYPE; stdcall;
  418. {$EXTERNALSYM GetTrusteeTypeW}
  419. {$IFDEF UNICODE}
  420. function GetTrusteeType(pTrustee: PTRUSTEE_W): TRUSTEE_TYPE; stdcall;
  421. {$EXTERNALSYM GetTrusteeType}
  422. {$ELSE}
  423. function GetTrusteeType(pTrustee: PTRUSTEE_A): TRUSTEE_TYPE; stdcall;
  424. {$EXTERNALSYM GetTrusteeType}
  425. {$ENDIF}
  426. function GetTrusteeFormA(pTrustee: PTRUSTEE_A): TRUSTEE_FORM; stdcall;
  427. {$EXTERNALSYM GetTrusteeFormA}
  428. function GetTrusteeFormW(pTrustee: PTRUSTEE_W): TRUSTEE_FORM; stdcall;
  429. {$EXTERNALSYM GetTrusteeFormW}
  430. {$IFDEF UNICODE}
  431. function GetTrusteeForm(pTrustee: PTRUSTEE_W): TRUSTEE_FORM; stdcall;
  432. {$EXTERNALSYM GetTrusteeForm}
  433. {$ELSE}
  434. function GetTrusteeForm(pTrustee: PTRUSTEE_A): TRUSTEE_FORM; stdcall;
  435. {$EXTERNALSYM GetTrusteeForm}
  436. {$ENDIF}
  437. function GetMultipleTrusteeOperationA(pTrustee: PTRUSTEE_A): MULTIPLE_TRUSTEE_OPERATION; stdcall;
  438. {$EXTERNALSYM GetMultipleTrusteeOperationA}
  439. function GetMultipleTrusteeOperationW(pTrustee: PTRUSTEE_W): MULTIPLE_TRUSTEE_OPERATION; stdcall;
  440. {$EXTERNALSYM GetMultipleTrusteeOperationW}
  441. {$IFDEF UNICODE}
  442. function GetMultipleTrusteeOperation(pTrustee: PTRUSTEE_W): MULTIPLE_TRUSTEE_OPERATION; stdcall;
  443. {$EXTERNALSYM GetMultipleTrusteeOperation}
  444. {$ELSE}
  445. function GetMultipleTrusteeOperation(pTrustee: PTRUSTEE_A): MULTIPLE_TRUSTEE_OPERATION; stdcall;
  446. {$EXTERNALSYM GetMultipleTrusteeOperation}
  447. {$ENDIF}
  448. function GetMultipleTrusteeA(pTrustee: PTRUSTEE_A): PTRUSTEE_A; stdcall;
  449. {$EXTERNALSYM GetMultipleTrusteeA}
  450. function GetMultipleTrusteeW(pTrustee: PTRUSTEE_W): PTRUSTEE_W; stdcall;
  451. {$EXTERNALSYM GetMultipleTrusteeW}
  452. {$IFDEF UNICODE}
  453. function GetMultipleTrustee(pTrustee: PTRUSTEE_W): PTRUSTEE_W; stdcall;
  454. {$EXTERNALSYM GetMultipleTrustee}
  455. {$ELSE}
  456. function GetMultipleTrustee(pTrustee: PTRUSTEE_A): PTRUSTEE_A; stdcall;
  457. {$EXTERNALSYM GetMultipleTrustee}
  458. {$ENDIF}
  459. implementation
  460. const
  461.   aclapilib = 'advapi32.dll';
  462. {$IFDEF DYNAMIC_LINK}
  463. var
  464.   _SetEntriesInAclA: Pointer;
  465. function SetEntriesInAclA;
  466. begin
  467.   GetProcedureAddress(_SetEntriesInAclA, aclapilib, 'SetEntriesInAclA');
  468.   asm
  469.     mov esp, ebp
  470.     pop ebp
  471.     jmp [_SetEntriesInAclA]
  472.   end;
  473. end;
  474. {$ELSE}
  475. function SetEntriesInAclA; external aclapilib name 'SetEntriesInAclA';
  476. {$ENDIF DYNAMIC_LINK}
  477. {$IFDEF DYNAMIC_LINK}
  478. var
  479.   _SetEntriesInAclW: Pointer;
  480. function SetEntriesInAclW;
  481. begin
  482.   GetProcedureAddress(_SetEntriesInAclW, aclapilib, 'SetEntriesInAclW');
  483.   asm
  484.     mov esp, ebp
  485.     pop ebp
  486.     jmp [_SetEntriesInAclW]
  487.   end;
  488. end;
  489. {$ELSE}
  490. function SetEntriesInAclW; external aclapilib name 'SetEntriesInAclW';
  491. {$ENDIF DYNAMIC_LINK}
  492. {$IFDEF UNICODE}
  493. {$IFDEF DYNAMIC_LINK}
  494. var
  495.   _SetEntriesInAcl: Pointer;
  496. function SetEntriesInAcl;
  497. begin
  498.   GetProcedureAddress(_SetEntriesInAcl, aclapilib, 'SetEntriesInAclW');
  499.   asm
  500.     mov esp, ebp
  501.     pop ebp
  502.     jmp [_SetEntriesInAcl]
  503.   end;
  504. end;
  505. {$ELSE}
  506. function SetEntriesInAcl; external aclapilib name 'SetEntriesInAclW';
  507. {$ENDIF DYNAMIC_LINK}
  508. {$ELSE}
  509. {$IFDEF DYNAMIC_LINK}
  510. var
  511.   _SetEntriesInAcl: Pointer;
  512. function SetEntriesInAcl;
  513. begin
  514.   GetProcedureAddress(_SetEntriesInAcl, aclapilib, 'SetEntriesInAclA');
  515.   asm
  516.     mov esp, ebp
  517.     pop ebp
  518.     jmp [_SetEntriesInAcl]
  519.   end;
  520. end;
  521. {$ELSE}
  522. function SetEntriesInAcl; external aclapilib name 'SetEntriesInAclA';
  523. {$ENDIF DYNAMIC_LINK}
  524. {$ENDIF}
  525. {$IFDEF DYNAMIC_LINK}
  526. var
  527.   _GetExplicitEntriesFromAclA: Pointer;
  528. function GetExplicitEntriesFromAclA;
  529. begin
  530.   GetProcedureAddress(_GetExplicitEntriesFromAclA, aclapilib, 'GetExplicitEntriesFromAclA');
  531.   asm
  532.     mov esp, ebp
  533.     pop ebp
  534.     jmp [_GetExplicitEntriesFromAclA]
  535.   end;
  536. end;
  537. {$ELSE}
  538. function GetExplicitEntriesFromAclA; external aclapilib name 'GetExplicitEntriesFromAclA';
  539. {$ENDIF DYNAMIC_LINK}
  540. {$IFDEF DYNAMIC_LINK}
  541. var
  542.   _GetExplicitEntriesFromAclW: Pointer;
  543. function GetExplicitEntriesFromAclW;
  544. begin
  545.   GetProcedureAddress(_GetExplicitEntriesFromAclW, aclapilib, 'GetExplicitEntriesFromAclW');
  546.   asm
  547.     mov esp, ebp
  548.     pop ebp
  549.     jmp [_GetExplicitEntriesFromAclW]
  550.   end;
  551. end;
  552. {$ELSE}
  553. function GetExplicitEntriesFromAclW; external aclapilib name 'GetExplicitEntriesFromAclW';
  554. {$ENDIF DYNAMIC_LINK}
  555. {$IFDEF UNICODE}
  556. {$IFDEF DYNAMIC_LINK}
  557. var
  558.   _GetExplicitEntriesFromAcl: Pointer;
  559. function GetExplicitEntriesFromAcl;
  560. begin
  561.   GetProcedureAddress(_GetExplicitEntriesFromAcl, aclapilib, 'GetExplicitEntriesFromAclW');
  562.   asm
  563.     mov esp, ebp
  564.     pop ebp
  565.     jmp [_GetExplicitEntriesFromAcl]
  566.   end;
  567. end;
  568. {$ELSE}
  569. function GetExplicitEntriesFromAcl; external aclapilib name 'GetExplicitEntriesFromAclW';
  570. {$ENDIF DYNAMIC_LINK}
  571. {$ELSE}
  572. {$IFDEF DYNAMIC_LINK}
  573. var
  574.   _GetExplicitEntriesFromAcl: Pointer;
  575. function GetExplicitEntriesFromAcl;
  576. begin
  577.   GetProcedureAddress(_GetExplicitEntriesFromAcl, aclapilib, 'GetExplicitEntriesFromAclA');
  578.   asm
  579.     mov esp, ebp
  580.     pop ebp
  581.     jmp [_GetExplicitEntriesFromAcl]
  582.   end;
  583. end;
  584. {$ELSE}
  585. function GetExplicitEntriesFromAcl; external aclapilib name 'GetExplicitEntriesFromAclA';
  586. {$ENDIF DYNAMIC_LINK}
  587. {$ENDIF}
  588. {$IFDEF DYNAMIC_LINK}
  589. var
  590.   _GetEffectiveRightsFromAclA: Pointer;
  591. function GetEffectiveRightsFromAclA;
  592. begin
  593.   GetProcedureAddress(_GetEffectiveRightsFromAclA, aclapilib, 'GetEffectiveRightsFromAclA');
  594.   asm
  595.     mov esp, ebp
  596.     pop ebp
  597.     jmp [_GetEffectiveRightsFromAclA]
  598.   end;
  599. end;
  600. {$ELSE}
  601. function GetEffectiveRightsFromAclA; external aclapilib name 'GetEffectiveRightsFromAclA';
  602. {$ENDIF DYNAMIC_LINK}
  603. {$IFDEF DYNAMIC_LINK}
  604. var
  605.   _GetEffectiveRightsFromAclW: Pointer;
  606. function GetEffectiveRightsFromAclW;
  607. begin
  608.   GetProcedureAddress(_GetEffectiveRightsFromAclW, aclapilib, 'GetEffectiveRightsFromAclW');
  609.   asm
  610.     mov esp, ebp
  611.     pop ebp
  612.     jmp [_GetEffectiveRightsFromAclW]
  613.   end;
  614. end;
  615. {$ELSE}
  616. function GetEffectiveRightsFromAclW; external aclapilib name 'GetEffectiveRightsFromAclW';
  617. {$ENDIF DYNAMIC_LINK}
  618. {$IFDEF UNICODE}
  619. {$IFDEF DYNAMIC_LINK}
  620. var
  621.   _GetEffectiveRightsFromAcl: Pointer;
  622. function GetEffectiveRightsFromAcl;
  623. begin
  624.   GetProcedureAddress(_GetEffectiveRightsFromAcl, aclapilib, 'GetEffectiveRightsFromAclW');
  625.   asm
  626.     mov esp, ebp
  627.     pop ebp
  628.     jmp [_GetEffectiveRightsFromAcl]
  629.   end;
  630. end;
  631. {$ELSE}
  632. function GetEffectiveRightsFromAcl; external aclapilib name 'GetEffectiveRightsFromAclW';
  633. {$ENDIF DYNAMIC_LINK}
  634. {$ELSE}
  635. {$IFDEF DYNAMIC_LINK}
  636. var
  637.   _GetEffectiveRightsFromAcl: Pointer;
  638. function GetEffectiveRightsFromAcl;
  639. begin
  640.   GetProcedureAddress(_GetEffectiveRightsFromAcl, aclapilib, 'GetEffectiveRightsFromAclA');
  641.   asm
  642.     mov esp, ebp
  643.     pop ebp
  644.     jmp [_GetEffectiveRightsFromAcl]
  645.   end;
  646. end;
  647. {$ELSE}
  648. function GetEffectiveRightsFromAcl; external aclapilib name 'GetEffectiveRightsFromAclA';
  649. {$ENDIF DYNAMIC_LINK}
  650. {$ENDIF}
  651. {$IFDEF DYNAMIC_LINK}
  652. var
  653.   _GetAuditedPermissionsFromAclA: Pointer;
  654. function GetAuditedPermissionsFromAclA;
  655. begin
  656.   GetProcedureAddress(_GetAuditedPermissionsFromAclA, aclapilib, 'GetAuditedPermissionsFromAclA');
  657.   asm
  658.     mov esp, ebp
  659.     pop ebp
  660.     jmp [_GetAuditedPermissionsFromAclA]
  661.   end;
  662. end;
  663. {$ELSE}
  664. function GetAuditedPermissionsFromAclA; external aclapilib name 'GetAuditedPermissionsFromAclA';
  665. {$ENDIF DYNAMIC_LINK}
  666. {$IFDEF DYNAMIC_LINK}
  667. var
  668.   _GetAuditedPermissionsFromAclW: Pointer;
  669. function GetAuditedPermissionsFromAclW;
  670. begin
  671.   GetProcedureAddress(_GetAuditedPermissionsFromAclW, aclapilib, 'GetAuditedPermissionsFromAclW');
  672.   asm
  673.     mov esp, ebp
  674.     pop ebp
  675.     jmp [_GetAuditedPermissionsFromAclW]
  676.   end;
  677. end;
  678. {$ELSE}
  679. function GetAuditedPermissionsFromAclW; external aclapilib name 'GetAuditedPermissionsFromAclW';
  680. {$ENDIF DYNAMIC_LINK}
  681. {$IFDEF UNICODE}
  682. {$IFDEF DYNAMIC_LINK}
  683. var
  684.   _GetAuditedPermissionsFromAcl: Pointer;
  685. function GetAuditedPermissionsFromAcl;
  686. begin
  687.   GetProcedureAddress(_GetAuditedPermissionsFromAcl, aclapilib, 'GetAuditedPermissionsFromAclW');
  688.   asm
  689.     mov esp, ebp
  690.     pop ebp
  691.     jmp [_GetAuditedPermissionsFromAcl]
  692.   end;
  693. end;
  694. {$ELSE}
  695. function GetAuditedPermissionsFromAcl; external aclapilib name 'GetAuditedPermissionsFromAclW';
  696. {$ENDIF DYNAMIC_LINK}
  697. {$ELSE}
  698. {$IFDEF DYNAMIC_LINK}
  699. var
  700.   _GetAuditedPermissionsFromAcl: Pointer;
  701. function GetAuditedPermissionsFromAcl;
  702. begin
  703.   GetProcedureAddress(_GetAuditedPermissionsFromAcl, aclapilib, 'GetAuditedPermissionsFromAclA');
  704.   asm
  705.     mov esp, ebp
  706.     pop ebp
  707.     jmp [_GetAuditedPermissionsFromAcl]
  708.   end;
  709. end;
  710. {$ELSE}
  711. function GetAuditedPermissionsFromAcl; external aclapilib name 'GetAuditedPermissionsFromAclA';
  712. {$ENDIF DYNAMIC_LINK}
  713. {$ENDIF}
  714. {$IFDEF DYNAMIC_LINK}
  715. var
  716.   _GetNamedSecurityInfoA: Pointer;
  717. function GetNamedSecurityInfoA;
  718. begin
  719.   GetProcedureAddress(_GetNamedSecurityInfoA, aclapilib, 'GetNamedSecurityInfoA');
  720.   asm
  721.     mov esp, ebp
  722.     pop ebp
  723.     jmp [_GetNamedSecurityInfoA]
  724.   end;
  725. end;
  726. {$ELSE}
  727. function GetNamedSecurityInfoA; external aclapilib name 'GetNamedSecurityInfoA';
  728. {$ENDIF DYNAMIC_LINK}
  729. {$IFDEF DYNAMIC_LINK}
  730. var
  731.   _GetNamedSecurityInfoW: Pointer;
  732. function GetNamedSecurityInfoW;
  733. begin
  734.   GetProcedureAddress(_GetNamedSecurityInfoW, aclapilib, 'GetNamedSecurityInfoW');
  735.   asm
  736.     mov esp, ebp
  737.     pop ebp
  738.     jmp [_GetNamedSecurityInfoW]
  739.   end;
  740. end;
  741. {$ELSE}
  742. function GetNamedSecurityInfoW; external aclapilib name 'GetNamedSecurityInfoW';
  743. {$ENDIF DYNAMIC_LINK}
  744. {$IFDEF UNICODE}
  745. {$IFDEF DYNAMIC_LINK}
  746. var
  747.   _GetNamedSecurityInfo: Pointer;
  748. function GetNamedSecurityInfo;
  749. begin
  750.   GetProcedureAddress(_GetNamedSecurityInfo, aclapilib, 'GetNamedSecurityInfoW');
  751.   asm
  752.     mov esp, ebp
  753.     pop ebp
  754.     jmp [_GetNamedSecurityInfo]
  755.   end;
  756. end;
  757. {$ELSE}
  758. function GetNamedSecurityInfo; external aclapilib name 'GetNamedSecurityInfoW';
  759. {$ENDIF DYNAMIC_LINK}
  760. {$ELSE}
  761. {$IFDEF DYNAMIC_LINK}
  762. var
  763.   _GetNamedSecurityInfo: Pointer;
  764. function GetNamedSecurityInfo;
  765. begin
  766.   GetProcedureAddress(_GetNamedSecurityInfo, aclapilib, 'GetNamedSecurityInfoA');
  767.   asm
  768.     mov esp, ebp
  769.     pop ebp
  770.     jmp [_GetNamedSecurityInfo]
  771.   end;
  772. end;
  773. {$ELSE}
  774. function GetNamedSecurityInfo; external aclapilib name 'GetNamedSecurityInfoA';
  775. {$ENDIF DYNAMIC_LINK}
  776. {$ENDIF}
  777. {$IFDEF DYNAMIC_LINK}
  778. var
  779.   _GetSecurityInfo: Pointer;
  780. function GetSecurityInfo;
  781. begin
  782.   GetProcedureAddress(_GetSecurityInfo, aclapilib, 'GetSecurityInfo');
  783.   asm
  784.     mov esp, ebp
  785.     pop ebp
  786.     jmp [_GetSecurityInfo]
  787.   end;
  788. end;
  789. {$ELSE}
  790. function GetSecurityInfo; external aclapilib name 'GetSecurityInfo';
  791. {$ENDIF DYNAMIC_LINK}
  792. {$IFDEF DYNAMIC_LINK}
  793. var
  794.   _SetNamedSecurityInfoA: Pointer;
  795. function SetNamedSecurityInfoA;
  796. begin
  797.   GetProcedureAddress(_SetNamedSecurityInfoA, aclapilib, 'SetNamedSecurityInfoA');
  798.   asm
  799.     mov esp, ebp
  800.     pop ebp
  801.     jmp [_SetNamedSecurityInfoA]
  802.   end;
  803. end;
  804. {$ELSE}
  805. function SetNamedSecurityInfoA; external aclapilib name 'SetNamedSecurityInfoA';
  806. {$ENDIF DYNAMIC_LINK}
  807. {$IFDEF DYNAMIC_LINK}
  808. var
  809.   _SetNamedSecurityInfoW: Pointer;
  810. function SetNamedSecurityInfoW;
  811. begin
  812.   GetProcedureAddress(_SetNamedSecurityInfoW, aclapilib, 'SetNamedSecurityInfoW');
  813.   asm
  814.     mov esp, ebp
  815.     pop ebp
  816.     jmp [_SetNamedSecurityInfoW]
  817.   end;
  818. end;
  819. {$ELSE}
  820. function SetNamedSecurityInfoW; external aclapilib name 'SetNamedSecurityInfoW';
  821. {$ENDIF DYNAMIC_LINK}
  822. {$IFDEF UNICODE}
  823. {$IFDEF DYNAMIC_LINK}
  824. var
  825.   _SetNamedSecurityInfo: Pointer;
  826. function SetNamedSecurityInfo;
  827. begin
  828.   GetProcedureAddress(_SetNamedSecurityInfo, aclapilib, 'SetNamedSecurityInfoW');
  829.   asm
  830.     mov esp, ebp
  831.     pop ebp
  832.     jmp [_SetNamedSecurityInfo]
  833.   end;
  834. end;
  835. {$ELSE}
  836. function SetNamedSecurityInfo; external aclapilib name 'SetNamedSecurityInfoW';
  837. {$ENDIF DYNAMIC_LINK}
  838. {$ELSE}
  839. {$IFDEF DYNAMIC_LINK}
  840. var
  841.   _SetNamedSecurityInfo: Pointer;
  842. function SetNamedSecurityInfo;
  843. begin
  844.   GetProcedureAddress(_SetNamedSecurityInfo, aclapilib, 'SetNamedSecurityInfoA');
  845.   asm
  846.     mov esp, ebp
  847.     pop ebp
  848.     jmp [_SetNamedSecurityInfo]
  849.   end;
  850. end;
  851. {$ELSE}
  852. function SetNamedSecurityInfo; external aclapilib name 'SetNamedSecurityInfoA';
  853. {$ENDIF DYNAMIC_LINK}
  854. {$ENDIF}
  855. {$IFDEF DYNAMIC_LINK}
  856. var
  857.   _SetSecurityInfo: Pointer;
  858. function SetSecurityInfo;
  859. begin
  860.   GetProcedureAddress(_SetSecurityInfo, aclapilib, 'SetSecurityInfo');
  861.   asm
  862.     mov esp, ebp
  863.     pop ebp
  864.     jmp [_SetSecurityInfo]
  865.   end;
  866. end;
  867. {$ELSE}
  868. function SetSecurityInfo; external aclapilib name 'SetSecurityInfo';
  869. {$ENDIF DYNAMIC_LINK}
  870. {$IFDEF DYNAMIC_LINK}
  871. var
  872.   _GetInheritanceSourceA: Pointer;
  873. function GetInheritanceSourceA;
  874. begin
  875.   GetProcedureAddress(_GetInheritanceSourceA, aclapilib, 'GetInheritanceSourceA');
  876.   asm
  877.     mov esp, ebp
  878.     pop ebp
  879.     jmp [_GetInheritanceSourceA]
  880.   end;
  881. end;
  882. {$ELSE}
  883. function GetInheritanceSourceA; external aclapilib name 'GetInheritanceSourceA';
  884. {$ENDIF DYNAMIC_LINK}
  885. {$IFDEF DYNAMIC_LINK}
  886. var
  887.   _GetInheritanceSourceW: Pointer;
  888. function GetInheritanceSourceW;
  889. begin
  890.   GetProcedureAddress(_GetInheritanceSourceW, aclapilib, 'GetInheritanceSourceW');
  891.   asm
  892.     mov esp, ebp
  893.     pop ebp
  894.     jmp [_GetInheritanceSourceW]
  895.   end;
  896. end;
  897. {$ELSE}
  898. function GetInheritanceSourceW; external aclapilib name 'GetInheritanceSourceW';
  899. {$ENDIF DYNAMIC_LINK}
  900. {$IFDEF UNICODE}
  901. {$IFDEF DYNAMIC_LINK}
  902. var
  903.   _GetInheritanceSource: Pointer;
  904. function GetInheritanceSource;
  905. begin
  906.   GetProcedureAddress(_GetInheritanceSource, aclapilib, 'GetInheritanceSourceW');
  907.   asm
  908.     mov esp, ebp
  909.     pop ebp
  910.     jmp [_GetInheritanceSource]
  911.   end;
  912. end;
  913. {$ELSE}
  914. function GetInheritanceSource; external aclapilib name 'GetInheritanceSourceW';
  915. {$ENDIF DYNAMIC_LINK}
  916. {$ELSE}
  917. {$IFDEF DYNAMIC_LINK}
  918. var
  919.   _GetInheritanceSource: Pointer;
  920. function GetInheritanceSource;
  921. begin
  922.   GetProcedureAddress(_GetInheritanceSource, aclapilib, 'GetInheritanceSourceA');
  923.   asm
  924.     mov esp, ebp
  925.     pop ebp
  926.     jmp [_GetInheritanceSource]
  927.   end;
  928. end;
  929. {$ELSE}
  930. function GetInheritanceSource; external aclapilib name 'GetInheritanceSourceA';
  931. {$ENDIF DYNAMIC_LINK}
  932. {$ENDIF}
  933. {$IFDEF DYNAMIC_LINK}
  934. var
  935.   _FreeInheritedFromArray: Pointer;
  936. function FreeInheritedFromArray;
  937. begin
  938.   GetProcedureAddress(_FreeInheritedFromArray, aclapilib, 'FreeInheritedFromArray');
  939.   asm
  940.     mov esp, ebp
  941.     pop ebp
  942.     jmp [_FreeInheritedFromArray]
  943.   end;
  944. end;
  945. {$ELSE}
  946. function FreeInheritedFromArray; external aclapilib name 'FreeInheritedFromArray';
  947. {$ENDIF DYNAMIC_LINK}
  948. {$IFDEF DYNAMIC_LINK}
  949. var
  950.   _TreeResetNamedSecurityInfoA: Pointer;
  951. function TreeResetNamedSecurityInfoA;
  952. begin
  953.   GetProcedureAddress(_TreeResetNamedSecurityInfoA, aclapilib, 'TreeResetNamedSecurityInfoA');
  954.   asm
  955.     mov esp, ebp
  956.     pop ebp
  957.     jmp [_TreeResetNamedSecurityInfoA]
  958.   end;
  959. end;
  960. {$ELSE}
  961. function TreeResetNamedSecurityInfoA; external aclapilib name 'TreeResetNamedSecurityInfoA';
  962. {$ENDIF DYNAMIC_LINK}
  963. {$IFDEF DYNAMIC_LINK}
  964. var
  965.   _TreeResetNamedSecurityInfoW: Pointer;
  966. function TreeResetNamedSecurityInfoW;
  967. begin
  968.   GetProcedureAddress(_TreeResetNamedSecurityInfoW, aclapilib, 'TreeResetNamedSecurityInfoW');
  969.   asm
  970.     mov esp, ebp
  971.     pop ebp
  972.     jmp [_TreeResetNamedSecurityInfoW]
  973.   end;
  974. end;
  975. {$ELSE}
  976. function TreeResetNamedSecurityInfoW; external aclapilib name 'TreeResetNamedSecurityInfoW';
  977. {$ENDIF DYNAMIC_LINK}
  978. {$IFDEF UNICODE}
  979. {$IFDEF DYNAMIC_LINK}
  980. var
  981.   _TreeResetNamedSecurityInfo: Pointer;
  982. function TreeResetNamedSecurityInfo;
  983. begin
  984.   GetProcedureAddress(_TreeResetNamedSecurityInfo, aclapilib, 'TreeResetNamedSecurityInfoW');
  985.   asm
  986.     mov esp, ebp
  987.     pop ebp
  988.     jmp [_TreeResetNamedSecurityInfo]
  989.   end;
  990. end;
  991. {$ELSE}
  992. function TreeResetNamedSecurityInfo; external aclapilib name 'TreeResetNamedSecurityInfoW';
  993. {$ENDIF DYNAMIC_LINK}
  994. {$ELSE}
  995. {$IFDEF DYNAMIC_LINK}
  996. var
  997.   _TreeResetNamedSecurityInfo: Pointer;
  998. function TreeResetNamedSecurityInfo;
  999. begin
  1000.   GetProcedureAddress(_TreeResetNamedSecurityInfo, aclapilib, 'TreeResetNamedSecurityInfoA');
  1001.   asm
  1002.     mov esp, ebp
  1003.     pop ebp
  1004.     jmp [_TreeResetNamedSecurityInfo]
  1005.   end;
  1006. end;
  1007. {$ELSE}
  1008. function TreeResetNamedSecurityInfo; external aclapilib name 'TreeResetNamedSecurityInfoA';
  1009. {$ENDIF DYNAMIC_LINK}
  1010. {$ENDIF}
  1011. {$IFDEF DYNAMIC_LINK}
  1012. var
  1013.   _BuildSecurityDescriptorA: Pointer;
  1014. function BuildSecurityDescriptorA;
  1015. begin
  1016.   GetProcedureAddress(_BuildSecurityDescriptorA, aclapilib, 'BuildSecurityDescriptorA');
  1017.   asm
  1018.     mov esp, ebp
  1019.     pop ebp
  1020.     jmp [_BuildSecurityDescriptorA]
  1021.   end;
  1022. end;
  1023. {$ELSE}
  1024. function BuildSecurityDescriptorA; external aclapilib name 'BuildSecurityDescriptorA';
  1025. {$ENDIF DYNAMIC_LINK}
  1026. {$IFDEF DYNAMIC_LINK}
  1027. var
  1028.   _BuildSecurityDescriptorW: Pointer;
  1029. function BuildSecurityDescriptorW;
  1030. begin
  1031.   GetProcedureAddress(_BuildSecurityDescriptorW, aclapilib, 'BuildSecurityDescriptorW');
  1032.   asm
  1033.     mov esp, ebp
  1034.     pop ebp
  1035.     jmp [_BuildSecurityDescriptorW]
  1036.   end;
  1037. end;
  1038. {$ELSE}
  1039. function BuildSecurityDescriptorW; external aclapilib name 'BuildSecurityDescriptorW';
  1040. {$ENDIF DYNAMIC_LINK}
  1041. {$IFDEF UNICODE}
  1042. {$IFDEF DYNAMIC_LINK}
  1043. var
  1044.   _BuildSecurityDescriptor: Pointer;
  1045. function BuildSecurityDescriptor;
  1046. begin
  1047.   GetProcedureAddress(_BuildSecurityDescriptor, aclapilib, 'BuildSecurityDescriptorW');
  1048.   asm
  1049.     mov esp, ebp
  1050.     pop ebp
  1051.     jmp [_BuildSecurityDescriptor]
  1052.   end;
  1053. end;
  1054. {$ELSE}
  1055. function BuildSecurityDescriptor; external aclapilib name 'BuildSecurityDescriptorW';
  1056. {$ENDIF DYNAMIC_LINK}
  1057. {$ELSE}
  1058. {$IFDEF DYNAMIC_LINK}
  1059. var
  1060.   _BuildSecurityDescriptor: Pointer;
  1061. function BuildSecurityDescriptor;
  1062. begin
  1063.   GetProcedureAddress(_BuildSecurityDescriptor, aclapilib, 'BuildSecurityDescriptorA');
  1064.   asm
  1065.     mov esp, ebp
  1066.     pop ebp
  1067.     jmp [_BuildSecurityDescriptor]
  1068.   end;
  1069. end;
  1070. {$ELSE}
  1071. function BuildSecurityDescriptor; external aclapilib name 'BuildSecurityDescriptorA';
  1072. {$ENDIF DYNAMIC_LINK}
  1073. {$ENDIF}
  1074. {$IFDEF DYNAMIC_LINK}
  1075. var
  1076.   _LookupSecurityDescriptorPartsA: Pointer;
  1077. function LookupSecurityDescriptorPartsA;
  1078. begin
  1079.   GetProcedureAddress(_LookupSecurityDescriptorPartsA, aclapilib, 'LookupSecurityDescriptorPartsA');
  1080.   asm
  1081.     mov esp, ebp
  1082.     pop ebp
  1083.     jmp [_LookupSecurityDescriptorPartsA]
  1084.   end;
  1085. end;
  1086. {$ELSE}
  1087. function LookupSecurityDescriptorPartsA; external aclapilib name 'LookupSecurityDescriptorPartsA';
  1088. {$ENDIF DYNAMIC_LINK}
  1089. {$IFDEF DYNAMIC_LINK}
  1090. var
  1091.   _LookupSecurityDescriptorPartsW: Pointer;
  1092. function LookupSecurityDescriptorPartsW;
  1093. begin
  1094.   GetProcedureAddress(_LookupSecurityDescriptorPartsW, aclapilib, 'LookupSecurityDescriptorPartsW');
  1095.   asm
  1096.     mov esp, ebp
  1097.     pop ebp
  1098.     jmp [_LookupSecurityDescriptorPartsW]
  1099.   end;
  1100. end;
  1101. {$ELSE}
  1102. function LookupSecurityDescriptorPartsW; external aclapilib name 'LookupSecurityDescriptorPartsW';
  1103. {$ENDIF DYNAMIC_LINK}
  1104. {$IFDEF UNICODE}
  1105. {$IFDEF DYNAMIC_LINK}
  1106. var
  1107.   _LookupSecurityDescriptorParts: Pointer;
  1108. function LookupSecurityDescriptorParts;
  1109. begin
  1110.   GetProcedureAddress(_LookupSecurityDescriptorParts, aclapilib, 'LookupSecurityDescriptorPartsW');
  1111.   asm
  1112.     mov esp, ebp
  1113.     pop ebp
  1114.     jmp [_LookupSecurityDescriptorParts]
  1115.   end;
  1116. end;
  1117. {$ELSE}
  1118. function LookupSecurityDescriptorParts; external aclapilib name 'LookupSecurityDescriptorPartsW';
  1119. {$ENDIF DYNAMIC_LINK}
  1120. {$ELSE}
  1121. {$IFDEF DYNAMIC_LINK}
  1122. var
  1123.   _LookupSecurityDescriptorParts: Pointer;
  1124. function LookupSecurityDescriptorParts;
  1125. begin
  1126.   GetProcedureAddress(_LookupSecurityDescriptorParts, aclapilib, 'LookupSecurityDescriptorPartsA');
  1127.   asm
  1128.     mov esp, ebp
  1129.     pop ebp
  1130.     jmp [_LookupSecurityDescriptorParts]
  1131.   end;
  1132. end;
  1133. {$ELSE}
  1134. function LookupSecurityDescriptorParts; external aclapilib name 'LookupSecurityDescriptorPartsA';
  1135. {$ENDIF DYNAMIC_LINK}
  1136. {$ENDIF}
  1137. {$IFDEF DYNAMIC_LINK}
  1138. var
  1139.   _BuildExplicitAccessWithNameA: Pointer;
  1140. procedure BuildExplicitAccessWithNameA;
  1141. begin
  1142.   GetProcedureAddress(_BuildExplicitAccessWithNameA, aclapilib, 'BuildExplicitAccessWithNameA');
  1143.   asm
  1144.     mov esp, ebp
  1145.     pop ebp
  1146.     jmp [_BuildExplicitAccessWithNameA]
  1147.   end;
  1148. end;
  1149. {$ELSE}
  1150. procedure BuildExplicitAccessWithNameA; external aclapilib name 'BuildExplicitAccessWithNameA';
  1151. {$ENDIF DYNAMIC_LINK}
  1152. {$IFDEF DYNAMIC_LINK}
  1153. var
  1154.   _BuildExplicitAccessWithNameW: Pointer;
  1155. procedure BuildExplicitAccessWithNameW;
  1156. begin
  1157.   GetProcedureAddress(_BuildExplicitAccessWithNameW, aclapilib, 'BuildExplicitAccessWithNameW');
  1158.   asm
  1159.     mov esp, ebp
  1160.     pop ebp
  1161.     jmp [_BuildExplicitAccessWithNameW]
  1162.   end;
  1163. end;
  1164. {$ELSE}
  1165. procedure BuildExplicitAccessWithNameW; external aclapilib name 'BuildExplicitAccessWithNameW';
  1166. {$ENDIF DYNAMIC_LINK}
  1167. {$IFDEF UNICODE}
  1168. {$IFDEF DYNAMIC_LINK}
  1169. var
  1170.   _BuildExplicitAccessWithName: Pointer;
  1171. procedure BuildExplicitAccessWithName;
  1172. begin
  1173.   GetProcedureAddress(_BuildExplicitAccessWithName, aclapilib, 'BuildExplicitAccessWithNameW');
  1174.   asm
  1175.     mov esp, ebp
  1176.     pop ebp
  1177.     jmp [_BuildExplicitAccessWithName]
  1178.   end;
  1179. end;
  1180. {$ELSE}
  1181. procedure BuildExplicitAccessWithName; external aclapilib name 'BuildExplicitAccessWithNameW';
  1182. {$ENDIF DYNAMIC_LINK}
  1183. {$ELSE}
  1184. {$IFDEF DYNAMIC_LINK}
  1185. var
  1186.   _BuildExplicitAccessWithName: Pointer;
  1187. procedure BuildExplicitAccessWithName;
  1188. begin
  1189.   GetProcedureAddress(_BuildExplicitAccessWithName, aclapilib, 'BuildExplicitAccessWithNameA');
  1190.   asm
  1191.     mov esp, ebp
  1192.     pop ebp
  1193.     jmp [_BuildExplicitAccessWithName]
  1194.   end;
  1195. end;
  1196. {$ELSE}
  1197. procedure BuildExplicitAccessWithName; external aclapilib name 'BuildExplicitAccessWithNameA';
  1198. {$ENDIF DYNAMIC_LINK}
  1199. {$ENDIF}
  1200. {$IFDEF DYNAMIC_LINK}
  1201. var
  1202.   _BuildImpersonateExplAccWNA: Pointer;
  1203. procedure BuildImpersonateExplicitAccessWithNameA;
  1204. begin
  1205.   GetProcedureAddress(_BuildImpersonateExplAccWNA, aclapilib, 'BuildImpersonateExplicitAccessWithNameA');
  1206.   asm
  1207.     mov esp, ebp
  1208.     pop ebp
  1209.     jmp [_BuildImpersonateExplAccWNA]
  1210.   end;
  1211. end;
  1212. {$ELSE}
  1213. procedure BuildImpersonateExplicitAccessWithNameA; external aclapilib name 'BuildImpersonateExplicitAccessWithNameA';
  1214. {$ENDIF DYNAMIC_LINK}
  1215. {$IFDEF DYNAMIC_LINK}
  1216. var
  1217.   _BuildImpersonateExplAccWNW: Pointer;
  1218. procedure BuildImpersonateExplicitAccessWithNameW;
  1219. begin
  1220.   GetProcedureAddress(_BuildImpersonateExplAccWNW, aclapilib, 'BuildImpersonateExplicitAccessWithNameW');
  1221.   asm
  1222.     mov esp, ebp
  1223.     pop ebp
  1224.     jmp [_BuildImpersonateExplAccWNW]
  1225.   end;
  1226. end;
  1227. {$ELSE}
  1228. procedure BuildImpersonateExplicitAccessWithNameW; external aclapilib name 'BuildImpersonateExplicitAccessWithNameW';
  1229. {$ENDIF DYNAMIC_LINK}
  1230. {$IFDEF UNICODE}
  1231. {$IFDEF DYNAMIC_LINK}
  1232. var
  1233.   _BuildImpersonateExplAccWN: Pointer;
  1234. procedure BuildImpersonateExplicitAccessWithName;
  1235. begin
  1236.   GetProcedureAddress(_BuildImpersonateExplAccWN, aclapilib, 'BuildImpersonateExplicitAccessWithNameW');
  1237.   asm
  1238.     mov esp, ebp
  1239.     pop ebp
  1240.     jmp [_BuildImpersonateExplAccWN]
  1241.   end;
  1242. end;
  1243. {$ELSE}
  1244. procedure BuildImpersonateExplicitAccessWithName; external aclapilib name 'BuildImpersonateExplicitAccessWithNameW';
  1245. {$ENDIF DYNAMIC_LINK}
  1246. {$ELSE}
  1247. {$IFDEF DYNAMIC_LINK}
  1248. var
  1249.   _BuildImpersonateExplAccWN: Pointer;
  1250. procedure BuildImpersonateExplicitAccessWithName;
  1251. begin
  1252.   GetProcedureAddress(_BuildImpersonateExplAccWN, aclapilib, 'BuildImpersonateExplicitAccessWithNameA');
  1253.   asm
  1254.     mov esp, ebp
  1255.     pop ebp
  1256.     jmp [_BuildImpersonateExplAccWN]
  1257.   end;
  1258. end;
  1259. {$ELSE}
  1260. procedure BuildImpersonateExplicitAccessWithName; external aclapilib name 'BuildImpersonateExplicitAccessWithNameA';
  1261. {$ENDIF DYNAMIC_LINK}
  1262. {$ENDIF}
  1263. {$IFDEF DYNAMIC_LINK}
  1264. var
  1265.   _BuildTrusteeWithNameA: Pointer;
  1266. procedure BuildTrusteeWithNameA;
  1267. begin
  1268.   GetProcedureAddress(_BuildTrusteeWithNameA, aclapilib, 'BuildTrusteeWithNameA');
  1269.   asm
  1270.     mov esp, ebp
  1271.     pop ebp
  1272.     jmp [_BuildTrusteeWithNameA]
  1273.   end;
  1274. end;
  1275. {$ELSE}
  1276. procedure BuildTrusteeWithNameA; external aclapilib name 'BuildTrusteeWithNameA';
  1277. {$ENDIF DYNAMIC_LINK}
  1278. {$IFDEF DYNAMIC_LINK}
  1279. var
  1280.   _BuildTrusteeWithNameW: Pointer;
  1281. procedure BuildTrusteeWithNameW;
  1282. begin
  1283.   GetProcedureAddress(_BuildTrusteeWithNameW, aclapilib, 'BuildTrusteeWithNameW');
  1284.   asm
  1285.     mov esp, ebp
  1286.     pop ebp
  1287.     jmp [_BuildTrusteeWithNameW]
  1288.   end;
  1289. end;
  1290. {$ELSE}
  1291. procedure BuildTrusteeWithNameW; external aclapilib name 'BuildTrusteeWithNameW';
  1292. {$ENDIF DYNAMIC_LINK}
  1293. {$IFDEF UNICODE}
  1294. {$IFDEF DYNAMIC_LINK}
  1295. var
  1296.   _BuildTrusteeWithName: Pointer;
  1297. procedure BuildTrusteeWithName;
  1298. begin
  1299.   GetProcedureAddress(_BuildTrusteeWithName, aclapilib, 'BuildTrusteeWithNameW');
  1300.   asm
  1301.     mov esp, ebp
  1302.     pop ebp
  1303.     jmp [_BuildTrusteeWithName]
  1304.   end;
  1305. end;
  1306. {$ELSE}
  1307. procedure BuildTrusteeWithName; external aclapilib name 'BuildTrusteeWithNameW';
  1308. {$ENDIF DYNAMIC_LINK}
  1309. {$ELSE}
  1310. {$IFDEF DYNAMIC_LINK}
  1311. var
  1312.   _BuildTrusteeWithName: Pointer;
  1313. procedure BuildTrusteeWithName;
  1314. begin
  1315.   GetProcedureAddress(_BuildTrusteeWithName, aclapilib, 'BuildTrusteeWithNameA');
  1316.   asm
  1317.     mov esp, ebp
  1318.     pop ebp
  1319.     jmp [_BuildTrusteeWithName]
  1320.   end;
  1321. end;
  1322. {$ELSE}
  1323. procedure BuildTrusteeWithName; external aclapilib name 'BuildTrusteeWithNameA';
  1324. {$ENDIF DYNAMIC_LINK}
  1325. {$ENDIF}
  1326. {$IFDEF DYNAMIC_LINK}
  1327. var
  1328.   _BuildImpersonateTrusteeA: Pointer;
  1329. procedure BuildImpersonateTrusteeA;
  1330. begin
  1331.   GetProcedureAddress(_BuildImpersonateTrusteeA, aclapilib, 'BuildImpersonateTrusteeA');
  1332.   asm
  1333.     mov esp, ebp
  1334.     pop ebp
  1335.     jmp [_BuildImpersonateTrusteeA]
  1336.   end;
  1337. end;
  1338. {$ELSE}
  1339. procedure BuildImpersonateTrusteeA; external aclapilib name 'BuildImpersonateTrusteeA';
  1340. {$ENDIF DYNAMIC_LINK}
  1341. {$IFDEF DYNAMIC_LINK}
  1342. var
  1343.   _BuildImpersonateTrusteeW: Pointer;
  1344. procedure BuildImpersonateTrusteeW;
  1345. begin
  1346.   GetProcedureAddress(_BuildImpersonateTrusteeW, aclapilib, 'BuildImpersonateTrusteeW');
  1347.   asm
  1348.     mov esp, ebp
  1349.     pop ebp
  1350.     jmp [_BuildImpersonateTrusteeW]
  1351.   end;
  1352. end;
  1353. {$ELSE}
  1354. procedure BuildImpersonateTrusteeW; external aclapilib name 'BuildImpersonateTrusteeW';
  1355. {$ENDIF DYNAMIC_LINK}
  1356. {$IFDEF UNICODE}
  1357. {$IFDEF DYNAMIC_LINK}
  1358. var
  1359.   _BuildImpersonateTrustee: Pointer;
  1360. procedure BuildImpersonateTrustee;
  1361. begin
  1362.   GetProcedureAddress(_BuildImpersonateTrustee, aclapilib, 'BuildImpersonateTrusteeW');
  1363.   asm
  1364.     mov esp, ebp
  1365.     pop ebp
  1366.     jmp [_BuildImpersonateTrustee]
  1367.   end;
  1368. end;
  1369. {$ELSE}
  1370. procedure BuildImpersonateTrustee; external aclapilib name 'BuildImpersonateTrusteeW';
  1371. {$ENDIF DYNAMIC_LINK}
  1372. {$ELSE}
  1373. {$IFDEF DYNAMIC_LINK}
  1374. var
  1375.   _BuildImpersonateTrustee: Pointer;
  1376. procedure BuildImpersonateTrustee;
  1377. begin
  1378.   GetProcedureAddress(_BuildImpersonateTrustee, aclapilib, 'BuildImpersonateTrusteeA');
  1379.   asm
  1380.     mov esp, ebp
  1381.     pop ebp
  1382.     jmp [_BuildImpersonateTrustee]
  1383.   end;
  1384. end;
  1385. {$ELSE}
  1386. procedure BuildImpersonateTrustee; external aclapilib name 'BuildImpersonateTrusteeA';
  1387. {$ENDIF DYNAMIC_LINK}
  1388. {$ENDIF}
  1389. {$IFDEF DYNAMIC_LINK}
  1390. var
  1391.   _BuildTrusteeWithSidA: Pointer;
  1392. procedure BuildTrusteeWithSidA;
  1393. begin
  1394.   GetProcedureAddress(_BuildTrusteeWithSidA, aclapilib, 'BuildTrusteeWithSidA');
  1395.   asm
  1396.     mov esp, ebp
  1397.     pop ebp
  1398.     jmp [_BuildTrusteeWithSidA]
  1399.   end;
  1400. end;
  1401. {$ELSE}
  1402. procedure BuildTrusteeWithSidA; external aclapilib name 'BuildTrusteeWithSidA';
  1403. {$ENDIF DYNAMIC_LINK}
  1404. {$IFDEF DYNAMIC_LINK}
  1405. var
  1406.   _BuildTrusteeWithSidW: Pointer;
  1407. procedure BuildTrusteeWithSidW;
  1408. begin
  1409.   GetProcedureAddress(_BuildTrusteeWithSidW, aclapilib, 'BuildTrusteeWithSidW');
  1410.   asm
  1411.     mov esp, ebp
  1412.     pop ebp
  1413.     jmp [_BuildTrusteeWithSidW]
  1414.   end;
  1415. end;
  1416. {$ELSE}
  1417. procedure BuildTrusteeWithSidW; external aclapilib name 'BuildTrusteeWithSidW';
  1418. {$ENDIF DYNAMIC_LINK}
  1419. {$IFDEF UNICODE}
  1420. {$IFDEF DYNAMIC_LINK}
  1421. var
  1422.   _BuildTrusteeWithSid: Pointer;
  1423. procedure BuildTrusteeWithSid;
  1424. begin
  1425.   GetProcedureAddress(_BuildTrusteeWithSid, aclapilib, 'BuildTrusteeWithSidW');
  1426.   asm
  1427.     mov esp, ebp
  1428.     pop ebp
  1429.     jmp [_BuildTrusteeWithSid]
  1430.   end;
  1431. end;
  1432. {$ELSE}
  1433. procedure BuildTrusteeWithSid; external aclapilib name 'BuildTrusteeWithSidW';
  1434. {$ENDIF DYNAMIC_LINK}
  1435. {$ELSE}
  1436. {$IFDEF DYNAMIC_LINK}
  1437. var
  1438.   _BuildTrusteeWithSid: Pointer;
  1439. procedure BuildTrusteeWithSid;
  1440. begin
  1441.   GetProcedureAddress(_BuildTrusteeWithSid, aclapilib, 'BuildTrusteeWithSidA');
  1442.   asm
  1443.     mov esp, ebp
  1444.     pop ebp
  1445.     jmp [_BuildTrusteeWithSid]
  1446.   end;
  1447. end;
  1448. {$ELSE}
  1449. procedure BuildTrusteeWithSid; external aclapilib name 'BuildTrusteeWithSidA';
  1450. {$ENDIF DYNAMIC_LINK}
  1451. {$ENDIF}
  1452. {$IFDEF DYNAMIC_LINK}
  1453. var
  1454.   _BuildTrusteeWithObjectsAndSidA: Pointer;
  1455. procedure BuildTrusteeWithObjectsAndSidA;
  1456. begin
  1457.   GetProcedureAddress(_BuildTrusteeWithObjectsAndSidA, aclapilib, 'BuildTrusteeWithObjectsAndSidA');
  1458.   asm
  1459.     mov esp, ebp
  1460.     pop ebp
  1461.     jmp [_BuildTrusteeWithObjectsAndSidA]
  1462.   end;
  1463. end;
  1464. {$ELSE}
  1465. procedure BuildTrusteeWithObjectsAndSidA; external aclapilib name 'BuildTrusteeWithObjectsAndSidA';
  1466. {$ENDIF DYNAMIC_LINK}
  1467. {$IFDEF DYNAMIC_LINK}
  1468. var
  1469.   _BuildTrusteeWithObjectsAndSidW: Pointer;
  1470. procedure BuildTrusteeWithObjectsAndSidW;
  1471. begin
  1472.   GetProcedureAddress(_BuildTrusteeWithObjectsAndSidW, aclapilib, 'BuildTrusteeWithObjectsAndSidW');
  1473.   asm
  1474.     mov esp, ebp
  1475.     pop ebp
  1476.     jmp [_BuildTrusteeWithObjectsAndSidW]
  1477.   end;
  1478. end;
  1479. {$ELSE}
  1480. procedure BuildTrusteeWithObjectsAndSidW; external aclapilib name 'BuildTrusteeWithObjectsAndSidW';
  1481. {$ENDIF DYNAMIC_LINK}
  1482. {$IFDEF UNICODE}
  1483. {$IFDEF DYNAMIC_LINK}
  1484. var
  1485.   _BuildTrusteeWithObjectsAndSid: Pointer;
  1486. procedure BuildTrusteeWithObjectsAndSid;
  1487. begin
  1488.   GetProcedureAddress(_BuildTrusteeWithObjectsAndSid, aclapilib, 'BuildTrusteeWithObjectsAndSidW');
  1489.   asm
  1490.     mov esp, ebp
  1491.     pop ebp
  1492.     jmp [_BuildTrusteeWithObjectsAndSid]
  1493.   end;
  1494. end;
  1495. {$ELSE}
  1496. procedure BuildTrusteeWithObjectsAndSid; external aclapilib name 'BuildTrusteeWithObjectsAndSidW';
  1497. {$ENDIF DYNAMIC_LINK}
  1498. {$ELSE}
  1499. {$IFDEF DYNAMIC_LINK}
  1500. var
  1501.   _BuildTrusteeWithObjectsAndSid: Pointer;
  1502. procedure BuildTrusteeWithObjectsAndSid;
  1503. begin
  1504.   GetProcedureAddress(_BuildTrusteeWithObjectsAndSid, aclapilib, 'BuildTrusteeWithObjectsAndSidA');
  1505.   asm
  1506.     mov esp, ebp
  1507.     pop ebp
  1508.     jmp [_BuildTrusteeWithObjectsAndSid]
  1509.   end;
  1510. end;
  1511. {$ELSE}
  1512. procedure BuildTrusteeWithObjectsAndSid; external aclapilib name 'BuildTrusteeWithObjectsAndSidA';
  1513. {$ENDIF DYNAMIC_LINK}
  1514. {$ENDIF}
  1515. {$IFDEF DYNAMIC_LINK}
  1516. var
  1517.   _BuildTrusteeWithObjectsAndNameA: Pointer;
  1518. procedure BuildTrusteeWithObjectsAndNameA;
  1519. begin
  1520.   GetProcedureAddress(_BuildTrusteeWithObjectsAndNameA, aclapilib, 'BuildTrusteeWithObjectsAndNameA');
  1521.   asm
  1522.     mov esp, ebp
  1523.     pop ebp
  1524.     jmp [_BuildTrusteeWithObjectsAndNameA]
  1525.   end;
  1526. end;
  1527. {$ELSE}
  1528. procedure BuildTrusteeWithObjectsAndNameA; external aclapilib name 'BuildTrusteeWithObjectsAndNameA';
  1529. {$ENDIF DYNAMIC_LINK}
  1530. {$IFDEF DYNAMIC_LINK}
  1531. var
  1532.   _BuildTrusteeWithObjectsAndNameW: Pointer;
  1533. procedure BuildTrusteeWithObjectsAndNameW;
  1534. begin
  1535.   GetProcedureAddress(_BuildTrusteeWithObjectsAndNameW, aclapilib, 'BuildTrusteeWithObjectsAndNameW');
  1536.   asm
  1537.     mov esp, ebp
  1538.     pop ebp
  1539.     jmp [_BuildTrusteeWithObjectsAndNameW]
  1540.   end;
  1541. end;
  1542. {$ELSE}
  1543. procedure BuildTrusteeWithObjectsAndNameW; external aclapilib name 'BuildTrusteeWithObjectsAndNameW';
  1544. {$ENDIF DYNAMIC_LINK}
  1545. {$IFDEF UNICODE}
  1546. {$IFDEF DYNAMIC_LINK}
  1547. var
  1548.   _BuildTrusteeWithObjectsAndName: Pointer;
  1549. procedure BuildTrusteeWithObjectsAndName;
  1550. begin
  1551.   GetProcedureAddress(_BuildTrusteeWithObjectsAndName, aclapilib, 'BuildTrusteeWithObjectsAndNameW');
  1552.   asm
  1553.     mov esp, ebp
  1554.     pop ebp
  1555.     jmp [_BuildTrusteeWithObjectsAndName]
  1556.   end;
  1557. end;
  1558. {$ELSE}
  1559. procedure BuildTrusteeWithObjectsAndName; external aclapilib name 'BuildTrusteeWithObjectsAndNameW';
  1560. {$ENDIF DYNAMIC_LINK}
  1561. {$ELSE}
  1562. {$IFDEF DYNAMIC_LINK}
  1563. var
  1564.   _BuildTrusteeWithObjectsAndName: Pointer;
  1565. procedure BuildTrusteeWithObjectsAndName;
  1566. begin
  1567.   GetProcedureAddress(_BuildTrusteeWithObjectsAndName, aclapilib, 'BuildTrusteeWithObjectsAndNameA');
  1568.   asm
  1569.     mov esp, ebp
  1570.     pop ebp
  1571.     jmp [_BuildTrusteeWithObjectsAndName]
  1572.   end;
  1573. end;
  1574. {$ELSE}
  1575. procedure BuildTrusteeWithObjectsAndName; external aclapilib name 'BuildTrusteeWithObjectsAndNameA';
  1576. {$ENDIF DYNAMIC_LINK}
  1577. {$ENDIF}
  1578. {$IFDEF DYNAMIC_LINK}
  1579. var
  1580.   _GetTrusteeNameA: Pointer;
  1581. function GetTrusteeNameA;
  1582. begin
  1583.   GetProcedureAddress(_GetTrusteeNameA, aclapilib, 'GetTrusteeNameA');
  1584.   asm
  1585.     mov esp, ebp
  1586.     pop ebp
  1587.     jmp [_GetTrusteeNameA]
  1588.   end;
  1589. end;
  1590. {$ELSE}
  1591. function GetTrusteeNameA; external aclapilib name 'GetTrusteeNameA';
  1592. {$ENDIF DYNAMIC_LINK}
  1593. {$IFDEF DYNAMIC_LINK}
  1594. var
  1595.   _GetTrusteeNameW: Pointer;
  1596. function GetTrusteeNameW;
  1597. begin
  1598.   GetProcedureAddress(_GetTrusteeNameW, aclapilib, 'GetTrusteeNameW');
  1599.   asm
  1600.     mov esp, ebp
  1601.     pop ebp
  1602.     jmp [_GetTrusteeNameW]
  1603.   end;
  1604. end;
  1605. {$ELSE}
  1606. function GetTrusteeNameW; external aclapilib name 'GetTrusteeNameW';
  1607. {$ENDIF DYNAMIC_LINK}
  1608. {$IFDEF UNICODE}
  1609. {$IFDEF DYNAMIC_LINK}
  1610. var
  1611.   _GetTrusteeName: Pointer;
  1612. function GetTrusteeName;
  1613. begin
  1614.   GetProcedureAddress(_GetTrusteeName, aclapilib, 'GetTrusteeNameW');
  1615.   asm
  1616.     mov esp, ebp
  1617.     pop ebp
  1618.     jmp [_GetTrusteeName]
  1619.   end;
  1620. end;
  1621. {$ELSE}
  1622. function GetTrusteeName; external aclapilib name 'GetTrusteeNameW';
  1623. {$ENDIF DYNAMIC_LINK}
  1624. {$ELSE}
  1625. {$IFDEF DYNAMIC_LINK}
  1626. var
  1627.   _GetTrusteeName: Pointer;
  1628. function GetTrusteeName;
  1629. begin
  1630.   GetProcedureAddress(_GetTrusteeName, aclapilib, 'GetTrusteeNameA');
  1631.   asm
  1632.     mov esp, ebp
  1633.     pop ebp
  1634.     jmp [_GetTrusteeName]
  1635.   end;
  1636. end;
  1637. {$ELSE}
  1638. function GetTrusteeName; external aclapilib name 'GetTrusteeNameA';
  1639. {$ENDIF DYNAMIC_LINK}
  1640. {$ENDIF}
  1641. {$IFDEF DYNAMIC_LINK}
  1642. var
  1643.   _GetTrusteeTypeA: Pointer;
  1644. function GetTrusteeTypeA;
  1645. begin
  1646.   GetProcedureAddress(_GetTrusteeTypeA, aclapilib, 'GetTrusteeTypeA');
  1647.   asm
  1648.     mov esp, ebp
  1649.     pop ebp
  1650.     jmp [_GetTrusteeTypeA]
  1651.   end;
  1652. end;
  1653. {$ELSE}
  1654. function GetTrusteeTypeA; external aclapilib name 'GetTrusteeTypeA';
  1655. {$ENDIF DYNAMIC_LINK}
  1656. {$IFDEF DYNAMIC_LINK}
  1657. var
  1658.   _GetTrusteeTypeW: Pointer;
  1659. function GetTrusteeTypeW;
  1660. begin
  1661.   GetProcedureAddress(_GetTrusteeTypeW, aclapilib, 'GetTrusteeTypeW');
  1662.   asm
  1663.     mov esp, ebp
  1664.     pop ebp
  1665.     jmp [_GetTrusteeTypeW]
  1666.   end;
  1667. end;
  1668. {$ELSE}
  1669. function GetTrusteeTypeW; external aclapilib name 'GetTrusteeTypeW';
  1670. {$ENDIF DYNAMIC_LINK}
  1671. {$IFDEF UNICODE}
  1672. {$IFDEF DYNAMIC_LINK}
  1673. var
  1674.   _GetTrusteeType: Pointer;
  1675. function GetTrusteeType;
  1676. begin
  1677.   GetProcedureAddress(_GetTrusteeType, aclapilib, 'GetTrusteeTypeW');
  1678.   asm
  1679.     mov esp, ebp
  1680.     pop ebp
  1681.     jmp [_GetTrusteeType]
  1682.   end;
  1683. end;
  1684. {$ELSE}
  1685. function GetTrusteeType; external aclapilib name 'GetTrusteeTypeW';
  1686. {$ENDIF DYNAMIC_LINK}
  1687. {$ELSE}
  1688. {$IFDEF DYNAMIC_LINK}
  1689. var
  1690.   _GetTrusteeType: Pointer;
  1691. function GetTrusteeType;
  1692. begin
  1693.   GetProcedureAddress(_GetTrusteeType, aclapilib, 'GetTrusteeTypeA');
  1694.   asm
  1695.     mov esp, ebp
  1696.     pop ebp
  1697.     jmp [_GetTrusteeType]
  1698.   end;
  1699. end;
  1700. {$ELSE}
  1701. function GetTrusteeType; external aclapilib name 'GetTrusteeTypeA';
  1702. {$ENDIF DYNAMIC_LINK}
  1703. {$ENDIF}
  1704. {$IFDEF DYNAMIC_LINK}
  1705. var
  1706.   _GetTrusteeFormA: Pointer;
  1707. function GetTrusteeFormA;
  1708. begin
  1709.   GetProcedureAddress(_GetTrusteeFormA, aclapilib, 'GetTrusteeFormA');
  1710.   asm
  1711.     mov esp, ebp
  1712.     pop ebp
  1713.     jmp [_GetTrusteeFormA]
  1714.   end;
  1715. end;
  1716. {$ELSE}
  1717. function GetTrusteeFormA; external aclapilib name 'GetTrusteeFormA';
  1718. {$ENDIF DYNAMIC_LINK}
  1719. {$IFDEF DYNAMIC_LINK}
  1720. var
  1721.   _GetTrusteeFormW: Pointer;
  1722. function GetTrusteeFormW;
  1723. begin
  1724.   GetProcedureAddress(_GetTrusteeFormW, aclapilib, 'GetTrusteeFormW');
  1725.   asm
  1726.     mov esp, ebp
  1727.     pop ebp
  1728.     jmp [_GetTrusteeFormW]
  1729.   end;
  1730. end;
  1731. {$ELSE}
  1732. function GetTrusteeFormW; external aclapilib name 'GetTrusteeFormW';
  1733. {$ENDIF DYNAMIC_LINK}
  1734. {$IFDEF UNICODE}
  1735. {$IFDEF DYNAMIC_LINK}
  1736. var
  1737.   _GetTrusteeForm: Pointer;
  1738. function GetTrusteeForm;
  1739. begin
  1740.   GetProcedureAddress(_GetTrusteeForm, aclapilib, 'GetTrusteeFormW');
  1741.   asm
  1742.     mov esp, ebp
  1743.     pop ebp
  1744.     jmp [_GetTrusteeForm]
  1745.   end;
  1746. end;
  1747. {$ELSE}
  1748. function GetTrusteeForm; external aclapilib name 'GetTrusteeFormW';
  1749. {$ENDIF DYNAMIC_LINK}
  1750. {$ELSE}
  1751. {$IFDEF DYNAMIC_LINK}
  1752. var
  1753.   _GetTrusteeForm: Pointer;
  1754. function GetTrusteeForm;
  1755. begin
  1756.   GetProcedureAddress(_GetTrusteeForm, aclapilib, 'GetTrusteeFormA');
  1757.   asm
  1758.     mov esp, ebp
  1759.     pop ebp
  1760.     jmp [_GetTrusteeForm]
  1761.   end;
  1762. end;
  1763. {$ELSE}
  1764. function GetTrusteeForm; external aclapilib name 'GetTrusteeFormA';
  1765. {$ENDIF DYNAMIC_LINK}
  1766. {$ENDIF}
  1767. {$IFDEF DYNAMIC_LINK}
  1768. var
  1769.   _GetMultipleTrusteeOperationA: Pointer;
  1770. function GetMultipleTrusteeOperationA;
  1771. begin
  1772.   GetProcedureAddress(_GetMultipleTrusteeOperationA, aclapilib, 'GetMultipleTrusteeOperationA');
  1773.   asm
  1774.     mov esp, ebp
  1775.     pop ebp
  1776.     jmp [_GetMultipleTrusteeOperationA]
  1777.   end;
  1778. end;
  1779. {$ELSE}
  1780. function GetMultipleTrusteeOperationA; external aclapilib name 'GetMultipleTrusteeOperationA';
  1781. {$ENDIF DYNAMIC_LINK}
  1782. {$IFDEF DYNAMIC_LINK}
  1783. var
  1784.   _GetMultipleTrusteeOperationW: Pointer;
  1785. function GetMultipleTrusteeOperationW;
  1786. begin
  1787.   GetProcedureAddress(_GetMultipleTrusteeOperationW, aclapilib, 'GetMultipleTrusteeOperationW');
  1788.   asm
  1789.     mov esp, ebp
  1790.     pop ebp
  1791.     jmp [_GetMultipleTrusteeOperationW]
  1792.   end;
  1793. end;
  1794. {$ELSE}
  1795. function GetMultipleTrusteeOperationW; external aclapilib name 'GetMultipleTrusteeOperationW';
  1796. {$ENDIF DYNAMIC_LINK}
  1797. {$IFDEF UNICODE}
  1798. {$IFDEF DYNAMIC_LINK}
  1799. var
  1800.   _GetMultipleTrusteeOperation: Pointer;
  1801. function GetMultipleTrusteeOperation;
  1802. begin
  1803.   GetProcedureAddress(_GetMultipleTrusteeOperation, aclapilib, 'GetMultipleTrusteeOperationW');
  1804.   asm
  1805.     mov esp, ebp
  1806.     pop ebp
  1807.     jmp [_GetMultipleTrusteeOperation]
  1808.   end;
  1809. end;
  1810. {$ELSE}
  1811. function GetMultipleTrusteeOperation; external aclapilib name 'GetMultipleTrusteeOperationW';
  1812. {$ENDIF DYNAMIC_LINK}
  1813. {$ELSE}
  1814. {$IFDEF DYNAMIC_LINK}
  1815. var
  1816.   _GetMultipleTrusteeOperation: Pointer;
  1817. function GetMultipleTrusteeOperation;
  1818. begin
  1819.   GetProcedureAddress(_GetMultipleTrusteeOperation, aclapilib, 'GetMultipleTrusteeOperationA');
  1820.   asm
  1821.     mov esp, ebp
  1822.     pop ebp
  1823.     jmp [_GetMultipleTrusteeOperation]
  1824.   end;
  1825. end;
  1826. {$ELSE}
  1827. function GetMultipleTrusteeOperation; external aclapilib name 'GetMultipleTrusteeOperationA';
  1828. {$ENDIF DYNAMIC_LINK}
  1829. {$ENDIF}
  1830. {$IFDEF DYNAMIC_LINK}
  1831. var
  1832.   _GetMultipleTrusteeA: Pointer;
  1833. function GetMultipleTrusteeA;
  1834. begin
  1835.   GetProcedureAddress(_GetMultipleTrusteeA, aclapilib, 'GetMultipleTrusteeA');
  1836.   asm
  1837.     mov esp, ebp
  1838.     pop ebp
  1839.     jmp [_GetMultipleTrusteeA]
  1840.   end;
  1841. end;
  1842. {$ELSE}
  1843. function GetMultipleTrusteeA; external aclapilib name 'GetMultipleTrusteeA';
  1844. {$ENDIF DYNAMIC_LINK}
  1845. {$IFDEF DYNAMIC_LINK}
  1846. var
  1847.   _GetMultipleTrusteeW: Pointer;
  1848. function GetMultipleTrusteeW;
  1849. begin
  1850.   GetProcedureAddress(_GetMultipleTrusteeW, aclapilib, 'GetMultipleTrusteeW');
  1851.   asm
  1852.     mov esp, ebp
  1853.     pop ebp
  1854.     jmp [_GetMultipleTrusteeW]
  1855.   end;
  1856. end;
  1857. {$ELSE}
  1858. function GetMultipleTrusteeW; external aclapilib name 'GetMultipleTrusteeW';
  1859. {$ENDIF DYNAMIC_LINK}
  1860. {$IFDEF UNICODE}
  1861. {$IFDEF DYNAMIC_LINK}
  1862. var
  1863.   _GetMultipleTrustee: Pointer;
  1864. function GetMultipleTrustee;
  1865. begin
  1866.   GetProcedureAddress(_GetMultipleTrustee, aclapilib, 'GetMultipleTrusteeW');
  1867.   asm
  1868.     mov esp, ebp
  1869.     pop ebp
  1870.     jmp [_GetMultipleTrustee]
  1871.   end;
  1872. end;
  1873. {$ELSE}
  1874. function GetMultipleTrustee; external aclapilib name 'GetMultipleTrusteeW';
  1875. {$ENDIF DYNAMIC_LINK}
  1876. {$ELSE}
  1877. {$IFDEF DYNAMIC_LINK}
  1878. var
  1879.   _GetMultipleTrustee: Pointer;
  1880. function GetMultipleTrustee;
  1881. begin
  1882.   GetProcedureAddress(_GetMultipleTrustee, aclapilib, 'GetMultipleTrusteeA');
  1883.   asm
  1884.     mov esp, ebp
  1885.     pop ebp
  1886.     jmp [_GetMultipleTrustee]
  1887.   end;
  1888. end;
  1889. {$ELSE}
  1890. function GetMultipleTrustee; external aclapilib name 'GetMultipleTrusteeA';
  1891. {$ENDIF DYNAMIC_LINK}
  1892. {$ENDIF}
  1893. end.