I'm writing a little app that will scan the area in memory where the text displayed in the console of a particular game is stored, looking for text that it can interpret as commands; in other words, I'll run this app, and then the game, and the app will moniter the section of memory where the console is stored looking for commands that I've typed into the console.
It's a simple enough idea, I've already written code to find the start of the console, along with code to read commands. But I'm not happy with it - rather than starting the search at the beginning of the program's address space, I have to start it at a hard-coded address. It works - since the memory is allocated just after the program starts up, it's usually in just about the same spot, but I don't like hard-coding memory addresses.
How would I get the Address map of the process so that I'd know which areas of memory are readable, allowing me to scan *all* of the process's readable memory?
I know it can be done without too much trouble, I have a program that does it, among other things. I've checked the program's dependencies and can't find an API call that looks like it would do the job.
I have a feeling this post belongs in the newbie forum, as I'm hoping it's a simple answer. Anybody able to throw some hints at me as to where to start looking?
Bookmarks