Frage:
Wie würde man den untenstehenden Quelltext schreiben, ohne absolute zu verwenden?
Delphi-Quellcode:
type
//aus jwaACLui.pas
PSI_ACCESS = ^SI_ACCESS;
{$EXTERNALSYM PSI_ACCESS}
_SI_ACCESS = record
pguid: LPGUID;
mask: ACCESS_MASK;
pszName: LPCWSTR; // may be resource ID
dwFlags: DWORD;
end;
{$EXTERNALSYM _SI_ACCESS}
SI_ACCESS = _SI_ACCESS;
{$EXTERNALSYM SI_ACCESS}
TSiAccess = SI_ACCESS;
PSiAccess = PSI_ACCESS;
function GetAccessNames(out iCount : Cardinal): PSI_ACCESS;
var siArr : array of SI_ACCESS absolute result;
i : Cardinal;
begin
iCount := 32;
GetMem(result, Sizeof(si) * iCount);
{result = siArr}
for i := 0 to iCount -1 do
begin
hier zugriff auf siArr[i] ganz leicht
end;
end;