Struct object::read::pe::DelayLoadImportTable
source · pub struct DelayLoadImportTable<'data> { /* private fields */ }
Expand description
Information for parsing a PE delay-load import table.
Returned by
DataDirectories::delay_load_import_table
.
Implementations§
source§impl<'data> DelayLoadImportTable<'data>
impl<'data> DelayLoadImportTable<'data>
sourcepub fn new(
section_data: &'data [u8],
section_address: u32,
import_address: u32
) -> Self
pub fn new( section_data: &'data [u8], section_address: u32, import_address: u32 ) -> Self
Create a new delay load import table parser.
The import descriptors start at import_address
.
This table works in the same way the import table does: descriptors will be
parsed until a null entry.
section_data
should be from the section containing import_address
, and
section_address
should be the address of that section. Pointers within the
descriptors and thunks may point to anywhere within the section data.
sourcepub fn descriptors(&self) -> Result<DelayLoadDescriptorIterator<'data>>
pub fn descriptors(&self) -> Result<DelayLoadDescriptorIterator<'data>>
Return an iterator for the import descriptors.
sourcepub fn name(&self, address: u32) -> Result<&'data [u8]>
pub fn name(&self, address: u32) -> Result<&'data [u8]>
Return a library name given its address.
This address may be from pe::ImageDelayloadDescriptor::dll_name_rva
.
sourcepub fn thunks(&self, address: u32) -> Result<ImportThunkList<'data>>
pub fn thunks(&self, address: u32) -> Result<ImportThunkList<'data>>
Return a list of thunks given its address.
This address may be from the INT, i.e. from
pe::ImageDelayloadDescriptor::import_name_table_rva
.
Please note that others RVA values from pe::ImageDelayloadDescriptor
are used
by the delay loader at runtime to store values, and thus do not point inside the same
section as the INT. Calling this function on those addresses will fail.
sourcepub fn import<Pe: ImageNtHeaders>(
&self,
thunk: Pe::ImageThunkData
) -> Result<Import<'data>>
pub fn import<Pe: ImageNtHeaders>( &self, thunk: Pe::ImageThunkData ) -> Result<Import<'data>>
Parse a thunk.
sourcepub fn hint_name(&self, address: u32) -> Result<(u16, &'data [u8])>
pub fn hint_name(&self, address: u32) -> Result<(u16, &'data [u8])>
Return the hint and name at the given address.
This address may be from pe::ImageThunkData32
or pe::ImageThunkData64
.
The hint is an index into the export name pointer table in the target library.
Trait Implementations§
source§impl<'data> Clone for DelayLoadImportTable<'data>
impl<'data> Clone for DelayLoadImportTable<'data>
source§fn clone(&self) -> DelayLoadImportTable<'data>
fn clone(&self) -> DelayLoadImportTable<'data>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more