#[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};
#[rustfmt::skip]
pub use hook::{
initialize,
uninitialize,
create_hook,
create_hook_api,
create_hook_api_ex,
remove_hook,
enable_hook,
disable_hook,
queue_enable_hook,
queue_disable_hook,
apply_queued,
status_to_string,
ALL_HOOKS,
};
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
}