12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337 |
- {******************************************************************************}
- { }
- { Access Control API interface Unit for Object Pascal }
- { }
- { Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
- { Corporation. All Rights Reserved. }
- { }
- { The original file is: aclapi.h, released June 2000. The original Pascal }
- { code is: AclApi.pas, released December 2000. The initial developer of the }
- { Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
- { }
- { Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
- { Marcel van Brakel. All Rights Reserved. }
- { }
- { Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
- { }
- { You may retrieve the latest version of this file at the Project JEDI }
- { APILIB home page, located at http://jedi-apilib.sourceforge.net }
- { }
- { The contents of this file are used with permission, subject to the Mozilla }
- { Public License Version 1.1 (the "License"); you may not use this file except }
- { in compliance with the License. You may obtain a copy of the License at }
- { http://www.mozilla.org/MPL/MPL-1.1.html }
- { }
- { Software distributed under the License is distributed on an "AS IS" basis, }
- { WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
- { the specific language governing rights and limitations under the License. }
- { }
- { Alternatively, the contents of this file may be used under the terms of the }
- { GNU Lesser General Public License (the "LGPL License"), in which case the }
- { provisions of the LGPL License are applicable instead of those above. }
- { If you wish to allow use of your version of this file only under the terms }
- { of the LGPL License and not to allow others to use your version of this file }
- { under the MPL, indicate your decision by deleting the provisions above and }
- { replace them with the notice and other provisions required by the LGPL }
- { License. If you do not delete the provisions above, a recipient may use }
- { your version of this file under either the MPL or the LGPL License. }
- { }
- { For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
- { }
- {******************************************************************************}
- unit JwaAclApi;
- {$WEAKPACKAGEUNIT}
- {$HPPEMIT ''}
- {$HPPEMIT '#include "aclapi.h"'}
- {$HPPEMIT ''}
- {$I jediapilib.inc}
- interface
- uses
- JwaAccCtrl, JwaWinNT, JwaWinType;
- //
- // Progress Function:
- // Caller of tree operation implements this Progress function, then
- // passes its function pointer to tree operation.
- // Tree operation invokes Progress function to provide progress and error
- // information to the caller during the potentially long execution
- // of the tree operation. Tree operation provides the name of the object
- // last processed and the error status of the operation on that object.
- // Tree operation also passes the current InvokeSetting value.
- // Caller may change the InvokeSetting value, for example, from "Always"
- // to "Only On Error."
- //
- type
- FN_PROGRESS = procedure(
- pObjectName: LPWSTR; // name of object just processed
- Status: DWORD; // status of operation on object
- var pInvokeSetting: PPROG_INVOKE_SETTING; // Never, always,
- Args: PVOID; // Caller specific data
- SecuritySet: BOOL // Whether security was set
- ); stdcall;
- {$EXTERNALSYM FN_PROGRESS}
- TFnProgress = FN_PROGRESS;
- function SetEntriesInAclA(cCountOfExplicitEntries: ULONG;
- pListOfExplicitEntries: PEXPLICIT_ACCESS_A; OldAcl: PACL;
- var NewAcl: PACL): DWORD; stdcall;
- {$EXTERNALSYM SetEntriesInAclA}
- function SetEntriesInAclW(cCountOfExplicitEntries: ULONG;
- pListOfExplicitEntries: PEXPLICIT_ACCESS_W; OldAcl: PACL;
- var NewAcl: PACL): DWORD; stdcall;
- {$EXTERNALSYM SetEntriesInAclW}
- function SetEntriesInAcl(cCountOfExplicitEntries: ULONG;
- pListOfExplicitEntries: PEXPLICIT_ACCESS; OldAcl: PACL;
- var NewAcl: PACL): DWORD; stdcall;
- {$EXTERNALSYM SetEntriesInAcl}
- function GetExplicitEntriesFromAclA(pacl: PACL; var pcCountOfExplicitEntries: ULONG;
- var pListOfExplicitEntries: PEXPLICIT_ACCESS_A): DWORD; stdcall;
- {$EXTERNALSYM GetExplicitEntriesFromAclA}
- function GetExplicitEntriesFromAclW(pacl: PACL; var pcCountOfExplicitEntries: ULONG;
- var pListOfExplicitEntries: PEXPLICIT_ACCESS_W): DWORD; stdcall;
- {$EXTERNALSYM GetExplicitEntriesFromAclW}
- function GetExplicitEntriesFromAcl(pacl: PACL; var pcCountOfExplicitEntries: ULONG;
- var pListOfExplicitEntries: PEXPLICIT_ACCESS): DWORD; stdcall;
- {$EXTERNALSYM GetExplicitEntriesFromAcl}
- function GetEffectiveRightsFromAclA(pacl: PACL; pTrustee: PTRUSTEE_A;
- var pAccessRights: ACCESS_MASK): DWORD; stdcall;
- {$EXTERNALSYM GetEffectiveRightsFromAclA}
- function GetEffectiveRightsFromAclW(pacl: PACL; pTrustee: PTRUSTEE_W;
- var pAccessRights: ACCESS_MASK): DWORD; stdcall;
- {$EXTERNALSYM GetEffectiveRightsFromAclW}
- function GetEffectiveRightsFromAcl(pacl: PACL; pTrustee: PTRUSTEE;
- var pAccessRights: ACCESS_MASK): DWORD; stdcall;
- {$EXTERNALSYM GetEffectiveRightsFromAcl}
- function GetAuditedPermissionsFromAclA(pacl: PACL; pTrustee: PTRUSTEE_A;
- var pSuccessfulAuditedRights, pFailedAuditRights: ACCESS_MASK): DWORD; stdcall;
- {$EXTERNALSYM GetAuditedPermissionsFromAclA}
- function GetAuditedPermissionsFromAclW(pacl: PACL; pTrustee: PTRUSTEE_W;
- var pSuccessfulAuditedRights, pFailedAuditRights: ACCESS_MASK): DWORD; stdcall;
- {$EXTERNALSYM GetAuditedPermissionsFromAclW}
- function GetAuditedPermissionsFromAcl(pacl: PACL; pTrustee: PTRUSTEE;
- var pSuccessfulAuditedRights, pFailedAuditRights: ACCESS_MASK): DWORD; stdcall;
- {$EXTERNALSYM GetAuditedPermissionsFromAcl}
- function GetNamedSecurityInfoA(pObjectName: LPSTR; ObjectType: SE_OBJECT_TYPE;
- SecurityInfo: SECURITY_INFORMATION; ppsidOwner, ppsidGroup: PPSID; ppDacl,
- ppSacl: PPACL; var ppSecurityDescriptor: PSECURITY_DESCRIPTOR): DWORD; stdcall;
- {$EXTERNALSYM GetNamedSecurityInfoA}
- function GetNamedSecurityInfoW(pObjectName: LPWSTR; ObjectType: SE_OBJECT_TYPE;
- SecurityInfo: SECURITY_INFORMATION; ppsidOwner, ppsidGroup: PPSID; ppDacl,
- ppSacl: PPACL; var ppSecurityDescriptor: PSECURITY_DESCRIPTOR): DWORD; stdcall;
- {$EXTERNALSYM GetNamedSecurityInfoW}
- function GetNamedSecurityInfo(pObjectName: LPTSTR; ObjectType: SE_OBJECT_TYPE;
- SecurityInfo: SECURITY_INFORMATION; ppsidOwner, ppsidGroup: PPSID; ppDacl,
- ppSacl: PPACL; var ppSecurityDescriptor: PSECURITY_DESCRIPTOR): DWORD; stdcall;
- {$EXTERNALSYM GetNamedSecurityInfo}
- function GetSecurityInfo(handle: HANDLE; ObjectType: SE_OBJECT_TYPE;
- SecurityInfo: SECURITY_INFORMATION; ppsidOwner: PPSID; ppsidGroup: PPSID;
- ppDacl, ppSacl: PPACL; var ppSecurityDescriptor: PSECURITY_DESCRIPTOR): DWORD; stdcall;
- {$EXTERNALSYM GetSecurityInfo}
- function SetNamedSecurityInfoA(pObjectName: LPSTR; ObjectType: SE_OBJECT_TYPE;
- SecurityInfo: SECURITY_INFORMATION; psidOwner, psidGroup: PSID;
- pDacl, pSacl: PACL): DWORD; stdcall;
- {$EXTERNALSYM SetNamedSecurityInfoA}
- function SetNamedSecurityInfoW(pObjectName: LPWSTR; ObjectType: SE_OBJECT_TYPE;
- SecurityInfo: SECURITY_INFORMATION; psidOwner, psidGroup: PSID;
- pDacl, pSacl: PACL): DWORD; stdcall;
- {$EXTERNALSYM SetNamedSecurityInfoW}
- function SetNamedSecurityInfo(pObjectName: LPTSTR; ObjectType: SE_OBJECT_TYPE;
- SecurityInfo: SECURITY_INFORMATION; psidOwner, psidGroup: PSID;
- pDacl, pSacl: PACL): DWORD; stdcall;
- {$EXTERNALSYM SetNamedSecurityInfo}
- function SetSecurityInfo(handle: HANDLE; ObjectType: SE_OBJECT_TYPE;
- SecurityInfo: SECURITY_INFORMATION; psidOwner, psidGroup: PSID;
- pDacl, pSacl: PACL): DWORD; stdcall;
- {$EXTERNALSYM SetSecurityInfo}
- function GetInheritanceSourceA(pObjectName: LPSTR; ObjectType: SE_OBJECT_TYPE;
- SecurityInfo: SECURITY_INFORMATION; Container: BOOL; pObjectClassGuids: LPGUID;
- GuidCount: DWORD; pAcl: PACL; pfnArray: PFN_OBJECT_MGR_FUNCTS;
- pGenericMapping: PGENERIC_MAPPING; pInheritArray: PINHERITED_FROMA): DWORD; stdcall;
- {$EXTERNALSYM GetInheritanceSourceA}
- function GetInheritanceSourceW(pObjectName: LPWSTR; ObjectType: SE_OBJECT_TYPE;
- SecurityInfo: SECURITY_INFORMATION; Container: BOOL; pObjectClassGuids: LPGUID;
- GuidCount: DWORD; pAcl: PACL; pfnArray: PFN_OBJECT_MGR_FUNCTS;
- pGenericMapping: PGENERIC_MAPPING; pInheritArray: PINHERITED_FROMW): DWORD; stdcall;
- {$EXTERNALSYM GetInheritanceSourceW}
- function GetInheritanceSource(pObjectName: LPTSTR; ObjectType: SE_OBJECT_TYPE;
- SecurityInfo: SECURITY_INFORMATION; Container: BOOL; pObjectClassGuids: LPGUID;
- GuidCount: DWORD; pAcl: PACL; pfnArray: PFN_OBJECT_MGR_FUNCTS;
- pGenericMapping: PGENERIC_MAPPING; pInheritArray: PINHERITED_FROM): DWORD; stdcall;
- {$EXTERNALSYM GetInheritanceSource}
- function FreeInheritedFromArray(pInheritArray: PINHERITED_FROMW; AceCnt: USHORT;
- pfnArray: PFN_OBJECT_MGR_FUNCTS): DWORD; stdcall;
- {$EXTERNALSYM FreeInheritedFromArray}
- function TreeResetNamedSecurityInfoA(pObjectName: LPSTR; ObjectType: SE_OBJECT_TYPE;
- SecurityInfo: SECURITY_INFORMATION; pOwner, pGroup: PSID; pDacl, pSacl: PACL;
- KeepExplicit: BOOL; fnProgress: FN_PROGRESS; ProgressInvokeSetting: PROG_INVOKE_SETTING;
- Args: PVOID): DWORD; stdcall;
- {$EXTERNALSYM TreeResetNamedSecurityInfoA}
- function TreeResetNamedSecurityInfoW(pObjectName: LPWSTR; ObjectType: SE_OBJECT_TYPE;
- SecurityInfo: SECURITY_INFORMATION; pOwner, pGroup: PSID; pDacl, pSacl: PACL;
- KeepExplicit: BOOL; fnProgress: FN_PROGRESS; ProgressInvokeSetting: PROG_INVOKE_SETTING;
- Args: PVOID): DWORD; stdcall;
- {$EXTERNALSYM TreeResetNamedSecurityInfoW}
- function TreeResetNamedSecurityInfo(pObjectName: LPTSTR; ObjectType: SE_OBJECT_TYPE;
- SecurityInfo: SECURITY_INFORMATION; pOwner, pGroup: PSID; pDacl, pSacl: PACL;
- KeepExplicit: BOOL; fnProgress: FN_PROGRESS; ProgressInvokeSetting: PROG_INVOKE_SETTING;
- Args: PVOID): DWORD; stdcall;
- {$EXTERNALSYM TreeResetNamedSecurityInfo}
- //----------------------------------------------------------------------------
- // The following API are provided for trusted servers to use to
- // implement access control on their own objects.
- //----------------------------------------------------------------------------
- function BuildSecurityDescriptorA(pOwner: PTRUSTEE_A; pGroup: PTRUSTEE_A;
- cCountOfAccessEntries: ULONG; pListOfAccessEntries: PEXPLICIT_ACCESS_A;
- cCountOfAuditEntries: ULONG; pListOfAuditEntries: PEXPLICIT_ACCESS_A;
- pOldSD: PSECURITY_DESCRIPTOR; var pSizeNewSD: ULONG;
- var pNewSD: PSECURITY_DESCRIPTOR): DWORD; stdcall;
- {$EXTERNALSYM BuildSecurityDescriptorA}
- function BuildSecurityDescriptorW(pOwner: PTRUSTEE_W; pGroup: PTRUSTEE_W;
- cCountOfAccessEntries: ULONG; pListOfAccessEntries: PEXPLICIT_ACCESS_W;
- cCountOfAuditEntries: ULONG; pListOfAuditEntries: PEXPLICIT_ACCESS_W;
- pOldSD: PSECURITY_DESCRIPTOR; var pSizeNewSD: ULONG;
- var pNewSD: PSECURITY_DESCRIPTOR): DWORD; stdcall;
- {$EXTERNALSYM BuildSecurityDescriptorW}
- function BuildSecurityDescriptor(pOwner: PTRUSTEE; pGroup: PTRUSTEE;
- cCountOfAccessEntries: ULONG; pListOfAccessEntries: PEXPLICIT_ACCESS;
- cCountOfAuditEntries: ULONG; pListOfAuditEntries: PEXPLICIT_ACCESS;
- pOldSD: PSECURITY_DESCRIPTOR; var pSizeNewSD: ULONG;
- var pNewSD: PSECURITY_DESCRIPTOR): DWORD; stdcall;
- {$EXTERNALSYM BuildSecurityDescriptor}
- function LookupSecurityDescriptorPartsA(pOwner, pGroup: PPTRUSTEE_A;
- cCountOfAccessEntries: PULONG; pListOfAccessEntries: PEXPLICIT_ACCESS_A;
- cCountOfAuditEntries: PULONG; pListOfAuditEntries: PEXPLICIT_ACCESS_A;
- var pSD: SECURITY_DESCRIPTOR): DWORD; stdcall;
- {$EXTERNALSYM LookupSecurityDescriptorPartsA}
- function LookupSecurityDescriptorPartsW(pOwner, pGroup: PPTRUSTEE_W;
- cCountOfAccessEntries: PULONG; pListOfAccessEntries: PEXPLICIT_ACCESS_W;
- cCountOfAuditEntries: PULONG; pListOfAuditEntries: PEXPLICIT_ACCESS_W;
- var pSD: SECURITY_DESCRIPTOR): DWORD; stdcall;
- {$EXTERNALSYM LookupSecurityDescriptorPartsW}
- function LookupSecurityDescriptorParts(pOwner, pGroup: PPTRUSTEE;
- cCountOfAccessEntries: PULONG; pListOfAccessEntries: PEXPLICIT_ACCESS;
- cCountOfAuditEntries: PULONG; pListOfAuditEntries: PEXPLICIT_ACCESS;
- var pSD: SECURITY_DESCRIPTOR): DWORD; stdcall;
- {$EXTERNALSYM LookupSecurityDescriptorParts}
- //----------------------------------------------------------------------------
- // The following helper API are provided for building
- // access control structures.
- //----------------------------------------------------------------------------
- procedure BuildExplicitAccessWithNameA(pExplicitAccess: PEXPLICIT_ACCESS_A;
- pTrusteeName: LPSTR; AccessPermissions: DWORD; AccessMode: ACCESS_MODE;
- Inheritance: DWORD); stdcall;
- {$EXTERNALSYM BuildExplicitAccessWithNameA}
- procedure BuildExplicitAccessWithNameW(pExplicitAccess: PEXPLICIT_ACCESS_W;
- pTrusteeName: LPWSTR; AccessPermissions: DWORD; AccessMode: ACCESS_MODE;
- Inheritance: DWORD); stdcall;
- {$EXTERNALSYM BuildExplicitAccessWithNameW}
- procedure BuildExplicitAccessWithName(pExplicitAccess: PEXPLICIT_ACCESS;
- pTrusteeName: LPTSTR; AccessPermissions: DWORD; AccessMode: ACCESS_MODE;
- Inheritance: DWORD); stdcall;
- {$EXTERNALSYM BuildExplicitAccessWithName}
- procedure BuildImpersonateExplicitAccessWithNameA(pExplicitAccess: PEXPLICIT_ACCESS_A;
- pTrusteeName: LPSTR; pTrustee: PTRUSTEE_A; AccessPermissions: DWORD;
- AccessMode: ACCESS_MODE; Inheritance: DWORD); stdcall;
- {$EXTERNALSYM BuildImpersonateExplicitAccessWithNameA}
- procedure BuildImpersonateExplicitAccessWithNameW(pExplicitAccess: PEXPLICIT_ACCESS_W;
- pTrusteeName: LPWSTR; pTrustee: PTRUSTEE_W; AccessPermissions: DWORD;
- AccessMode: ACCESS_MODE; Inheritance: DWORD); stdcall;
- {$EXTERNALSYM BuildImpersonateExplicitAccessWithNameW}
- procedure BuildImpersonateExplicitAccessWithName(pExplicitAccess: PEXPLICIT_ACCESS;
- pTrusteeName: LPTSTR; pTrustee: PTRUSTEE; AccessPermissions: DWORD;
- AccessMode: ACCESS_MODE; Inheritance: DWORD); stdcall;
- {$EXTERNALSYM BuildImpersonateExplicitAccessWithName}
- procedure BuildTrusteeWithNameA(pTrustee: PTRUSTEE_A; pName: LPSTR); stdcall;
- {$EXTERNALSYM BuildTrusteeWithNameA}
- procedure BuildTrusteeWithNameW(pTrustee: PTRUSTEE_W; pName: LPWSTR); stdcall;
- {$EXTERNALSYM BuildTrusteeWithNameW}
- procedure BuildTrusteeWithName(pTrustee: PTRUSTEE; pName: LPTSTR); stdcall;
- {$EXTERNALSYM BuildTrusteeWithName}
- procedure BuildImpersonateTrusteeA(pTrustee: PTRUSTEE_A;
- pImpersonateTrustee: PTRUSTEE_A); stdcall;
- {$EXTERNALSYM BuildImpersonateTrusteeA}
- procedure BuildImpersonateTrusteeW(pTrustee: PTRUSTEE_W;
- pImpersonateTrustee: PTRUSTEE_W); stdcall;
- {$EXTERNALSYM BuildImpersonateTrusteeW}
- procedure BuildImpersonateTrustee(pTrustee: PTRUSTEE;
- pImpersonateTrustee: PTRUSTEE); stdcall;
- {$EXTERNALSYM BuildImpersonateTrustee}
- procedure BuildTrusteeWithSidA(pTrustee: PTRUSTEE_A; pSid: PSID); stdcall;
- {$EXTERNALSYM BuildTrusteeWithSidA}
- procedure BuildTrusteeWithSidW(pTrustee: PTRUSTEE_W; pSid: PSID); stdcall;
- {$EXTERNALSYM BuildTrusteeWithSidW}
- procedure BuildTrusteeWithSid(pTrustee: PTRUSTEE; pSid: PSID); stdcall;
- {$EXTERNALSYM BuildTrusteeWithSid}
- procedure BuildTrusteeWithObjectsAndSidA(pTrustee: PTRUSTEE_A;
- pObjSid: POBJECTS_AND_SID; pObjectGuid: PGUID; pInheritedObjectGuid: PGUID;
- pSid: PSID); stdcall;
- {$EXTERNALSYM BuildTrusteeWithObjectsAndSidA}
- procedure BuildTrusteeWithObjectsAndSidW(pTrustee: PTRUSTEE_W;
- pObjSid: POBJECTS_AND_SID; pObjectGuid: PGUID; pInheritedObjectGuid: PGUID;
- pSid: PSID); stdcall;
- {$EXTERNALSYM BuildTrusteeWithObjectsAndSidW}
- procedure BuildTrusteeWithObjectsAndSid(pTrustee: PTRUSTEE;
- pObjSid: POBJECTS_AND_SID; pObjectGuid: PGUID; pInheritedObjectGuid: PGUID;
- pSid: PSID); stdcall;
- {$EXTERNALSYM BuildTrusteeWithObjectsAndSid}
- procedure BuildTrusteeWithObjectsAndNameA(pTrustee: PTRUSTEE_A;
- pObjName: POBJECTS_AND_NAME_A; ObjectType: SE_OBJECT_TYPE;
- ObjectTypeName, InheritedObjectTypeName, Name: LPSTR); stdcall;
- {$EXTERNALSYM BuildTrusteeWithObjectsAndNameA}
- procedure BuildTrusteeWithObjectsAndNameW(pTrustee: PTRUSTEE_W;
- pObjName: POBJECTS_AND_NAME_W; ObjectType: SE_OBJECT_TYPE;
- ObjectTypeName, InheritedObjectTypeName, Name: LPWSTR); stdcall;
- {$EXTERNALSYM BuildTrusteeWithObjectsAndNameW}
- procedure BuildTrusteeWithObjectsAndName(pTrustee: PTRUSTEE;
- pObjName: POBJECTS_AND_NAME; ObjectType: SE_OBJECT_TYPE;
- ObjectTypeName, InheritedObjectTypeName, Name: LPTSTR); stdcall;
- {$EXTERNALSYM BuildTrusteeWithObjectsAndName}
- function GetTrusteeNameA(pTrustee: PTRUSTEE_A): LPSTR; stdcall;
- {$EXTERNALSYM GetTrusteeNameA}
- function GetTrusteeNameW(pTrustee: PTRUSTEE_W): LPWSTR; stdcall;
- {$EXTERNALSYM GetTrusteeNameW}
- function GetTrusteeName(pTrustee: PTRUSTEE): LPTSTR; stdcall;
- {$EXTERNALSYM GetTrusteeName}
- function GetTrusteeTypeA(pTrustee: PTRUSTEE_A): TRUSTEE_TYPE; stdcall;
- {$EXTERNALSYM GetTrusteeTypeA}
- function GetTrusteeTypeW(pTrustee: PTRUSTEE_W): TRUSTEE_TYPE; stdcall;
- {$EXTERNALSYM GetTrusteeTypeW}
- function GetTrusteeType(pTrustee: PTRUSTEE): TRUSTEE_TYPE; stdcall;
- {$EXTERNALSYM GetTrusteeType}
- function GetTrusteeFormA(pTrustee: PTRUSTEE_A): TRUSTEE_FORM; stdcall;
- {$EXTERNALSYM GetTrusteeFormA}
- function GetTrusteeFormW(pTrustee: PTRUSTEE_W): TRUSTEE_FORM; stdcall;
- {$EXTERNALSYM GetTrusteeFormW}
- function GetTrusteeForm(pTrustee: PTRUSTEE): TRUSTEE_FORM; stdcall;
- {$EXTERNALSYM GetTrusteeForm}
- function GetMultipleTrusteeOperationA(pTrustee: PTRUSTEE_A): MULTIPLE_TRUSTEE_OPERATION; stdcall;
- {$EXTERNALSYM GetMultipleTrusteeOperationA}
- function GetMultipleTrusteeOperationW(pTrustee: PTRUSTEE_W): MULTIPLE_TRUSTEE_OPERATION; stdcall;
- {$EXTERNALSYM GetMultipleTrusteeOperationW}
- function GetMultipleTrusteeOperation(pTrustee: PTRUSTEE): MULTIPLE_TRUSTEE_OPERATION; stdcall;
- {$EXTERNALSYM GetMultipleTrusteeOperation}
- function GetMultipleTrusteeA(pTrustee: PTRUSTEE_A): PTRUSTEE_A; stdcall;
- {$EXTERNALSYM GetMultipleTrusteeA}
- function GetMultipleTrusteeW(pTrustee: PTRUSTEE_W): PTRUSTEE_W; stdcall;
- {$EXTERNALSYM GetMultipleTrusteeW}
- function GetMultipleTrustee(pTrustee: PTRUSTEE): PTRUSTEE; stdcall;
- {$EXTERNALSYM GetMultipleTrustee}
- implementation
- const
- aclapilib = 'advapi32.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetEntriesInAclA: Pointer;
- function SetEntriesInAclA;
- begin
- GetProcedureAddress(_SetEntriesInAclA, aclapilib, 'SetEntriesInAclA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetEntriesInAclA]
- end;
- end;
- var
- _SetEntriesInAclW: Pointer;
- function SetEntriesInAclW;
- begin
- GetProcedureAddress(_SetEntriesInAclW, aclapilib, 'SetEntriesInAclW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetEntriesInAclW]
- end;
- end;
- var
- _SetEntriesInAcl: Pointer;
- function SetEntriesInAcl;
- begin
- GetProcedureAddress(_SetEntriesInAcl, aclapilib, 'SetEntriesInAcl' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetEntriesInAcl]
- end;
- end;
- var
- _GetExplicitEntriesFromAclA: Pointer;
- function GetExplicitEntriesFromAclA;
- begin
- GetProcedureAddress(_GetExplicitEntriesFromAclA, aclapilib, 'GetExplicitEntriesFromAclA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetExplicitEntriesFromAclA]
- end;
- end;
- var
- _GetExplicitEntriesFromAclW: Pointer;
- function GetExplicitEntriesFromAclW;
- begin
- GetProcedureAddress(_GetExplicitEntriesFromAclW, aclapilib, 'GetExplicitEntriesFromAclW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetExplicitEntriesFromAclW]
- end;
- end;
- var
- _GetExplicitEntriesFromAcl: Pointer;
- function GetExplicitEntriesFromAcl;
- begin
- GetProcedureAddress(_GetExplicitEntriesFromAcl, aclapilib, 'GetExplicitEntriesFromAcl' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetExplicitEntriesFromAcl]
- end;
- end;
- var
- _GetEffectiveRightsFromAclA: Pointer;
- function GetEffectiveRightsFromAclA;
- begin
- GetProcedureAddress(_GetEffectiveRightsFromAclA, aclapilib, 'GetEffectiveRightsFromAclA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetEffectiveRightsFromAclA]
- end;
- end;
- var
- _GetEffectiveRightsFromAclW: Pointer;
- function GetEffectiveRightsFromAclW;
- begin
- GetProcedureAddress(_GetEffectiveRightsFromAclW, aclapilib, 'GetEffectiveRightsFromAclW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetEffectiveRightsFromAclW]
- end;
- end;
- var
- _GetEffectiveRightsFromAcl: Pointer;
- function GetEffectiveRightsFromAcl;
- begin
- GetProcedureAddress(_GetEffectiveRightsFromAcl, aclapilib, 'GetEffectiveRightsFromAcl' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetEffectiveRightsFromAcl]
- end;
- end;
- var
- _GetAuditedPermissionsFromAclA: Pointer;
- function GetAuditedPermissionsFromAclA;
- begin
- GetProcedureAddress(_GetAuditedPermissionsFromAclA, aclapilib, 'GetAuditedPermissionsFromAclA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAuditedPermissionsFromAclA]
- end;
- end;
- var
- _GetAuditedPermissionsFromAclW: Pointer;
- function GetAuditedPermissionsFromAclW;
- begin
- GetProcedureAddress(_GetAuditedPermissionsFromAclW, aclapilib, 'GetAuditedPermissionsFromAclW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAuditedPermissionsFromAclW]
- end;
- end;
- var
- _GetAuditedPermissionsFromAcl: Pointer;
- function GetAuditedPermissionsFromAcl;
- begin
- GetProcedureAddress(_GetAuditedPermissionsFromAcl, aclapilib, 'GetAuditedPermissionsFromAcl' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAuditedPermissionsFromAcl]
- end;
- end;
- var
- _GetNamedSecurityInfoA: Pointer;
- function GetNamedSecurityInfoA;
- begin
- GetProcedureAddress(_GetNamedSecurityInfoA, aclapilib, 'GetNamedSecurityInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNamedSecurityInfoA]
- end;
- end;
- var
- _GetNamedSecurityInfoW: Pointer;
- function GetNamedSecurityInfoW;
- begin
- GetProcedureAddress(_GetNamedSecurityInfoW, aclapilib, 'GetNamedSecurityInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNamedSecurityInfoW]
- end;
- end;
- var
- _GetNamedSecurityInfo: Pointer;
- function GetNamedSecurityInfo;
- begin
- GetProcedureAddress(_GetNamedSecurityInfo, aclapilib, 'GetNamedSecurityInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNamedSecurityInfo]
- end;
- end;
- var
- _GetSecurityInfo: Pointer;
- function GetSecurityInfo;
- begin
- GetProcedureAddress(_GetSecurityInfo, aclapilib, 'GetSecurityInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSecurityInfo]
- end;
- end;
- var
- _SetNamedSecurityInfoA: Pointer;
- function SetNamedSecurityInfoA;
- begin
- GetProcedureAddress(_SetNamedSecurityInfoA, aclapilib, 'SetNamedSecurityInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetNamedSecurityInfoA]
- end;
- end;
- var
- _SetNamedSecurityInfoW: Pointer;
- function SetNamedSecurityInfoW;
- begin
- GetProcedureAddress(_SetNamedSecurityInfoW, aclapilib, 'SetNamedSecurityInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetNamedSecurityInfoW]
- end;
- end;
- var
- _SetNamedSecurityInfo: Pointer;
- function SetNamedSecurityInfo;
- begin
- GetProcedureAddress(_SetNamedSecurityInfo, aclapilib, 'SetNamedSecurityInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetNamedSecurityInfo]
- end;
- end;
- var
- _SetSecurityInfo: Pointer;
- function SetSecurityInfo;
- begin
- GetProcedureAddress(_SetSecurityInfo, aclapilib, 'SetSecurityInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetSecurityInfo]
- end;
- end;
- var
- _GetInheritanceSourceA: Pointer;
- function GetInheritanceSourceA;
- begin
- GetProcedureAddress(_GetInheritanceSourceA, aclapilib, 'GetInheritanceSourceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetInheritanceSourceA]
- end;
- end;
- var
- _GetInheritanceSourceW: Pointer;
- function GetInheritanceSourceW;
- begin
- GetProcedureAddress(_GetInheritanceSourceW, aclapilib, 'GetInheritanceSourceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetInheritanceSourceW]
- end;
- end;
- var
- _GetInheritanceSource: Pointer;
- function GetInheritanceSource;
- begin
- GetProcedureAddress(_GetInheritanceSource, aclapilib, 'GetInheritanceSource' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetInheritanceSource]
- end;
- end;
- var
- _FreeInheritedFromArray: Pointer;
- function FreeInheritedFromArray;
- begin
- GetProcedureAddress(_FreeInheritedFromArray, aclapilib, 'FreeInheritedFromArray');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FreeInheritedFromArray]
- end;
- end;
- var
- _TreeResetNamedSecurityInfoA: Pointer;
- function TreeResetNamedSecurityInfoA;
- begin
- GetProcedureAddress(_TreeResetNamedSecurityInfoA, aclapilib, 'TreeResetNamedSecurityInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TreeResetNamedSecurityInfoA]
- end;
- end;
- var
- _TreeResetNamedSecurityInfoW: Pointer;
- function TreeResetNamedSecurityInfoW;
- begin
- GetProcedureAddress(_TreeResetNamedSecurityInfoW, aclapilib, 'TreeResetNamedSecurityInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TreeResetNamedSecurityInfoW]
- end;
- end;
- var
- _TreeResetNamedSecurityInfo: Pointer;
- function TreeResetNamedSecurityInfo;
- begin
- GetProcedureAddress(_TreeResetNamedSecurityInfo, aclapilib, 'TreeResetNamedSecurityInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TreeResetNamedSecurityInfo]
- end;
- end;
- var
- _BuildSecurityDescriptorA: Pointer;
- function BuildSecurityDescriptorA;
- begin
- GetProcedureAddress(_BuildSecurityDescriptorA, aclapilib, 'BuildSecurityDescriptorA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildSecurityDescriptorA]
- end;
- end;
- var
- _BuildSecurityDescriptorW: Pointer;
- function BuildSecurityDescriptorW;
- begin
- GetProcedureAddress(_BuildSecurityDescriptorW, aclapilib, 'BuildSecurityDescriptorW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildSecurityDescriptorW]
- end;
- end;
- var
- _BuildSecurityDescriptor: Pointer;
- function BuildSecurityDescriptor;
- begin
- GetProcedureAddress(_BuildSecurityDescriptor, aclapilib, 'BuildSecurityDescriptor' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildSecurityDescriptor]
- end;
- end;
- var
- _LookupSecurityDescriptorPartsA: Pointer;
- function LookupSecurityDescriptorPartsA;
- begin
- GetProcedureAddress(_LookupSecurityDescriptorPartsA, aclapilib, 'LookupSecurityDescriptorPartsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LookupSecurityDescriptorPartsA]
- end;
- end;
- var
- _LookupSecurityDescriptorPartsW: Pointer;
- function LookupSecurityDescriptorPartsW;
- begin
- GetProcedureAddress(_LookupSecurityDescriptorPartsW, aclapilib, 'LookupSecurityDescriptorPartsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LookupSecurityDescriptorPartsW]
- end;
- end;
- var
- _LookupSecurityDescriptorParts: Pointer;
- function LookupSecurityDescriptorParts;
- begin
- GetProcedureAddress(_LookupSecurityDescriptorParts, aclapilib, 'LookupSecurityDescriptorParts' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LookupSecurityDescriptorParts]
- end;
- end;
- var
- _BuildExplicitAccessWithNameA: Pointer;
- procedure BuildExplicitAccessWithNameA;
- begin
- GetProcedureAddress(_BuildExplicitAccessWithNameA, aclapilib, 'BuildExplicitAccessWithNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildExplicitAccessWithNameA]
- end;
- end;
- var
- _BuildExplicitAccessWithNameW: Pointer;
- procedure BuildExplicitAccessWithNameW;
- begin
- GetProcedureAddress(_BuildExplicitAccessWithNameW, aclapilib, 'BuildExplicitAccessWithNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildExplicitAccessWithNameW]
- end;
- end;
- var
- _BuildExplicitAccessWithName: Pointer;
- procedure BuildExplicitAccessWithName;
- begin
- GetProcedureAddress(_BuildExplicitAccessWithName, aclapilib, 'BuildExplicitAccessWithName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildExplicitAccessWithName]
- end;
- end;
- var
- _BuildImpersonateExplAccWNA: Pointer;
- procedure BuildImpersonateExplicitAccessWithNameA;
- begin
- GetProcedureAddress(_BuildImpersonateExplAccWNA, aclapilib, 'BuildImpersonateExplicitAccessWithNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildImpersonateExplAccWNA]
- end;
- end;
- var
- _BuildImpersonateExplAccWNW: Pointer;
- procedure BuildImpersonateExplicitAccessWithNameW;
- begin
- GetProcedureAddress(_BuildImpersonateExplAccWNW, aclapilib, 'BuildImpersonateExplicitAccessWithNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildImpersonateExplAccWNW]
- end;
- end;
- var
- _BuildImpersonateExplAccWN: Pointer;
- procedure BuildImpersonateExplicitAccessWithName;
- begin
- GetProcedureAddress(_BuildImpersonateExplAccWN, aclapilib, 'BuildImpersonateExplicitAccessWithName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildImpersonateExplAccWN]
- end;
- end;
- var
- _BuildTrusteeWithNameA: Pointer;
- procedure BuildTrusteeWithNameA;
- begin
- GetProcedureAddress(_BuildTrusteeWithNameA, aclapilib, 'BuildTrusteeWithNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildTrusteeWithNameA]
- end;
- end;
- var
- _BuildTrusteeWithNameW: Pointer;
- procedure BuildTrusteeWithNameW;
- begin
- GetProcedureAddress(_BuildTrusteeWithNameW, aclapilib, 'BuildTrusteeWithNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildTrusteeWithNameW]
- end;
- end;
- var
- _BuildTrusteeWithName: Pointer;
- procedure BuildTrusteeWithName;
- begin
- GetProcedureAddress(_BuildTrusteeWithName, aclapilib, 'BuildTrusteeWithName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildTrusteeWithName]
- end;
- end;
- var
- _BuildImpersonateTrusteeA: Pointer;
- procedure BuildImpersonateTrusteeA;
- begin
- GetProcedureAddress(_BuildImpersonateTrusteeA, aclapilib, 'BuildImpersonateTrusteeA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildImpersonateTrusteeA]
- end;
- end;
- var
- _BuildImpersonateTrusteeW: Pointer;
- procedure BuildImpersonateTrusteeW;
- begin
- GetProcedureAddress(_BuildImpersonateTrusteeW, aclapilib, 'BuildImpersonateTrusteeW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildImpersonateTrusteeW]
- end;
- end;
- var
- _BuildImpersonateTrustee: Pointer;
- procedure BuildImpersonateTrustee;
- begin
- GetProcedureAddress(_BuildImpersonateTrustee, aclapilib, 'BuildImpersonateTrustee' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildImpersonateTrustee]
- end;
- end;
- var
- _BuildTrusteeWithSidA: Pointer;
- procedure BuildTrusteeWithSidA;
- begin
- GetProcedureAddress(_BuildTrusteeWithSidA, aclapilib, 'BuildTrusteeWithSidA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildTrusteeWithSidA]
- end;
- end;
- var
- _BuildTrusteeWithSidW: Pointer;
- procedure BuildTrusteeWithSidW;
- begin
- GetProcedureAddress(_BuildTrusteeWithSidW, aclapilib, 'BuildTrusteeWithSidW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildTrusteeWithSidW]
- end;
- end;
- var
- _BuildTrusteeWithSid: Pointer;
- procedure BuildTrusteeWithSid;
- begin
- GetProcedureAddress(_BuildTrusteeWithSid, aclapilib, 'BuildTrusteeWithSid' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildTrusteeWithSid]
- end;
- end;
- var
- _BuildTrusteeWithObjectsAndSidA: Pointer;
- procedure BuildTrusteeWithObjectsAndSidA;
- begin
- GetProcedureAddress(_BuildTrusteeWithObjectsAndSidA, aclapilib, 'BuildTrusteeWithObjectsAndSidA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildTrusteeWithObjectsAndSidA]
- end;
- end;
- var
- _BuildTrusteeWithObjectsAndSidW: Pointer;
- procedure BuildTrusteeWithObjectsAndSidW;
- begin
- GetProcedureAddress(_BuildTrusteeWithObjectsAndSidW, aclapilib, 'BuildTrusteeWithObjectsAndSidW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildTrusteeWithObjectsAndSidW]
- end;
- end;
- var
- _BuildTrusteeWithObjectsAndSid: Pointer;
- procedure BuildTrusteeWithObjectsAndSid;
- begin
- GetProcedureAddress(_BuildTrusteeWithObjectsAndSid, aclapilib, 'BuildTrusteeWithObjectsAndSid' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildTrusteeWithObjectsAndSid]
- end;
- end;
- var
- _BuildTrusteeWithObjectsAndNameA: Pointer;
- procedure BuildTrusteeWithObjectsAndNameA;
- begin
- GetProcedureAddress(_BuildTrusteeWithObjectsAndNameA, aclapilib, 'BuildTrusteeWithObjectsAndNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildTrusteeWithObjectsAndNameA]
- end;
- end;
- var
- _BuildTrusteeWithObjectsAndNameW: Pointer;
- procedure BuildTrusteeWithObjectsAndNameW;
- begin
- GetProcedureAddress(_BuildTrusteeWithObjectsAndNameW, aclapilib, 'BuildTrusteeWithObjectsAndNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildTrusteeWithObjectsAndNameW]
- end;
- end;
- var
- _BuildTrusteeWithObjectsAndName: Pointer;
- procedure BuildTrusteeWithObjectsAndName;
- begin
- GetProcedureAddress(_BuildTrusteeWithObjectsAndName, aclapilib, 'BuildTrusteeWithObjectsAndName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildTrusteeWithObjectsAndName]
- end;
- end;
- var
- _GetTrusteeNameA: Pointer;
- function GetTrusteeNameA;
- begin
- GetProcedureAddress(_GetTrusteeNameA, aclapilib, 'GetTrusteeNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTrusteeNameA]
- end;
- end;
- var
- _GetTrusteeNameW: Pointer;
- function GetTrusteeNameW;
- begin
- GetProcedureAddress(_GetTrusteeNameW, aclapilib, 'GetTrusteeNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTrusteeNameW]
- end;
- end;
- var
- _GetTrusteeName: Pointer;
- function GetTrusteeName;
- begin
- GetProcedureAddress(_GetTrusteeName, aclapilib, 'GetTrusteeName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTrusteeName]
- end;
- end;
- var
- _GetTrusteeTypeA: Pointer;
- function GetTrusteeTypeA;
- begin
- GetProcedureAddress(_GetTrusteeTypeA, aclapilib, 'GetTrusteeTypeA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTrusteeTypeA]
- end;
- end;
- var
- _GetTrusteeTypeW: Pointer;
- function GetTrusteeTypeW;
- begin
- GetProcedureAddress(_GetTrusteeTypeW, aclapilib, 'GetTrusteeTypeW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTrusteeTypeW]
- end;
- end;
- var
- _GetTrusteeType: Pointer;
- function GetTrusteeType;
- begin
- GetProcedureAddress(_GetTrusteeType, aclapilib, 'GetTrusteeType' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTrusteeType]
- end;
- end;
- var
- _GetTrusteeFormA: Pointer;
- function GetTrusteeFormA;
- begin
- GetProcedureAddress(_GetTrusteeFormA, aclapilib, 'GetTrusteeFormA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTrusteeFormA]
- end;
- end;
- var
- _GetTrusteeFormW: Pointer;
- function GetTrusteeFormW;
- begin
- GetProcedureAddress(_GetTrusteeFormW, aclapilib, 'GetTrusteeFormW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTrusteeFormW]
- end;
- end;
- var
- _GetTrusteeForm: Pointer;
- function GetTrusteeForm;
- begin
- GetProcedureAddress(_GetTrusteeForm, aclapilib, 'GetTrusteeForm' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTrusteeForm]
- end;
- end;
- var
- _GetMultipleTrusteeOperationA: Pointer;
- function GetMultipleTrusteeOperationA;
- begin
- GetProcedureAddress(_GetMultipleTrusteeOperationA, aclapilib, 'GetMultipleTrusteeOperationA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMultipleTrusteeOperationA]
- end;
- end;
- var
- _GetMultipleTrusteeOperationW: Pointer;
- function GetMultipleTrusteeOperationW;
- begin
- GetProcedureAddress(_GetMultipleTrusteeOperationW, aclapilib, 'GetMultipleTrusteeOperationW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMultipleTrusteeOperationW]
- end;
- end;
- var
- _GetMultipleTrusteeOperation: Pointer;
- function GetMultipleTrusteeOperation;
- begin
- GetProcedureAddress(_GetMultipleTrusteeOperation, aclapilib, 'GetMultipleTrusteeOperation' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMultipleTrusteeOperation]
- end;
- end;
- var
- _GetMultipleTrusteeA: Pointer;
- function GetMultipleTrusteeA;
- begin
- GetProcedureAddress(_GetMultipleTrusteeA, aclapilib, 'GetMultipleTrusteeA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMultipleTrusteeA]
- end;
- end;
- var
- _GetMultipleTrusteeW: Pointer;
- function GetMultipleTrusteeW;
- begin
- GetProcedureAddress(_GetMultipleTrusteeW, aclapilib, 'GetMultipleTrusteeW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMultipleTrusteeW]
- end;
- end;
- var
- _GetMultipleTrustee: Pointer;
- function GetMultipleTrustee;
- begin
- GetProcedureAddress(_GetMultipleTrustee, aclapilib, 'GetMultipleTrustee' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMultipleTrustee]
- end;
- end;
- {$ELSE}
- function SetEntriesInAclA; external aclapilib name 'SetEntriesInAclA';
- function SetEntriesInAclW; external aclapilib name 'SetEntriesInAclW';
- function SetEntriesInAcl; external aclapilib name 'SetEntriesInAcl' + AWSuffix;
- function GetExplicitEntriesFromAclA; external aclapilib name 'GetExplicitEntriesFromAclA';
- function GetExplicitEntriesFromAclW; external aclapilib name 'GetExplicitEntriesFromAclW';
- function GetExplicitEntriesFromAcl; external aclapilib name 'GetExplicitEntriesFromAcl' + AWSuffix;
- function GetEffectiveRightsFromAclA; external aclapilib name 'GetEffectiveRightsFromAclA';
- function GetEffectiveRightsFromAclW; external aclapilib name 'GetEffectiveRightsFromAclW';
- function GetEffectiveRightsFromAcl; external aclapilib name 'GetEffectiveRightsFromAcl' + AWSuffix;
- function GetAuditedPermissionsFromAclA; external aclapilib name 'GetAuditedPermissionsFromAclA';
- function GetAuditedPermissionsFromAclW; external aclapilib name 'GetAuditedPermissionsFromAclW';
- function GetAuditedPermissionsFromAcl; external aclapilib name 'GetAuditedPermissionsFromAcl' + AWSuffix;
- function GetNamedSecurityInfoA; external aclapilib name 'GetNamedSecurityInfoA';
- function GetNamedSecurityInfoW; external aclapilib name 'GetNamedSecurityInfoW';
- function GetNamedSecurityInfo; external aclapilib name 'GetNamedSecurityInfo' + AWSuffix;
- function GetSecurityInfo; external aclapilib name 'GetSecurityInfo';
- function SetNamedSecurityInfoA; external aclapilib name 'SetNamedSecurityInfoA';
- function SetNamedSecurityInfoW; external aclapilib name 'SetNamedSecurityInfoW';
- function SetNamedSecurityInfo; external aclapilib name 'SetNamedSecurityInfo' + AWSuffix;
- function SetSecurityInfo; external aclapilib name 'SetSecurityInfo';
- function GetInheritanceSourceA; external aclapilib name 'GetInheritanceSourceA';
- function GetInheritanceSourceW; external aclapilib name 'GetInheritanceSourceW';
- function GetInheritanceSource; external aclapilib name 'GetInheritanceSource' + AWSuffix;
- function FreeInheritedFromArray; external aclapilib name 'FreeInheritedFromArray';
- function TreeResetNamedSecurityInfoA; external aclapilib name 'TreeResetNamedSecurityInfoA';
- function TreeResetNamedSecurityInfoW; external aclapilib name 'TreeResetNamedSecurityInfoW';
- function TreeResetNamedSecurityInfo; external aclapilib name 'TreeResetNamedSecurityInfo' + AWSuffix;
- function BuildSecurityDescriptorA; external aclapilib name 'BuildSecurityDescriptorA';
- function BuildSecurityDescriptorW; external aclapilib name 'BuildSecurityDescriptorW';
- function BuildSecurityDescriptor; external aclapilib name 'BuildSecurityDescriptor' + AWSuffix;
- function LookupSecurityDescriptorPartsA; external aclapilib name 'LookupSecurityDescriptorPartsA';
- function LookupSecurityDescriptorPartsW; external aclapilib name 'LookupSecurityDescriptorPartsW';
- function LookupSecurityDescriptorParts; external aclapilib name 'LookupSecurityDescriptorParts' + AWSuffix;
- procedure BuildExplicitAccessWithNameA; external aclapilib name 'BuildExplicitAccessWithNameA';
- procedure BuildExplicitAccessWithNameW; external aclapilib name 'BuildExplicitAccessWithNameW';
- procedure BuildExplicitAccessWithName; external aclapilib name 'BuildExplicitAccessWithName' + AWSuffix;
- procedure BuildImpersonateExplicitAccessWithNameA; external aclapilib name 'BuildImpersonateExplicitAccessWithNameA';
- procedure BuildImpersonateExplicitAccessWithNameW; external aclapilib name 'BuildImpersonateExplicitAccessWithNameW';
- procedure BuildImpersonateExplicitAccessWithName; external aclapilib name 'BuildImpersonateExplicitAccessWithName' + AWSuffix;
- procedure BuildTrusteeWithNameA; external aclapilib name 'BuildTrusteeWithNameA';
- procedure BuildTrusteeWithNameW; external aclapilib name 'BuildTrusteeWithNameW';
- procedure BuildTrusteeWithName; external aclapilib name 'BuildTrusteeWithName' + AWSuffix;
- procedure BuildImpersonateTrusteeA; external aclapilib name 'BuildImpersonateTrusteeA';
- procedure BuildImpersonateTrusteeW; external aclapilib name 'BuildImpersonateTrusteeW';
- procedure BuildImpersonateTrustee; external aclapilib name 'BuildImpersonateTrustee' + AWSuffix;
- procedure BuildTrusteeWithSidA; external aclapilib name 'BuildTrusteeWithSidA';
- procedure BuildTrusteeWithSidW; external aclapilib name 'BuildTrusteeWithSidW';
- procedure BuildTrusteeWithSid; external aclapilib name 'BuildTrusteeWithSid' + AWSuffix;
- procedure BuildTrusteeWithObjectsAndSidA; external aclapilib name 'BuildTrusteeWithObjectsAndSidA';
- procedure BuildTrusteeWithObjectsAndSidW; external aclapilib name 'BuildTrusteeWithObjectsAndSidW';
- procedure BuildTrusteeWithObjectsAndSid; external aclapilib name 'BuildTrusteeWithObjectsAndSid' + AWSuffix;
- procedure BuildTrusteeWithObjectsAndNameA; external aclapilib name 'BuildTrusteeWithObjectsAndNameA';
- procedure BuildTrusteeWithObjectsAndNameW; external aclapilib name 'BuildTrusteeWithObjectsAndNameW';
- procedure BuildTrusteeWithObjectsAndName; external aclapilib name 'BuildTrusteeWithObjectsAndName' + AWSuffix;
- function GetTrusteeNameA; external aclapilib name 'GetTrusteeNameA';
- function GetTrusteeNameW; external aclapilib name 'GetTrusteeNameW';
- function GetTrusteeName; external aclapilib name 'GetTrusteeName' + AWSuffix;
- function GetTrusteeTypeA; external aclapilib name 'GetTrusteeTypeA';
- function GetTrusteeTypeW; external aclapilib name 'GetTrusteeTypeW';
- function GetTrusteeType; external aclapilib name 'GetTrusteeType' + AWSuffix;
- function GetTrusteeFormA; external aclapilib name 'GetTrusteeFormA';
- function GetTrusteeFormW; external aclapilib name 'GetTrusteeFormW';
- function GetTrusteeForm; external aclapilib name 'GetTrusteeForm' + AWSuffix;
- function GetMultipleTrusteeOperationA; external aclapilib name 'GetMultipleTrusteeOperationA';
- function GetMultipleTrusteeOperationW; external aclapilib name 'GetMultipleTrusteeOperationW';
- function GetMultipleTrusteeOperation; external aclapilib name 'GetMultipleTrusteeOperation' + AWSuffix;
- function GetMultipleTrusteeA; external aclapilib name 'GetMultipleTrusteeA';
- function GetMultipleTrusteeW; external aclapilib name 'GetMultipleTrusteeW';
- function GetMultipleTrustee; external aclapilib name 'GetMultipleTrustee' + AWSuffix;
- {$ENDIF DYNAMIC_LINK}
- end.
|