Expand description
§MinHook-rs
A Rust implementation of MinHook library for Windows x64 function hooking.
§Documentation
For complete documentation, examples, and technical details, see the README.md.
§Quick Example
use min_hook_rs::*;
use std::ffi::c_void;
unsafe extern "system" fn my_hook() -> i32 { 42 }
fn main() -> Result<()> {
initialize()?;
let trampoline = create_hook(0x12345678 as *mut c_void, my_hook as *mut c_void)?;
enable_hook(0x12345678 as *mut c_void)?;
// Function is now hooked
Ok(())
}Re-exports§
pub use error::HookError;pub use error::Result;pub use hook::initialize;pub use hook::uninitialize;pub use hook::create_hook;pub use hook::create_hook_api;pub use hook::create_hook_api_ex;pub use hook::remove_hook;pub use hook::enable_hook;pub use hook::disable_hook;pub use hook::queue_enable_hook;pub use hook::queue_disable_hook;pub use hook::apply_queued;pub use hook::status_to_string;pub use hook::ALL_HOOKS;
Modules§
- buffer
- Memory buffer management for MinHook-rs
- disasm
- x86_64 instruction decoder
- error
- Error handling for MinHook-rs
- hook
- Hook management for MinHook-rs
- instruction
- x64 instruction structures for MinHook-rs
- trampoline
- Trampoline function creation for MinHook-rs
Constants§
- LIBRARY_
NAME - Library name
- VERSION
- Library version
Functions§
- get_
library_ name - Get library name
- get_
version - Get library version string
- is_
supported - Check if the current platform is supported