C++ - WriteProcessMemory Pointers C.E.

Hi guys!
So I'm trying to do something here.
I made a program to "Hack" my own game I've created.
Like a virtual joystick. It's a second program in which allows you to move on the game I've created.
This WORKS! I've used Cheat Engine to find the address, and used C++ WriteProcessMemory to change the player x within that value.

Again, this works. It changes my player position.
HOWEVER, If I close and reopen my program, The address has changed?
I can easily find the pointer - This I know how to do.

The problem is, I don't know how to enter this into WriteProcessMemory?

For example:
I find the pointer. It points to the correct address in which is changeable.
What do I enter in WriteProcessMemory?

If (This is made up - Not real) 000812BC is my address that currently changes.
I "Find out what accesses this address". Click the only result.
See the "Is probably..." code (Let's pretend it's 000831B2) and the Red result that states what I need to put in for my Offset (We will pretend is 10).
I search 4 Bytes Hex 000831B2. Find my first result (We will pretend it is 0013DB12).
"Add Address Manually", Put in 0013DB12 and Offset what we found in the first step (10).
This points to the address that I need!
But I don't know how to put this in in C++...

Any help would be GREAT
You need to find the address at runtime, Cheat Engine or whatever does not have some kind of DLL to use it in your program ?
No, I want to use a constant Hex Value without having to re-find it every single time I open my program.
You can't do that as memory address is changed by the operating system every time you run the target program, is just how windows works.
I don't believe that's true..
There are multiple tutorials on finding this address that doesn't change.
Just, I can't figure it out properly myself.
I'm doing something wrong..
I ALWAYS end with the same address before I add the 10 offset.
It's 100% always the same.

I just don't know how to add this offset to the address I've found in C++.
Topic archived. No new replies allowed.