Ai
1 Star 0 Fork 0

phy0292/cheat-engine

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
AccessCheck.pas 1.48 KB
一键复制 编辑 原始数据 按行查看 历史
cheat-engine 提交于 2019-12-20 00:49 +08:00 . Fix registry issues
unit AccessCheck;
{obsolete, all files are now in the user or temp folder}
{$MODE Delphi}
{
This unit will contain routines to be used for testing and verifying that ce has
the required access needed.
FileAccessTest is the main routine
}
interface
uses LCLIntf, SysUtils, classes, forms, CEFuncProc, NewKernelHandler;
procedure FileAccessTest;
implementation
uses Globals;
resourcestring
rsNoFileCreationRightsOrNoFileOverwriteRights = 'No file creation rights or no file overwrite rights';
rsNoFileModificationRights = 'No file modification rights';
rsNoFileDeletionRights = 'No file deletion rights';
rsNoDeleteRights = 'No delete rights';
rsButYouDoHaveModifyRights = 'But you do have modify rights';
procedure FileAccessTest;
var f: tfilestream;
begin
try
f:=TFilestream.Create(CheatEngineDir+'accesscheck.tmp', fmCreate);
try
f.WriteBuffer(rsNoDeleteRights+#13#10,18);
finally
f.Free;
end;
except
raise exception.Create(rsNoFileCreationRightsOrNoFileOverwriteRights);
end;
try
f:=TFilestream.Create(CheatEngineDir+'accesscheck.tmp', fmOpenReadWrite);
try
f.Seek(0,soFromEnd);
f.WriteBuffer(rsButYouDoHaveModifyRights+#13#10,31);
finally
f.free;
end;
except
raise exception.Create(rsNoFileModificationRights);
end;
if not deletefile(CheatEngineDir+'accesscheck.tmp') then
raise exception.Create(rsNoFileDeletionRights);
end;
end.
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/phy0292/cheat-engine.git
git@gitee.com:phy0292/cheat-engine.git
phy0292
cheat-engine
cheat-engine
master

搜索帮助