/[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 08:51:33	584
+++ trunk/RomCheater/Docking/FloatingMemorySearcher.cs	2013/06/06 09:12:35	587
@@ -50,14 +50,16 @@
         IAcceptsProcessAndConfig,
         ISearchInProgress,
         IAcceptsBrowseMemoryRegion,
-        IAcceptsMemoryRange
+        IAcceptsMemoryRange,
+        IAcceptPEData
     {
 #if INCREASE_NUMBER_OF_RESULTS_BEFORE_DISPLAY
         const int MIN_NUMBER_OF_RESULTS_BEFORE_DISPLAY = 0x2701; // 10,000 results
 #else
         const int MIN_NUMBER_OF_RESULTS_BEFORE_DISPLAY = 0x03e8; // 1,000 results
 #endif
-
+        private IPEDData _PEData;
+        private IPEDData PEData { get { return _PEData; } set { _PEData = value; } }
         const uint MEM_1B = 0x1;
         const uint MEM_1KB = 0x400;
         const uint MEM_1MB = MEM_1KB * MEM_1KB; // 1024 * 1024 = 1MB
@@ -204,7 +206,18 @@
             get
             {
 #if FORCE_USE_OF_MEMORYSIZECONSTANTS
-                return MemorySizeConstants.MinimumSearchAddress + MemorySizeConstants.MaximumSearchSize;
+                if (this.PEData != null)
+                {
+                    if (this.PEData.Is32bitAssembly())
+                    {
+                        return MemorySizeConstants.MinimumSearchAddress + MemorySizeConstants.MaximumSearchSize_x86;
+                    }
+                    else
+                    {
+                        return MemorySizeConstants.MinimumSearchAddress + MemorySizeConstants.MaximumSearchSize_x64;
+                    }                    
+                }
+                return MemorySizeConstants.MinimumSearchAddress + MemorySizeConstants.MaximumSearchSize_x86;                
 #else
                 return _MemoryRangeSize;
 #endif
@@ -2646,6 +2659,11 @@
 
 #endif
         }
-               
+
+
+        public void SetPEViewerData(IPEDData peData)
+        {
+            this.PEData = peData;
+        }
     }
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22