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

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

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

--- trunk/RomCheater.Core/IPEDData.cs	2014/04/07 11:43:31	796
+++ trunk/RomCheater.Core/IPEDData.cs	2014/04/07 12:03:17	797
@@ -59,25 +59,25 @@
         public UInt16[] _e_res2;
         public UInt32 _e_lfanew;             // File address of new exe header
 
-        public string e_magic { get { return string.Format("0x{0:x4}", _e_magic); } }
-        public string e_cblp { get { return string.Format("0x{0:x4}", _e_cblp); } }
-        public string e_cp { get { return string.Format("0x{0:x4}", _e_cp); } }
-        public string e_crlc { get { return string.Format("0x{0:x4}", _e_crlc); } }
-        public string e_cparhdr { get { return string.Format("0x{0:x4}", _e_cparhdr); } }
-        public string e_minalloc { get { return string.Format("0x{0:x4}", _e_minalloc); } }
-        public string e_maxalloc { get { return string.Format("0x{0:x4}", _e_maxalloc); } }
-        public string e_ss { get { return string.Format("0x{0:x4}", _e_ss); } }
-        public string e_sp { get { return string.Format("0x{0:x4}", _e_sp); } }
-        public string e_csum { get { return string.Format("0x{0:x4}", _e_csum); } }
-        public string e_ip { get { return string.Format("0x{0:x4}", _e_ip); } }
-        public string e_cs { get { return string.Format("0x{0:x4}", _e_cs); } }
-        public string e_lfarlc { get { return string.Format("0x{0:x4}", _e_lfarlc); } }
-        public string e_ovno { get { return string.Format("0x{0:x4}", _e_ovno); } }
+        public string e_magic { get { return string.Format("0x{0}", _e_magic.ToString("X")); } }
+        public string e_cblp { get { return string.Format("0x{0}", _e_cblp.ToString("X")); } }
+        public string e_cp { get { return string.Format("0x{0}", _e_cp.ToString("X")); } }
+        public string e_crlc { get { return string.Format("0x{0}", _e_crlc.ToString("X")); } }
+        public string e_cparhdr { get { return string.Format("0x{0}", _e_cparhdr.ToString("X")); } }
+        public string e_minalloc { get { return string.Format("0x{0}", _e_minalloc.ToString("X")); } }
+        public string e_maxalloc { get { return string.Format("0x{0}", _e_maxalloc.ToString("X")); } }
+        public string e_ss { get { return string.Format("0x{0}", _e_ss.ToString("X")); } }
+        public string e_sp { get { return string.Format("0x{0}", _e_sp.ToString("X")); } }
+        public string e_csum { get { return string.Format("0x{0}", _e_csum.ToString("X")); } }
+        public string e_ip { get { return string.Format("0x{0}", _e_ip.ToString("X")); } }
+        public string e_cs { get { return string.Format("0x{0}", _e_cs.ToString("X")); } }
+        public string e_lfarlc { get { return string.Format("0x{0}", _e_lfarlc.ToString("X")); } }
+        public string e_ovno { get { return string.Format("0x{0}", _e_ovno.ToString("X")); } }
         public ushort[] e_res1 { get { return _e_res1; } }
-        public string e_oemid { get { return string.Format("0x{0:x4}", _e_oemid); } }
-        public string e_oeminfo { get { return string.Format("0x{0:x4}", _e_oeminfo); } }
+        public string e_oemid { get { return string.Format("0x{0}", _e_oemid.ToString("X")); } }
+        public string e_oeminfo { get { return string.Format("0x{0}", _e_oeminfo.ToString("X")); } }
         public ushort[] e_res2 { get { return _e_res2; } }
