public static uint Read(int address, byte[] buffer, uint count) { if (address == 0) { throw new Exception("Read address is 0!"); } uint bytesRead = 0; if (!ProcessImports.ReadProcessMemory(Handle, new IntPtr(address), buffer, count, ref bytesRead)) { Error.GetLastError(); } return(bytesRead); }
public static int ReadInt(int address) { if (address == 0) { throw new Exception("Read address is 0!"); } IntPtr rw; IntPtr puffer; if (!ProcessImports.ReadProcessMemory(Handle, new IntPtr(address), out puffer, new UIntPtr(4), out rw)) { Error.GetLastError(); } return(puffer.ToInt32()); }