/[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

revision 289 by william, Tue Jun 5 09:06:27 2012 UTC revision 292 by william, Tue Jun 5 10:26:59 2012 UTC
# Line 1  Line 1 
1  //#define USE_AUTOMATIC_MEMORY_SEARCH_RANGE // when defined will automatically choose the best starting address and size for memory search otherwise it will use the constants defined in MemorySizeConstants  #define USE_AUTOMATIC_MEMORY_SEARCH_RANGE // when defined will automatically choose the best starting address and size for memory search otherwise it will use the constants defined in MemorySizeConstants
2  #if !USE_AUTOMATIC_MEMORY_SEARCH_RANGE  #if !USE_AUTOMATIC_MEMORY_SEARCH_RANGE
3  #define FORCE_USE_OF_MEMORYSIZECONSTANTS // when defined wil force the use of the constants defined in MemorySizeConstants for memory search range  #define FORCE_USE_OF_MEMORYSIZECONSTANTS // when defined wil force the use of the constants defined in MemorySizeConstants for memory search range
4  #endif  #endif
# Line 24  using System.IO; Line 24  using System.IO;
24  using Sojaner.MemoryScanner.MemoryProviers;  using Sojaner.MemoryScanner.MemoryProviers;
25  using RomCheater.PluginFramework.Events;  using RomCheater.PluginFramework.Events;
26  using System.Reflection;  using System.Reflection;
27    using Sojaner.MemoryScanner;
28    
29  namespace RomCheater.Docking  namespace RomCheater.Docking
30  {  {
# Line 76  namespace RomCheater.Docking Line 77  namespace RomCheater.Docking
77              txtMemoryRangeSize.Value = (MemorySizeConstants.MinimumAddress > 0) ? (uint)(MemorySizeConstants.MaximumAddress - MemorySizeConstants.MinimumAddress) : MemorySizeConstants.MaximumAddress;              txtMemoryRangeSize.Value = (MemorySizeConstants.MinimumAddress > 0) ? (uint)(MemorySizeConstants.MaximumAddress - MemorySizeConstants.MinimumAddress) : MemorySizeConstants.MaximumAddress;
78  #endif  #endif
79  #if USE_AUTOMATIC_MEMORY_SEARCH_RANGE && !FORCE_USE_OF_MEMORYSIZECONSTANTS  #if USE_AUTOMATIC_MEMORY_SEARCH_RANGE && !FORCE_USE_OF_MEMORYSIZECONSTANTS
80              // code to automatically choose the best starting memory address and size              //// code to automatically choose the best starting memory address and size
81                if (process != null)
82                {
83                    string filename = process.MainModule.FileName;
84                    //string filename = @"c:\Windows\notepad.exe";
85                    PEReader peReader = new PEReader(filename);
86                }
87                else
88                {
89                    txtMemoryRangeStart.Value = MemorySizeConstants.MinimumAddress;
90                    txtMemoryRangeSize.Value = (MemorySizeConstants.MinimumAddress > 0) ? (uint)(MemorySizeConstants.MaximumAddress - MemorySizeConstants.MinimumAddress) : MemorySizeConstants.MaximumAddress;
91                }
92  #endif  #endif
93    
94          }          }

Legend:
Removed from v.289  
changed lines
  Added in v.292

  ViewVC Help
Powered by ViewVC 1.1.22