Hi!
Ich versuche momentan nur zum Spaß in Aion meine Max-HP auszulesen.
Sieht bis jetzt so aus (Ausschnitt):
Code:
if(hGameWindow)
{
GetWindowThreadProcessId(hGameWindow, &dwProcId);
if(dwProcId != 0)
{
hProcHandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwProcId);
if(hProcHandle == INVALID_HANDLE_VALUE || hProcHandle == NULL)
{
GameStatus = "Failed to open Process!";
std::cout << GameStatus << std::endl;
std::cout << GetLastError();
}
} else {
GameStatus = "Failed to get Process ID!";
std::cout << GameStatus << std::endl;
std::cout << GetLastError();
}
}
....
....
ReadProcessMemory(hProcHandle, (LPCVOID)health/*DWORD health=0xA2771C;*/, &iHealth, sizeof(int), NULL);
Funktioniert aber so nicht. Nach ein bisschen googlen habe ich herrausgefunden dass es da noch etwas mit der Game.dll auf sich hat, aber was genau muss ich noch tun damit es funktioniert? BTW: ReadProcessMemory gibt 0 zurück, GetLastError 299.
-------------------------
Hi!
At the moment I'm trying to read my Max-HP via ReadProcessMemory.
Looks like this(excerpt):
Code:
if(hGameWindow)
{
GetWindowThreadProcessId(hGameWindow, &dwProcId);
if(dwProcId != 0)
{
hProcHandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwProcId);
if(hProcHandle == INVALID_HANDLE_VALUE || hProcHandle == NULL)
{
GameStatus = "Failed to open Process!";
std::cout << GameStatus << std::endl;
std::cout << GetLastError();
}
} else {
GameStatus = "Failed to get Process ID!";
std::cout << GameStatus << std::endl;
std::cout << GetLastError();
}
}
....
....
ReadProcessMemory(hProcHandle, (LPCVOID)health/*DWORD health=0xA2771C;*/, &iHealth, sizeof(int), NULL);
But it doesn't work like this. I found out that I have to do something with Game.dll, but what? BTW: ReadProcessMemory returns 0, GetLastError 299.
Greets!
__________________