Function GetModuleHandle

Source
pub fn GetModuleHandle<T>(module: T, hash: Option<fn(&str) -> u32>) -> HMODULE
where T: ToString,
Expand description

Retrieves the handle of a module loaded into memory based on the module name or a numeric hash.

§Arguments

  • module - It can be a DLL name (&str or String) or a numeric hash (u32). The function detects automatically the type and performs the appropriate comparison.
  • hash - An optional function that converts a &str into a u32,
    used when searching by numeric hash.

§Returns

  • The address of the module if found.