Help needed with changing Memory Addresses

Hello, I'm both new to this forum and C++ coding in general.

I'm trying to make a game trainer for my brother's games.

I've managed to get the new values to write to proper addresses but I have two problems:

1. It seems that the addresses change every time I start the game, so every time I start it, I have to find the new address.

2. I want to be able to make it run in the background durring play, so then my bro can press say F5 and he recieves health. So how can I make the initial console for the trainer recieve input from another window/program.

If any of you can help me with those problems, I will be very thankfull.
If what I've wrote isn't clear enough, I'd be happy to explain it more.

Thank you all very much,
Stephengp

Edit: Also, forgot one thing, is there a way to check the value of an address before you change it??

Thanks again...
Last edited on
Anyone? please help.....
Hi
There are 2 problems that u have quoted in ur mail.
The first one regarding the dynamic nature of the addresses cant be resolved and u will have to read the addresses at runtime only.
Regarding the second one, it would be really great if u could tell that currently how are u achieving the writing of values at specific addresses and what sort of communication are u using between ur game trainer and the actual game.

Regards
Anuj
Thank you Anuj,

About the dynamic addresses, I've heard that pointers can deal with them, Is that true?

Also, I'm achieving the writing of values at address like this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
(************CODE************)
    LONG address = 0x100579C;
    int newvalue = 1;
    HWND hwnd;
    HANDLE phandle;
    DWORD pid;
    hwnd = FindWindow(NULL, "Minesweeper");
    cout << "Minesweeper is Open" << endl;
    GetWindowThreadProcessId(hwnd, &pid);
    phandle = OpenProcess(PROCESS_ALL_ACCESS, 0, pid);

(***************CODE****************)

            WriteProcessMemory(phandle, (LPVOID)address, (LPVOID) &newvalue, 4, 0);

That's not all of the code, but its the bit that changes the address value.

Thanks,
Stephen
Last edited on
Topic archived. No new replies allowed.