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 


[Help!] Readprocessmemory

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
onlyus
Newbie cheater
Reputation: 0

Joined: 27 Aug 2011
Posts: 19
Location: 214214

PostPosted: Sat Aug 27, 2011 3:01 pm    Post subject: [Help!] Readprocessmemory Reply with quote

hi everyone my english not good sorry
i'm made memory editer but.. problem

Down plz !

/// Script
procedure TForm1.Button1Click(Sender: TObject);
var
hProcess,HandleWindow: THandle;
ProcessID,temp:cardinal;
buf: Pointer;
begin
HandleWindow :=FindWindow('notepad',Nil);
if HandleWindow = 0 then begin
Showmessage('not found')
;Exit;
end;
GetWindowThreadProcessId(HandleWindow,@ProcessID);
hProcess := OpenProcess(PROCESS_ALL_ACCESS,FALSE,ProcessID);
Getmem(buf,4);
readprocessmemory(hProcess,ptr($01003E21),buf,4, temp);
showmessage(String(buf));
freemem(buf);
CloseHandle(hProcess);
End;
End.
////
this script working but
showmessage(String(buf)); // <
messagebox content " !@$5%%^ "
i'm want integer (EX: 1,2,3,4~~~)
help me plz !!

_________________
i'm noob
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Sat Aug 27, 2011 3:22 pm    Post subject: Reply with quote

do:

showmessage(inttostr(pinteger(buf)^));

what it does:
typecast buf to a integerpointer: (pinteger(buf))
then dereference the pointer to a integer (^)
and then convert the integer to a string (inttostr)

_________________
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
onlyus
Newbie cheater
Reputation: 0

Joined: 27 Aug 2011
Posts: 19
Location: 214214

PostPosted: Sat Aug 27, 2011 3:27 pm    Post subject: thanks Reply with quote

thanks!
_________________
i'm noob
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
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