Hi, I have a question for you want to create a trainer in C++, I have a request. . . edit someone fashion me this code?
Code:
#include <iostream>
#include <windows.h>
using namespace std;
int main()
{
int newValue = 40;
HWND hWnd = FindWindow(0, "Saper");
if (hWnd == 0) {
cerr << "Nie ma okna" << endl;
} else {
DWORD pId;
GetWindowThreadProcessId(hWnd, &pId);
HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pId);
if (!hProc) {
cerr << "Nie widac procesu" << endl;
} else {
int isSuccessful = WriteProcessMemory(hProc, (LPVOID)0x0024909C, &newValue, (DWORD)sizeof(newValue), NULL);
if (isSuccessful > 0) {
clog << "Proces zostal dobrze zaladowany!" << endl;
} else {
cerr << "Nie mozna zapisac w pamieci procesu." << endl;
}
CloseHandle(hProc);
}
}
return 0;
}
How can I make the function key? And how do I remove that, as the fires of my program is that the CLI does not appear the words ' instance with returned 0 excution time: . . . . the s and how do I add the offset to that address because every now and then I need to change the addresses and I want it to be fixed