pub struct DosHeader {Show 19 fields
pub e_magic: [u8; 2],
pub e_cblp: u16,
pub e_cp: u16,
pub e_crlc: u16,
pub e_cparhdr: u16,
pub e_minalloc: u16,
pub e_maxalloc: u16,
pub e_ss: u16,
pub e_sp: u16,
pub e_csum: u16,
pub e_ip: u16,
pub e_cs: u16,
pub e_lfarlc: u16,
pub e_ovno: u16,
pub e_res: [u16; 4],
pub e_oemid: u16,
pub e_oeminfo: u16,
pub e_res2: [u16; 10],
pub e_lfanew: u32,
}Expand description
Parsed IMAGE_DOS_HEADER (the 64-byte prefix every PE file
starts with). The fields that aren’t meaningful for modern
PE files (the original 16-bit DOS layout descriptors) round
through verbatim — typical values are e_cblp = 0x90,
e_cparhdr = 0x4, e_minalloc = 0, e_maxalloc = 0xffff,
e_sp = 0xb8, with reserved fields zero. The two fields
that matter for the modern format are e_magic ("MZ")
and e_lfanew (file offset of the PE signature).
Fields§
§e_magic: [u8; 2]§e_cblp: u16§e_cp: u16§e_crlc: u16§e_cparhdr: u16§e_minalloc: u16§e_maxalloc: u16§e_ss: u16§e_sp: u16§e_csum: u16§e_ip: u16§e_cs: u16§e_lfarlc: u16§e_ovno: u16§e_res: [u16; 4]§e_oemid: u16§e_oeminfo: u16§e_res2: [u16; 10]§e_lfanew: u32Implementations§
Trait Implementations§
impl Copy for DosHeader
impl Eq for DosHeader
impl StructuralPartialEq 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 UnsafeUnpin 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