pub struct DosHeader {Show 19 fields
pub e_magic: u16,
pub e_cblp: u16,
pub e_cp: u16,
pub e_crlc: u16,
pub e_cparhdr: u16,
pub e_min_allocate: u16,
pub e_max_allocate: u16,
pub e_ss: u16,
pub e_sp: u16,
pub e_check_sum: u16,
pub e_ip: u16,
pub e_cs: u16,
pub e_lfarlc: u16,
pub e_ovno: u16,
pub e_res: [u16; 4],
pub e_oem_id: u16,
pub e_oem_info: u16,
pub e_res2: [u16; 10],
pub e_lfanew: u32,
}Expand description
DOS 头结构
包含 DOS 可执行文件的基本信息,是 PE 文件的第一个结构。 虽然现代 Windows 程序不运行在 DOS 模式下,但 PE 格式仍保留这个结构用于兼容性。
Fields§
§e_magic: u16DOS 签名,通常为 0x5A4D(“MZ”)
e_cblp: u16文件最后页的字节数
e_cp: u16文件的总页数
e_crlc: u16重定位项的数量
e_cparhdr: u16段落中头部的大小
e_min_allocate: u16所需的最小段落数
e_max_allocate: u16所需的最大段落数
e_ss: u16初始的 SS 寄存器值
e_sp: u16初始的 SP 寄存器值
e_check_sum: u16校验和
e_ip: u16初始的 IP 寄存器值
e_cs: u16初始的 CS 寄存器值
e_lfarlc: u16重定位表的文件偏移
e_ovno: u16覆盖号
e_res: [u16; 4]保留字段,通常为 0
e_oem_id: u16OEM 标识符
e_oem_info: u16OEM 信息
e_res2: [u16; 10]保留字段,通常为 0
e_lfanew: u32PE 头的文件偏移,指向真正的 PE 结构
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DosHeader
impl<'de> Deserialize<'de> for DosHeader
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for DosHeader
Auto Trait Implementations§
impl Freeze for DosHeader
impl RefUnwindSafe for DosHeader
impl Send for DosHeader
impl Sync for DosHeader
impl Unpin for DosHeader
impl UnwindSafe for DosHeader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more