 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
Epz Newbie cheater
Reputation: 0
Joined: 01 Jul 2012 Posts: 23
|
Posted: Sun Dec 01, 2013 4:52 pm Post subject: Multilevel Pointer |
|
|
I've checked out the tutorials etc. About a year ago I got it work correctly with C#, but now... What the...
What's wrong guys?
Code: |
[DllImport("kernel32.dll")]
public static extern int ReadProcessMemory(int hProcess, int lpBaseAddress, byte[] lpBuffer, int dwSize, out int lpNumberOfBytesRead);
bytesRead = 0;
int BaseAddr1 = 0x013398F3;
int Offset1 = 0x18C;
int Addr1 = ReadProcessMemory((int)nProcHandle, BaseAddr1, Buff, Buff.Length, out bytesRead);
int Addr2 = ReadProcessMemory((int)nProcHandle, Addr1 + Offset1, Buff, Buff.Length, out bytesRead);
int Addr3 = ReadProcessMemory((int)nProcHandle, Addr2, Buff, Buff.Length, out bytesRead); |
Whatever convert style I use I can't get same result than cheat engine does result (in 4bytes value): 1155350528 (in CE)
E: I really tried many times, but... pffft... getting kinda angry, because I don't just get the result I want to. Sadly I've thrown all of my old sources to trash bin :/
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25785 Location: The netherlands
|
Posted: Sun Dec 01, 2013 5:01 pm Post subject: |
|
|
ReadProcessMemory returns a boolean, not a value. Buff contains the value instead
_________________
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 |
|
 |
Epz Newbie cheater
Reputation: 0
Joined: 01 Jul 2012 Posts: 23
|
Posted: Sun Dec 01, 2013 5:13 pm Post subject: |
|
|
Oh. I fixed it, by converting everything after found result. If someone is finding a answer it's this:
Code: | ReadProcessMemory((int)nProcHandle, BaseAddr1, Buff, Buff.Length, out bytesRead);
int Addr1 = BitConverter.ToInt32(Buff, 0);
ReadProcessMemory((int)nProcHandle, Addr1 + Offset1, Buff, Buff.Length, out bytesRead);
int Addr2 = BitConverter.ToInt32(Buff, 0);
ReadProcessMemory((int)nProcHandle, Addr2, Buff, Buff.Length, out bytesRead); |
E: Thank you Dark Byte.
|
|
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
|
|