diff --git a/SabreTools.Models/PortableExecutable/COFFSymbolTableEntries/BaseEntry.cs b/SabreTools.Models/PortableExecutable/COFFSymbolTableEntries/BaseEntry.cs new file mode 100644 index 0000000..7694621 --- /dev/null +++ b/SabreTools.Models/PortableExecutable/COFFSymbolTableEntries/BaseEntry.cs @@ -0,0 +1,32 @@ +namespace SabreTools.Models.PortableExecutable.COFFSymbolTableEntries +{ + /// + /// The symbol table in this section is inherited from the traditional + /// COFF format. It is distinct from Microsoft Visual C++ debug information. + /// A file can contain both a COFF symbol table and Visual C++ debug + /// information, and the two are kept separate. Some Microsoft tools use + /// the symbol table for limited but important purposes, such as + /// communicating COMDAT information to the linker. Section names and file + /// names, as well as code and data symbols, are listed in the symbol table. + /// + /// The location of the symbol table is indicated in the COFF header. + /// + /// The symbol table is an array of records, each 18 bytes long. Each record + /// is either a standard or auxiliary symbol-table record. A standard record + /// defines a symbol or name. + /// + /// Auxiliary symbol table records always follow, and apply to, some standard + /// symbol table record. An auxiliary record can have any format that the tools + /// can recognize, but 18 bytes must be allocated for them so that symbol table + /// is maintained as an array of regular size. Currently, Microsoft tools + /// recognize auxiliary formats for the following kinds of records: function + /// definitions, function begin and end symbols (.bf and .ef), weak externals, + /// file names, and section definitions. + /// + /// The traditional COFF design also includes auxiliary-record formats for arrays + /// and structures.Microsoft tools do not use these, but instead place that + /// symbolic information in Visual C++ debug format in the debug sections. + /// + /// + public abstract class BaseEntry { } +} diff --git a/SabreTools.Models/PortableExecutable/COFFSymbolTableEntries/CLRTokenDefinition.cs b/SabreTools.Models/PortableExecutable/COFFSymbolTableEntries/CLRTokenDefinition.cs new file mode 100644 index 0000000..c21c69e --- /dev/null +++ b/SabreTools.Models/PortableExecutable/COFFSymbolTableEntries/CLRTokenDefinition.cs @@ -0,0 +1,33 @@ +namespace SabreTools.Models.PortableExecutable.COFFSymbolTableEntries +{ + /// + /// Auxiliary Format 6: CLR Token Definition (Object Only) + /// + /// This auxiliary symbol generally follows the IMAGE_SYM_CLASS_CLR_TOKEN. It is + /// used to associate a token with the COFF symbol table's namespace. + /// + /// + public class CLRTokenDefinition : BaseEntry + { + /// + /// Must be IMAGE_AUX_SYMBOL_TYPE_TOKEN_DEF (1). + /// + public byte AuxFormat6AuxType { get; set; } + + /// + /// Reserved, must be zero. + /// + public byte AuxFormat6Reserved1 { get; set; } + + /// + /// The symbol index of the COFF symbol to which this CLR token definition refers. + /// + public uint AuxFormat6SymbolTableIndex { get; set; } + + /// + /// Reserved, must be zero. + /// + /// 12 bytes + public byte[]? AuxFormat6Reserved2 { get; set; } + } +} \ No newline at end of file diff --git a/SabreTools.Models/PortableExecutable/COFFSymbolTableEntries/Descriptor.cs b/SabreTools.Models/PortableExecutable/COFFSymbolTableEntries/Descriptor.cs new file mode 100644 index 0000000..4d18142 --- /dev/null +++ b/SabreTools.Models/PortableExecutable/COFFSymbolTableEntries/Descriptor.cs @@ -0,0 +1,53 @@ +namespace SabreTools.Models.PortableExecutable.COFFSymbolTableEntries +{ + /// + /// Auxiliary Format 2: .bf and .ef Symbols + /// + /// For each function definition in the symbol table, three items describe + /// the beginning, ending, and number of lines. Each of these symbols has + /// storage class FUNCTION (101): + /// + /// A symbol record named .bf (begin function). The Value field is unused. + /// + /// A symbol record named .lf (lines in function). The Value field gives the + /// number of lines in the function. + /// + /// A symbol record named .ef (end of function). The Value field has the same + /// number as the Total Size field in the function-definition symbol record. + /// + // The .bf and .ef symbol records (but not .lf records) are followed by an + // auxiliary record with the following format: + /// + /// + public class Descriptor : BaseEntry + { + /// + /// Unused + /// + public uint Unused1 { get; set; } + + /// + /// The actual ordinal line number (1, 2, 3, and so on) within the source file, + /// corresponding to the .bf or .ef record. + /// + public ushort Linenumber { get; set; } + + /// + /// Unused + /// + /// 6 bytes + public byte[]? Unused2 { get; set; } + + /// + /// The symbol-table index of the next .bf symbol record. If the function is the + /// last in the symbol table, this field is set to zero. It is not used for + /// .ef records. + /// + public uint PointerToNextFunction { get; set; } + + /// + /// Unused + /// + public ushort Unused3 { get; set; } + } +} \ No newline at end of file diff --git a/SabreTools.Models/PortableExecutable/COFFSymbolTableEntries/FileRecord.cs b/SabreTools.Models/PortableExecutable/COFFSymbolTableEntries/FileRecord.cs new file mode 100644 index 0000000..a3e61f1 --- /dev/null +++ b/SabreTools.Models/PortableExecutable/COFFSymbolTableEntries/FileRecord.cs @@ -0,0 +1,20 @@ +namespace SabreTools.Models.PortableExecutable.COFFSymbolTableEntries +{ + /// + /// Auxiliary Format 4: Files + /// + /// This format follows a symbol-table record with storage class FILE (103). + /// The symbol name itself should be .file, and the auxiliary record that + /// follows it gives the name of a source-code file. + /// + /// + public class FileRecord : BaseEntry + { + /// + /// An ANSI string that gives the name of the source file. This is padded + /// with nulls if it is less than the maximum length. + /// + /// 18 bytes + public byte[]? FileName { get; set; } + } +} \ No newline at end of file diff --git a/SabreTools.Models/PortableExecutable/COFFSymbolTableEntries/FunctionDefinition.cs b/SabreTools.Models/PortableExecutable/COFFSymbolTableEntries/FunctionDefinition.cs new file mode 100644 index 0000000..acb2205 --- /dev/null +++ b/SabreTools.Models/PortableExecutable/COFFSymbolTableEntries/FunctionDefinition.cs @@ -0,0 +1,47 @@ +namespace SabreTools.Models.PortableExecutable.COFFSymbolTableEntries +{ + /// + /// Auxiliary Format 1: Function Definitions + /// + /// A symbol table record marks the beginning of a function definition if it + /// has all of the following: a storage class of EXTERNAL (2), a Type value + /// that indicates it is a function (0x20), and a section number that is + /// greater than zero. Note that a symbol table record that has a section + /// number of UNDEFINED (0) does not define the function and does not have + /// an auxiliary record. Function-definition symbol records are followed by + /// an auxiliary record in the format described below: + /// + /// + public class FunctionDefinition : BaseEntry + { + /// + /// The symbol-table index of the corresponding .bf (begin function) + /// symbol record. + /// + public uint TagIndex { get; set; } + + /// + /// The size of the executable code for the function itself. If the function + /// is in its own section, the SizeOfRawData in the section header is greater + /// or equal to this field, depending on alignment considerations. + /// + public uint TotalSize { get; set; } + + /// + /// The file offset of the first COFF line-number entry for the function, or + /// zero if none exists. + /// + public uint PointerToLinenumber { get; set; } + + /// + /// The symbol-table index of the record for the next function. If the function + /// is the last in the symbol table, this field is set to zero. + /// + public uint PointerToNextFunction { get; set; } + + /// + /// Unused + /// + public ushort Unused { get; set; } + } +} \ No newline at end of file diff --git a/SabreTools.Models/PortableExecutable/COFFSymbolTableEntries/SectionDefinition.cs b/SabreTools.Models/PortableExecutable/COFFSymbolTableEntries/SectionDefinition.cs new file mode 100644 index 0000000..f09b6a9 --- /dev/null +++ b/SabreTools.Models/PortableExecutable/COFFSymbolTableEntries/SectionDefinition.cs @@ -0,0 +1,54 @@ +namespace SabreTools.Models.PortableExecutable.COFFSymbolTableEntries +{ + /// + /// Auxiliary Format 5: Section Definitions + /// + /// This format follows a symbol-table record that defines a section. Such a + /// record has a symbol name that is the name of a section (such as .text or + /// .drectve) and has storage class STATIC (3). The auxiliary record provides + /// information about the section to which it refers. Thus, it duplicates some + /// of the information in the section header. + /// + /// + public class SectionDefinition : BaseEntry + { + /// + /// The size of section data; the same as SizeOfRawData in the section header. + /// + public uint Length { get; set; } + + /// + /// The number of relocation entries for the section. + /// + public ushort NumberOfRelocations { get; set; } + + /// + /// The number of line-number entries for the section. + /// + public ushort NumberOfLinenumbers { get; set; } + + /// + /// The checksum for communal data. It is applicable if the IMAGE_SCN_LNK_COMDAT + /// flag is set in the section header. + /// + public uint CheckSum { get; set; } + + /// + /// One-based index into the section table for the associated section. This is + /// used when the COMDAT selection setting is 5. + /// + public ushort Number { get; set; } + + /// + /// The COMDAT selection number. This is applicable if the section is a + /// COMDAT section. + /// + public byte Selection { get; set; } + + /// + /// Unused + /// + /// 3 bytes + public byte[]? Unused { get; set; } + } +} \ No newline at end of file diff --git a/SabreTools.Models/PortableExecutable/COFFSymbolTableEntries/StandardRecord.cs b/SabreTools.Models/PortableExecutable/COFFSymbolTableEntries/StandardRecord.cs new file mode 100644 index 0000000..f7ad845 --- /dev/null +++ b/SabreTools.Models/PortableExecutable/COFFSymbolTableEntries/StandardRecord.cs @@ -0,0 +1,58 @@ +namespace SabreTools.Models.PortableExecutable.COFFSymbolTableEntries +{ + /// + /// A standard record defines a symbol or name. + /// + /// + public class StandardRecord : BaseEntry + { + #region Symbol Name + + /// + /// An array of 8 bytes. This array is padded with nulls on the right if + /// the name is less than 8 bytes long. + /// + public byte[]? ShortName { get; set; } = new byte[8]; + + /// + /// A field that is set to all zeros if the name is longer than 8 bytes. + /// + public uint Zeroes { get; set; } + + /// + /// An offset into the string table. + /// + public uint Offset { get; set; } + + #endregion + + /// + /// The value that is associated with the symbol. The interpretation of this + /// field depends on SectionNumber and StorageClass. A typical meaning is the + /// relocatable address. + /// + public uint Value { get; set; } + + /// + /// The signed integer that identifies the section, using a one-based index + /// into the section table. Some values have special meaning. + /// + public ushort SectionNumber { get; set; } + + /// + /// A number that represents type. Microsoft tools set this field to 0x20 + /// (function) or 0x0 (not a function). + /// + public SymbolType SymbolType { get; set; } + + /// + /// An enumerated value that represents storage class. + /// + public StorageClass StorageClass { get; set; } + + /// + /// The number of auxiliary symbol table entries that follow this record. + /// + public byte NumberOfAuxSymbols { get; set; } + } +} \ No newline at end of file diff --git a/SabreTools.Models/PortableExecutable/COFFSymbolTableEntries/WeakExternal.cs b/SabreTools.Models/PortableExecutable/COFFSymbolTableEntries/WeakExternal.cs new file mode 100644 index 0000000..a5aae9f --- /dev/null +++ b/SabreTools.Models/PortableExecutable/COFFSymbolTableEntries/WeakExternal.cs @@ -0,0 +1,45 @@ +namespace SabreTools.Models.PortableExecutable.COFFSymbolTableEntries +{ + /// + /// Auxiliary Format 3: Weak Externals + /// + /// "Weak externals" are a mechanism for object files that allows flexibility at + /// link time. A module can contain an unresolved external symbol (sym1), but it + /// can also include an auxiliary record that indicates that if sym1 is not + /// present at link time, another external symbol (sym2) is used to resolve + /// references instead. + /// + /// If a definition of sym1 is linked, then an external reference to the symbol + /// is resolved normally. If a definition of sym1 is not linked, then all references + /// to the weak external for sym1 refer to sym2 instead. The external symbol, sym2, + /// must always be linked; typically, it is defined in the module that contains + /// the weak reference to sym1. + /// + /// Weak externals are represented by a symbol table record with EXTERNAL storage + /// class, UNDEF section number, and a value of zero. The weak-external symbol + /// record is followed by an auxiliary record with the following format: + /// + /// + public class WeakExternal : BaseEntry + { + /// + /// The symbol-table index of sym2, the symbol to be linked if sym1 is not found. + /// + public uint TagIndex { get; set; } + + /// + /// A value of IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY indicates that no library search + /// for sym1 should be performed. + /// A value of IMAGE_WEAK_EXTERN_SEARCH_LIBRARY indicates that a library search for + /// sym1 should be performed. + /// A value of IMAGE_WEAK_EXTERN_SEARCH_ALIAS indicates that sym1 is an alias for sym2. + /// + public uint Characteristics { get; set; } + + /// + /// Unused + /// + /// 10 bytes + public byte[]? Unused { get; set; } + } +} \ No newline at end of file diff --git a/SabreTools.Models/PortableExecutable/COFFSymbolTableEntry.cs b/SabreTools.Models/PortableExecutable/COFFSymbolTableEntry.cs deleted file mode 100644 index 7129ec6..0000000 --- a/SabreTools.Models/PortableExecutable/COFFSymbolTableEntry.cs +++ /dev/null @@ -1,307 +0,0 @@ -namespace SabreTools.Models.PortableExecutable -{ - /// - /// The symbol table in this section is inherited from the traditional - /// COFF format. It is distinct from Microsoft Visual C++ debug information. - /// A file can contain both a COFF symbol table and Visual C++ debug - /// information, and the two are kept separate. Some Microsoft tools use - /// the symbol table for limited but important purposes, such as - /// communicating COMDAT information to the linker. Section names and file - /// names, as well as code and data symbols, are listed in the symbol table. - /// - /// The location of the symbol table is indicated in the COFF header. - /// - /// The symbol table is an array of records, each 18 bytes long. Each record - /// is either a standard or auxiliary symbol-table record. A standard record - /// defines a symbol or name. - /// - /// - public sealed class COFFSymbolTableEntry - { - #region Standard COFF Symbol Table Entry - - #region Symbol Name - - /// - /// An array of 8 bytes. This array is padded with nulls on the right if - /// the name is less than 8 bytes long. - /// - public byte[]? ShortName { get; set; } = new byte[8]; - - /// - /// A field that is set to all zeros if the name is longer than 8 bytes. - /// - public uint Zeroes { get; set; } - - /// - /// An offset into the string table. - /// - public uint Offset { get; set; } - - #endregion - - /// - /// The value that is associated with the symbol. The interpretation of this - /// field depends on SectionNumber and StorageClass. A typical meaning is the - /// relocatable address. - /// - public uint Value { get; set; } - - /// - /// The signed integer that identifies the section, using a one-based index - /// into the section table. Some values have special meaning. - /// - public ushort SectionNumber { get; set; } - - /// - /// A number that represents type. Microsoft tools set this field to 0x20 - /// (function) or 0x0 (not a function). - /// - public SymbolType SymbolType { get; set; } - - /// - /// An enumerated value that represents storage class. - /// - public StorageClass StorageClass { get; set; } - - /// - /// The number of auxiliary symbol table entries that follow this record. - /// - public byte NumberOfAuxSymbols { get; set; } - - #endregion - - #region Auxiliary Symbol Records - - // Auxiliary symbol table records always follow, and apply to, some standard - // symbol table record. An auxiliary record can have any format that the tools - // can recognize, but 18 bytes must be allocated for them so that symbol table - // is maintained as an array of regular size. Currently, Microsoft tools - // recognize auxiliary formats for the following kinds of records: function - // definitions, function begin and end symbols (.bf and .ef), weak externals, - // file names, and section definitions. - // - // The traditional COFF design also includes auxiliary-record formats for arrays - // and structures.Microsoft tools do not use these, but instead place that - // symbolic information in Visual C++ debug format in the debug sections. - - #region Auxiliary Format 1: Function Definitions - - // A symbol table record marks the beginning of a function definition if it - // has all of the following: a storage class of EXTERNAL (2), a Type value - // that indicates it is a function (0x20), and a section number that is - // greater than zero. Note that a symbol table record that has a section - // number of UNDEFINED (0) does not define the function and does not have - // an auxiliary record. Function-definition symbol records are followed by - // an auxiliary record in the format described below: - - /// - /// The symbol-table index of the corresponding .bf (begin function) - /// symbol record. - /// - public uint AuxFormat1TagIndex { get; set; } - - /// - /// The size of the executable code for the function itself. If the function - /// is in its own section, the SizeOfRawData in the section header is greater - /// or equal to this field, depending on alignment considerations. - /// - public uint AuxFormat1TotalSize { get; set; } - - /// - /// The file offset of the first COFF line-number entry for the function, or - /// zero if none exists. - /// - public uint AuxFormat1PointerToLinenumber { get; set; } - - /// - /// The symbol-table index of the record for the next function. If the function - /// is the last in the symbol table, this field is set to zero. - /// - public uint AuxFormat1PointerToNextFunction { get; set; } - - /// - /// Unused - /// - public ushort AuxFormat1Unused { get; set; } - - #endregion - - #region Auxiliary Format 2: .bf and .ef Symbols - - // For each function definition in the symbol table, three items describe - // the beginning, ending, and number of lines. Each of these symbols has - // storage class FUNCTION (101): - // - // A symbol record named .bf (begin function). The Value field is unused. - // - // A symbol record named .lf (lines in function). The Value field gives the - // number of lines in the function. - // - // A symbol record named .ef (end of function). The Value field has the same - // number as the Total Size field in the function-definition symbol record. - // - // The .bf and .ef symbol records (but not .lf records) are followed by an - // auxiliary record with the following format: - - /// - /// Unused - /// - public uint AuxFormat2Unused1 { get; set; } - - /// - /// The actual ordinal line number (1, 2, 3, and so on) within the source file, - /// corresponding to the .bf or .ef record. - /// - public ushort AuxFormat2Linenumber { get; set; } - - /// - /// Unused - /// - public byte[]? AuxFormat2Unused2 { get; set; } = new byte[6]; - - /// - /// The symbol-table index of the next .bf symbol record. If the function is the - /// last in the symbol table, this field is set to zero. It is not used for - /// .ef records. - /// - public uint AuxFormat2PointerToNextFunction { get; set; } - - /// - /// Unused - /// - public ushort AuxFormat2Unused3 { get; set; } - - #endregion - - #region Auxiliary Format 3: Weak Externals - - // "Weak externals" are a mechanism for object files that allows flexibility at - // link time. A module can contain an unresolved external symbol (sym1), but it - // can also include an auxiliary record that indicates that if sym1 is not - // present at link time, another external symbol (sym2) is used to resolve - // references instead. - // - // If a definition of sym1 is linked, then an external reference to the symbol - // is resolved normally. If a definition of sym1 is not linked, then all references - // to the weak external for sym1 refer to sym2 instead. The external symbol, sym2, - // must always be linked; typically, it is defined in the module that contains - // the weak reference to sym1. - // - // Weak externals are represented by a symbol table record with EXTERNAL storage - // class, UNDEF section number, and a value of zero. The weak-external symbol - // record is followed by an auxiliary record with the following format: - - /// - /// The symbol-table index of sym2, the symbol to be linked if sym1 is not found. - /// - public uint AuxFormat3TagIndex { get; set; } - - /// - /// A value of IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY indicates that no library search - /// for sym1 should be performed. - /// A value of IMAGE_WEAK_EXTERN_SEARCH_LIBRARY indicates that a library search for - /// sym1 should be performed. - /// A value of IMAGE_WEAK_EXTERN_SEARCH_ALIAS indicates that sym1 is an alias for sym2. - /// - public uint AuxFormat3Characteristics { get; set; } - - /// - /// Unused - /// - public byte[]? AuxFormat3Unused { get; set; } = new byte[10]; - - #endregion - - #region Auxiliary Format 4: Files - - // This format follows a symbol-table record with storage class FILE (103). - // The symbol name itself should be .file, and the auxiliary record that - // follows it gives the name of a source-code file. - - /// - /// An ANSI string that gives the name of the source file. This is padded - /// with nulls if it is less than the maximum length. - /// - public byte[]? AuxFormat4FileName { get; set; } = new byte[18]; - - #endregion - - #region Auxiliary Format 5: Section Definitions - - // This format follows a symbol-table record that defines a section. Such a - // record has a symbol name that is the name of a section (such as .text or - // .drectve) and has storage class STATIC (3). The auxiliary record provides - // information about the section to which it refers. Thus, it duplicates some - // of the information in the section header. - - /// - /// The size of section data; the same as SizeOfRawData in the section header. - /// - public uint AuxFormat5Length { get; set; } - - /// - /// The number of relocation entries for the section. - /// - public ushort AuxFormat5NumberOfRelocations { get; set; } - - /// - /// The number of line-number entries for the section. - /// - public ushort AuxFormat5NumberOfLinenumbers { get; set; } - - /// - /// The checksum for communal data. It is applicable if the IMAGE_SCN_LNK_COMDAT - /// flag is set in the section header. - /// - public uint AuxFormat5CheckSum { get; set; } - - /// - /// One-based index into the section table for the associated section. This is - /// used when the COMDAT selection setting is 5. - /// - public ushort AuxFormat5Number { get; set; } - - /// - /// The COMDAT selection number. This is applicable if the section is a - /// COMDAT section. - /// - public byte AuxFormat5Selection { get; set; } - - /// - /// Unused - /// - public byte[]? AuxFormat5Unused { get; set; } = new byte[3]; - - #endregion - - #region Auxiliary Format 6: CLR Token Definition (Object Only) - - // This auxiliary symbol generally follows the IMAGE_SYM_CLASS_CLR_TOKEN. It is - // used to associate a token with the COFF symbol table's namespace. - - /// - /// Must be IMAGE_AUX_SYMBOL_TYPE_TOKEN_DEF (1). - /// - public byte AuxFormat6AuxType { get; set; } - - /// - /// Reserved, must be zero. - /// - public byte AuxFormat6Reserved1 { get; set; } - - /// - /// The symbol index of the COFF symbol to which this CLR token definition refers. - /// - public uint AuxFormat6SymbolTableIndex { get; set; } - - /// - /// Reserved, must be zero. - /// - public byte[]? AuxFormat6Reserved2 { get; set; } = new byte[12]; - - #endregion - - #endregion - } -} diff --git a/SabreTools.Models/PortableExecutable/Executable.cs b/SabreTools.Models/PortableExecutable/Executable.cs index 4a4534a..a3963b4 100644 --- a/SabreTools.Models/PortableExecutable/Executable.cs +++ b/SabreTools.Models/PortableExecutable/Executable.cs @@ -45,7 +45,7 @@ namespace SabreTools.Models.PortableExecutable /// /// COFF symbol table /// - public COFFSymbolTableEntry[]? COFFSymbolTable { get; set; } + public COFFSymbolTableEntries.BaseEntry[]? COFFSymbolTable { get; set; } /// /// COFF string table diff --git a/SabreTools.Models/PortableExecutable/ResourceEntries/AcceleratorTable.cs b/SabreTools.Models/PortableExecutable/ResourceEntries/AcceleratorTable.cs new file mode 100644 index 0000000..59c1465 --- /dev/null +++ b/SabreTools.Models/PortableExecutable/ResourceEntries/AcceleratorTable.cs @@ -0,0 +1,19 @@ + +namespace SabreTools.Models.PortableExecutable.ResourceEntries +{ + /// + /// The ACCELTABLEENTRY structure is repeated for all accelerator table entries in the resource. + /// The last entry in the table is flagged with the value 0x0080. + /// + /// You can compute the number of elements in the table if you divide the length of the resource + /// by eight. Then your application can randomly access the individual fixed-length entries. + /// + /// + public sealed class AcceleratorTable + { + /// + /// Accelerator table entries + /// + public AcceleratorTableEntry[]? Entries { get; set; } + } +} diff --git a/SabreTools.Models/PortableExecutable/AcceleratorTableEntry.cs b/SabreTools.Models/PortableExecutable/ResourceEntries/AcceleratorTableEntry.cs similarity index 95% rename from SabreTools.Models/PortableExecutable/AcceleratorTableEntry.cs rename to SabreTools.Models/PortableExecutable/ResourceEntries/AcceleratorTableEntry.cs index 2824417..986e4ee 100644 --- a/SabreTools.Models/PortableExecutable/AcceleratorTableEntry.cs +++ b/SabreTools.Models/PortableExecutable/ResourceEntries/AcceleratorTableEntry.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace SabreTools.Models.PortableExecutable +namespace SabreTools.Models.PortableExecutable.ResourceEntries { /// /// Describes the data in an individual accelerator table resource. The structure definition diff --git a/SabreTools.Models/PortableExecutable/AssemblyManifest.cs b/SabreTools.Models/PortableExecutable/ResourceEntries/AssemblyManifest.cs similarity index 99% rename from SabreTools.Models/PortableExecutable/AssemblyManifest.cs rename to SabreTools.Models/PortableExecutable/ResourceEntries/AssemblyManifest.cs index 84fc3d8..6e36404 100644 --- a/SabreTools.Models/PortableExecutable/AssemblyManifest.cs +++ b/SabreTools.Models/PortableExecutable/ResourceEntries/AssemblyManifest.cs @@ -1,6 +1,6 @@ using System.Xml.Serialization; -namespace SabreTools.Models.PortableExecutable +namespace SabreTools.Models.PortableExecutable.ResourceEntries { /// [XmlRoot(ElementName = "assembly", Namespace = "urn:schemas-microsoft-com:asm.v1")] diff --git a/SabreTools.Models/PortableExecutable/DialogBoxResource.cs b/SabreTools.Models/PortableExecutable/ResourceEntries/DialogBoxResource.cs similarity index 96% rename from SabreTools.Models/PortableExecutable/DialogBoxResource.cs rename to SabreTools.Models/PortableExecutable/ResourceEntries/DialogBoxResource.cs index e24b857..3a1837f 100644 --- a/SabreTools.Models/PortableExecutable/DialogBoxResource.cs +++ b/SabreTools.Models/PortableExecutable/ResourceEntries/DialogBoxResource.cs @@ -1,4 +1,4 @@ -namespace SabreTools.Models.PortableExecutable +namespace SabreTools.Models.PortableExecutable.ResourceEntries { /// /// A dialog box is also one resource entry in the resource file. It consists of one diff --git a/SabreTools.Models/PortableExecutable/DialogItemTemplate.cs b/SabreTools.Models/PortableExecutable/ResourceEntries/DialogItemTemplate.cs similarity index 99% rename from SabreTools.Models/PortableExecutable/DialogItemTemplate.cs rename to SabreTools.Models/PortableExecutable/ResourceEntries/DialogItemTemplate.cs index 1f771f6..1f83e74 100644 --- a/SabreTools.Models/PortableExecutable/DialogItemTemplate.cs +++ b/SabreTools.Models/PortableExecutable/ResourceEntries/DialogItemTemplate.cs @@ -1,4 +1,4 @@ -namespace SabreTools.Models.PortableExecutable +namespace SabreTools.Models.PortableExecutable.ResourceEntries { /// /// Defines the dimensions and style of a control in a dialog box. One or more of these diff --git a/SabreTools.Models/PortableExecutable/DialogItemTemplateExtended.cs b/SabreTools.Models/PortableExecutable/ResourceEntries/DialogItemTemplateExtended.cs similarity index 98% rename from SabreTools.Models/PortableExecutable/DialogItemTemplateExtended.cs rename to SabreTools.Models/PortableExecutable/ResourceEntries/DialogItemTemplateExtended.cs index 9fa7d3b..39a4f16 100644 --- a/SabreTools.Models/PortableExecutable/DialogItemTemplateExtended.cs +++ b/SabreTools.Models/PortableExecutable/ResourceEntries/DialogItemTemplateExtended.cs @@ -1,4 +1,4 @@ -namespace SabreTools.Models.PortableExecutable +namespace SabreTools.Models.PortableExecutable.ResourceEntries { /// /// A block of text used by an extended dialog box template to describe the extended dialog box. diff --git a/SabreTools.Models/PortableExecutable/DialogTemplate.cs b/SabreTools.Models/PortableExecutable/ResourceEntries/DialogTemplate.cs similarity index 99% rename from SabreTools.Models/PortableExecutable/DialogTemplate.cs rename to SabreTools.Models/PortableExecutable/ResourceEntries/DialogTemplate.cs index 33b53ec..9138fa8 100644 --- a/SabreTools.Models/PortableExecutable/DialogTemplate.cs +++ b/SabreTools.Models/PortableExecutable/ResourceEntries/DialogTemplate.cs @@ -1,4 +1,4 @@ -namespace SabreTools.Models.PortableExecutable +namespace SabreTools.Models.PortableExecutable.ResourceEntries { /// /// Defines the dimensions and style of a dialog box. This structure, always the first diff --git a/SabreTools.Models/PortableExecutable/DialogTemplateExtended.cs b/SabreTools.Models/PortableExecutable/ResourceEntries/DialogTemplateExtended.cs similarity index 99% rename from SabreTools.Models/PortableExecutable/DialogTemplateExtended.cs rename to SabreTools.Models/PortableExecutable/ResourceEntries/DialogTemplateExtended.cs index 2838ccb..dad176f 100644 --- a/SabreTools.Models/PortableExecutable/DialogTemplateExtended.cs +++ b/SabreTools.Models/PortableExecutable/ResourceEntries/DialogTemplateExtended.cs @@ -1,4 +1,4 @@ -namespace SabreTools.Models.PortableExecutable +namespace SabreTools.Models.PortableExecutable.ResourceEntries { /// /// An extended dialog box template begins with a DLGTEMPLATEEX header that describes diff --git a/SabreTools.Models/PortableExecutable/DirEntry.cs b/SabreTools.Models/PortableExecutable/ResourceEntries/DirEntry.cs similarity index 92% rename from SabreTools.Models/PortableExecutable/DirEntry.cs rename to SabreTools.Models/PortableExecutable/ResourceEntries/DirEntry.cs index 1e7629c..0ef4633 100644 --- a/SabreTools.Models/PortableExecutable/DirEntry.cs +++ b/SabreTools.Models/PortableExecutable/ResourceEntries/DirEntry.cs @@ -1,4 +1,4 @@ -namespace SabreTools.Models.PortableExecutable +namespace SabreTools.Models.PortableExecutable.ResourceEntries { /// /// Contains the information necessary for an application to access a specific font. The structure diff --git a/SabreTools.Models/PortableExecutable/FontGroupHeader.cs b/SabreTools.Models/PortableExecutable/ResourceEntries/FontGroupHeader.cs similarity index 92% rename from SabreTools.Models/PortableExecutable/FontGroupHeader.cs rename to SabreTools.Models/PortableExecutable/ResourceEntries/FontGroupHeader.cs index a3ec8f1..e2cb132 100644 --- a/SabreTools.Models/PortableExecutable/FontGroupHeader.cs +++ b/SabreTools.Models/PortableExecutable/ResourceEntries/FontGroupHeader.cs @@ -1,4 +1,4 @@ -namespace SabreTools.Models.PortableExecutable +namespace SabreTools.Models.PortableExecutable.ResourceEntries { /// /// Contains the information necessary for an application to access a specific font. The structure diff --git a/SabreTools.Models/PortableExecutable/MenuHeader.cs b/SabreTools.Models/PortableExecutable/ResourceEntries/MenuHeader.cs similarity index 86% rename from SabreTools.Models/PortableExecutable/MenuHeader.cs rename to SabreTools.Models/PortableExecutable/ResourceEntries/MenuHeader.cs index b58f17a..53a63f6 100644 --- a/SabreTools.Models/PortableExecutable/MenuHeader.cs +++ b/SabreTools.Models/PortableExecutable/ResourceEntries/MenuHeader.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace SabreTools.Models.PortableExecutable +namespace SabreTools.Models.PortableExecutable.ResourceEntries { /// /// Common base class for menu item types diff --git a/SabreTools.Models/PortableExecutable/MenuHeaderExtended.cs b/SabreTools.Models/PortableExecutable/ResourceEntries/MenuHeaderExtended.cs similarity index 94% rename from SabreTools.Models/PortableExecutable/MenuHeaderExtended.cs rename to SabreTools.Models/PortableExecutable/ResourceEntries/MenuHeaderExtended.cs index a0bc8fc..3bb5f90 100644 --- a/SabreTools.Models/PortableExecutable/MenuHeaderExtended.cs +++ b/SabreTools.Models/PortableExecutable/ResourceEntries/MenuHeaderExtended.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace SabreTools.Models.PortableExecutable +namespace SabreTools.Models.PortableExecutable.ResourceEntries { /// /// Defines the header for an extended menu template. This structure definition is for diff --git a/SabreTools.Models/PortableExecutable/MenuItem.cs b/SabreTools.Models/PortableExecutable/ResourceEntries/MenuItem.cs similarity index 86% rename from SabreTools.Models/PortableExecutable/MenuItem.cs rename to SabreTools.Models/PortableExecutable/ResourceEntries/MenuItem.cs index 74853e9..e23a4ad 100644 --- a/SabreTools.Models/PortableExecutable/MenuItem.cs +++ b/SabreTools.Models/PortableExecutable/ResourceEntries/MenuItem.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace SabreTools.Models.PortableExecutable +namespace SabreTools.Models.PortableExecutable.ResourceEntries { /// /// Common base class for menu item types diff --git a/SabreTools.Models/PortableExecutable/MenuItemExtended.cs b/SabreTools.Models/PortableExecutable/ResourceEntries/MenuItemExtended.cs similarity index 95% rename from SabreTools.Models/PortableExecutable/MenuItemExtended.cs rename to SabreTools.Models/PortableExecutable/ResourceEntries/MenuItemExtended.cs index bcfc818..7640245 100644 --- a/SabreTools.Models/PortableExecutable/MenuItemExtended.cs +++ b/SabreTools.Models/PortableExecutable/ResourceEntries/MenuItemExtended.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace SabreTools.Models.PortableExecutable +namespace SabreTools.Models.PortableExecutable.ResourceEntries { /// /// Defines a menu item in an extended menu template. This structure definition is for diff --git a/SabreTools.Models/PortableExecutable/MenuResource.cs b/SabreTools.Models/PortableExecutable/ResourceEntries/MenuResource.cs similarity index 91% rename from SabreTools.Models/PortableExecutable/MenuResource.cs rename to SabreTools.Models/PortableExecutable/ResourceEntries/MenuResource.cs index 4d6a1d6..49a2326 100644 --- a/SabreTools.Models/PortableExecutable/MenuResource.cs +++ b/SabreTools.Models/PortableExecutable/ResourceEntries/MenuResource.cs @@ -1,4 +1,4 @@ -namespace SabreTools.Models.PortableExecutable +namespace SabreTools.Models.PortableExecutable.ResourceEntries { /// /// A menu resource consists of a MENUHEADER structure followed by one or more diff --git a/SabreTools.Models/PortableExecutable/MessageResourceBlock.cs b/SabreTools.Models/PortableExecutable/ResourceEntries/MessageResourceBlock.cs similarity index 94% rename from SabreTools.Models/PortableExecutable/MessageResourceBlock.cs rename to SabreTools.Models/PortableExecutable/ResourceEntries/MessageResourceBlock.cs index 94987d1..8bc537e 100644 --- a/SabreTools.Models/PortableExecutable/MessageResourceBlock.cs +++ b/SabreTools.Models/PortableExecutable/ResourceEntries/MessageResourceBlock.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace SabreTools.Models.PortableExecutable +namespace SabreTools.Models.PortableExecutable.ResourceEntries { /// /// Contains information about message strings with identifiers in the range indicated diff --git a/SabreTools.Models/PortableExecutable/MessageResourceData.cs b/SabreTools.Models/PortableExecutable/ResourceEntries/MessageResourceData.cs similarity index 93% rename from SabreTools.Models/PortableExecutable/MessageResourceData.cs rename to SabreTools.Models/PortableExecutable/ResourceEntries/MessageResourceData.cs index 749b00a..43bb74c 100644 --- a/SabreTools.Models/PortableExecutable/MessageResourceData.cs +++ b/SabreTools.Models/PortableExecutable/ResourceEntries/MessageResourceData.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace SabreTools.Models.PortableExecutable +namespace SabreTools.Models.PortableExecutable.ResourceEntries { /// /// Contains information about formatted text for display as an error message or in a message diff --git a/SabreTools.Models/PortableExecutable/MessageResourceEntry.cs b/SabreTools.Models/PortableExecutable/ResourceEntries/MessageResourceEntry.cs similarity index 93% rename from SabreTools.Models/PortableExecutable/MessageResourceEntry.cs rename to SabreTools.Models/PortableExecutable/ResourceEntries/MessageResourceEntry.cs index fc2bf2f..8265657 100644 --- a/SabreTools.Models/PortableExecutable/MessageResourceEntry.cs +++ b/SabreTools.Models/PortableExecutable/ResourceEntries/MessageResourceEntry.cs @@ -1,4 +1,4 @@ -namespace SabreTools.Models.PortableExecutable +namespace SabreTools.Models.PortableExecutable.ResourceEntries { /// /// Contains the error message or message box display text for a message table resource. diff --git a/SabreTools.Models/PortableExecutable/NormalMenuHeader.cs b/SabreTools.Models/PortableExecutable/ResourceEntries/NormalMenuHeader.cs similarity index 93% rename from SabreTools.Models/PortableExecutable/NormalMenuHeader.cs rename to SabreTools.Models/PortableExecutable/ResourceEntries/NormalMenuHeader.cs index af7b8c4..92f7e74 100644 --- a/SabreTools.Models/PortableExecutable/NormalMenuHeader.cs +++ b/SabreTools.Models/PortableExecutable/ResourceEntries/NormalMenuHeader.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace SabreTools.Models.PortableExecutable +namespace SabreTools.Models.PortableExecutable.ResourceEntries { /// /// Contains version information for the menu resource. The structure definition provided diff --git a/SabreTools.Models/PortableExecutable/NormalMenuItem.cs b/SabreTools.Models/PortableExecutable/ResourceEntries/NormalMenuItem.cs similarity index 93% rename from SabreTools.Models/PortableExecutable/NormalMenuItem.cs rename to SabreTools.Models/PortableExecutable/ResourceEntries/NormalMenuItem.cs index 8176c0e..a3bdf17 100644 --- a/SabreTools.Models/PortableExecutable/NormalMenuItem.cs +++ b/SabreTools.Models/PortableExecutable/ResourceEntries/NormalMenuItem.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace SabreTools.Models.PortableExecutable +namespace SabreTools.Models.PortableExecutable.ResourceEntries { /// /// Contains information about each item in a menu resource that does not open a menu diff --git a/SabreTools.Models/PortableExecutable/StringData.cs b/SabreTools.Models/PortableExecutable/ResourceEntries/StringData.cs similarity index 98% rename from SabreTools.Models/PortableExecutable/StringData.cs rename to SabreTools.Models/PortableExecutable/ResourceEntries/StringData.cs index f5ab210..fad1f52 100644 --- a/SabreTools.Models/PortableExecutable/StringData.cs +++ b/SabreTools.Models/PortableExecutable/ResourceEntries/StringData.cs @@ -1,4 +1,4 @@ -namespace SabreTools.Models.PortableExecutable +namespace SabreTools.Models.PortableExecutable.ResourceEntries { /// /// Represents the organization of data in a file-version resource. It contains a string diff --git a/SabreTools.Models/PortableExecutable/StringFileInfo.cs b/SabreTools.Models/PortableExecutable/ResourceEntries/StringFileInfo.cs similarity index 95% rename from SabreTools.Models/PortableExecutable/StringFileInfo.cs rename to SabreTools.Models/PortableExecutable/ResourceEntries/StringFileInfo.cs index 89c2f06..4f87623 100644 --- a/SabreTools.Models/PortableExecutable/StringFileInfo.cs +++ b/SabreTools.Models/PortableExecutable/ResourceEntries/StringFileInfo.cs @@ -1,4 +1,4 @@ -namespace SabreTools.Models.PortableExecutable +namespace SabreTools.Models.PortableExecutable.ResourceEntries { /// /// Represents the organization of data in a file-version resource. It contains version diff --git a/SabreTools.Models/PortableExecutable/StringTable.cs b/SabreTools.Models/PortableExecutable/ResourceEntries/StringTable.cs similarity index 96% rename from SabreTools.Models/PortableExecutable/StringTable.cs rename to SabreTools.Models/PortableExecutable/ResourceEntries/StringTable.cs index 9792bd5..a766a5f 100644 --- a/SabreTools.Models/PortableExecutable/StringTable.cs +++ b/SabreTools.Models/PortableExecutable/ResourceEntries/StringTable.cs @@ -1,4 +1,4 @@ -namespace SabreTools.Models.PortableExecutable +namespace SabreTools.Models.PortableExecutable.ResourceEntries { /// /// Represents the organization of data in a file-version resource. It contains language diff --git a/SabreTools.Models/PortableExecutable/VarData.cs b/SabreTools.Models/PortableExecutable/ResourceEntries/VarData.cs similarity index 96% rename from SabreTools.Models/PortableExecutable/VarData.cs rename to SabreTools.Models/PortableExecutable/ResourceEntries/VarData.cs index 64d3102..3549b2d 100644 --- a/SabreTools.Models/PortableExecutable/VarData.cs +++ b/SabreTools.Models/PortableExecutable/ResourceEntries/VarData.cs @@ -1,4 +1,4 @@ -namespace SabreTools.Models.PortableExecutable +namespace SabreTools.Models.PortableExecutable.ResourceEntries { /// /// Represents the organization of data in a file-version resource. It typically contains a diff --git a/SabreTools.Models/PortableExecutable/VarFileInfo.cs b/SabreTools.Models/PortableExecutable/ResourceEntries/VarFileInfo.cs similarity index 95% rename from SabreTools.Models/PortableExecutable/VarFileInfo.cs rename to SabreTools.Models/PortableExecutable/ResourceEntries/VarFileInfo.cs index 799a8dd..9635c8b 100644 --- a/SabreTools.Models/PortableExecutable/VarFileInfo.cs +++ b/SabreTools.Models/PortableExecutable/ResourceEntries/VarFileInfo.cs @@ -1,4 +1,4 @@ -namespace SabreTools.Models.PortableExecutable +namespace SabreTools.Models.PortableExecutable.ResourceEntries { /// /// Represents the organization of data in a file-version resource. It contains version diff --git a/SabreTools.Models/PortableExecutable/VersionInfo.cs b/SabreTools.Models/PortableExecutable/ResourceEntries/VersionInfo.cs similarity index 97% rename from SabreTools.Models/PortableExecutable/VersionInfo.cs rename to SabreTools.Models/PortableExecutable/ResourceEntries/VersionInfo.cs index cd733cc..06a45a1 100644 --- a/SabreTools.Models/PortableExecutable/VersionInfo.cs +++ b/SabreTools.Models/PortableExecutable/ResourceEntries/VersionInfo.cs @@ -1,4 +1,4 @@ -namespace SabreTools.Models.PortableExecutable +namespace SabreTools.Models.PortableExecutable.ResourceEntries { /// /// Represents the organization of data in a file-version resource. It is the root