#[cfg(not(target_arch = "x86_64"))]
compile_error!("This crate only supports x86_64 architecture");
#[cfg(not(target_os = "windows"))]
compile_error!("This crate only supports Windows");
pub mod buffer;
pub mod disasm;
pub mod error;
pub mod hook;
pub mod instruction;
pub mod trampoline;
pub use error::{HookError, Result};
pub use hook::{
ALL_HOOKS, apply_queued, create_hook, create_hook_api, create_hook_api_ex, disable_hook,
enable_hook, initialize, queue_disable_hook, queue_enable_hook, remove_hook, status_to_string,
uninitialize,
};
pub use buffer::{MEMORY_SLOT_SIZE, allocate_buffer, free_buffer, is_executable_address};
pub use disasm::{HookInstruction, decode_instruction};
pub use instruction::{CallAbs, JccAbs, JccRel, JmpAbs, JmpRel, JmpRelShort, Trampoline};
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
pub const LIBRARY_NAME: &str = "MinHook-rs";
#[inline]
pub fn is_supported() -> bool {
cfg!(target_arch = "x86_64") && cfg!(target_os = "windows")
}
#[inline]
pub fn get_version() -> &'static str {
VERSION
}
#[inline]
pub fn get_library_name() -> &'static str {
LIBRARY_NAME
}