/[RomCheater]/trunk/RomCheater/Docking/MemorySearch/ResultItemState.cs
ViewVC logotype

Diff of /trunk/RomCheater/Docking/MemorySearch/ResultItemState.cs

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

revision 229 by william, Sat Jun 2 18:31:40 2012 UTC revision 240 by william, Sun Jun 3 12:54:18 2012 UTC
# Line 6  using System.Windows.Forms; Line 6  using System.Windows.Forms;
6  using System.IO;  using System.IO;
7  using System.Diagnostics;  using System.Diagnostics;
8  using RomCheater.Logging;  using RomCheater.Logging;
9    using Sojaner.MemoryScanner.MemoryProviers;
10    
11  namespace RomCheater.Docking.MemorySearch  namespace RomCheater.Docking.MemorySearch
12  {  {
# Line 61  namespace RomCheater.Docking.MemorySearc Line 62  namespace RomCheater.Docking.MemorySearc
62          {          {
63              uint Address = 0;              uint Address = 0;
64              Address = Convert.ToUInt32(this.Address, 16);              Address = Convert.ToUInt32(this.Address, 16);
65              Sojaner.MemoryScanner.ProcessMemoryReader reader = new Sojaner.MemoryScanner.ProcessMemoryReader();              GenericMemoryProvider provider = new GenericMemoryProvider(null, Process.GetProcessById(pid));
             reader.ReadProcess = Process.GetProcessById(pid);  
             if (reader.ReadProcess == null) { logger.Error.WriteLine("Could not attach to process: {0}", pid); return; }  
             reader.OpenProcess();  
66              int bytesReadSize;              int bytesReadSize;
67              byte[] data;              byte[] data;
68              uint bytesToRead=0;              uint bytesToRead=0;
# Line 84  namespace RomCheater.Docking.MemorySearc Line 82  namespace RomCheater.Docking.MemorySearc
82                      break;                      break;
83              }              }
84    
85              reader.ReadProcessMemory(Address, bytesToRead, out bytesReadSize, out data);              provider.ReadProcessMemory(Address, bytesToRead, out bytesReadSize, out data);
86              MemoryStream ms = new MemoryStream(data);              MemoryStream ms = new MemoryStream(data);
87              BinaryReader r_ms = new BinaryReader(ms);              BinaryReader r_ms = new BinaryReader(ms);
88                        

Legend:
Removed from v.229  
changed lines
  Added in v.240

  ViewVC Help
Powered by ViewVC 1.1.22