using System.Runtime.InteropServices;
namespace NitroxModel.Platforms.OS.Windows.Internal
{
[StructLayout(LayoutKind.Sequential)]
public struct ImageDosHeader
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
public char[] e_magic_byte; // Magic number
///
/// Bytes on last page of file
///
public ushort e_cblp;
///
/// Pages in file
///
public ushort e_cp;
public ushort e_crlc;
///
/// Size of header in paragraphs
///
public ushort e_cparhdr;
public ushort e_minalloc;
public ushort e_maxalloc;
public ushort e_ss;
public ushort e_sp;
///
/// Checksum
///
public ushort e_csum;
///
/// Initial IP value
///
public ushort e_ip; //
///
/// Initial (relative) CS value
///
public ushort e_cs;
///
/// File address of relocation table
///
public ushort e_lfarlc;
///
/// Overlay number
///
public ushort e_ovno;
///
/// Reserved words
///
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
public ushort[] e_res1;
public ushort e_oemid;
public ushort e_oeminfo;
///
/// Reserved words
///
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)]
public ushort[] e_res2;
///
/// Image base offset to address of PE header.
///
public int e_lfanew;
}
}