/[RomCheater]/trunk/Win32/Sojaner.MemoryScanner/MemoryScanner.cs
ViewVC logotype

Diff of /trunk/Win32/Sojaner.MemoryScanner/MemoryScanner.cs

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

revision 198 by william, Thu May 31 07:13:43 2012 UTC revision 200 by william, Thu May 31 07:29:44 2012 UTC
# Line 114  namespace Sojaner.MemoryScanner Line 114  namespace Sojaner.MemoryScanner
114              #region DumpMemoryToFile              #region DumpMemoryToFile
115              public bool DumpMemoryToFile(Process ppid, string filename, uint MemoryAddress, uint bytesToRead, out int bytesRead)              public bool DumpMemoryToFile(Process ppid, string filename, uint MemoryAddress, uint bytesToRead, out int bytesRead)
116              {              {
117                  logger.Info.WriteLine("Dumping memory (0x{0:x8}-0x{1:x8}) from pid=({3}) to file {2}", MemoryAddress, MemoryAddress + bytesToRead, filename, string.Format("0x{0:x4} {1}.exe", ppid.Id, ppid.ProcessName));                  //logger.Info.WriteLine("Dumping memory (0x{0:x8}-0x{1:x8}) from pid=({3}) to file {2}", MemoryAddress, MemoryAddress + bytesToRead, filename, string.Format("0x{0:x4} {1}.exe", ppid.Id, ppid.ProcessName));
118                  bytesRead = 0;                  bytesRead = 0;
119                  uint byte_alignment = 0;                  uint byte_alignment = 0;
120                  // get common init parameters                  // get common init parameters
# Line 187  namespace Sojaner.MemoryScanner Line 187  namespace Sojaner.MemoryScanner
187              #region DumpMemoryToByteArray              #region DumpMemoryToByteArray
188              public byte[] DumpMemoryToByteArray(Process ppid, uint MemoryAddress, uint bytesToRead, out int bytesRead)              public byte[] DumpMemoryToByteArray(Process ppid, uint MemoryAddress, uint bytesToRead, out int bytesRead)
189              {              {
190                  logger.Info.WriteLine("Dumping memory (0x{0:x8}-0x{1:x8}) from pid=({2})", MemoryAddress, MemoryAddress + bytesToRead, string.Format("0x{0:x4} {1}.exe", ppid.Id, ppid.ProcessName));                  //logger.Info.WriteLine("Dumping memory (0x{0:x8}-0x{1:x8}) from pid=({2})", MemoryAddress, MemoryAddress + bytesToRead, string.Format("0x{0:x4} {1}.exe", ppid.Id, ppid.ProcessName));
191                  bytesRead = 0;                  bytesRead = 0;
192                  uint byte_alignment = 0;                  uint byte_alignment = 0;
193                  // get common init parameters                  // get common init parameters
# Line 237  namespace Sojaner.MemoryScanner Line 237  namespace Sojaner.MemoryScanner
237                          bw.Close();                          bw.Close();
238                          return ms.ToArray();                          return ms.ToArray();
239                      }                      }
240                      logger.Info.WriteLine("Succefully dumped memory (0x{0:x8}-0x{1:x8}) from pid=({2})", MemoryAddress, MemoryAddress + bytesToRead, string.Format("0x{0:x4} {1}.exe", ppid.Id, ppid.ProcessName));                      //logger.Info.WriteLine("Succefully dumped memory (0x{0:x8}-0x{1:x8}) from pid=({2})", MemoryAddress, MemoryAddress + bytesToRead, string.Format("0x{0:x4} {1}.exe", ppid.Id, ppid.ProcessName));
241                  }                  }
242                  catch (OutOfMemoryException ex)                  catch (OutOfMemoryException ex)
243                  {                  {

Legend:
Removed from v.198  
changed lines
  Added in v.200

  ViewVC Help
Powered by ViewVC 1.1.22