 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
yazigegeda Expert Cheater
Reputation: 0
Joined: 22 Jan 2019 Posts: 183
|
Posted: Tue Sep 15, 2020 7:52 am Post subject: How to use allocateMemory? |
|
|
| Quote: |
allocateMemory(size, BaseAddress OPTIONAL, Protection OPTIONAL): Allocates some memory into the target process
deAlloc(address, size OPTIONAL): Frees allocated memory
|
Can you focus on the Protection OPTIONAL parameter? Sample code is best
:?
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Tue Sep 15, 2020 3:58 pm Post subject: |
|
|
Protection uses the Windows allocator constants for memory page protections which can be found here:
https://docs.microsoft.com/en-us/windows/win32/memory/memory-protection-constants
The default, when not given as it is optional, is PAGE_EXECUTE_READWRITE.
An example of that is:
| Code: |
allocateMemory(1024, 0x00400000, 0x40);
|
this will attempt to allocate 1024 bytes of memory at, or near, the address of 0x00400000 with the protection flags of 0x40 (PAGE_EXECUTE_READWRITE).
Keep in mind that both the base address and protection are optional parameters and can be ignored unless you require them for some reason. In the majority of cases, you should never need to use them though.
_________________
- Retired. |
|
| 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
|
|