ReadProcessMemory fails on some Pages (GetLastError()=299)

前端 未结 2 497
借酒劲吻你
借酒劲吻你 2021-01-06 11:48

I try to read all commited pages of a process (Win7-64). On most pages it works but it fails for a few pages. I cannot explain why. Here is my test programme (compiled x32,

2条回答
  •  青春惊慌失措
    2021-01-06 12:32

    The page size on 32-bit Windows is not the same as the page size on 64-bit Windows. Therefore, the page size is a per-process value. The page size for your process is not necessarily the same as the page size of the process you are reading from. Use the RegionSize member of the MEMORY_BASIC_INFORMATION instead. That is the actual size of the affected region.

提交回复
热议问题