#[repr(i32)]pub enum HookError {
Show 13 variants
Unknown = -1,
AlreadyInitialized = 1,
NotInitialized = 2,
AlreadyCreated = 3,
NotCreated = 4,
Enabled = 5,
Disabled = 6,
NotExecutable = 7,
UnsupportedFunction = 8,
MemoryAlloc = 9,
MemoryProtect = 10,
ModuleNotFound = 11,
FunctionNotFound = 12,
}
Expand description
Error codes returned by MinHook operations
Variants§
Unknown = -1
Unknown error (should not be returned)
AlreadyInitialized = 1
MinHook is already initialized
NotInitialized = 2
MinHook is not initialized yet, or already uninitialized
AlreadyCreated = 3
The hook for the specified target function is already created
NotCreated = 4
The hook for the specified target function is not created yet
Enabled = 5
The hook for the specified target function is already enabled
Disabled = 6
The hook for the specified target function is not enabled yet, or already disabled
NotExecutable = 7
The specified pointer is invalid (points to non-allocated and/or non-executable region)
UnsupportedFunction = 8
The specified target function cannot be hooked
MemoryAlloc = 9
Failed to allocate memory
MemoryProtect = 10
Failed to change the memory protection
ModuleNotFound = 11
The specified module is not loaded
FunctionNotFound = 12
The specified function is not found
Implementations§
Trait Implementations§
Source§impl Error for HookError
impl Error for HookError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
impl Copy for HookError
impl Eq for HookError
impl StructuralPartialEq for HookError
Auto Trait Implementations§
impl Freeze for HookError
impl RefUnwindSafe for HookError
impl Send for HookError
impl Sync for HookError
impl Unpin for HookError
impl UnwindSafe for HookError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more