Interprocess memory editing

I'm thinking of writing a trainer for a game, but I need to be able to access the memory of the games process directly. I recall there being an API function for this, but I cant remember what it was, anyone know?

Does anyone know how to determine exactly how much RAM a game is using so you can ReadProcessMemory all of it?

The function fails and returns an error if the memory you tried to read is invalid. Persoanlly I woudl try reading in blocks until you encounter a block that fails, then read it byte by byte.

Personally I want to write a trainer so I can get a feel for how they are written, so i can write code that is much more difficult fro them to hack. Unfortunately, knowign how to beat hackers requires you to know their methods.

Personally I want to write a trainer so I can get a feel for how they are written, so i can write code that is much more difficult fro them to hack. Unfortunately, knowign how to beat hackers requires you to know their methods.

and why must programmers waste time trying to make games unfriendly to hackers? I never understood that BS. Nothing is hacker-proof. Quit wasting your time and ours. I remember hacking so many N64 games that had completely screwy programming. There are still certain games with timers I can't bloody freeze using a gameshark and it annoys the hell out of me.

Oh, that's like putting items in stores where you can easily take them and get out of there without paying.
In short, it isn't fool proof, but if you implement a basic system, the amount of thefts will decrease by a large amount.
They want to protect their game, and by all rights, they have the right to do so. Just like you'd want to protect your own work from being tampered with or stolen.

Originally Posted by Adak

io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.

Originally Posted by Salem

You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

Oh, that's like putting items in stores where you can easily take them and get out of there without paying.
In short, it isn't fool proof, but if you implement a basic system, the amount of thefts will decrease by a large amount.
They want to protect their game, and by all rights, they have the right to do so. Just like you'd want to protect your own work from being tampered with or stolen.

If you pay for the goddamn game, you should have to right to screw with it all you want. That includes getting infinite ammo, time, whatever. If they had any right to prevent cheating, gamesharks/etc wouldn't exist. How the hell can you compare it to theft? There's no theft involved in manipulating a game to play the way you want it to.

I don't think that analogy holds.
Say you have invented something and you don't want to give out how it works or what's inside, so that you can have monopoly on it. When selling this device to someone, would you want them to crack it open and mix around with it or would you ban that?
As the copyright holder, you certainly have the right to ban such use.
The same goes for game makers. It's their work and they're kind enough to let you use it.

Originally Posted by Adak

io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.

Originally Posted by Salem

You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

If you are ruining someone else's enjoyment of the game by cheating, you are cheating them out of the experience they deserve. They are not able to enjoy the game at its full potential, which they also spent their money for.

Singleplayer cheating I think is fine in some respects. Once you cross the line to multiplayer cheating, however, I think you're scum.