Probably one of the simplest skeletons I've got:
Code:
#include <windows.h>
#include <stdio.h>
int main(){
HANDLE hProcess = 0;
HWND hWindow;
DWORD pid = 0;
hWindow = FindWindow(NULL, "Window Name");
if (hWindow){
GetWindowThreadProcessId(hWindow, &pid);
}
hProcess = OpenProcess(PROCESS_ALL_ACCESS, 0, pid);
if(hProcess != NULL)
printf("Process Found!");
else {
printf("Process Not Found!");
return 0;
}
//Writes byte values to 0x00567...
BYTE valueToWrite[] ={0x90, 0x90};
WriteProcessMemory(hProcess, (void*)0x00567A8F, (void*)&valueToWrite, sizeof(valueToWrite), NULL);
return 0;
}
Its really handy if you want to make your own trainer. You of course need to know how to use it