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 


What is the very basic c# code I need to use this pointer?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
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 3:27 am    Post subject: What is the very basic c# code I need to use this pointer? Reply with quote

Having found pitch in Amnesia, I want to change it using c#.

What is the very basic code I need to use the pointer being shown in the image to change the value the pointer in the image points to?

So I was using

Code:

Process[] aProcesses = Process.GetProcessesByName("Amnesia");
            if (aProcesses.Length != 0) //If the process exists
            {
                memoryaddress = 0x00341C18;
                Process p = aProcesses[0];
                Int32 baseAddress = 0x00341C18;
                byte[] btBuffer = new byte[4];
                IntPtr lpOutStorage = IntPtr.Zero;
                Int32[] offsetList = new Int32[] { 0x28, 0x50, 0x1c, 0x4, 0x39c };
                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);
                label1.Text = "Neigung: " + BitConverter.ToSingle(btResult, 0);
            }


to read, but I always get 0.
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 -> Cheat Engine 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