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# how to write to unwriteable address

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

Joined: 10 Apr 2011
Posts: 33

PostPosted: Thu May 31, 2012 4:45 pm    Post subject: c# how to write to unwriteable address Reply with quote

I need to write an adress but it isn't writeable. how does CE make page writeable? how could I do this?
Back to top
View user's profile Send private message
Obitio
Advanced Cheater
Reputation: 0

Joined: 09 Apr 2012
Posts: 68
Location: null

PostPosted: Thu May 31, 2012 5:11 pm    Post subject: Re: c# how to write to unwriteable address Reply with quote

vnlagrla wrote:
I need to write an adress but it isn't writeable. how does CE make page writeable? how could I do this?

lol I think what you mean is that you can't write to the address with WriteProcessMemory but Cheat Engine can do that right?That's because Cheat Engine uses it's own OP and WPM and stuff through a driver.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25831
Location: The netherlands

PostPosted: Thu May 31, 2012 5:36 pm    Post subject: Reply with quote

Try using VirtualProtect(Ex) to make the page writable
_________________
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
View user's profile Send private message MSN Messenger
vnlagrla
Cheater
Reputation: 0

Joined: 10 Apr 2011
Posts: 33

PostPosted: Thu May 31, 2012 7:59 pm    Post subject: Reply with quote

Can you give me an Example of how I could make 0x402AB000 through 0x402AB00C Writeable?
I have it set up like this
Code:

[DllImport("kernel32.dll", SetLastError = true)]
static extern bool VirtualProtectEx(IntPtr hProcess, IntPtr lpAddress, int dwSize, uint flNewProtect, out uint lpflOldProtect);
       
public void makewriteable()
{
         VirtualProtectEx(ProcHandle, (IntPtr) 0x402ab000, 0xc, 0x40, "what goes here");
}

how would I set this up?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25831
Location: The netherlands

PostPosted: Thu May 31, 2012 8:29 pm    Post subject: Reply with quote

"what goes here" should be a uint variable that gets the old protection
It must be provided

e.g:
uint myvar;
and then change "what goes here" to myvar

_________________
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
View user's profile Send private message MSN Messenger
vnlagrla
Cheater
Reputation: 0

Joined: 10 Apr 2011
Posts: 33

PostPosted: Fri Jun 01, 2012 9:17 am    Post subject: Reply with quote

Thanks Dark Byte, i didn't realize i had to put out before myvar
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 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