Skip to content

Commit

Permalink
Update fileaccess.pas
Browse files Browse the repository at this point in the history
  • Loading branch information
rzndsa authored Aug 20, 2016
1 parent f35cb2a commit b7e0618
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Cheat Engine/fileaccess.pas
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ procedure MakePathAccessible(path: widestring);

implementation

resourcestring
rsNoGetNamedSecurityInfo = 'no GetNamedSecurityInfo';
rsNoGetSecurityInfo = 'no GetSecurityInfo';
rsNoSetEntriesInAcl = 'no SetEntriesInAcl';
rsNoSetNamedSecurityInfo = 'no SetNamedSecurityInfo';

const SECURITY_WORLD_SID_AUTHORITY: TSidIdentifierAuthority = (Value: (0, 0, 0, 0, 0, 1));

type
Expand Down Expand Up @@ -70,10 +76,10 @@ procedure MakePathAccessible(path: widestring);
GetSecurityInfo:=getprocaddress(advapi, 'GetSecurityInfo');
SetEntriesInAcl:=getprocaddress(advapi, 'SetEntriesInAclW');
SetNamedSecurityInfo:=getprocaddress(advapi, 'SetNamedSecurityInfoW');
if not assigned(GetNamedSecurityInfo) then raise exception.create('no GetNamedSecurityInfo');
if not assigned(GetSecurityInfo) then raise exception.create('no GetSecurityInfo');
if not assigned(SetEntriesInAcl) then raise exception.create('no SetEntriesInAcl');
if not assigned(SetNamedSecurityInfo) then raise exception.create('no SetNamedSecurityInfo');
if not assigned(GetNamedSecurityInfo) then raise exception.create(rsNoGetNamedSecurityInfo);
if not assigned(GetSecurityInfo) then raise exception.create(rsNoGetSecurityInfo);
if not assigned(SetEntriesInAcl) then raise exception.create(rsNoSetEntriesInAcl);
if not assigned(SetNamedSecurityInfo) then raise exception.create(rsNoSetNamedSecurityInfo);
// showmessage(advancedoptionsunit.strcouldntrestorecode);
//function CreateFile(lpFileName:LPCSTR; dwDesiredAccess:DWORD; dwShareMode:DWORD; lpSecurityAttributes:LPSECURITY_ATTRIBUTES; dwCreationDisposition:DWORD;dwFlagsAndAttributes:DWORD; hTemplateFile:HANDLE):HANDLE; external 'kernel32' name 'CreateFileA';
// z:=0;
Expand Down

0 comments on commit b7e0618

Please sign in to comment.