📄 jwaaclapi.pas
字号:
pSid: PSID); stdcall;
{$EXTERNALSYM BuildTrusteeWithObjectsAndSid}
{$ENDIF}
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}
{$IFDEF UNICODE}
procedure BuildTrusteeWithObjectsAndName(pTrustee: PTRUSTEE_W;
pObjName: POBJECTS_AND_NAME_W; ObjectType: SE_OBJECT_TYPE;
ObjectTypeName, InheritedObjectTypeName, Name: LPWSTR); stdcall;
{$EXTERNALSYM BuildTrusteeWithObjectsAndName}
{$ELSE}
procedure BuildTrusteeWithObjectsAndName(pTrustee: PTRUSTEE_A;
pObjName: POBJECTS_AND_NAME_A; ObjectType: SE_OBJECT_TYPE;
ObjectTypeName, InheritedObjectTypeName, Name: LPSTR); stdcall;
{$EXTERNALSYM BuildTrusteeWithObjectsAndName}
{$ENDIF}
function GetTrusteeNameA(pTrustee: PTRUSTEE_A): LPSTR; stdcall;
{$EXTERNALSYM GetTrusteeNameA}
function GetTrusteeNameW(pTrustee: PTRUSTEE_W): LPWSTR; stdcall;
{$EXTERNALSYM GetTrusteeNameW}
{$IFDEF UNICODE}
function GetTrusteeName(pTrustee: PTRUSTEE_W): LPWSTR; stdcall;
{$EXTERNALSYM GetTrusteeName}
{$ELSE}
function GetTrusteeName(pTrustee: PTRUSTEE_A): LPSTR; stdcall;
{$EXTERNALSYM GetTrusteeName}
{$ENDIF}
function GetTrusteeTypeA(pTrustee: PTRUSTEE_A): TRUSTEE_TYPE; stdcall;
{$EXTERNALSYM GetTrusteeTypeA}
function GetTrusteeTypeW(pTrustee: PTRUSTEE_W): TRUSTEE_TYPE; stdcall;
{$EXTERNALSYM GetTrusteeTypeW}
{$IFDEF UNICODE}
function GetTrusteeType(pTrustee: PTRUSTEE_W): TRUSTEE_TYPE; stdcall;
{$EXTERNALSYM GetTrusteeType}
{$ELSE}
function GetTrusteeType(pTrustee: PTRUSTEE_A): TRUSTEE_TYPE; stdcall;
{$EXTERNALSYM GetTrusteeType}
{$ENDIF}
function GetTrusteeFormA(pTrustee: PTRUSTEE_A): TRUSTEE_FORM; stdcall;
{$EXTERNALSYM GetTrusteeFormA}
function GetTrusteeFormW(pTrustee: PTRUSTEE_W): TRUSTEE_FORM; stdcall;
{$EXTERNALSYM GetTrusteeFormW}
{$IFDEF UNICODE}
function GetTrusteeForm(pTrustee: PTRUSTEE_W): TRUSTEE_FORM; stdcall;
{$EXTERNALSYM GetTrusteeForm}
{$ELSE}
function GetTrusteeForm(pTrustee: PTRUSTEE_A): TRUSTEE_FORM; stdcall;
{$EXTERNALSYM GetTrusteeForm}
{$ENDIF}
function GetMultipleTrusteeOperationA(pTrustee: PTRUSTEE_A): MULTIPLE_TRUSTEE_OPERATION; stdcall;
{$EXTERNALSYM GetMultipleTrusteeOperationA}
function GetMultipleTrusteeOperationW(pTrustee: PTRUSTEE_W): MULTIPLE_TRUSTEE_OPERATION; stdcall;
{$EXTERNALSYM GetMultipleTrusteeOperationW}
{$IFDEF UNICODE}
function GetMultipleTrusteeOperation(pTrustee: PTRUSTEE_W): MULTIPLE_TRUSTEE_OPERATION; stdcall;
{$EXTERNALSYM GetMultipleTrusteeOperation}
{$ELSE}
function GetMultipleTrusteeOperation(pTrustee: PTRUSTEE_A): MULTIPLE_TRUSTEE_OPERATION; stdcall;
{$EXTERNALSYM GetMultipleTrusteeOperation}
{$ENDIF}
function GetMultipleTrusteeA(pTrustee: PTRUSTEE_A): PTRUSTEE_A; stdcall;
{$EXTERNALSYM GetMultipleTrusteeA}
function GetMultipleTrusteeW(pTrustee: PTRUSTEE_W): PTRUSTEE_W; stdcall;
{$EXTERNALSYM GetMultipleTrusteeW}
{$IFDEF UNICODE}
function GetMultipleTrustee(pTrustee: PTRUSTEE_W): PTRUSTEE_W; stdcall;
{$EXTERNALSYM GetMultipleTrustee}
{$ELSE}
function GetMultipleTrustee(pTrustee: PTRUSTEE_A): PTRUSTEE_A; stdcall;
{$EXTERNALSYM GetMultipleTrustee}
{$ENDIF}
implementation
const
aclapilib = 'advapi32.dll';
{$IFDEF DYNAMIC_LINK}
var
_SetEntriesInAclA: Pointer;
function SetEntriesInAclA;
begin
GetProcedureAddress(_SetEntriesInAclA, aclapilib, 'SetEntriesInAclA');
asm
mov esp, ebp
pop ebp
jmp [_SetEntriesInAclA]
end;
end;
{$ELSE}
function SetEntriesInAclA; external aclapilib name 'SetEntriesInAclA';
{$ENDIF DYNAMIC_LINK}
{$IFDEF DYNAMIC_LINK}
var
_SetEntriesInAclW: Pointer;
function SetEntriesInAclW;
begin
GetProcedureAddress(_SetEntriesInAclW, aclapilib, 'SetEntriesInAclW');
asm
mov esp, ebp
pop ebp
jmp [_SetEntriesInAclW]
end;
end;
{$ELSE}
function SetEntriesInAclW; external aclapilib name 'SetEntriesInAclW';
{$ENDIF DYNAMIC_LINK}
{$IFDEF UNICODE}
{$IFDEF DYNAMIC_LINK}
var
_SetEntriesInAcl: Pointer;
function SetEntriesInAcl;
begin
GetProcedureAddress(_SetEntriesInAcl, aclapilib, 'SetEntriesInAclW');
asm
mov esp, ebp
pop ebp
jmp [_SetEntriesInAcl]
end;
end;
{$ELSE}
function SetEntriesInAcl; external aclapilib name 'SetEntriesInAclW';
{$ENDIF DYNAMIC_LINK}
{$ELSE}
{$IFDEF DYNAMIC_LINK}
var
_SetEntriesInAcl: Pointer;
function SetEntriesInAcl;
begin
GetProcedureAddress(_SetEntriesInAcl, aclapilib, 'SetEntriesInAclA');
asm
mov esp, ebp
pop ebp
jmp [_SetEntriesInAcl]
end;
end;
{$ELSE}
function SetEntriesInAcl; external aclapilib name 'SetEntriesInAclA';
{$ENDIF DYNAMIC_LINK}
{$ENDIF}
{$IFDEF DYNAMIC_LINK}
var
_GetExplicitEntriesFromAclA: Pointer;
function GetExplicitEntriesFromAclA;
begin
GetProcedureAddress(_GetExplicitEntriesFromAclA, aclapilib, 'GetExplicitEntriesFromAclA');
asm
mov esp, ebp
pop ebp
jmp [_GetExplicitEntriesFromAclA]
end;
end;
{$ELSE}
function GetExplicitEntriesFromAclA; external aclapilib name 'GetExplicitEntriesFromAclA';
{$ENDIF DYNAMIC_LINK}
{$IFDEF DYNAMIC_LINK}
var
_GetExplicitEntriesFromAclW: Pointer;
function GetExplicitEntriesFromAclW;
begin
GetProcedureAddress(_GetExplicitEntriesFromAclW, aclapilib, 'GetExplicitEntriesFromAclW');
asm
mov esp, ebp
pop ebp
jmp [_GetExplicitEntriesFromAclW]
end;
end;
{$ELSE}
function GetExplicitEntriesFromAclW; external aclapilib name 'GetExplicitEntriesFromAclW';
{$ENDIF DYNAMIC_LINK}
{$IFDEF UNICODE}
{$IFDEF DYNAMIC_LINK}
var
_GetExplicitEntriesFromAcl: Pointer;
function GetExplicitEntriesFromAcl;
begin
GetProcedureAddress(_GetExplicitEntriesFromAcl, aclapilib, 'GetExplicitEntriesFromAclW');
asm
mov esp, ebp
pop ebp
jmp [_GetExplicitEntriesFromAcl]
end;
end;
{$ELSE}
function GetExplicitEntriesFromAcl; external aclapilib name 'GetExplicitEntriesFromAclW';
{$ENDIF DYNAMIC_LINK}
{$ELSE}
{$IFDEF DYNAMIC_LINK}
var
_GetExplicitEntriesFromAcl: Pointer;
function GetExplicitEntriesFromAcl;
begin
GetProcedureAddress(_GetExplicitEntriesFromAcl, aclapilib, 'GetExplicitEntriesFromAclA');
asm
mov esp, ebp
pop ebp
jmp [_GetExplicitEntriesFromAcl]
end;
end;
{$ELSE}
function GetExplicitEntriesFromAcl; external aclapilib name 'GetExplicitEntriesFromAclA';
{$ENDIF DYNAMIC_LINK}
{$ENDIF}
{$IFDEF DYNAMIC_LINK}
var
_GetEffectiveRightsFromAclA: Pointer;
function GetEffectiveRightsFromAclA;
begin
GetProcedureAddress(_GetEffectiveRightsFromAclA, aclapilib, 'GetEffectiveRightsFromAclA');
asm
mov esp, ebp
pop ebp
jmp [_GetEffectiveRightsFromAclA]
end;
end;
{$ELSE}
function GetEffectiveRightsFromAclA; external aclapilib name 'GetEffectiveRightsFromAclA';
{$ENDIF DYNAMIC_LINK}
{$IFDEF DYNAMIC_LINK}
var
_GetEffectiveRightsFromAclW: Pointer;
function GetEffectiveRightsFromAclW;
begin
GetProcedureAddress(_GetEffectiveRightsFromAclW, aclapilib, 'GetEffectiveRightsFromAclW');
asm
mov esp, ebp
pop ebp
jmp [_GetEffectiveRightsFromAclW]
end;
end;
{$ELSE}
function GetEffectiveRightsFromAclW; external aclapilib name 'GetEffectiveRightsFromAclW';
{$ENDIF DYNAMIC_LINK}
{$IFDEF UNICODE}
{$IFDEF DYNAMIC_LINK}
var
_GetEffectiveRightsFromAcl: Pointer;
function GetEffectiveRightsFromAcl;
begin
GetProcedureAddress(_GetEffectiveRightsFromAcl, aclapilib, 'GetEffectiveRightsFromAclW');
asm
mov esp, ebp
pop ebp
jmp [_GetEffectiveRightsFromAcl]
end;
end;
{$ELSE}
function GetEffectiveRightsFromAcl; external aclapilib name 'GetEffectiveRightsFromAclW';
{$ENDIF DYNAMIC_LINK}
{$ELSE}
{$IFDEF DYNAMIC_LINK}
var
_GetEffectiveRightsFromAcl: Pointer;
function GetEffectiveRightsFromAcl;
begin
GetProcedureAddress(_GetEffectiveRightsFromAcl, aclapilib, 'GetEffectiveRightsFromAclA');
asm
mov esp, ebp
pop ebp
jmp [_GetEffectiveRightsFromAcl]
end;
end;
{$ELSE}
function GetEffectiveRightsFromAcl; external aclapilib name 'GetEffectiveRightsFromAclA';
{$ENDIF DYNAMIC_LINK}
{$ENDIF}
{$IFDEF DYNAMIC_LINK}
var
_GetAuditedPermissionsFromAclA: Pointer;
function GetAuditedPermissionsFromAclA;
begin
GetProcedureAddress(_GetAuditedPermissionsFromAclA, aclapilib, 'GetAuditedPermissionsFromAclA');
asm
mov esp, ebp
pop ebp
jmp [_GetAuditedPermissionsFromAclA]
end;
end;
{$ELSE}
function GetAuditedPermissionsFromAclA; external aclapilib name 'GetAuditedPermissionsFromAclA';
{$ENDIF DYNAMIC_LINK}
{$IFDEF DYNAMIC_LINK}
var
_GetAuditedPermissionsFromAclW: Pointer;
function GetAuditedPermissionsFromAclW;
begin
GetProcedureAddress(_GetAuditedPermissionsFromAclW, aclapilib, 'GetAuditedPermissionsFromAclW');
asm
mov esp, ebp
pop ebp
jmp [_GetAuditedPermissionsFromAclW]
end;
end;
{$ELSE}
function GetAuditedPermissionsFromAclW; external aclapilib name 'GetAuditedPermissionsFromAclW';
{$ENDIF DYNAMIC_LINK}
{$IFDEF UNICODE}
{$IFDEF DYNAMIC_LINK}
var
_GetAuditedPermissionsFromAcl: Pointer;
function GetAuditedPermissionsFromAcl;
begin
GetProcedureAddress(_GetAuditedPermissionsFromAcl, aclapilib, 'GetAuditedPermissionsFromAclW');
asm
mov esp, ebp
pop ebp
jmp [_GetAuditedPermissionsFromAcl]
end;
end;
{$ELSE}
function GetAuditedPermissionsFromAcl; external aclapilib name 'GetAuditedPermissionsFromAclW';
{$ENDIF DYNAMIC_LINK}
{$ELSE}
{$IFDEF DYNAMIC_LINK}
var
_GetAuditedPermissionsFromAcl: Pointer;
function GetAuditedPermissionsFromAcl;
begin
GetProcedureAddress(_GetAuditedPermissionsFromAcl, aclapilib, 'GetAuditedPermissionsFromAclA');
asm
mov esp, ebp
pop ebp
jmp [_GetAuditedPermissionsFromAcl]
end;
end;
{$ELSE}
function GetAuditedPermissionsFromAcl; external aclapilib name 'GetAuditedPermissionsFromAclA';
{$ENDIF DYNAMIC_LINK}
{$ENDIF}
{$IFDEF DYNAMIC_LINK}
var
_GetNamedSecurityInfoA: Pointer;
function GetNamedSecurityInfoA;
begin
GetProcedureAddress(_GetNamedSecurityInfoA, aclapilib, 'GetNamedSecurityInfoA');
asm
mov esp, ebp
pop ebp
jmp [_GetNamedSecurityInfoA]
end;
end;
{$ELSE}
function GetNamedSecurityInfoA; external aclapilib name 'GetNamedSecurityInfoA';
{$ENDIF DYNAMIC_LINK}
{$IFDEF DYNAMIC_LINK}
var
_GetNamedSecurityInfoW: Pointer;
function GetNamedSecurityInfoW;
begin
GetProcedureAddress(_GetNamedSecurityInfoW, aclapilib, 'GetNamedSecurityInfoW');
asm
mov esp, ebp
pop ebp
jmp [_GetNamedSecurityInfoW]
end;
end;
{$ELSE}
function GetNamedSecurityInfoW; external aclapilib name 'GetNamedSecurityInfoW';
{$ENDIF DYNAMIC_LINK}
{$IFDEF UNICODE}
{$IFDEF DYNAMIC_LINK}
var
_GetNamedSecurityInfo: Pointer;
function GetNamedSecurityInfo;
begin
GetProcedureAddress(_GetNamedSecurityInfo, aclapilib, 'GetNamedSecurityInfoW');
asm
mov esp, ebp
pop ebp
jmp [_GetNamedSecurityInfo]
end;
end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -