简体   繁体   English

使用变量地址读取另一个进程的内存

[英]read memory of another process using address of variable

I want to read memory of process A but when the process A is disposed. 我想读取进程A的内存,但是当处理进程A时。 I have run A, it displays address of some variable, I closed it. 我已经运行了A,它显示了一些变量的地址,我关闭了它。

I have run B where I input address of A's variable. 我已经运行了B输入A变量的地址。 It causes error "Access violation...". 它会导致错误“访问冲突...”。

I use Borland C++ builder and Windows 7. 我使用Borland C ++ builder和Windows 7。

Is there any way to watch ram when process is closed? 在关闭过程时有没有办法观察ram? Maybe some tools will help me. 也许一些工具会帮助我。 Could you give me names of tools to read memory by absolute address after memory deallocation? 你可以给我一些工具名称,以便在内存释放后按绝对地址读取内存吗?
Maybe it should be some sort of leak detectors? 也许它应该是某种泄漏探测器?

关闭之后我不知道,但是在运行时,可以将ReadProcessMemory()CreateRemoteThread

On most systems, separate processes exist in completely separate virtual address spaces . 在大多数系统上,完全独立的虚拟地址空间中存在单独的进程。 The pointers you see in one process are completely meaningless in another. 你在一个过程中看到的指针在另一个过程中完全没有意义。

Consequently, you have to explicitly share memory if you want to do this; 因此,如果你想这样做,你必须明确地共享内存; I'm no Windows expert, but I believe that CreateSharedMemory() may be what you need. 我不是Windows专家,但我相信CreateSharedMemory()可能就是你所需要的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM