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 


[Delphi] Getting a (basic) value of a process

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

Joined: 27 Dec 2009
Posts: 94

PostPosted: Sun Dec 27, 2009 11:24 am    Post subject: [Delphi] Getting a (basic) value of a process Reply with quote

Hi guys,

I've got a problem on getting that address:

Please look up the img: img682.imageshack.us/img682/3632/that.png

I mean that solitaire.exe and where can i find the exact value/address? Is that the allocationbase?
And how can i get it in Delphi?

Thats all because i cannot get the right multi-level pointer of Win7 Solitaire -.-

So the only way was a pointer like that i posted(solitaire.exe + (...)) but coding that is for me a problem because i dunno how CE manages to get the address of solitaire .exe


Thx for help, xenico Very Happy
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Sun Dec 27, 2009 11:35 am    Post subject: Reply with quote

GetModuleHandle('solitaire.exe');

or if you're not already in the process then you can use the tlhelp32 functions
Back to top
View user's profile Send private message
Xenico
Advanced Cheater
Reputation: 0

Joined: 27 Dec 2009
Posts: 94

PostPosted: Mon Dec 28, 2009 7:30 am    Post subject: Reply with quote

Okay if i do this the returned value is 0. I think it failed Sad.
My code looks like this.
Code:
procedure TForm1.BtnAttachClick(Sender: TObject);
begin
  HandleWindow := GetProcess('Solitaire.exe');
  Base :=GetModuleHandle('Solitaire.exe');
  Showmessage(inttohex(Base, 6));
  if (HandleWindow <> 0) then label1.caption := 'OK!' else label1.caption := 'Attaching failed!';
end;


HandleWindow and Base are both global integer variables. So what's wrong?
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Mon Dec 28, 2009 8:45 am    Post subject: Reply with quote

Should it be THandle ?
Back to top
View user's profile Send private message
Xenico
Advanced Cheater
Reputation: 0

Joined: 27 Dec 2009
Posts: 94

PostPosted: Tue Dec 29, 2009 4:02 am    Post subject: Reply with quote

I tried it now with Base as a THandle var, but its still the same effect...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming 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