I'm new to this area of experties so I'm not entirely sure... I know externaly you've got two functions: WriteProcessMemory and ReadProcessMemory , but internally things are different... I'm also not familiar enough with pointers yet to make it myself - but if you can comment it for me I think I'll be okay :).
So, what's the best way to read memory?
By the way, this is my write memory function:
void WriteToMemory(DWORD addressToWrite, char* valueToWrite, int byteNum)
{
//used to change our file access type, stores the old
//access type and restores it after memory is written
unsigned long OldProtection;
//give that address read and write permissions and store the old permissions at oldProtection
VirtualProtect((LPVOID)(addressToWrite), byteNum, PAGE_EXECUTE_READWRITE, &OldProtection);
//write the memory into the program and overwrite previous value
memcpy((LPVOID)addressToWrite, valueToWrite, byteNum);
//reset the permissions of the address back to oldProtection after writting memory
VirtualProtect((LPVOID)(addressToWrite), byteNum, OldProtection, NULL);
}