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

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

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

--- trunk/RomCheater/Docking/FloatingMemorySectionViewer.cs	2013/06/07 09:55:01	599
+++ trunk/RomCheater/Docking/FloatingMemorySectionViewer.cs	2013/06/07 10:27:53	600
@@ -12,6 +12,7 @@
 using RomCheater.PluginFramework.Events;
 using Sojaner.MemoryScanner;
 using Sojaner.MemoryScanner.MemoryProviers;
+using ManagedWinapi;
 
 namespace RomCheater.Docking
 {
@@ -45,11 +46,26 @@
         {
             if (process == null) { return; }
             // perform processing when process is updated
-
+            List<MEMORY_REGION_INFORMATION> regions = new List<MEMORY_REGION_INFORMATION>();
             using (GenericMemoryProvider provider = new GenericMemoryProvider((IAcceptsProcessAndConfig)this))
             {
                 provider.OpenProvider();
-                provider.QueryMemoryRegion();
+                if (this.PEData != null)
+                {
+                    if (this.PEData.Is32bitAssembly())
+                    {
+                        regions = provider.QueryMemoryRegions(MemorySizeConstants.MinimumAddress, MemorySizeConstants.MaximumAddressSize_x86);
+                    }
+                    else
+                    {
+                        regions = provider.QueryMemoryRegions(MemorySizeConstants.MinimumAddress, MemorySizeConstants.MaximumAddressSize_x64);
+                    }
+                }
+                else
+                {
+                    regions = provider.QueryMemoryRegions(MemorySizeConstants.MinimumAddress, MemorySizeConstants.MaximumAddressSize_x86);
+                }
+                
                 provider.CloseProvider();
             }
 
@@ -64,6 +80,8 @@
             this.PEData = peData;
         }
         #endregion
-   
+
+
+        public object MEMORY_REGION_INFORMATION { get; set; }
     }
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22