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 445 by william, Tue May 28 15:16:05 2013 UTC vs.
Revision 446 by william, Sun Jun 2 19:52:03 2013 UTC

--- trunk/Win32/Sojaner.MemoryScanner/MemoryScanner.cs	2013/06/02 19:21:16	445
+++ trunk/Win32/Sojaner.MemoryScanner/MemoryScanner.cs	2013/06/02 19:52:03	446
@@ -319,7 +319,16 @@ namespace Sojaner.MemoryScanner
                     byte[] bigMem = mem.Read();
                     count += bigMem.Length;
                     if (this.OnBytesRead != null)
-                        this.OnBytesRead.Invoke(new OnBytesReadEventArgs(this, UserState, bigMem, j, bytesToRead));
+                    {
+                        OnBytesReadEventArgs t = new OnBytesReadEventArgs(this, UserState, bigMem, j, bytesToRead);
+                        this.OnBytesRead.Invoke(t);
+                        if (t.Canceled)
+                        {
+                            bigMem = null;
+                            break;
+                        }
+                        
+                    }
                     bigMem = null;
                 }
             }