ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/RomCheater/Docking/FloatingRamDumperDialog.cs
(Generate patch)

Comparing trunk/RomCheater/Docking/FloatingRamDumperDialog.cs (file contents):
Revision 245 by william, Sun Jun 3 14:50:09 2012 UTC vs.
Revision 246 by william, Sun Jun 3 15:15:51 2012 UTC

--- trunk/RomCheater/Docking/FloatingRamDumperDialog.cs	2012/06/03 14:50:09	245
+++ trunk/RomCheater/Docking/FloatingRamDumperDialog.cs	2012/06/03 15:15:51	246
@@ -156,9 +156,25 @@ namespace RomCheater.Docking
                 if (end > uint.MaxValue)
                     logger.Warn.WriteLine("Warning: DumpRam(): ending address is greater than 0x{0:x8} and we are running x64, this will exceed the max value for UIntPtr", int.MaxValue);
             }
+            else if (arch == ProcessorAssemblyArchitecture.AnyCpu)
+            {
+                if (IntPtr.Size == 4) //x86
+                {
+                    if (end > int.MaxValue)
+                        logger.Warn.WriteLine("Warning: DumpRam(): ending address is greater than 0x{0:x8} and we are running x86, this will exceed the max value for IntPtr", int.MaxValue);
+                }
+                else if (IntPtr.Size == 8) //x64
+                {
+                }
+                else // unknown
+                {
+                    if (end > uint.MaxValue)
+                        logger.Warn.WriteLine("Warning: DumpRam(): ending address is greater than 0x{0:x8} and we are running x64, this will exceed the max value for UIntPtr", int.MaxValue);
+                }
+            }
             else
             {
-                throw new InvalidProgramException(string.Format("Unexcepted processor aritecture: expected x86 or x64 but we have: {0}", arch));
+                throw new InvalidProgramException(string.Format("Unexcepted processor aritecture: expected x86, x64, or AnyCpu(Msil) but we have: {0}", arch));
             }
             DumpRam(start, byte_count, filename);
         }