ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/Win32/Sojaner.MemoryScanner/MemoryScanner.cs
(Generate patch)

Comparing trunk/Win32/Sojaner.MemoryScanner/MemoryScanner.cs (file contents):
Revision 428 by william, Tue May 28 13:32:28 2013 UTC vs.
Revision 429 by william, Tue May 28 15:16:05 2013 UTC

--- trunk/Win32/Sojaner.MemoryScanner/MemoryScanner.cs	2013/05/28 13:32:28	428
+++ trunk/Win32/Sojaner.MemoryScanner/MemoryScanner.cs	2013/05/28 15:16:05	429
@@ -311,11 +311,13 @@ namespace Sojaner.MemoryScanner
         public void ReadProcessMemoryAtOnce(uint MemoryAddress, uint bytesToRead, object UserState)
         {
             uint size = 1024 * 128;
+            int count = 0;
             for (uint j = MemoryAddress; j < (MemoryAddress + bytesToRead); j += size)
             {
                 using (ProcessMemoryChunk mem = new ProcessMemoryChunk(m_ReadProcess, (IntPtr)j, (int)size))
                 {
                     byte[] bigMem = mem.Read();
+                    count += bigMem.Length;
                     if (this.OnBytesRead != null)
                         this.OnBytesRead.Invoke(new OnBytesReadEventArgs(this, UserState, bigMem, j, bytesToRead));
                     bigMem = null;