i think that freezing a value is more simple
i think that all we need is put our code in a timer
set its interval
is this ok ???
i think that freezing a value is more simple
i think that all we need is put our code in a timer
set its interval
is this ok ???
Hey all,
Before the major website update, ive asked how to read the value of an specific, multi level pointer.
for example;
Address 03D7C4C4 with offset 3B8 ---> 03D7C87C
And so on...
So I want to read the address that's pointed by the previous pointer using the offset.
MrSmith posted an perfect code snippet, but after the update, the post was vanished.
Thanks in advance!
It works something like this
Code:Procedure readpointer; var BytesRead : Cardinal; myVar : Cardinal; EndVar : Integer // example, it could be anything byte, cardinal etc.. myHandle, PID : Integer; begin myHandle := FindWindow("classname here", "windowtitle here") // if you only know window title, use nil for classname PID := GetWindowThreadProcessId(myHandle, PID); myHandle := OpenProcess (PROCESS_ALL_ACCESS, False, PID); If PID <> 0 Then begin ReadProcessMemory(myHandle, Ptr(pointer address here), @myVar, SizeOf(myVar), BytesRead); ReadProcessMemory(myHandle, Ptr(myVar + offset), @myVar, SizeOf(myVar), BytesRead); ReadProcessMemory(myHandle, Ptr(myVar + offset2), @myVar, SizeOf(myVar), BytesRead); // it can continue as far as the pointer goes. ReadProcessMemory(myHandle, Ptr(myVar), @EndVar, SizeOf(EndVar), BytesRead); Result := EndVar end else ShowMessage ('There was some error'); end;
Ever Danced With The Devil By The Pale Moonlight ?
i am very newbie delphi ;x
It's advised to read a few tutorials on coding with delphi
Ever Danced With The Devil By The Pale Moonlight ?
Thanx MrSmith.
It was just the snippet i was searching for.
However, I got an few errors;
-There is no overloaded version of 'GetWindowThreadProcessId' that can be called with these arguments.
-Declaration expected, but end of file found (witch I don't understand, since there is nothing after "end;"
-Undeclared identifier: 'Result'
----edit----
I fixed the end of file error
----edit----
Maybe you can clear some code up, with explanation offcourse since i'm still learning
Thanx in advance!
---------- Post added at 02:36 PM ---------- Previous post was at 11:10 AM ----------
I've managed to get rid of the errors, but the code's result seem to return a zero
every time, no matter what game is loaded.
Is there something i'm missing?
Last edited by boredtc; 2011-08-06 at 12:17 PM.
You need the pointers/addresses of the value's you wish to read, if you copy and paste your code i can take a look for you
Ever Danced With The Devil By The Pale Moonlight ?
Hey, thanks for the fast reply.
I know the right pointer + offsets, but whatever i do, it gives me the big 0 as result.
As i was forced to make an new account, i'm not yet able to post code snippets, but after the 3rd post i should be :P
Thanks
---------- Post added at 03:34 PM ---------- Previous post was at 03:32 PM ----------
Code:var Form1: TForm1; BytesRead : Cardinal; myVar : Cardinal; EndVar : Cardinal; //it could be anything byte, cardinal etc.. myHandle : Integer; PID : integer; Result : Integer; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); begin myHandle := FindWindow(nil, 'Game name window'); if myHandle = 0 then begin MessageDlg ('The game is not loaded in memory, try again...', mtwarning,[mbOK],0); end; PID := GetWindowThreadProcessId(myHandle, @PID); myHandle := OpenProcess (PROCESS_ALL_ACCESS, False, PID); ReadProcessMemory(myHandle, Ptr($3D7C4C4), @myVar, SizeOf(myVar), BytesRead); ReadProcessMemory(myHandle, Ptr(myVar + $3B8), @myVar, SizeOf(myVar), BytesRead); ReadProcessMemory(myHandle, Ptr(myVar + $120), @myVar, SizeOf(myVar), BytesRead); ReadProcessMemory(myHandle, Ptr(myVar + $7C), @myVar, SizeOf(myVar), BytesRead); ReadProcessMemory(myHandle, Ptr(myVar + $14), @myVar, SizeOf(myVar), BytesRead); ReadProcessMemory(myHandle, Ptr(myVar + $268), @myVar, SizeOf(myVar), BytesRead); ReadProcessMemory(myHandle, Ptr(myVar), @EndVar, SizeOf(EndVar), BytesRead); Result := EndVar; showMessage (IntToStr(result)); end; end.
Ok here you haven't defined the correct window to search memory for, you need to change 'Game name window' to the title of your game This should resolve your problem.
Also what kind of value are you reading ? hp ? level ? exp etc.. ?
Ever Danced With The Devil By The Pale Moonlight ?
Hmm, and in this case, how can we make a multilevel pointer retrieving cardinal.
In this case Aion works at this base.
Process. aion.bin
BaseOffset: Game.dll
with offsets it will result in
Game.dll+OFFSET, that will work with the rest of the offsets in game, including multilevel offsets.
Game.dll+OFFSET+OFFSET1+OFFSET2...
And the same logic has for retriving HexToString...
And guidenance ?