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 


C# Multi level pointer

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

Joined: 10 Mar 2012
Posts: 14

PostPosted: Fri Mar 16, 2012 1:34 am    Post subject: C# Multi level pointer Reply with quote

i managed to find my pointer and offset in cheat engine tho i havnt managed to use it in c#, when i used normal pointer and offset i can find the value tho with multi level its diff.

can somebody here help me?

this is my pointer and offset
"game.exe"+00994088 4/1C8/30
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Fri Mar 16, 2012 12:41 pm    Post subject: Reply with quote

You can do something like this to read multilevel pointers:

Code:

            Int32 baseAddress = 0x005853B0;
            byte[] btBuffer = new byte[4];
            IntPtr lpOutStorage = IntPtr.Zero;
            Int32[] offsetList = new Int32[] { 0xC, 0x14, 0x0, 0x18 };

            ReadProcessMemory(p.Handle, new IntPtr(baseAddress), btBuffer, (uint)btBuffer.Length, ref lpOutStorage);

            for (UInt32 x = 0; x < (offsetList.Length - 1); x++)
            {
                baseAddress = BitConverter.ToInt32(btBuffer, 0) + offsetList[x];
                ReadProcessMemory(p.Handle, new IntPtr(baseAddress), btBuffer, (uint)btBuffer.Length, ref lpOutStorage);
            }

            baseAddress = BitConverter.ToInt32(btBuffer, 0) + offsetList[offsetList.Length - 1];

            float result = 0.0f;
            byte[] btResult = new byte[Marshal.SizeOf(result)];
            ReadProcessMemory(p.Handle, new IntPtr(baseAddress), btResult, (uint)btResult.Length, ref lpOutStorage);
            result = BitConverter.ToSingle(btResult, 0);


You can find the process using:
Code:

            Process p = (from proc in Process.GetProcesses()
                         where proc.ProcessName.ToLower() == "tutorial-i386"
                         select proc).SingleOrDefault();


Change the process name with yours.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Schwimmbad
Newbie cheater
Reputation: 0

Joined: 04 Aug 2012
Posts: 17
Location: E.T.A.-Hoffmann-Str. 54, 82418 Seehausen am Staffelsee

PostPosted: Mon Aug 06, 2012 5:24 am    Post subject: Reply with quote

I did that but I still get zero. This is my thread: viewtopic.php?p=5393209#5393209
Back to top
View user's profile Send private message AIM Address 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