Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法知道我可以使用 ReadProcessMemory 从另一个进程读取多少内存? 如果我尝试从特定地址读取太多内存,它将返回错误代码 299,并且将读取 0 个字节。 我猜这是因为我试图读取超出进程分配的缓冲区。
据我所知,唯一的方法是尝试阅读它。ReadProcessMemory如果您要读取的内存块在进程中不能完全访问,则将返回 0,例如,它的一部分未分配。
ReadProcessMemory
使用较小的nSize(1024 或 512 甚至 1)是一种解决方法。
nSize