delphi写内存问题
我用CE搜索微软自带扫雷雷数地址是00F68250用WriteProcessMemory这么写内存可以把雷数固定在1个!就是怎么写整数内存...
我用CE搜索微软自带扫雷 雷数地址是00F68250
用WriteProcessMemory这么写内存 可以把雷数固定在1个!
就是怎么写整数内存 展开
用WriteProcessMemory这么写内存 可以把雷数固定在1个!
就是怎么写整数内存 展开
展开全部
procedure WriteMem(cls,win:PChar;badr:Integer;v:Pointer;size:Integer);
var
n,pid,hprocess:Cardinal;
begin
GetWindowThreadProcessId(FindWindow(cls,win),pid);
hprocess:=OpenProcess(PROCESS_ALL_ACCESS,False,pid);
if hprocess<>0 then
begin
WriteProcessMemory(hprocess,Pointer(badr),v,size,n);
CloseHandle(hprocess);
end;
end;
procedure ReadMem(cls,win:PChar;badr:Integer;v:Pointer;size:Integer);
var
n,pid,hprocess:Cardinal;
begin
GetWindowThreadProcessId(FindWindow(cls,win),pid);
hprocess:=OpenProcess(PROCESS_ALL_ACCESS,False,pid);
if hprocess<>0 then
begin
ReadProcessMemory(hprocess,Pointer(badr),v,size,n);
CloseHandle(hprocess);
end;
end;
procedure TForm1.Button2Click(Sender:TObject);
var
i:Integer;
begin
ReadMem('扫雷',nil,$10052C4,@i,4);
mmo1.Lines.Add(IntToStr(i));
Dec(i,3);
WriteMem('扫雷',nil,$10052C4,@i,4);//设置雷数
// WriteMem('扫雷',nil,$1005A60,@i,4);//剩余雷数
mmo1.Lines.Add(IntToStr(i));
end;
var
n,pid,hprocess:Cardinal;
begin
GetWindowThreadProcessId(FindWindow(cls,win),pid);
hprocess:=OpenProcess(PROCESS_ALL_ACCESS,False,pid);
if hprocess<>0 then
begin
WriteProcessMemory(hprocess,Pointer(badr),v,size,n);
CloseHandle(hprocess);
end;
end;
procedure ReadMem(cls,win:PChar;badr:Integer;v:Pointer;size:Integer);
var
n,pid,hprocess:Cardinal;
begin
GetWindowThreadProcessId(FindWindow(cls,win),pid);
hprocess:=OpenProcess(PROCESS_ALL_ACCESS,False,pid);
if hprocess<>0 then
begin
ReadProcessMemory(hprocess,Pointer(badr),v,size,n);
CloseHandle(hprocess);
end;
end;
procedure TForm1.Button2Click(Sender:TObject);
var
i:Integer;
begin
ReadMem('扫雷',nil,$10052C4,@i,4);
mmo1.Lines.Add(IntToStr(i));
Dec(i,3);
WriteMem('扫雷',nil,$10052C4,@i,4);//设置雷数
// WriteMem('扫雷',nil,$1005A60,@i,4);//剩余雷数
mmo1.Lines.Add(IntToStr(i));
end;
大雅新科技有限公司
2024-11-19 广告
2024-11-19 广告
这方面更多更全面的信息其实可以找下大雅新。深圳市大雅新科技有限公司从事KVM延长器,DVI延长器,USB延长器,键盘鼠标延长器,双绞线视频传输器,VGA视频双绞线传输器,VGA延长器,VGA视频延长器,DVI KVM 切换器等,优质供应商,...
点击进入详情页
本回答由大雅新科技有限公司提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询