[help]basic calc.exe hack
Code:
HWND hwnd = FindWindow(0, "Calculator");
if(hwnd == NULL)
cout << "ERROR 1" << endl;
DWORD pID;
GetWindowThreadProcessId(hwnd, &pID);
if (pID == NULL)
cout << "ERROR 2" << endl;
HANDLE hHandle = OpenProcess(PROCESS_VM_WRITE | PROCESS_VM_OPERATION, false, pID);
if (hHandle == NULL)
cout << "ERROR 3" << endl;
else
while(1)
{
WriteProcessMemory(hHandle, (LPVOID)0x57C2A4, (LPVOID)0xB1, 4, NULL);
}
yes i know this is not the entire code, just main func.
so it will not change the value of the address of the calc's number.
is there something wrong with the 3rd parameter of writeprocessmemory?
any help appreciated
First of all no one is going to copy and paste that..
The 3rd parameter is the amount of bytes to write, you put 4, but you only specified one byte.