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 header structure
Contains basic information about a DOS executable, the first structure in a PE file. Although modern Windows programs don’t run in DOS mode, the PE format still retains this structure for compatibility.
Fields§
§e_magic: u16DOS signature, usually 0x5A4D (“MZ”)
e_cblp: u16Number of bytes in the last page of the file
e_cp: u16Total number of pages in the file
e_crlc: u16Number of relocation items
e_cparhdr: u16Size of the header in paragraphs
e_min_allocate: u16Minimum number of paragraphs required
e_max_allocate: u16Maximum number of paragraphs required
e_ss: u16Initial SS register value
e_sp: u16Initial SP register value
e_check_sum: u16Checksum
e_ip: u16Initial IP register value
e_cs: u16Initial CS register value
e_lfarlc: u16File offset of the relocation table
e_ovno: u16Overlay number
e_res: [u16; 4]Reserved fields, usually 0
e_oem_id: u16OEM identifier
e_oem_info: u16OEM information
e_res2: [u16; 10]Reserved fields, usually 0
e_lfanew: u32File offset of the PE header, pointing to the real PE structure