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

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

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

--- trunk/Win32/Sojaner.MemoryScanner/MemoryProviers/BaseMemoryProvider.cs	2012/06/03 15:28:16	248
+++ trunk/Win32/Sojaner.MemoryScanner/MemoryProviers/BaseMemoryProvider.cs	2012/06/03 16:09:05	249
@@ -77,7 +77,7 @@
                 //logger.VerboseDebug.WriteLine("CloseProvider(): System.Environment.StackTrace: {0}{1}", System.Environment.NewLine, System.Environment.StackTrace);
                 if (provider == null) return;
                 provider.CloseHandle();
-                provider = null; // free any memory associated with the provider
+                //provider = null; // free any memory associated with the provider
                 isClosed = true;
                 isOpen = false;
             }
@@ -123,8 +123,8 @@
         #endregion
 
         #region IPatchMemory members
-        #region public virtual bool PatchMemory(uint address, byte value)
-        public virtual bool PatchMemory(uint address, byte value)
+        #region public virtual bool PatchMemory(int address, byte value)
+        public virtual bool PatchMemory(int address, byte value)
         {
             if (!EnsureProviderIsOpen()) { return false; }
             int bytesWritten;
@@ -136,8 +136,8 @@
             return false;
         }
         #endregion
-        #region public virtual bool PatchMemory(uint address, sbyte value)
-        public virtual bool PatchMemory(uint address, sbyte value)
+        #region public virtual bool PatchMemory(int address, sbyte value)
+        public virtual bool PatchMemory(int address, sbyte value)
         {
             if (!EnsureProviderIsOpen()) { return false; }
             int bytesWritten;
@@ -149,8 +149,8 @@
             return false;
         }
         #endregion
-        #region public virtual bool PatchMemory(uint address, ushort value)
-        public virtual bool PatchMemory(uint address, ushort value)
+        #region public virtual bool PatchMemory(int address, ushort value)
+        public virtual bool PatchMemory(int address, ushort value)
         {
             if (!EnsureProviderIsOpen()) { return false; }
             int bytesWritten;
@@ -163,8 +163,8 @@
             return false;
         }
         #endregion
-        #region public virtual bool PatchMemory(uint address, short value)
-        public virtual bool PatchMemory(uint address, short value)
+        #region public virtual bool PatchMemory(int address, short value)
+        public virtual bool PatchMemory(int address, short value)
         {
             if (!EnsureProviderIsOpen()) { return false; }
             int bytesWritten;
@@ -177,8 +177,8 @@
             return false;
         }
         #endregion
-        #region public virtual bool PatchMemory(uint address, uint value)
-        public virtual bool PatchMemory(uint address, uint value)
+        #region public virtual bool PatchMemory(int address, uint value)
+        public virtual bool PatchMemory(int address, uint value)
         {
             if (!EnsureProviderIsOpen()) { return false; }
             int bytesWritten;
@@ -191,8 +191,8 @@
             return false;
         }
         #endregion
-        #region public virtual bool PatchMemory(uint address, int value)
-        public virtual bool PatchMemory(uint address, int value)
+        #region public virtual bool PatchMemory(int address, int value)
+        public virtual bool PatchMemory(int address, int value)
         {
             if (!EnsureProviderIsOpen()) { return false; }
             int bytesWritten;
@@ -205,8 +205,8 @@
             return false;
         }
         #endregion
-        #region public virtual bool PatchMemory(uint address, ulong value)
-        public virtual bool PatchMemory(uint address, ulong value)
+        #region public virtual bool PatchMemory(int address, ulong value)
+        public virtual bool PatchMemory(int address, ulong value)
         {
             if (!EnsureProviderIsOpen()) { return false; }
             int bytesWritten;
@@ -219,8 +219,8 @@
             return false;
         }
         #endregion
-        #region public virtual bool PatchMemory(uint address, long value)
-        public virtual bool PatchMemory(uint address, long value)
+        #region public virtual bool PatchMemory(int address, long value)
+        public virtual bool PatchMemory(int address, long value)
         {
             if (!EnsureProviderIsOpen()) { return false; }
             int bytesWritten;
@@ -236,8 +236,8 @@
         #endregion
 
         #region IReadMemory members
-        #region public virtual bool ReadMemory(uint address, out byte value)
-        public virtual bool ReadMemory(uint address, out byte value)
+        #region public virtual bool ReadMemory(int address, out byte value)
+        public virtual bool ReadMemory(int address, out byte value)
         {
             value = 0;
              if (!EnsureProviderIsOpen()) { return false; }
@@ -256,8 +256,8 @@
             }
         }
         #endregion
-        #region public virtual bool ReadMemory(uint address, out sbyte value)
-        public virtual bool ReadMemory(uint address, out sbyte value)
+        #region public virtual bool ReadMemory(int address, out sbyte value)
+        public virtual bool ReadMemory(int address, out sbyte value)
         {
             value = 0;
             if (!EnsureProviderIsOpen()) { return false; }
@@ -277,8 +277,8 @@
             }
         }
         #endregion
-        #region public virtual bool ReadMemory(uint address, out ushort value)
-        public virtual bool ReadMemory(uint address, out ushort value)
+        #region public virtual bool ReadMemory(int address, out ushort value)
+        public virtual bool ReadMemory(int address, out ushort value)
         {
             value = 0;
             if (!EnsureProviderIsOpen()) { return false; }
@@ -298,8 +298,8 @@
             }
         }
         #endregion
