Documentation ¶
Index ¶
- Constants
- func ApplyQueued() (err error)
- func CreateHook(pTarget, pDetour, ppOriginal uintptr) (err error)
- func CreateHookAPI(strModule, strProcName string, pDetour, ppOriginal uintptr) (err error)
- func CreateHookAPIEx(strModule, strProcName string, pDetour, ppOriginal, ppTarget uintptr) (err error)
- func DisableHook(pTarget uintptr) (err error)
- func EnableHook(pTarget uintptr) (err error)
- func Initialize() (err error)
- func QueueDisableHook(pTarget uintptr) (err error)
- func QueueEnableHook(pTarget uintptr) (err error)
- func RemoveHook(pTarget uintptr) (err error)
- func Uninitialize() (err error)
Constants ¶
const AllHooks = NULL
AllHooks for #define MH_ALL_HOOKS NULL Can be passed as a parameter to MH_EnableHook, MH_DisableHook, MH_QueueEnableHook or MH_QueueDisableHook.
const NULL = 0
NULL = 0x00000000
Variables ¶
This section is empty.
Functions ¶
func ApplyQueued ¶
func ApplyQueued() (err error)
ApplyQueued () for MH_STATUS WINAPI MH_ApplyQueued(VOID); Applies all queued changes in one go.
func CreateHook ¶
CreateHook () for MH_STATUS WINAPI MH_CreateHook(LPVOID pTarget, LPVOID pDetour, LPVOID *ppOriginal); Creates a Hook for the specified target function, in disabled state. Parameters:
pTarget [in] A pointer to the target function, which will be overridden by the detour function. pDetour [in] A pointer to the detour function, which will override the target function. ppOriginal [out] A pointer to the trampoline function, which will be used to call the original target function. This parameter can be NULL.
func CreateHookAPI ¶
CreateHookAPI () for MH_STATUS WINAPI MH_CreateHookApi(LPCWSTR pszModule, LPCSTR pszProcName, LPVOID pDetour, LPVOID *ppOriginal); Creates a Hook for the specified API function, in disabled state. Parameters:
pszModule [in] A pointer to the loaded module name which contains the target function. pszTarget [in] A pointer to the target function name, which will be overridden by the detour function. pDetour [in] A pointer to the detour function, which will override the target function. ppOriginal [out] A pointer to the trampoline function, which will be used to call the original target function. This parameter can be NULL.
------------------------------------------------------------------------ strModule: Module name in Go's string. Replace of pszModule. strProcName: Procedure (target function) name in Go's string. Replace of pszTarget.
func CreateHookAPIEx ¶
func CreateHookAPIEx(strModule, strProcName string, pDetour, ppOriginal, ppTarget uintptr) (err error)
CreateHookAPIEx () for MH_STATUS WINAPI MH_CreateHookApiEx(LPCWSTR pszModule, LPCSTR pszProcName, LPVOID pDetour, LPVOID *ppOriginal, LPVOID *ppTarget); Creates a Hook for the specified API function, in disabled state. Parameters:
pszModule [in] A pointer to the loaded module name which contains the target function. pszTarget [in] A pointer to the target function name, which will be overridden by the detour function. pDetour [in] A pointer to the detour function, which will override the target function. ppOriginal [out] A pointer to the trampoline function, which will be used to call the original target function. This parameter can be NULL. ppTarget [out] A pointer to the target function, which will be used with other functions. This parameter can be NULL.
------------------------------------------------------------------------ strModule: Module name in Go's string. Replace of pszModule. strProcName: Procedure (target function) name in Go's string. Replace of pszTarget.
func DisableHook ¶
DisableHook () for MH_STATUS WINAPI MH_DisableHook(LPVOID pTarget); Disables an already created hook. Parameters:
pTarget [in] A pointer to the target function. If this parameter is MH_ALL_HOOKS, all created hooks are disabled in one go.
------------------------------------------------------------------------ gominhook.AllHooks is equivalent to MH_ALL_HOOKS. gominhook.AllHooks can be used as an argument to this function to disable all created hooks.
func EnableHook ¶
EnableHook () for MH_STATUS WINAPI MH_EnableHook(LPVOID pTarget); Enables an already created hook. Parameters:
pTarget [in] A pointer to the target function. If this parameter is MH_ALL_HOOKS, all created hooks are enabled in one go.
------------------------------------------------------------------------ gominhook.AllHooks is equivalent to MH_ALL_HOOKS. gominhook.AllHooks can be used as an argument to this function to enable all created hooks.
func Initialize ¶
func Initialize() (err error)
Initialize () for MH_STATUS WINAPI MH_Initialize(VOID) Initialize the MinHook library. You must call this function EXACTLY ONCE at the beginning of your program.
func QueueDisableHook ¶
QueueDisableHook () for MH_STATUS WINAPI MH_QueueDisableHook(LPVOID pTarget); Queues to disable an already created hook. Parameters:
pTarget [in] A pointer to the target function. If this parameter is MH_ALL_HOOKS, all created hooks are queued to be disabled.
------------------------------------------------------------------------ gominhook.AllHooks is equivalent to MH_ALL_HOOKS. gominhook.AllHooks can be used as an argument to this function to queue all created hooks to be disabled.
func QueueEnableHook ¶
QueueEnableHook () for MH_STATUS WINAPI MH_QueueEnableHook(LPVOID pTarget); Queues to enable an already created hook. Parameters:
pTarget [in] A pointer to the target function. If this parameter is MH_ALL_HOOKS, all created hooks are queued to be enabled.
------------------------------------------------------------------------ gominhook.AllHooks is equivalent to MH_ALL_HOOKS. gominhook.AllHooks can be used as an argument to this function to queue all created hooks to be enabled.
func RemoveHook ¶
RemoveHook () for MH_STATUS WINAPI MH_RemoveHook(LPVOID pTarget); Removes an already created hook. Parameters:
pTarget [in] A pointer to the target function.
func Uninitialize ¶
func Uninitialize() (err error)
Uninitialize () for MH_STATUS WINAPI MH_Uninitialize(VOID) Uninitialize the MinHook library. You must call this function EXACTLY ONCE at the end of your program.
Types ¶
This section is empty.