I need some help, I have this code :I want to know how to find the dwLocationOfFunction variable, I know it has to do with finding the pointer and offset of process, I am NEW to c++, I found this tutorial any help to clear me out on how to do it?
I need some help, I have this code :
ReadProcessMemory(hProcess, (LPVOID)dwLocationOfFunction, &FirstByte, sizeof(FirstByte), NULL)
There are a couple of ways to go about it, I'll tell you the ones I know:
1. Use a memory scanning tool to find out your address and then find the pointer + offset ( ollydbg, Cheat Engine etc...)
once you have found the pointer + offset do this:
unsigned long pointer = 0x123456; // arbitrary numbers
unsigned long offset = 0xEC; // arbitrary numbers
unsigned long address = pointer + offset;
ReadProcessMemory(appHandle, (LPVOID)address, (LPVOID) &buffer, buffersize, 0);
declare a buffer to hold your value and the size of the buffer and that should be it.