-        #region public virtual bool ReadMemory(uint address, out short value)
-        public virtual bool ReadMemory(uint address, out short value)
+        #region public virtual bool ReadMemory(int address, out short value)
+        public virtual bool ReadMemory(int address, out short value)
         {
             value = 0;
             if (!EnsureProviderIsOpen()) { return false; }
@@ -319,8 +319,8 @@
             }
         }
         #endregion
-        #region public virtual bool ReadMemory(uint address, out uint value)
-        public virtual bool ReadMemory(uint address, out uint value)
+        #region public virtual bool ReadMemory(int address, out uint value)
+        public virtual bool ReadMemory(int address, out uint value)
         {
             value = 0;
             if (!EnsureProviderIsOpen()) { return false; }
@@ -340,8 +340,8 @@
             }
         }
         #endregion
-        #region public virtual bool ReadMemory(uint address, out int value)
-        public virtual bool ReadMemory(uint address, out int value)
+        #region public virtual bool ReadMemory(int address, out int value)
+        public virtual bool ReadMemory(int address, out int value)
         {
             value = 0;
             if (!EnsureProviderIsOpen()) { return false; }
@@ -361,8 +361,8 @@
             }
         }
         #endregion
-        #region public virtual bool ReadMemory(uint address, out ulong value)
-        public virtual bool ReadMemory(uint address, out ulong value)
+        #region public virtual bool ReadMemory(int address, out ulong value)
+        public virtual bool ReadMemory(int address, out ulong value)
         {
             value = 0;
             if (!EnsureProviderIsOpen()) { return false; }
@@ -382,8 +382,8 @@
             }
         }
         #endregion
-        #region public virtual bool ReadMemory(uint address, out long value)
-        public virtual bool ReadMemory(uint address, out long value)
+        #region public virtual bool ReadMemory(int address, out long value)
+        public virtual bool ReadMemory(int address, out long value)
         {
             value = 0;
             if (!EnsureProviderIsOpen()) { return false; }
@@ -406,8 +406,8 @@
         #endregion
 
         #region IMemoryReader members
-        #region public virtual bool ReadFirstNonZeroByte(uint MemoryAddress, uint bytesToRead, out uint address)
-        public virtual bool ReadFirstNonZeroByte(uint MemoryAddress, uint bytesToRead, out uint address)
+        #region public virtual bool ReadFirstNonZeroByte(int MemoryAddress, uint bytesToRead, out int address)
+        public virtual bool ReadFirstNonZeroByte(int MemoryAddress, uint bytesToRead, out int address)
         {
             address = 0;
             if (!EnsureProviderIsOpen()) { return false; }
@@ -415,8 +415,8 @@
             catch { address = 0x00; return false; }
         }
         #endregion       
-        #region public virtual void ReadProcessMemory(uint MemoryAddress, int bytesToRead, out int bytesRead, out byte[] data)
-        public virtual void ReadProcessMemory(uint MemoryAddress, uint bytesToRead, out int bytesRead, out byte[] data)
+        #region public virtual void ReadProcessMemory(int MemoryAddress, int bytesToRead, out int bytesRead, out byte[] data)
+        public virtual void ReadProcessMemory(int MemoryAddress, uint bytesToRead, out int bytesRead, out byte[] data)
         {
             bytesRead = 0x00;
             data = new byte[] { };
@@ -426,8 +426,8 @@
         }
         #endregion
         #region IMemoryWriter members
-        #region public virtual void WriteProcessMemory(uint MemoryAddress, byte byteToWrite, out int bytesWritten)
-        public virtual void WriteProcessMemory(uint MemoryAddress, byte byteToWrite, out int bytesWritten)
+        #region public virtual void WriteProcessMemory(int MemoryAddress, byte byteToWrite, out int bytesWritten)
+        public virtual void WriteProcessMemory(int MemoryAddress, byte byteToWrite, out int bytesWritten)
         {
             bytesWritten = 0;
             if (!EnsureProviderIsOpen()) { return; }
@@ -435,8 +435,8 @@
             catch { bytesWritten = 0x00; }
         }
         #endregion
-        #region public virtual void WriteProcessMemory(uint MemoryAddress, byte[] bytesToWrite, out int bytesWritten)
-        public virtual void WriteProcessMemory(uint MemoryAddress, byte[] bytesToWrite, out int bytesWritten)
+        #region public virtual void WriteProcessMemory(int MemoryAddress, byte[] bytesToWrite, out int bytesWritten)
+        public virtual void WriteProcessMemory(int MemoryAddress, byte[] bytesToWrite, out int bytesWritten)
         {
             bytesWritten = 0;
             if (!EnsureProviderIsOpen()) { return; }
@@ -447,8 +447,8 @@
         #endregion
         #endregion
         #region IFileWriter members
-        #region  public virtual bool WriteProcessMemoryToFile(string filename, uint MemoryAddress, uint bytesToRead, out int bytesRead)
-        public virtual bool WriteProcessMemoryToFile(string filename, uint MemoryAddress, uint bytesToRead, out int bytesRead)
+        #region  public virtual bool WriteProcessMemoryToFile(string filename, int MemoryAddress, uint bytesToRead, out int bytesRead)
+        public virtual bool WriteProcessMemoryToFile(string filename, int MemoryAddress, uint bytesToRead, out int bytesRead)
         {
             bytesRead = 0;
             if (!EnsureProviderIsOpen()) { return false; }

 

  ViewVC Help
Powered by ViewVC 1.1.22