lief::runtime::windows::module

Function find_module

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

Try to get the Module with the given name.

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

This function relies on the Windows API GetModuleHandle which is more efficient than the generic implementation crate::runtime::module_from_name.