pub struct PE {
pub base: *mut c_void,
}Expand description
Portable Executable (PE) abstraction over a module’s in-memory image.
Fields§
§base: *mut c_voidBase address of the loaded module.
Implementations§
Source§impl PE
impl PE
Sourcepub fn dos_header(&self) -> *const IMAGE_DOS_HEADER
pub fn dos_header(&self) -> *const IMAGE_DOS_HEADER
Returns the DOS header of the module.
Sourcepub fn nt_header(&self) -> Option<*const IMAGE_NT_HEADERS>
pub fn nt_header(&self) -> Option<*const IMAGE_NT_HEADERS>
Returns a pointer to the IMAGE_NT_HEADERS, if valid.
Sourcepub fn sections(&self) -> Option<&[IMAGE_SECTION_HEADER]>
pub fn sections(&self) -> Option<&[IMAGE_SECTION_HEADER]>
Returns all section headers in the PE.
Sourcepub fn section_name_by_rva(&self, rva: u32) -> Option<&str>
pub fn section_name_by_rva(&self, rva: u32) -> Option<&str>
Finds the name of the section containing a specific RVA.
Sourcepub fn section_by_name(&self, name: &str) -> Option<&IMAGE_SECTION_HEADER>
pub fn section_by_name(&self, name: &str) -> Option<&IMAGE_SECTION_HEADER>
Finds a section by its name.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PE
impl RefUnwindSafe for PE
impl !Send for PE
impl !Sync for PE
impl Unpin for PE
impl UnwindSafe for PE
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