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

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

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

--- trunk/RomCheater/Docking/FloatingMemorySearcher.cs	2013/06/06 07:56:04	577
+++ trunk/RomCheater/Docking/FloatingMemorySearcher.cs	2013/06/06 08:18:44	578
@@ -181,7 +181,7 @@
         private uint _MemoryRangeStart;
         private uint _MemoryRangeSize;
 #endif
-        public uint MemoryRangeStart
+        public ulong MemoryRangeStart
         {
             get
             {
@@ -198,8 +198,8 @@
                 txtMemoryRangeStart.Value = value;
 #endif
             }
-        }         
-        public uint MemoryRangeSize
+        }
+        public ulong MemoryRangeSize
         {
             get
             {
@@ -502,7 +502,7 @@
                 using (GenericMemoryProvider provider = new GenericMemoryProvider((IAcceptsProcessAndConfig)this))
                 {
                     provider.OpenProvider();
-                    int bytesReadSize;
+                    ulong bytesReadSize;
                     byte[] data;
                     uint bytesToRead = 0;
                     switch (_result.ValueType)
@@ -578,15 +578,15 @@
                     e.Cancel = true;
                     return;
                 }
-                int Address = 0;
+                ulong Address = 0;
                 ResultDataType _result = (ResultDataType)AddedItems[i].Tag;
-                Address = Convert.ToInt32(AddedItems[i].SubItems[col_Added_Address].Text, 16);
+                Address = Convert.ToUInt64(AddedItems[i].SubItems[col_Added_Address].Text, 16);
                 using (GenericMemoryProvider provider = new GenericMemoryProvider((IAcceptsProcessAndConfig)this))
                 {
                     provider.OpenProvider();
-                    int bytesReadSize;
+                    ulong bytesReadSize;
                     byte[] data;
-                    uint bytesToRead = 0;
+                    ulong bytesToRead = 0;
                     switch (_result.ValueType)
                     {
                         case SearchDataTypes._8bits:
@@ -1112,10 +1112,10 @@
                     {
                         #region FirstSearch
                         provider.OpenProvider();
-                        int count = (int)((MemoryRangeSize - MemoryRangeStart) / STEP_SIZE);
-                        SearchResultWriter writer = new SearchResultWriter((int)(count), SearchGuid);
+                        ulong count = (ulong)((MemoryRangeSize - MemoryRangeStart) / STEP_SIZE);
+                        SearchResultWriter writer = new SearchResultWriter((ulong)(count), SearchGuid);
                         int Last_Whole_Percent_Done = 0;
-                        uint size = 0;
+                        ulong size = 0;
                         switch (sdt)
                         {
                             case SearchDataTypes._8bits: size = (MEM_CHUNK_SIZE / BitTools.SizeOf<uint>(sdt)); break;
@@ -1124,10 +1124,10 @@
                             case SearchDataTypes._64bits: size = (MEM_CHUNK_SIZE / BitTools.SizeOf<uint>(sdt)); break;
                         }
                         //uint size = STEP_SIZE * 4096;
-                        for (uint i = MemoryRangeStart; i < MemoryRangeSize; i += size)
+                        for (ulong i = MemoryRangeStart; i < MemoryRangeSize; i += size)
                         {
 
-                            int bytesRead = 0;
+                            ulong bytesRead = 0;
                             byte[] data = new byte[size];
                             provider.ReadProcessMemoryAtOnce(i, size, out bytesRead, out data);
                             string message = string.Format(" -> Reading Address: 0x{0:x8}", (i + MemoryRangeStart));
@@ -1139,7 +1139,7 @@
                                 Last_Whole_Percent_Done = int_percent_done;
                             }
 
-                            uint address_index = i;
+                            ulong address_index = i;
                             #region comparison and serialization
                             switch (sdt)
                             {
@@ -1516,11 +1516,11 @@
                         Guid new_SearchGuid = GuidTools.IncrementGuid(SearchGuid);
                         int Last_Whole_Percent_Done = 0;
                         // need to get the address list
-                        uint[] reader_addresses = new uint[0];
+                        ulong[] reader_addresses = new ulong[0];
                         #region Address pre-population
                         using (SearchResultReader reader = new SearchResultReader(SearchGuid, SearchArgs.IsUnsignedDataType, SearchArgs.DataType, new Action<int, string>(UpdateProgress), new Func<bool>(ShouldCancelAnySearchOperation))) // delete the file on dispose
                         {
-                            reader_addresses = new uint[reader.ResultCount];
+                            reader_addresses = new ulong[reader.ResultCount];
                             // pre-populate the addresses array
                             Stopwatch st_profiler_reader_addresses = new Stopwatch();
                             st_profiler_reader_addresses.Start();
@@ -1588,7 +1588,7 @@
                                     Last_Whole_Percent_Done = int_percent_done;
                                 }
 
-                                int bytesRead = 0;
+                                ulong bytesRead = 0;
                                 byte[] data = new byte[STEP_SIZE];
                                 provider.ReadProcessMemory(address, STEP_SIZE, out bytesRead, out data);
                                 switch (sdt)

 

  ViewVC Help
Powered by ViewVC 1.1.22