Can someone please help me find the base address of game to hack

I found the pointer in cheat engine its "isaac-ng.exe"+00222A60. I have been googling it all night but I can't get the base address of "isaac-ng.exe" or anything else. I can use writeProcessMememory() and change the address but it changes every time the game restarts. can someone please give me some example code for visual studio that will help me do this I would really appreciate it I know it sounds easy but nothing I try works
I just googled "get base address of main executable in remote process" and this was the first result: http://stackoverflow.com/questions/14467229/get-base-address-of-process
visual studio doesnt recognize any of those functions other than OpenProcess. do I have to import something?
Did you #include <windows.h> ?
yes
this is my code so far, it just trys to write to some memory address. i wish i could find the base address of the game

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "stdafx.h"
#include <iostream>
#include <windows.h>

using namespace std;

int main(void) {

	int nVal = 2000;

	HWND hWnd = FindWindowA(0, "Binding of Isaac: Rebirth v1.0");
	if (hWnd == 0){
		cerr << "Could not find window." << endl;
	}
	else {
		DWORD PID;
		GetWindowThreadProcessId(hWnd, &PID);
		HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, false, PID);


		if (!hProc) {
			cerr << "Cannot open process." << endl;
		}
		else {
			int stat = WriteProcessMemory(hProc, (LPVOID)0x0E1CC8D0, &nVal, (DWORD)sizeof(nVal), NULL);

			if (stat > 0){
				clog << "Memory written to process." << endl;
			}
			else {
				cerr << "Memory couldn't be written to process." << endl;
			}

			CloseHandle(hProc);

			cin.get();

		}

	}

	return 0;
}
If you click the links to the msdn pages in the SO posts you will see they require psapi.h
Topic archived. No new replies allowed.