-        public string e_lfanew { get { return string.Format("0x{0:x8}", _e_lfanew); } }
+        public string e_lfanew { get { return string.Format("0x{0}", _e_lfanew.ToString("X")); } }
 
         public override string ToString()
         {
@@ -92,13 +92,13 @@
         public UInt32 _Size;
         [Browsable(false)]
         public UInt32 _VirtualStart { get { return _VirtualAddress; } }
-        public string VirtualStart { get { return string.Format("0x{0:x8}", _VirtualStart); } }
+        public string VirtualStart { get { return string.Format("0x{0}", _VirtualStart.ToString("X")); } }
         [Browsable(false)]
         public UInt32 _VirtualEnd { get { return (_VirtualStart + _VirtualSize); } }
-        public string VirtualEnd { get { return string.Format("0x{0:x8}", _VirtualEnd); } }
+        public string VirtualEnd { get { return string.Format("0x{0}", _VirtualEnd.ToString("X")); } }
         [Browsable(false)]
         public UInt32 _VirtualSize { get { return _Size; } }
-        public string VirtualSize { get { return string.Format("0x{0:x8}", _VirtualSize); } }
+        public string VirtualSize { get { return string.Format("0x{0}", _VirtualSize.ToString("X")); } }
 
         public override string ToString()
         {
@@ -149,7 +149,7 @@
 
         public override string ToString()
         {
-            return string.Format("Cout: 0x{0}", DataDirectoryCount.ToString("X"));
+            return string.Format("Data Directory Count: 0x{0}", DataDirectoryCount.ToString("X"));
         }
     }
 
@@ -192,41 +192,41 @@
         public DATA_DIRECTORIES _DATA_DIRECTORIES;
 
         public string Magic { get { return ((MagicType)_Magic).ToString(); } }
-        public string MajorLinkerVersion { get { return string.Format("0x{0:x2}", _MajorLinkerVersion); } }
-        public string MinorLinkerVersion { get { return string.Format("0x{0:x2}", _MajorLinkerVersion); } }
+        public string MajorLinkerVersion { get { return string.Format("0x{0}", _MajorLinkerVersion.ToString("X")); } }
+        public string MinorLinkerVersion { get { return string.Format("0x{0}", _MajorLinkerVersion); } }
 
-        public string SizeOfCode { get { return string.Format("0x{0:x2}", _SizeOfCode); } }
-        public string SizeOfInitializedData { get { return string.Format("0x{0:x8}", _SizeOfInitializedData); } }
-        public string SizeOfUninitializedData { get { return string.Format("0x{0:x8}", _SizeOfUninitializedData); } }
-        public string AddressOfEntryPoint { get { return string.Format("0x{0:x8}", _AddressOfEntryPoint); } }
-        public string BaseOfCode { get { return string.Format("0x{0:x8}", _BaseOfCode); } }
-        public string BaseOfData { get { return string.Format("0x{0:x8}", _BaseOfData); } }
-        public string ImageBase { get { return string.Format("0x{0:x8}", _ImageBase); } }
-        public string SectionAlignment { get { return string.Format("0x{0:x8}", _SectionAlignment); } }
-        public string FileAlignment { get { return string.Format("0x{0:x8}", _FileAlignment); } }
-
-        public string MajorOperatingSystemVersion { get { return string.Format("0x{0:x4}", _MajorOperatingSystemVersion); } }
-        public string MinorOperatingSystemVersion { get { return string.Format("0x{0:x4}", _MinorOperatingSystemVersion); } }
-        public string MajorImageVersion { get { return string.Format("0x{0:x4}", _MajorImageVersion); } }
-        public string MinorImageVersion { get { return string.Format("0x{0:x4}", _MinorImageVersion); } }
-        public string MajorSubsystemVersion { get { return string.Format("0x{0:x4}", _MajorSubsystemVersion); } }
-        public string MinorSubsystemVersion { get { return string.Format("0x{0:x4}", _MinorSubsystemVersion); } }
-
-        public string Win32VersionValue { get { return string.Format("0x{0:x8}", _Win32VersionValue); } }
-        public string SizeOfImage { get { return string.Format("0x{0:x8}", _SizeOfImage); } }
-        public string SizeOfHeaders { get { return string.Format("0x{0:x8}", _SizeOfHeaders); } }
-        public string CheckSum { get { return string.Format("0x{0:x8}", _CheckSum); } }
+        public string SizeOfCode { get { return string.Format("0x{0}", _SizeOfCode.ToString("X")); } }
+        public string SizeOfInitializedData { get { return string.Format("0x{0}", _SizeOfInitializedData.ToString("X")); } }
+        public string SizeOfUninitializedData { get { return string.Format("0x{0}", _SizeOfUninitializedData.ToString("X")); } }
+        public string AddressOfEntryPoint { get { return string.Format("0x{0}", _AddressOfEntryPoint.ToString("X")); } }
+        public string BaseOfCode { get { return string.Format("0x{0}", _BaseOfCode.ToString("X")); } }
+        public string BaseOfData { get { return string.Format("0x{0}", _BaseOfData.ToString("X")); } }
+        public string ImageBase { get { return string.Format("0x{0}", _ImageBase.ToString("X")); } }
+        public string SectionAlignment { get { return string.Format("0x{0}", _SectionAlignment.ToString("X")); } }
+        public string FileAlignment { get { return string.Format("0x{0}", _FileAlignment.ToString("X")); } }
+
+        public string MajorOperatingSystemVersion { get { return string.Format("0x{0}", _MajorOperatingSystemVersion.ToString("X")); } }
+        public string MinorOperatingSystemVersion { get { return string.Format("0x{0}", _MinorOperatingSystemVersion.ToString("X")); } }
+        public string MajorImageVersion { get { return string.Format("0x{0}", _MajorImageVersion.ToString("X")); } }
+        public string MinorImageVersion { get { return string.Format("0x{0}", _MinorImageVersion.ToString("X")); } }
+        public string MajorSubsystemVersion { get { return string.Format("0x{0}", _MajorSubsystemVersion.ToString("X")); } }
+        public string MinorSubsystemVersion { get { return string.Format("0x{0}", _MinorSubsystemVersion.ToString("X")); } }
+
+        public string Win32VersionValue { get { return string.Format("0x{0}", _Win32VersionValue.ToString("X")); } }
+        public string SizeOfImage { get { return string.Format("0x{0}", _SizeOfImage.ToString("X")); } }
+        public string SizeOfHeaders { get { return string.Format("0x{0}", _SizeOfHeaders.ToString("X")); } }
+        public string CheckSum { get { return string.Format("0x{0}", _CheckSum.ToString("X")); } }
 
         public string Subsystem { get { return ((SubSystemType)_Subsystem).ToString(); } }
         public string DllCharacteristics { get { return string.Format("{0}", _DllCharacteristics); } }
 
-        public string SizeOfStackReserve { get { return string.Format("0x{0:x8}", _SizeOfStackReserve); } }
-        public string SizeOfStackCommit { get { return string.Format("0x{0:x8}", _SizeOfStackCommit); } }
-        public string SizeOfHeapReserve { get { return string.Format("0x{0:x8}", _SizeOfHeapReserve); } }
-        public string SizeOfHeapCommit { get { return string.Format("0x{0:x8}", _SizeOfHeapCommit); } }
+        public string SizeOfStackReserve { get { return string.Format("0x{0}", _SizeOfStackReserve.ToString("X")); } }
+        public string SizeOfStackCommit { get { return string.Format("0x{0}", _SizeOfStackCommit.ToString("X")); } }
+        public string SizeOfHeapReserve { get { return string.Format("0x{0}", _SizeOfHeapReserve.ToString("X")); } }
+        public string SizeOfHeapCommit { get { return string.Format("0x{0}", _SizeOfHeapCommit.ToString("X")); } }
 
-        public string LoaderFlags { get { return string.Format("0x{0:x8}", _LoaderFlags); } }
-        public string NumberOfRvaAndSizes { get { return string.Format("0x{0:x8}", _NumberOfRvaAndSizes); } }
+        public string LoaderFlags { get { return string.Format("0x{0}", _LoaderFlags.ToString("X")); } }
+        public string NumberOfRvaAndSizes { get { return string.Format("0x{0}", _NumberOfRvaAndSizes.ToString("X")); } }
 
         public DATA_DIRECTORIES DATA_DIRECTORIES { get { return _DATA_DIRECTORIES; } }
 
@@ -276,40 +276,40 @@
 
 
         public string Magic { get { return ((MagicType)_Magic).ToString(); } }
-        public string MajorLinkerVersion { get { return string.Format("0x{0:x2}", _MajorLinkerVersion); } }
-        public string MinorLinkerVersion { get { return string.Format("0x{0:x2}", _MajorLinkerVersion); } }
+        public string MajorLinkerVersion { get { return string.Format("0x{0}", _MajorLinkerVersion.ToString("X")); } }
+        public string MinorLinkerVersion { get { return string.Format("0x{0}", _MajorLinkerVersion.ToString("X")); } }
 
-        public string SizeOfCode { get { return string.Format("0x{0:x2}", _SizeOfCode); } }
-        public string SizeOfInitializedData { get { return string.Format("0x{0:x8}", _SizeOfInitializedData); } }
-        public string SizeOfUninitializedData { get { return string.Format("0x{0:x8}", _SizeOfUninitializedData); } }
-        public string AddressOfEntryPoint { get { return string.Format("0x{0:x8}", _AddressOfEntryPoint); } }
-        public string BaseOfCode { get { return string.Format("0x{0:x8}", _BaseOfCode); } }
-        public string ImageBase { get { return string.Format("0x{0:x16}", _ImageBase); } }
-        public string SectionAlignment { get { return string.Format("0x{0:x8}", _SectionAlignment); } }
-        public string FileAlignment { get { return string.Format("0x{0:x8}", _FileAlignment); } }
-
-        public string MajorOperatingSystemVersion { get { return string.Format("0x{0:x4}", _MajorOperatingSystemVersion); } }
-        public string MinorOperatingSystemVersion { get { return string.Format("0x{0:x4}", _MinorOperatingSystemVersion); } }
-        public string MajorImageVersion { get { return string.Format("0x{0:x4}", _MajorImageVersion); } }
-        public string MinorImageVersion { get { return string.Format("0x{0:x4}", _MinorImageVersion); } }
-        public string MajorSubsystemVersion { get { return string.Format("0x{0:x4}", _MajorSubsystemVersion); } }
-        public string MinorSubsystemVersion { get { return string.Format("0x{0:x4}", _MinorSubsystemVersion); } }
-
-        public string Win32VersionValue { get { return string.Format("0x{0:x8}", _Win32VersionValue); } }
-        public string SizeOfImage { get { return string.Format("0x{0:x8}", _SizeOfImage); } }
-        public string SizeOfHeaders { get { return string.Format("0x{0:x8}", _SizeOfHeaders); } }
-        public string CheckSum { get { return string.Format("0x{0:x8}", _CheckSum); } }
+        public string SizeOfCode { get { return string.Format("0x{0}", _SizeOfCode.ToString("X")); } }
+        public string SizeOfInitializedData { get { return string.Format("0x{0}", _SizeOfInitializedData.ToString("X")); } }
+        public string SizeOfUninitializedData { get { return string.Format("0x{0}", _SizeOfUninitializedData.ToString("X")); } }
+        public string AddressOfEntryPoint { get { return string.Format("0x{0}", _AddressOfEntryPoint.ToString("X")); } }
+        public string BaseOfCode { get { return string.Format("0x{0}", _BaseOfCode.ToString("X")); } }
+        public string ImageBase { get { return string.Format("0x{0}", _ImageBase.ToString("X")); } }
+        public string SectionAlignment { get { return string.Format("0x{0}", _SectionAlignment.ToString("X")); } }
+        public string FileAlignment { get { return string.Format("0x{0}", _FileAlignment.ToString("X")); } }
+
+        public string MajorOperatingSystemVersion { get { return string.Format("0x{0}", _MajorOperatingSystemVersion.ToString("X")); } }
+        public string MinorOperatingSystemVersion { get { return string.Format("0x{0}", _MinorOperatingSystemVersion.ToString("X")); } }
+        public string MajorImageVersion { get { return string.Format("0x{0}", _MajorImageVersion.ToString("X")); } }
+        public string MinorImageVersion { get { return string.Format("0x{0}", _MinorImageVersion.ToString("X")); } }
+        public string MajorSubsystemVersion { get { return string.Format("0x{0}", _MajorSubsystemVersion.ToString("X")); } }
+        public string MinorSubsystemVersion { get { return string.Format("0x{0}", _MinorSubsystemVersion.ToString("X")); } }
+
+        public string Win32VersionValue { get { return string.Format("0x{0}", _Win32VersionValue.ToString("X")); } }
+        public string SizeOfImage { get { return string.Format("0x{0}", _SizeOfImage.ToString("X")); } }
+        public string SizeOfHeaders { get { return string.Format("0x{0}", _SizeOfHeaders.ToString("X")); } }
+        public string CheckSum { get { return string.Format("0x{0}", _CheckSum.ToString("X")); } }
 
         public string Subsystem { get { return ((SubSystemType)_Subsystem).ToString(); } }
         public string DllCharacteristics { get { return string.Format("{0}", _DllCharacteristics); } }
 
-        public string SizeOfStackReserve { get { return string.Format("0x{0:x16}", _SizeOfStackReserve); } }
-        public string SizeOfStackCommit { get { return string.Format("0x{0:x16}", _SizeOfStackCommit); } }
-        public string SizeOfHeapReserve { get { return string.Format("0x{0:x16}", _SizeOfHeapReserve); } }
-        public string SizeOfHeapCommit { get { return string.Format("0x{0:x16}", _SizeOfHeapCommit); } }
+        public string SizeOfStackReserve { get { return string.Format("0x{0}", _SizeOfStackReserve.ToString("X")); } }
+        public string SizeOfStackCommit { get { return string.Format("0x{0}", _SizeOfStackCommit.ToString("X")); } }
+        public string SizeOfHeapReserve { get { return string.Format("0x{0}", _SizeOfHeapReserve.ToString("X")); } }
+        public string SizeOfHeapCommit { get { return string.Format("0x{0}", _SizeOfHeapCommit.ToString("X")); } }
 
-        public string LoaderFlags { get { return string.Format("0x{0:x8}", _LoaderFlags); } }
-        public string NumberOfRvaAndSizes { get { return string.Format("0x{0:x8}", _NumberOfRvaAndSizes); } }
+        public string LoaderFlags { get { return string.Format("0x{0}", _LoaderFlags.ToString("X")); } }
+        public string NumberOfRvaAndSizes { get { return string.Format("0x{0}", _NumberOfRvaAndSizes.ToString("X")); } }
 
         public DATA_DIRECTORIES DATA_DIRECTORIES { get { return _DATA_DIRECTORIES; } }
 
@@ -334,11 +334,11 @@
         public FileCharacteristicType _Characteristics;
 
         public MachineTypeFlags MachineType { get { return _Machine; } }
-        public string NumberOfSections { get { return string.Format("0x{0:x4}", _NumberOfSections); } }
-        public string TimeDateStamp { get { return string.Format("{0} (0x{1:x8})", GetDateTimeFromLinkerTime(_TimeDateStamp).ToString(), _TimeDateStamp); } }
-        public string PointerToSymbolTable { get { return string.Format("0x{0:x8}", _PointerToSymbolTable); } }
-        public string NumberOfSymbols { get { return string.Format("0x{0:x8}", _NumberOfSymbols); } }
-        public string SizeOfOptionalHeader { get { return string.Format("0x{0:x4}", _SizeOfOptionalHeader); } }
+        public string NumberOfSections { get { return string.Format("0x{0}", _NumberOfSections.ToString("X")); } }
+        public string TimeDateStamp { get { return string.Format("{0} (0x{1})", GetDateTimeFromLinkerTime(_TimeDateStamp).ToString(), _TimeDateStamp.ToString("X")); } }
+        public string PointerToSymbolTable { get { return string.Format("0x{0}", _PointerToSymbolTable.ToString("X")); } }
+        public string NumberOfSymbols { get { return string.Format("0x{0}", _NumberOfSymbols.ToString("X")); } }
+        public string SizeOfOptionalHeader { get { return string.Format("0x{0}", _SizeOfOptionalHeader.ToString("X")); } }
         public FileCharacteristicType Characteristics { get { return _Characteristics; } }
         public override string ToString()
         {
@@ -386,18 +386,18 @@
 
         public string Name { get { if (_Name == null || _Name.Length == 0) { return string.Empty; } else { return _Name; } } }
         //public Misc Misc { get { return _Misc; } }
-        public string VirtualSize { get { return string.Format("0x{0:x8}", _VirtualSize); } }
-        public string VirtualAddress { get { return string.Format("0x{0:x8}", _VirtualAddress); } }
+        public string VirtualSize { get { return string.Format("0x{0}", _VirtualSize.ToString("X")); } }
+        public string VirtualAddress { get { return string.Format("0x{0}", _VirtualAddress.ToString("X")); } }
         [Browsable(false)]
         public UInt32 _VirtualAddressEnd { get { return _VirtualAddress + _VirtualSize; } }
-        public string VirtualAddressEnd { get { return string.Format("0x{0:x8}", _VirtualAddressEnd); } }
+        public string VirtualAddressEnd { get { return string.Format("0x{0}", _VirtualAddressEnd.ToString("X")); } }
 
-        public string SizeOfRawData { get { return string.Format("0x{0:x8}", _SizeOfRawData); } }
-        public string PointerToRawData { get { return string.Format("0x{0:x8}", _PointerToRawData); } }
-        public string PointerToRelocations { get { return string.Format("0x{0:x8}", _PointerToRelocations); } }
-        public string PointerToLinenumbers { get { return string.Format("0x{0:x8}", _PointerToLinenumbers); } }
-        public string NumberOfRelocations { get { return string.Format("0x{0:x4}", _NumberOfRelocations); } }
-        public string NumberOfLinenumbers { get { return string.Format("0x{0:x4}", _NumberOfLinenumbers); } }
+        public string SizeOfRawData { get { return string.Format("0x{0}", _SizeOfRawData.ToString("X")); } }
+        public string PointerToRawData { get { return string.Format("0x{0}", _PointerToRawData.ToString("X")); } }
+        public string PointerToRelocations { get { return string.Format("0x{0}", _PointerToRelocations.ToString("X")); } }
+        public string PointerToLinenumbers { get { return string.Format("0x{0}", _PointerToLinenumbers.ToString("X")); } }
+        public string NumberOfRelocations { get { return string.Format("0x{0}", _NumberOfRelocations.ToString("X")); } }
+        public string NumberOfLinenumbers { get { return string.Format("0x{0}", _NumberOfLinenumbers.ToString("X")); } }
         public string Characteristics { get { return _Characteristics.ToString(); } }
 
         public override string ToString()
@@ -445,9 +445,9 @@
 
 
         public string Name { get { return _Name; } }
-        public string Start { get { return string.Format("0x{0:x8}", _Start); } }
-        public string End { get { return string.Format("0x{0:x8}", _End); } }
-        public string Size { get { return string.Format("0x{0:x8}", _Size); } }
+        public string Start { get { return string.Format("0x{0}", _Start.ToString("X")); } }
+        public string End { get { return string.Format("0x{0}", _End.ToString("X")); } }
+        public string Size { get { return string.Format("0x{0}", _Size.ToString("X")); } }
 
         public override string ToString()
         {

 

  ViewVC Help
Powered by ViewVC 1.1.22