How can I read memory from a selected process? I'm using the ReadProcessMemory function and I don't understand the 2nd parameter (lpBaseAddress). Could anyone help me with this, or tell me another way to read memory from a process?
This is my function for reading memory, which I pulled off of Google.
public int ReadInt32(IntPtr hProcess, IntPtr dwAddress)
{
byte[] buffer = new byte[4];
int bytesread;
ReadProcessMemory(hProcess, dwAddress, buffer, 4, out bytesread);
return BitConverter.ToInt32(buffer, 0);
}