Accessing memory of other programs

This is a discussion on Accessing memory of other programs within the C Programming forums, part of the General Programming Boards category; I used to have this nifty program that i could use when i was playing a game, that i could ...

  1. #1
    Rebooted Inquirer's Avatar
    Join Date
    Apr 2002
    Posts
    281

    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.

    Thanks!
    Compilers:
    GCC on Red Hat 8.1 (Primary)
    GCC on Mac OS X 10.2.4 (Secondary)

    Others:
    MinGW on XP

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    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
    Location
    Groningen (NL)
    Posts
    2,386
    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.
    http://www.cs.cf.ac.uk/Dave/C/

  4. #4
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    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
    Posts
    501
    for linux you might want to look at shmget and those families of functions.
    Help populate a c/c++ help irc channel
    server: irc://irc.efnet.net
    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, 03: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 Cprogramming.com
    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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21