/[RomCheater]/trunk/RomCheater/Docking/FloatingMemorySearcher.cs
ViewVC logotype

Diff of /trunk/RomCheater/Docking/FloatingMemorySearcher.cs

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

--- trunk/RomCheater/Docking/FloatingMemorySearcher.cs	2012/06/08 04:39:37	349
+++ trunk/RomCheater/Docking/FloatingMemorySearcher.cs	2012/06/09 21:46:37	354
@@ -1008,7 +1008,23 @@
             int bytes_read = 0;
 
             byte[] buffered_mem = new byte[MemoryRangeSize]; // throws OutOfMemoryException if size is over 2G
-            provider.ReadProcessMemory((int)MemoryRangeStart, MemoryRangeSize, out bytes_read, out buffered_mem);
+
+
+            provider.ReadProcessMemoryAtOnce(MemoryRangeStart, MemoryRangeSize, out bytes_read, out buffered_mem);
+            //uint buffer_size = 1024;
+            //List<byte> buffer_bytes = new List<byte>();
+            //for (uint i = (uint)MemoryRangeStart; i < MemoryRangeSize; )
+            //{
+            //    byte[] _buffer = new byte[buffer_size];
+            //    provider.ReadProcessMemory((int)i, buffer_size, out bytes_read, out _buffer);
+            //    foreach (byte b in _buffer)
+            //    {
+            //        buffer_bytes.Add(b);
+            //    }
+            //    i += buffer_size;
+            //}
+            //buffered_mem = buffer_bytes.ToArray();
+          
             provider.CloseProvider();
        
             if (buffered_mem.Length == 0) { logger.Warn.WriteLine("Buffered Memory is Zero Length."); return; }

 

  ViewVC Help
Powered by ViewVC 1.1.22