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

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

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

--- trunk/RomCheater/Docking/FloatingRamDumperDialog.cs	2012/06/03 16:32:58	251
+++ trunk/RomCheater/Docking/FloatingRamDumperDialog.cs	2012/06/03 16:35:25	252
@@ -13,6 +13,7 @@
 using RomCheater.Logging;
 using System.Reflection;
 using Sojaner.MemoryScanner.MemoryProviers;
+using Sojaner.MemoryScanner;
 
 namespace RomCheater.Docking
 {
@@ -180,10 +181,10 @@
         }
         private void DumpRam(long start, uint count, string filename)
         {
-            if (this.AcceptedProcess == null) return;            
-            GenericMemoryProvider provider = new GenericMemoryProvider((IAcceptsProcessAndConfig)this);
-            provider.OpenProvider();
+            if (this.AcceptedProcess == null) return;    
             int bytesReadSize;
+            Sojaner.MemoryScanner.MemoryProviers.GenericMemoryProvider provider = new Sojaner.MemoryScanner.MemoryProviers.GenericMemoryProvider((IAcceptsProcessAndConfig)this);
+            provider.OpenProvider();
             if (provider.WriteProcessMemoryToFile(filename, (int)start, count, out bytesReadSize))
             {
                 MessageBox.Show(string.Format("Succefully dumped memory (0x{0:x8}-0x{1:x8}) from pid=({3}) to file {2}", start, start + count, filename, string.Format("0x{0:x4} {1}.exe", this.AcceptedProcess.Id, AcceptedProcess.ProcessName)), "", MessageBoxButtons.OK, MessageBoxIcon.Information);
@@ -193,6 +194,13 @@
                 MessageBox.Show(string.Format("Failed to dump memory (0x{0:x8}-0x{1:x8}) from pid=({3}) to file {2}", start, start + count, filename, string.Format("0x{0:x4} {1}.exe", this.AcceptedProcess.Id, AcceptedProcess.ProcessName)), "", MessageBoxButtons.OK, MessageBoxIcon.Error);
             }
             provider.CloseProvider();
+
+            //ProcessMemoryReader provider = new ProcessMemoryReader();
+            //provider.ReadProcess = this.AcceptedProcess;
+            //provider.OpenProcess();
+            //provider.WriteProcessMemoryToFile(filename, (int)start, count, out bytesReadSize);
+            //provider.CloseHandle();
+
         }
         #endregion
     }

 

  ViewVC Help
Powered by ViewVC 1.1.22