2022-11-07 09:38:34 -08:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Runtime.InteropServices;
|
2022-11-04 09:56:06 -07:00
|
|
|
|
|
2023-03-07 16:59:14 -05:00
|
|
|
|
namespace BinaryObjectScanner.Models.NewExecutable
|
2022-11-04 09:56:06 -07:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The resource table follows the segment table and contains entries for
|
|
|
|
|
|
/// each resource in the executable file. The resource table consists of
|
|
|
|
|
|
/// an alignment shift count, followed by a table of resource records. The
|
|
|
|
|
|
/// resource records define the type ID for a set of resources. Each
|
|
|
|
|
|
/// resource record contains a table of resource entries of the defined
|
|
|
|
|
|
/// type. The resource entry defines the resource ID or name ID for the
|
|
|
|
|
|
/// resource. It also defines the location and size of the resource. The
|
|
|
|
|
|
/// following describes the contents of each of these structures:
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <see href="http://bytepointer.com/resources/win16_ne_exe_format_win3.0.htm"/>
|
|
|
|
|
|
[StructLayout(LayoutKind.Sequential)]
|
2022-12-27 17:12:55 -08:00
|
|
|
|
public sealed class ResourceTable
|
2022-11-04 09:56:06 -07:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Alignment shift count for resource data.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public ushort AlignmentShiftCount;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// A table of resource type information blocks follows.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public ResourceTypeInformationEntry[] ResourceTypes;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Resource type and name strings are stored at the end of the
|
|
|
|
|
|
/// resource table.
|
|
|
|
|
|
/// </summary>
|
2022-11-07 09:38:34 -08:00
|
|
|
|
public Dictionary<ushort, ResourceTypeAndNameString> TypeAndNameStrings;
|
2022-11-04 09:56:06 -07:00
|
|
|
|
}
|
|
|
|
|
|
}
|