Thread: Read memory

  1. #1
    Politics&Cpp geek Da-Nuka's Avatar
    Join Date
    Oct 2004
    Posts
    104

    Read memory

    Hi.
    I am trying to make a cheat/anticheat program for old games.

    How can you read used memory/RAM? Is it a C++ libary for it? Or do I have to learn assembler, and some hardware?
    If so, exactly what do i have to learn of assembly and hardware?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Well you have to say which OS/Compiler you're using.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    Quote Originally Posted by Da-Nuka
    Hi.
    How can you read used memory/RAM? Is it a C++ libary for it?
    every time you use malloc(), new, read from a file, read from serial ports, and a whole holst of other functions, the program is reading and using memory in either RAM or on disk. So you will have to be just a tad more specific about your question.

  4. #4
    Politics&Cpp geek Da-Nuka's Avatar
    Join Date
    Oct 2004
    Posts
    104
    oh, sorry.
    I am using Windows XP, and i am using the DevC++ compiler.
    I want to make a function like this:
    Code:
    readMem() {
    byte memory[100000];
    int Start=0;
    int End=GetLastMemory();
    while(Start < End) {
    bytememory[start]=ReadMemoryCell[start];
    start++;
    }
    }
    Or in words, a way to read ALL the memorycells( on the RAM) on the computer, at all times.

  5. #5
    Registered User
    Join Date
    Aug 2005
    Location
    Austria
    Posts
    1,990
    Quote Originally Posted by Da-Nuka
    Or in words, a way to read ALL the memorycells( on the RAM) on the computer, at all times.
    That's not so easy. XP won't let you alwais read the memory of another process. check out ReadProcessMemory
    Kurt

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Memory allocation/reallocation
    By magda3227 in forum C Programming
    Replies: 10
    Last Post: 07-04-2008, 03:27 PM
  2. To find the memory leaks without using any tools
    By asadullah in forum C Programming
    Replies: 2
    Last Post: 05-12-2008, 07:54 AM
  3. Memory usage and memory leaks
    By vsanandan in forum C Programming
    Replies: 1
    Last Post: 05-03-2008, 05:45 AM
  4. "sorting news" assignment
    By prljavibluzer in forum C Programming
    Replies: 7
    Last Post: 02-06-2008, 06:45 AM
  5. pointers
    By InvariantLoop in forum C Programming
    Replies: 13
    Last Post: 02-04-2005, 09:32 AM