Files
SabreTools.Models/PortableExecutable/ResourceDataEntry.cs

45 lines
1.5 KiB
C#
Raw Normal View History

namespace SabreTools.Models.PortableExecutable
2023-09-04 00:11:04 -04:00
{
/// <summary>
/// The resource directory string area consists of Unicode strings, which
/// are word-aligned. These strings are stored together after the last
/// Resource Directory entry and before the first Resource Data entry.
/// This minimizes the impact of these variable-length strings on the
/// alignment of the fixed-size directory entries.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
public sealed class ResourceDataEntry
{
/// <summary>
/// The address of a unit of resource data in the Resource Data area.
/// </summary>
2023-09-10 21:24:10 -04:00
public uint DataRVA { get; set; }
2023-09-04 00:11:04 -04:00
/// <summary>
/// The size, in bytes, of the resource data that is pointed to by the
/// Data RVA field.
/// </summary>
2023-09-10 21:24:10 -04:00
public uint Size { get; set; }
2023-09-04 00:11:04 -04:00
/// <summary>
/// The resource data that is pointed to by the Data RVA field.
/// </summary>
2023-09-04 21:14:41 -04:00
#if NET48
2023-09-10 21:24:10 -04:00
public byte[] Data { get; set; }
2023-09-04 21:14:41 -04:00
#else
2023-09-10 21:24:10 -04:00
public byte[]? Data { get; set; }
2023-09-04 21:14:41 -04:00
#endif
2023-09-04 00:11:04 -04:00
/// <summary>
/// The code page that is used to decode code point values within the
/// resource data. Typically, the code page would be the Unicode code page.
/// </summary>
2023-09-10 21:24:10 -04:00
public uint Codepage { get; set; }
2023-09-04 00:11:04 -04:00
/// <summary>
/// Reserved, must be 0.
/// </summary>
2023-09-10 21:24:10 -04:00
public uint Reserved { get; set; }
2023-09-04 00:11:04 -04:00
}
}