/[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

revision 349 by william, Fri Jun 8 04:39:37 2012 UTC revision 354 by william, Sat Jun 9 21:46:37 2012 UTC
# Line 1008  namespace RomCheater.Docking Line 1008  namespace RomCheater.Docking
1008              int bytes_read = 0;              int bytes_read = 0;
1009    
1010              byte[] buffered_mem = new byte[MemoryRangeSize]; // throws OutOfMemoryException if size is over 2G              byte[] buffered_mem = new byte[MemoryRangeSize]; // throws OutOfMemoryException if size is over 2G
1011              provider.ReadProcessMemory((int)MemoryRangeStart, MemoryRangeSize, out bytes_read, out buffered_mem);  
1012    
1013                provider.ReadProcessMemoryAtOnce(MemoryRangeStart, MemoryRangeSize, out bytes_read, out buffered_mem);
1014                //uint buffer_size = 1024;
1015                //List<byte> buffer_bytes = new List<byte>();
1016                //for (uint i = (uint)MemoryRangeStart; i < MemoryRangeSize; )
1017                //{
1018                //    byte[] _buffer = new byte[buffer_size];
1019                //    provider.ReadProcessMemory((int)i, buffer_size, out bytes_read, out _buffer);
1020                //    foreach (byte b in _buffer)
1021                //    {
1022                //        buffer_bytes.Add(b);
1023                //    }
1024                //    i += buffer_size;
1025                //}
1026                //buffered_mem = buffer_bytes.ToArray();
1027              
1028              provider.CloseProvider();              provider.CloseProvider();
1029                
1030              if (buffered_mem.Length == 0) { logger.Warn.WriteLine("Buffered Memory is Zero Length."); return; }              if (buffered_mem.Length == 0) { logger.Warn.WriteLine("Buffered Memory is Zero Length."); return; }

Legend:
Removed from v.349  
changed lines
  Added in v.354

  ViewVC Help
Powered by ViewVC 1.1.22