Search code examples
pointersprogramming-languagesmemory-address

Address Inquiry


Okay so, lets say I have an integer. When I execute the program, that integer gets an address.

Makes sense.

But, there is many programs out there. Lets see, when creating any game hack, lets say minesweeper I find address of where that data stored and change it.

But... That hack, that simple hack which just changing some address... Works on every computer and every-time.

The question is, that data is getting same address every-time. And on my computer, there is about 30 exe running now. Don't other programs want that address ? What If they want that address ? Why that hack works every-time ? Why other programs dont want that very same address ? How its working every-time ?


Solution

  • Every application gets it's own virtual addressing space (4GB on 32 bit machines) to overcome that problem in a multitasking operating system.

    Here is a pretty good article covering the subject.

    Your "hack" is probably locating a process using something like OpenProcess and editing the memory using WriteProcessMemory. That's why it works on "all" machines.