#[repr(C, packed(1))]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_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: i32,
}Fields§
§e_magic: u16§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: i32Implementations§
Source§impl DosHeader
impl DosHeader
Sourcepub fn is_nt_offset_valid(&self) -> bool
pub fn is_nt_offset_valid(&self) -> bool
check if e_lfanew offset is within reasonable bounds
Sourcepub fn nt_headers_offset_checked(&self) -> Option<usize>
pub fn nt_headers_offset_checked(&self) -> Option<usize>
get offset to NT headers (returns None if invalid)
Sourcepub fn nt_headers_offset(&self) -> usize
pub fn nt_headers_offset(&self) -> usize
get offset to NT headers
§Safety
caller must ensure offset is valid via is_nt_offset_valid() or bounds check
against module size. use nt_headers_offset_checked() for safe access.
Trait Implementations§
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