GetProcAddress

Trait GetProcAddress 

Source
pub trait GetProcAddress<'a, T>: Pe<'a> {
    // Required method
    fn get_export(self, name: T) -> Result<Export<'a>>;

    // Provided method
    fn get_proc_address(self, name: T) -> Result<Va> { ... }
}
Expand description

Convenient way to get an exported address.

Required Methods§

Source

fn get_export(self, name: T) -> Result<Export<'a>>

Convenient method to get an exported function.

Note that calling this method many times is less efficient than caching a By instance, such is the trade-off for convenience.

Provided Methods§

Source

fn get_proc_address(self, name: T) -> Result<Va>

Convenient method to get the address of an exported function.

Note that this method does not support forwarded exports and will return Err(Null) instead.

Note that calling this method many times is less efficient than caching a By instance, such is the trade-off for convenience.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a, P: Pe<'a>> GetProcAddress<'a, u16> for P

Source§

impl<'b, 'a, P: Pe<'a>> GetProcAddress<'a, Import<'b>> for P

Source§

impl<'b, 'a, P: Pe<'a>, S: AsRef<[u8]> + ?Sized> GetProcAddress<'a, &'b S> for P