I've found/reworked some code to read/write data directly to the memory of another application. The code to read/write a single address is as fast as I could want, but finding the address is a hassle. I'd assume for any given program the locations of variables in the memory would be the same relative to a given position, I'd guess the start position.
So I currently use this to read memory:
Public Function ReadBytes(ByVal addr As IntPtr, ByVal size As Int32) As Byte()
Dim _rtnBytes(size - 1) As Byte
ReadProcessMemory(_targetProcessHandle, addr, _rtnBytes, size, vbNull)
Return _rtnBytes
End Function
This code requires a bunch of global variables, routines to attach to the memory etc..
The ideal answer would give me a method or reference to code that gives me the starting address of the memory for a given process. I'm doing this in VB.NET