Welcome to cyminhook’s documentation!

Contents:

Hook functions on Windows using MinHook.

exception cyminhook.Error(status)

MinHook error.

class cyminhook.MinHook

MinHook hook.

signature is a ctypes function signature created by either ctypes.CFUNCTYPE(), ctypes.WINFUNCTYPE(), ctypes.PYFUNCTYPE(). target is either the address to hook or a ctypes function object for the function to hook. detour is the Python callable that will be called by the hook.

Warning

Be careful not to enter an infinite recursion from the detour function.

close()

Close the hook. Removing it.

disable()

Disable the hook.

enable()

Enable the hook.

class cyminhook.Status(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

MinHook status codes.

cyminhook.apply_queued()

Apply all queued changes in one go.

cyminhook.queue_disable(hook)

Queue to disable an already created hook.

cyminhook.queue_enable(hook)

Queue to enable an already created hook.

Indices and tables