Click here to Skip to main content
15,889,281 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
Hi everyone,

I'm writing Memory Viewer Software with C++ and I wanna add some properties to my project. One of them my properties, reading process memory addresses.

Example;
User select one application and my project will be list all of addresses(with values) for selected application.

Can I do this and How can I do this?

Please help me, I'm waiting for your help...
Posted
Comments
Mohibur Rashid 16-May-15 22:43pm    
what os?
Dave Kreskowiak 16-May-15 23:42pm    
and what do you mean by "all addresses"?
Richard MacCutchan 17-May-15 3:12am    
Short answer: no you cannot do this. Even if you can read the memory of another process you have no idea what sort of values are stored there, so the information will be of limited use.
Umut Comlekcioglu 17-May-15 8:07am    
In Windows OS..

For example, User select Chrome.exe and my project will read Chrome.exe addresess in RAM.

0x000000 : 500
0x000001 : 7500
0x000002 : Chrome

Like that, I wanna read RAM addreses..

1 solution

From what you say it seems that you have some confusion about how a modern OS manage memory.
First of all I suggest you to read this[^] and this[^] to clarify the basics (in an actual OS the memory is virtual and each executable generally is allocated on the same standard virtual address 0x400000).
When you'll have more clear ideas you can start from OpenProcess()[^] function. From this, if you have enough privileges, you can obtain an handle to the process. With this handle you can access the process resources, memory is one of them. Use function ReadProcessMemory()[^] function.
These functions are typically used in debuggers to access debugging process memory, the locations to read to inspect variables are obtained from debug info's using the functions from dbghelp[^] library.

Good luck! ;)

P.S. It should be clear that whichever address you read through ReadProcessMemory() you are reading data at the specified logical address inside the process, not a physical global memory address.
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900