Thread: Accessing memory of other programs

  1. #1

    Accessing memory of other programs

    I used to have this nifty program that i could use when i was playing a game, that i could specify a number and a program, and it would locate that number in memory. Once it did that, i could change that number to whatever I wanted, and it would change in the game. I have recently been researching and programming lots of different things that can be done with memory, and this came up. I would like to know if this is possible in C, and if possible, where I should start looking to find out how. I would also like to know how to look up processes, a.k.a. get a list of them, and their memory addresses.

    GCC on Red Hat 8.1 (Primary)
    GCC on Mac OS X 10.2.4 (Secondary)

    MinGW on XP

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Processes are compiler/OS specific. Lookup your local documentation.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    Join Date
    Aug 2001
    Groningen (NL)
    Here you can find more information. Especially read the section about inter-process-communication. Note that this information may not apply to your environment, as Hammer already said, it is platform and perhaps also compiler specific.

  4. #4
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Ontario, Canada
    With Windows, look up ReadProcessMemory( ) and WriteProcessMemory( ).
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  5. #5
    Obsessed with C chrismiceli's Avatar
    Join Date
    Jan 2003
    for linux you might want to look at shmget and those families of functions.
    Help populate a c/c++ help irc channel
    server: irc://
    channel: #c

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problems with shared memory shmdt() shmctl()
    By Jcarroll in forum C Programming
    Replies: 1
    Last Post: 03-17-2009, 10:48 PM
  2. memory frames in programs
    By cs32 in forum C Programming
    Replies: 15
    Last Post: 01-11-2008, 04:06 AM
  3. Manipulating the Windows Clipboard
    By Johno in forum Windows Programming
    Replies: 2
    Last Post: 10-01-2002, 09:37 AM
  4. Accessing programs in CGI
    By sean in forum A Brief History of
    Replies: 5
    Last Post: 06-13-2002, 01:54 AM
  5. Accessing memory directly
    By YALINI in forum C Programming
    Replies: 0
    Last Post: 08-30-2001, 11:56 PM