lief::runtime::windows

Function dlopen

pub fn dlopen(name: &str) -> Option<Module>
Expand description

Load the module (DLL) with the given name into the current process and wrap the resulting handle in a Module.

if let Some(kernel32) = lief::runtime::windows::dlopen("kernel32.dll") {
    println!("{}", kernel32.path());
}

This function relies on the Windows API LoadLibrary. To get a handle on a module that is already loaded, prefer find_module.