Reading memory that belongs to another process on Windows
2 ビュー (過去 30 日間)
古いコメントを表示
Suppose I have another process running on Windws. That process is stopped in the debugger (Visual Studio). Visual Studio does not have a means of dumping the contents of specified memory locations into a file. However, Visual Studio will tell me the starting address in memory for the data.
Is there a way that Matlab can take a process i.d., a starting address and the number of bytes and read the memory from the process and load it into a Matlab variable / array? Then I would want to have Matlab read this data as 4-byte integer data and give me an array of the integers.
Is there anything that has to be set on the other process to make its memory readable of can Matlab read memory that belongs to any other process?
Thank you for your replies. This would be enormously cool if it worked.
Linda Seltzer
0 件のコメント
回答 (2 件)
James Tursa
2012 年 7 月 23 日
No. In general, the memory of one process cannot be accessed by another process. There are ways to pass data such as the address itself across (e.g., a COM link ala the MATLAB Engine etc), but the address of one process means nothing to the other process and will not map correctly to the memory you are trying to access (you will likely get a seg fault if you try it).
6 件のコメント
James Tursa
2012 年 7 月 23 日
Am I to understand from your comment below that you cannot modify the C/C++ program? This would be required to add the code for the MATLAB Engine.
Walter Roberson
2012 年 7 月 23 日
Can COM be used to control Visual Studios? And can Visual Studios, so controlled, report back memory contents?
Walter Roberson
2012 年 7 月 23 日
It appears that it is possible on MS Windows. See http://www.codeproject.com/Articles/4865/Performing-a-hex-dump-of-another-process-s-memory
参考
カテゴリ
Help Center および File Exchange で COM Component Integration についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!