A well written program should protect it's own memory. However, most C/C++ program aren't all that well written. So you should be able to do something like this:
1) Write a memory watcher that will grab information on which processes allocate memory when
2) Write a helper app that can read this program's log file and then attempt to directly access the memory which has been grabbed up by the process in question. (You may be able to get around protected memory issues if you write this in assembler and work below the OS)
3) Now the helper app can be used to search for anything you like.
This information is offered for educational purposes only and the author is in no way responsible for any damage from the use or misuse of the ideas presented within.