das Problem ist, dass ich über Kiki nicht die richtige Adresse von
den Punkten in Solitär finde.....
Die Adresse soll statisch sein.
Achja hier mal der Sorce, da kommt jetzt ne Meldung error: 5.
Warschienlich heißt das, dass das Prog keinen Zugriff auf S4 hat oder?
Wie kann ich das lösen? Soll ich mal ne bypass.dll injecten?
Edit source vergessen xD
#include <windows.h>
#include <iostream>
using namespace std;
int main()
{
HWND hwnd;
DWORD Id;
HANDLE ProcessHandle;
float value;
float value2;
float a;
float b;
unsigned adress = 0xD57BC0;
unsigned adress2 = 0xD57BC4;
hwnd = FindWindow(0,L"S4 Client");
if(!hwnd)
{
cout << "S4 League not found !" << endl;
}
else
{
cout << "S4 League found !" << endl;
cout << "Windowhandle: " << hwnd << endl;
GetWindowThreadProcessId(hwnd,&Id);
cout << "Process Id: " << Id << endl;
ProcessHandle = OpenProcess(PROCESS_ALL_ACCESS ,FALSE,Id);
if(!ProcessHandle)
{
int errorcode = 0;
errorcode = GetLastError();
cout << "wasnt able to get Proccess Acces, errorcode: "
<< errorcode << '\n';
}
else
{
cout << "ProcessHandle: " << ProcessHandle << endl;
ReadProcessMemory(ProcessHandle, (void*)adress, &value, 4, NULL);
ReadProcessMemory(ProcessHandle, (void*)adress2, &value2, 4, NULL);
cout << "How much points to add? " << endl;
cin >> a;
cin >> b;
a += value;
b += value2;
WriteProcessMemory(ProcessHandle,(LPVOID)adress,&a ,sizeof(float),NULL);
WriteProcessMemory(ProcessHandle,(LPVOID)adress2,& b,sizeof(float),NULL);
cout << "Points added " << endl;
cin.get();
}
}
}