HWND hwnd = FindWindow(NULL,"Name of Window");
DWORD pid; GetWindowThreadProcessId(hwnd, &pid);
HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS,false,pid);
WriteProcessMemory(hProc,(LPVOID)0x01564F9,(LPCVOID)<value you are writing>,sizeof(int),NULL);
#include <iostream>
#include <Windows.h>
int main()
{
HWND game = FindWindow(NULL, TEXT("Catapult Madness | Armor Games - Windows Internet Explorer"));
DWORD pid;
GetWindowThreadProcessId(game, &pid);
HANDLE hproc = OpenProcess(PROCESS_ALL_ACCESS, 0, pid);
std::cout<<pid<<std::endl;
if(WriteProcessMemory(hproc, (LPVOID) 0x0EBF071C, (LPCVOID) 0, sizeof(4), NULL)){
MessageBox(NULL, TEXT("Memory Copied."), TEXT("Hack"), NULL);
}
if(!WriteProcessMemory(hproc, (LPVOID) 0x0EBF071C, (LPCVOID) 0, sizeof(4), NULL)){
MessageBox(NULL, TEXT("Failure"), TEXT("Hack"), NULL);
}
std::cin.get();
return 0;
}
#include <iostream>
#include <Windows.h>
int main()
{
HWND game = FindWindow(NULL, TEXT("Catapult Madness | Armor Games - Windows Internet Explorer"));
DWORD pid;
GetWindowThreadProcessId(game, &pid);
HANDLE hproc = OpenProcess(PROCESS_ALL_ACCESS, 0, pid);
std::cout<<pid<<std::endl;
int Zero = 0;
if(WriteProcessMemory(hproc, (LPVOID) 0x0EBF071C, (LPCVOID) &Zero, sizeof(int), NULL)){
MessageBox(NULL, TEXT("Memory Copied."), TEXT("Hack"), NULL);
}
if(!WriteProcessMemory(hproc, (LPVOID) 0x0EBF071C, (LPCVOID) &Zero, sizeof(int), NULL)){
MessageBox(NULL, TEXT("Failure"), TEXT("Hack"), NULL);
}
std::cin.get();
return 0;
}