/[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/05/28 04:14:03	156
+++ trunk/RomCheater/Docking/FloatingRamDumperDialog.cs	2012/05/28 04:20:13	157
@@ -9,6 +9,7 @@
 using WeifenLuo.WinFormsUI.Docking;
 using RomCheater.PluginFramework.Interfaces;
 using System.Diagnostics;
+using System.IO;
 
 namespace RomCheater.Docking
 {
@@ -166,6 +167,13 @@
             int bytesReadSize;
             byte[] data = reader.ReadProcessMemory((IntPtr)(uint)start, count, out bytesReadSize);
             reader.CloseHandle();
+            using (FileStream fs = new FileStream(filename, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite))
+            {
+                BinaryWriter bw = new BinaryWriter(fs);
+                foreach (byte b in data) { bw.Write(b); }
+                bw.Flush();
+                bw.Close();
+            }
         }
         #endregion
     }

 

  ViewVC Help
Powered by ViewVC 1.1.22