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 


Memory Access Violation

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
nero1232
Advanced Cheater
Reputation: 0

Joined: 08 Mar 2017
Posts: 65

PostPosted: Mon Mar 13, 2017 10:46 am    Post subject: Memory Access Violation Reply with quote

Hi,

I created a memory location and am trying to access it through my c# prog but I am getting an error:

"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

Here is my code:

Code:


                    IntPtr processHandle = OpenProcess(PROCESS_WM_READ, false, pro.Id);

                    int bytesRead = 0;
                    byte[] buffer = new byte[8]; //may need to increase


                    // 0x7FF7EEE60000 is the address
                    ReadProcessMemory((int)processHandle, 0x7FF7FC8A0000, buffer, buffer.Length, ref bytesRead);

                    Console.WriteLine(Encoding.Unicode.GetString(buffer) +
                       " (" + bytesRead.ToString() + "bytes)");
                    Console.ReadLine();



The process opens fine and crashes on the ReadProcessMemory line. The address 7FF7FC8A0000 I have showing in Cheat engine and it is definitely populated with the data that I want (pointer address).

Any ideas why I can't access it?

Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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