Skip to main content
Tweeted twitter.com/StackSoftEng/status/1375779646147604483
added 12 characters in body
Source Link
lennon310
  • 3.2k
  • 7
  • 19
  • 35

The title really says it all, I want to have all the readable memory of another process in a buffer. I understand that I will have to use ReadProcessMemory()ReadProcessMemory(), but If I'm correct I can't just use one call to ReadProcessMemoryReadProcessMemory() starting from address 0 for example, because there would be addresses that are non readable in the range. I

I have one idea, which I believe should work, I would like to know if this is an actual solution and if there are any better solutions.

My idea would be to start from address 0 and use VirtualQueryExVirtualQueryEx to check if the current range is readable, if yes I read it, and in both cases I jump forward the size of the range, and repeat until VirtualQueryExVirtualQueryEx returns that my address is too high.

Would this actually get all the memory? Is there a better/different method?

The title really says it all, I want to have all the readable memory of another process in a buffer. I understand that I will have to use ReadProcessMemory(), but If I'm correct I can't just use one call to ReadProcessMemory starting from address 0 for example, because there would be addresses that are non readable in the range. I have one idea, which I believe should work, I would like to know if this is an actual solution and if there are any better solutions.

My idea would be to start from address 0 and use VirtualQueryEx to check if the current range is readable, if yes I read it, and in both cases I jump forward the size of the range, and repeat until VirtualQueryEx returns that my address is too high.

Would this actually get all the memory? Is there a better/different method?

The title really says it all, I want to have all the readable memory of another process in a buffer. I understand that I will have to use ReadProcessMemory(), but If I'm correct I can't just use one call to ReadProcessMemory() starting from address 0 for example, because there would be addresses that are non readable in the range.

I have one idea, which I believe should work, I would like to know if this is an actual solution and if there are any better solutions.

My idea would be to start from address 0 and use VirtualQueryEx to check if the current range is readable, if yes I read it, and in both cases I jump forward the size of the range, and repeat until VirtualQueryEx returns that my address is too high.

Would this actually get all the memory? Is there a better/different method?

Source Link

How to read all the memory of another process in windows?

The title really says it all, I want to have all the readable memory of another process in a buffer. I understand that I will have to use ReadProcessMemory(), but If I'm correct I can't just use one call to ReadProcessMemory starting from address 0 for example, because there would be addresses that are non readable in the range. I have one idea, which I believe should work, I would like to know if this is an actual solution and if there are any better solutions.

My idea would be to start from address 0 and use VirtualQueryEx to check if the current range is readable, if yes I read it, and in both cases I jump forward the size of the range, and repeat until VirtualQueryEx returns that my address is too high.

Would this actually get all the memory? Is there a better/different method?