Files
SabreTools.Serialization/SabreTools.Data.Models/PortableExecutable/DataDirectory.cs

30 lines
1.1 KiB
C#
Raw Normal View History

2025-09-26 12:09:34 -04:00
using System.Runtime.InteropServices;
2025-09-26 13:06:18 -04:00
namespace SabreTools.Data.Models.PortableExecutable
2025-09-26 12:09:34 -04:00
{
/// <summary>
/// Each data directory gives the address and size of a table or string that Windows uses.
/// These data directory entries are all loaded into memory so that the system can use them
/// at run time.
2025-10-30 23:29:24 -04:00
///
2025-09-26 12:09:34 -04:00
/// Also, do not assume that the RVAs in this table point to the beginning of a section or
/// that the sections that contain specific tables have specific names.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class DataDirectory
{
/// <summary>
/// The first field, VirtualAddress, is actually the RVA of the table. The RVA
/// is the address of the table relative to the base address of the image when
/// the table is loaded.
/// </summary>
public uint VirtualAddress;
/// <summary>
/// The second field gives the size in bytes.
/// </summary>
public uint Size;
}
}