[help]basic calc.exe hack

Posts 1–6 of 6 · Page 1 of 1
[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.
how would i specify all the bytes needed?
Quote Originally Posted by kibbles18 View Post
how would i specify all the bytes needed?
If you want to write one byte.. then you tell it to write one byte, not four.
Messy code is messy
Quote Originally Posted by whit View Post
Messy code is messy
Not only is it messy, it doesn't work :L
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us