I am trying to get this code to work out and test it, can someone tweak it a little bit to get it to work on something in WoW so that I can see visible results and
know it is working?
Code:
#include <iostream>
#include <windows.h>
#define WPMAddr 0x98765
#define RPMAddr 0x12345
using namespace std;
int main()
{
DWORD pid;
const short WPMValue = 0;
short RPMValue = 0;
HWND hwnd = FindWindowA(NULL, "World of Warcraft");
GetWindowThreadProcessId(hwnd, &pid);
HANDLE phandle = OpenProcess(PROCESS_VM_OPERATION | PROCESS_VM_WRITE | PROCESS_VM_READ, 0, pid);
WriteProcessMemory(phandle, (LPVOID)WPMAddr, &WPMValue, sizeof(WPMValue), 0);
ReadProcessMemory(phandle, (LPCVOID)RPMAddr, &RPMValue, sizeof(RPMValue), 0);
return 0;
}