/[RomCheater]/trunk/RomCheater.Core/PEData.cs
ViewVC logotype

Diff of /trunk/RomCheater.Core/PEData.cs

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

--- trunk/RomCheater.Core/PEData.cs	2013/06/17 09:31:52	686
+++ trunk/RomCheater.Core/PEData.cs	2014/04/07 12:03:17	797
@@ -25,11 +25,11 @@
 
 
         [Browsable(false)]
-        public uint _VirtualEntryPoint { get; private set; }
-        public string VirtualEntryPoint { get { return string.Format("0x{0:x8}", _VirtualEntryPoint); } }
+        public ulong _VirtualEntryPoint { get; private set; }
+        public string VirtualEntryPoint { get { return string.Format("0x{0}", _VirtualEntryPoint.ToString("X")); } }
 
         [Browsable(false)]
-        public uint _VirtualRVA
+        public ulong _VirtualRVA
         {
             get
             {
@@ -43,7 +43,7 @@
                 }
             }
         }
-        public string VirtualRVA { get { return string.Format("0x{0:x8}", _VirtualRVA); } }
+        public string VirtualRVA { get { return string.Format("0x{0}", _VirtualRVA.ToString("X")); } }
 
         [Browsable(false)]
         public ulong _VirtualImageBase { get; private set; }
@@ -51,14 +51,7 @@
         {
             get
             {
-                if (this.Is32bitAssembly())
-                {
-                    return string.Format("0x{0:x8}", _VirtualImageBase);
-                }
-                else
-                {
-                    return string.Format("0x{0:x16}", _VirtualImageBase);
-                }
+                return string.Format("0x{0}", _VirtualImageBase.ToString("X"));
             }
         }
 
@@ -75,14 +68,15 @@
             if (iap == null) { throw new ArgumentNullException("iap", "The selected process cannot be null"); }
             Process p = iap.AcceptedProcess;
             reader = new PeHeaderReader(p);
-
-            this._VirtualEntryPoint = (uint)p.MainModule.EntryPointAddress;
+           
             if (this.Is32bitAssembly())
             {
-                this._VirtualImageBase = (uint)p.MainModule.BaseAddress;
+                this._VirtualEntryPoint = (uint)p.MainModule.EntryPointAddress;
+                this._VirtualImageBase = (uint)p.MainModule.BaseAddress;                
             }
             else
             {
+                this._VirtualEntryPoint = (ulong)p.MainModule.EntryPointAddress;
                 this._VirtualImageBase = (ulong)p.MainModule.BaseAddress;
             }
 

 

  ViewVC Help
Powered by ViewVC 1.1.22