Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Cheat Engine Process

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
vegettadbz
Cheater
Reputation: 0

Joined: 01 Dec 2010
Posts: 28

PostPosted: Wed Dec 01, 2010 1:38 am    Post subject: Cheat Engine Process Reply with quote

Hello guys!
First of all, congratulations for your work and your site. It is really good. Smile
I am new here and i need your help. I am using cheat engine for 2 years now. I am not an expert but a know some things. The last days i am dealing with a problem. The game i am trying to hack appears twice in the process list. It looks like this.
00000C64- Game.exe
00000E40- Game.exe
I know that the second process is the real one that i need. I have made the hacks and they work fine. But when i am trying to generate the trainer, for some reason cheat engine doesn't let me pick up the second one .exe process. I don't know if the problem is cheat engine or game, since i have never had a situation like this.
Can you please help me? Thanks. Smile
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25788
Location: The netherlands

PostPosted: Wed Dec 01, 2010 9:53 am    Post subject: Reply with quote

The trainer only picks the first one. Not much to do about that right now except recompile the trainer maker part of ce yourself and change the processlist scan so it scans from bottom to top
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
vegettadbz
Cheater
Reputation: 0

Joined: 01 Dec 2010
Posts: 28

PostPosted: Wed Dec 01, 2010 10:26 am    Post subject: Reply with quote

How can I do that? I don't know too much, so can you help me? I hope it is easy *cross fingers*...:/
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25788
Location: The netherlands

PostPosted: Wed Dec 01, 2010 10:34 am    Post subject: Reply with quote

I can't do it because I don't have delphi installed right now.

Anyhow, you will need to get delphi 7 enterprise
Then get the ce sourcecode (preferably from the svn)
and edit standalone\MemoryTrainerUnit.pas

search for
Code:

procedure TFrmMemoryTrainer.checkforprocess;
Var SNAPHandle: THandle;
    ProcessEntry: ProcessEntry32;
    Check: Boolean;
    FullProcessName,ProcessName: String;
    I: Integer;
 
begin
  SNAPHandle:=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
  If SnapHandle>0 then
  begin
    ProcessEntry.dwSize:=SizeOf(ProcessEntry);
    Check:=Process32First(SnapHandle,ProcessEntry);
    while check=true do
    begin
      ProcessName:='';
      FullProcessName:='';
      FullProcessName:=processentry.szExeFile;
      i:=Length(FullProcessName);
      while (i>0) and (FullProcessname[i-1]<>'\') do dec(i);
      processname:=copy(FullProcessName,i,length(FullProcessname)-i+1);

      if uppercase(processname)=uppercase(process) then
      begin
        processhandler.ProcessID:=ProcessEntry.th32ProcessID;
        btnLaunch.Enabled:=false;

        if processhandle=0 then
          processhandler.processhandle:=openprocess(process_all_access,false,processid);

        symhandler.showmodules:=true;
        symhandler.showsymbols:=true;
        symhandler.reinitialize;

        reinterpretaddresses;       
        exit;
      end;

      check:=Process32Next(SnapHandle,ProcessEntry);
    end;
  end;

  if processhandle<>0 then closehandle(processhandle);
  processhandler.processhandle:=0;
  btnLaunch.Enabled:=true;
end;

and replace it with
Code:

procedure TFrmMemoryTrainer.checkforprocess;
Var SNAPHandle: THandle;
    ProcessEntry: ProcessEntry32;
    Check: Boolean;
    FullProcessName,ProcessName: String;
    I: Integer;

    besttargetid: dword;
begin
  besttarget:=0;
  SNAPHandle:=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
  If SnapHandle>0 then
  begin
    ProcessEntry.dwSize:=SizeOf(ProcessEntry);
    Check:=Process32First(SnapHandle,ProcessEntry);
    while check=true do
    begin
      ProcessName:='';
      FullProcessName:='';
      FullProcessName:=processentry.szExeFile;
      i:=Length(FullProcessName);
      while (i>0) and (FullProcessname[i-1]<>'\') do dec(i);
      processname:=copy(FullProcessName,i,length(FullProcessname)-i+1);

      if uppercase(processname)=uppercase(process) then
      begin
        besttarget:=ProcessEntry.th32ProcessID;
      end;

      check:=Process32Next(SnapHandle,ProcessEntry);
    end;
  end;

  if besttarget<>0 then
  begin
    processhandler.ProcessID:=besttarget;
    btnLaunch.Enabled:=false;

    if processhandle=0 then
      processhandler.processhandle:=openprocess(process_all_access,false,processid);

    symhandler.showmodules:=true;
    symhandler.showsymbols:=true;
    symhandler.reinitialize;

    reinterpretaddresses;       
    exit;
  end;

  if processhandle<>0 then closehandle(processhandle);
  processhandler.processhandle:=0;
  btnLaunch.Enabled:=true;
end;


now BUILD trainerwithassembler.dpr
and when that has finished successfully BUILD cheatengine.dpr

now you can create trainers that pick the last process in the list with the specified name instead of the first one

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
vegettadbz
Cheater
Reputation: 0

Joined: 01 Dec 2010
Posts: 28

PostPosted: Thu Dec 02, 2010 4:49 am    Post subject: Reply with quote

Unfortunately i don't know how to use delphi. Is there an alternative method? :/
Back to top
View user's profile Send private message
SFP+
Comp. talk moderator
Reputation: 26

Joined: 02 May 2007
Posts: 1228
Location: Sweden

PostPosted: Fri Dec 03, 2010 3:27 am    Post subject: Reply with quote

vegettadbz wrote:
Unfortunately i don't know how to use delphi. Is there an alternative method? :/
He just told there isn't, you don't need to know how to use Delphi at all. Simply download delphi enterprise,
go to the folder standalone\
open MemoryTrainerUnit.pas
look for the 'text'
replace with the new text
open trainerwithassembler.dpr
BUILD the file (there's a tab for it in the program)
open cheatengine.dpr
BUILD the file

Capish?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites