Hi,
I'm using JEDI WSCL to change permissions on a folder during installation. When compiling without Optimization, and with Range Checking, I get a rangecheck when setting the new Access Control List.
procedure SetFilePermissions(const folder: string);
var
FileObject: TJwSecureFileObject;
DACL: TJwDAccessControlList;
begin
FileObject := TJwSecureFileObject.Create(folder);
try
DACL := FileObject.DACL;
JwInitWellknownSIDs;
DACL.Add(TJwDiscretionaryAccessControlEntryAllow.Create(nil, [afObjectInheritAce], GENERIC_ALL, JwWorldSID, false));
FileObject.SetDACL(DACL);
finally
FileObject.Free;
end;
end;
It lookes like it comes from function TJwSecurityId.CreateCopyOfSID( ) in JwsclSid.pas, but I can not find out why.
Do anybody have any clue?
I'm using Delphi 2007, btw, and the wscl code is the latest from sourceforge.
regards,
-Vegar