Files
SabreTools.Models/PortableExecutable/HintNameTableEntry.cs

28 lines
995 B
C#
Raw Permalink Normal View History

2024-04-23 16:42:29 -04:00
using System.Runtime.InteropServices;
namespace SabreTools.Models.PortableExecutable
2023-09-04 00:11:04 -04:00
{
/// <summary>
/// One hint/name table suffices for the entire import section.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
2024-04-23 16:42:29 -04:00
[StructLayout(LayoutKind.Sequential)]
2023-09-04 00:11:04 -04:00
public sealed class HintNameTableEntry
{
/// <summary>
/// An index into the export name pointer table. A match is attempted first
/// with this value. If it fails, a binary search is performed on the DLL's
/// export name pointer table.
/// </summary>
2024-04-23 16:42:29 -04:00
public ushort Hint;
2023-09-04 00:11:04 -04:00
/// <summary>
/// An ASCII string that contains the name to import. This is the string that
/// must be matched to the public name in the DLL. This string is case sensitive
/// and terminated by a null byte.
/// </summary>
2024-04-23 16:42:29 -04:00
[MarshalAs(UnmanagedType.LPStr)]
public string? Name;
2023-09-04 00:11:04 -04:00
}
}