Crate winhooker

Source

Structs§

Allocation
a memory allocation
Hook
a hook that was placed on some function
PreparedHook
a hook that was prepared to be placed on some function
StaticHook
a static hook which can be used to store hook information as a static variable so that it can easily be accessed from anywhere. the generic argument F should be a function pointer signature of the hooked function (e.g extern "C" fn(i32) -> i32).
WinapiError
a winapi error

Enums§

Error
an error that occurs while hooking a function

Functions§

alloc_and_build_trampoline
allocates and builds the trampoline to a heap allocated executable memory region.
hook_function
hooks the function with the given fn_addr from the given module such that when the function is called it instead jumps to the given hook_to_addr.
hook_function_by_name
hooks the function with the fn_name from the library with the provided library_name such that when the function is called it instead jumps to the given hook_to_addr.
module_get_fn_possible_content
returns a slice which represents the possible content of the function at the given address in the given module.
prepare_hook
prepares a hook to be placed on the given fn_addr from the given module, but doesn’t actually put the hook on the function.

Type Aliases§

Result
the result of hooking a function