/[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 353 by william, Sat Jun 9 21:11:02 2012 UTC revision 354 by william, Sat Jun 9 21:46:37 2012 UTC
# Line 253  namespace Sojaner.MemoryScanner Line 253  namespace Sojaner.MemoryScanner
253          }          }
254          #endregion          #endregion
255          #region public void ReadProcessMemory(int MemoryAddress, uint bytesToRead, out int bytesRead, out byte[] data)          #region public void ReadProcessMemory(int MemoryAddress, uint bytesToRead, out int bytesRead, out byte[] data)
256            public void ReadProcessMemoryAtOnce(int MemoryAddress, uint bytesToRead, out int bytesRead, out byte[] data)
257            {
258                ReadProcessMemoryAtOnce((uint)MemoryAddress, bytesToRead, out bytesRead, out data);
259            }
260          public void ReadProcessMemory(int MemoryAddress, uint bytesToRead, out int bytesRead, out byte[] data)          public void ReadProcessMemory(int MemoryAddress, uint bytesToRead, out int bytesRead, out byte[] data)
261          {          {
262              ReadProcessMemory((uint)MemoryAddress, bytesToRead, out bytesRead, out data);              ReadProcessMemory((uint)MemoryAddress, bytesToRead, out bytesRead, out data);
263          }          }
264            public void ReadProcessMemoryAtOnce(uint MemoryAddress, uint bytesToRead, out int bytesRead, out byte[] data)
265            {
266                try
267                {
268                    data = new byte[bytesToRead];
269                    ProcessMemoryReader.ProcessMemoryReaderApi.ReadProcessMemory(m_hProcess, (IntPtr)MemoryAddress, data, bytesToRead, out bytesRead);
270                }
271                catch (SEHException ex)
272                {
273                    logger.Error.WriteLine("ReadProcessMemory() SEHException was thrown: (0x{0:x8}) - {1}", ex.ErrorCode, ex.Message);
274                    logger.Error.WriteLine(ex.ToString());
275                    throw ex;
276                }
277                catch (Exception ex)
278                {
279                    logger.Error.WriteLine("ReadProcessMemory(): Exception");
280                    logger.Error.WriteLine(ex.ToString());
281                    throw ex;
282                }
283            }
284          public void ReadProcessMemory(uint MemoryAddress, uint bytesToRead, out int bytesRead, out byte[] data)          public void ReadProcessMemory(uint MemoryAddress, uint bytesToRead, out int bytesRead, out byte[] data)
285          {          {
286              try              try

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

  ViewVC Help
Powered by ViewVC 1.1.22