/[RomCheater]/trunk/Win32/Sojaner.MemoryScanner/MemoryScanner.cs
ViewVC logotype

Diff of /trunk/Win32/Sojaner.MemoryScanner/MemoryScanner.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 428 by william, Tue May 28 13:32:28 2013 UTC revision 429 by william, Tue May 28 15:16:05 2013 UTC
# Line 311  namespace Sojaner.MemoryScanner Line 311  namespace Sojaner.MemoryScanner
311          public void ReadProcessMemoryAtOnce(uint MemoryAddress, uint bytesToRead, object UserState)          public void ReadProcessMemoryAtOnce(uint MemoryAddress, uint bytesToRead, object UserState)
312          {          {
313              uint size = 1024 * 128;              uint size = 1024 * 128;
314                int count = 0;
315              for (uint j = MemoryAddress; j < (MemoryAddress + bytesToRead); j += size)              for (uint j = MemoryAddress; j < (MemoryAddress + bytesToRead); j += size)
316              {              {
317                  using (ProcessMemoryChunk mem = new ProcessMemoryChunk(m_ReadProcess, (IntPtr)j, (int)size))                  using (ProcessMemoryChunk mem = new ProcessMemoryChunk(m_ReadProcess, (IntPtr)j, (int)size))
318                  {                  {
319                      byte[] bigMem = mem.Read();                      byte[] bigMem = mem.Read();
320                        count += bigMem.Length;
321                      if (this.OnBytesRead != null)                      if (this.OnBytesRead != null)
322                          this.OnBytesRead.Invoke(new OnBytesReadEventArgs(this, UserState, bigMem, j, bytesToRead));                          this.OnBytesRead.Invoke(new OnBytesReadEventArgs(this, UserState, bigMem, j, bytesToRead));
323                      bigMem = null;                      bigMem = null;

Legend:
Removed from v.428  
changed lines
  Added in v.429

  ViewVC Help
Powered by ViewVC 1.1.22