 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
steelblob Newbie cheater
Reputation: 0
Joined: 13 Dec 2006 Posts: 10
|
Posted: Fri Dec 15, 2006 10:48 am Post subject: Getting a pointer in C++ |
|
|
How would I go about getting the address of my pointer, (DMA) value, through C++.
I know people have done it through Delphi
| Quote: |
Function GetAddyfrmpointer(baseaddress:dword;offset:dword):dword;
var a: dword;
x: dword;
i: integer;
offsetcount: integer;
offsets:array of dword;
b:integer;
maxid:integer;
begin
offsetcount:=1;
b:=0;
setlength(offsets,1);
offsets[b]:=offset;
a:=baseaddress;
i:=0;
while (i<offsetcount) do
begin
if not readprocessmemory(processhandle,pointer(a),@a,4,x) then exit;
inc(a,offsets[i]);
inc(i);
result:=a
end;
end;
|
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25835 Location: The netherlands
|
Posted: Fri Dec 15, 2006 2:59 pm Post subject: |
|
|
example for a level3 pointer: (not sure it works, writing it here out of my head and not checking it's actually valid)
| Code: |
int offsets[3]={0x3b,0x20,0x22}; //lets say you have these 3 offsets
unsigned int address=0x00800000; //lets say your basepointer was at 00800000
int i;
i=0;
while (i<offsetcount)
{
if (!ReadProcessMemory(processhandle,(PVOID)address,4,&address,NULL))
return -1; //error found
address=address+offsets[i];
i++;
}
return address;
|
_________________
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 |
|
 |
|
|
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
|
|