mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-04-24 23:30:07 +00:00
Add LE/LX resource table
This commit is contained in:
@@ -30,8 +30,13 @@ namespace BurnOutSharp.Models.LinearExecutable
|
||||
/// </summary>
|
||||
public ObjectPageTableEntry[] ObjectPageTable { get; set; }
|
||||
|
||||
// TODO: Object iterate data map table
|
||||
// TODO: Resource table
|
||||
// TODO: Object iterate data map table [Does this exist?]
|
||||
|
||||
/// <summary>
|
||||
/// Resource table
|
||||
/// </summary>
|
||||
public ResourceTableEntry[] ResourceTable { get; set; }
|
||||
|
||||
// TODO: Resident-names table
|
||||
// TODO: Entry table
|
||||
// TODO: Module directives table
|
||||
|
||||
52
BurnOutSharp.Models/LinearExecutable/ResourceTableEntry.cs
Normal file
52
BurnOutSharp.Models/LinearExecutable/ResourceTableEntry.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace BurnOutSharp.Models.LinearExecutable
|
||||
{
|
||||
/// <summary>
|
||||
/// The resource table is an array of resource table entries. Each resource table
|
||||
/// entry contains a type ID and name ID. These entries are used to locate resource
|
||||
/// objects contained in the Object table. The number of entries in the resource
|
||||
/// table is defined by the Resource Table Count located in the linear EXE header.
|
||||
/// More than one resource may be contained within a single object. Resource table
|
||||
/// entries are in a sorted order, (ascending, by Resource Name ID within the
|
||||
/// Resource Type ID). This allows the DosGetResource API function to use a binary
|
||||
/// search when looking up a resource in a 32-bit module instead of the linear search
|
||||
/// being used in the current 16-bit module.
|
||||
/// </summary>
|
||||
/// <see href="https://faydoc.tripod.com/formats/exe-LE.htm"/>
|
||||
/// <see href="http://www.edm2.com/index.php/LX_-_Linear_eXecutable_Module_Format_Description"/>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public class ResourceTableEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// Resource type ID.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The type of resources are:
|
||||
/// - BTMP = Bitmap
|
||||
/// - EMSG = Error message string
|
||||
/// - FONT = Fonts
|
||||
/// </remarks>
|
||||
public ushort TypeID;
|
||||
|
||||
/// <summary>
|
||||
/// An ID used as a name for the resource when referred to.
|
||||
/// </summary>
|
||||
public ushort NameID;
|
||||
|
||||
/// <summary>
|
||||
/// The number of bytes the resource consists of.
|
||||
/// </summary>
|
||||
public uint ResourceSize;
|
||||
|
||||
/// <summary>
|
||||
/// The number of the object which contains the resource.
|
||||
/// </summary>
|
||||
public ushort ObjectNumber;
|
||||
|
||||
/// <summary>
|
||||
/// The offset within the specified object where the resource begins.
|
||||
/// </summary>
|
||||
public uint Offset;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user