Click to See Complete Forum and Search --> : accessing another application memory


mathieu
May 22nd, 1999, 05:08 PM
I would like to access another application memory in windows 98. The application is not mine so i cant use pipe or shared memory.
I know this is possible, i seen a cheat for a game that was accessing the game memory..

Tanks you for your help!

Rob Wainwright
May 23rd, 1999, 01:48 PM
You can write a DLL and inject it into the process space of the required application. It is then possible to Read and Write to the memory. This is clearly a dangerous thing to do.

There is a sample in Advanced Windows where Richter demonstrates getting a list of the address locations of all the linked dlls within a process. I think the sample is INJECTLIB.

HTH

Jerry Coffin
May 25th, 1999, 04:25 PM
There are a couple of ways of doing this. One is to inject a DLL into the process you want to play with. Another is to use the debug API to attach to the process, then use ReadProcessMemory and WriteProcessMemory to access its memory. Of course, to do any real good, you'll have to also know something about what's where in the other process. You can get some information using VirtualQueryEx, though there's no guarantee that it'll be sufficient for your purposes. You can also use the image helper functions to get the addresses of its symbols; this can (of course) extract a lot more information about the other process if it includes debug information.


The universe is a figment of its own imagination.