#include <iostream>
#include <windows.h>
#include <conio.h>
#include <string>
using namespace std;
int main()
{
string response;
cout << " gogogokitty199's Point Modifier\n"; //title at the top of program
cout << " \n";
cout << " \n";
LPCWSTR Waw = L"Call of Duty®"; //name of game window, example(The Dead Linger)
HWND hwnd = FindWindow(0, Waw);
DWORD process_ID;
GetWindowThreadProcessId(hwnd, &process_ID);
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, process_ID);
while (true) //program will reset here
{
cout << "What do you want to set your points as: ";
int Points;
cin >> Points;
DWORD newdatasize = sizeof(Points);
if (WriteProcessMemory(hProcess, (LPVOID)0x018EF124, &Points, newdatasize, NULL)) //change pointner
cout << "point write success\n";
cout << " \n";
}
}


#include <iostream>
#include <windows.h>
using namespace std;
int main()
{
HWND hwnd = 0; // handle to window of target process
DWORD process_ID = 0; // target process's ID
LPCWSTR Waw = L"Call of Duty®"; //title of game window, example(The Dead Linger)
const DWORD pointsAddr = 0x018EF124; //static addr where 'points' are stored in target process.
cout << " gogogokitty199's Point Modifier\n\n" << endl;
while (true)
{//Try find game window: will loop until window is found.
hwnd = FindWindowW(0,Waw);
if (!hwnd)
{
cout << "Game Window Not Open yet. Waiting 2 seconds..." << endl;
Sleep(2000);
}
else
break;
}
cout <<"Game Window Found. Handle: " << hwnd << endl;
GetWindowThreadProcessId(hwnd, &process_ID); //Find processID (unknown thus far) based on the window handle
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, process_ID); //Try get handle from OpenProcess()
if (hProcess)
{//OpenProcess success
cout <<"Process Opened OK. Handle: " << hProcess << endl;
int Points = 0;
while (true)
{
cout << "What do you want to set your points as: ";
cin >> Points;
if (WriteProcessMemory(hProcess, (LPVOID)pointsAddr, &Points, sizeof(Points), NULL)) //change value
cout << "\npoint write success\n" << endl;
else
{
cout <<"\npoint write FAIL! WriteProcessMemory() returned False.\n"
<<"Shutting down." << endl;
system("PAUSE");
return 1; // 1 indicates error, wpm failed.
}
}
}
else
{//OpenProcess fail
cout <<"Unable to access process. Maybe try running \"As Admin.\". OpenProcess() Failed.\n"
<<"Shutting Down." << endl;
system("PAUSE");
return 1; // 1 indicates error
}
return 0; // can't occur
}
elobrate it