Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
AsaApi::IHooks Class Referenceabstract

#include <IHooks.h>

+ Inheritance diagram for AsaApi::IHooks:

Public Member Functions

virtual ~IHooks ()=default
 
template<typename T >
bool SetHook (const std::string &func_name, LPVOID detour, T **original)
 Hooks a function. Hooks are called in the reverse order.
 
virtual bool DisableHook (const std::string &func_name, LPVOID detour)=0
 Removes a hook from a function.
 

Private Member Functions

virtual bool SetHookInternal (const std::string &func_name, LPVOID detour, LPVOID *original)=0
 

Detailed Description

Definition at line 8 of file IHooks.h.

Constructor & Destructor Documentation

◆ ~IHooks()

virtual AsaApi::IHooks::~IHooks ( )
virtualdefault

Member Function Documentation

◆ DisableHook()

virtual bool AsaApi::IHooks::DisableHook ( const std::string & func_name,
LPVOID detour )
pure virtual

Removes a hook from a function.

Parameters
func_nameFunction full name
detourA pointer to the detour function
Returns
true if success, false otherwise

Implemented in API::Hooks.

◆ SetHook()

template<typename T >
bool AsaApi::IHooks::SetHook ( const std::string & func_name,
LPVOID detour,
T ** original )
inline

Hooks a function. Hooks are called in the reverse order.

Parameters
func_nameFunction full name
detourA pointer to the detour function, which will override the target function
originalA pointer to the trampoline function, which will be used to call the original target function
Returns
true if success, false otherwise

Definition at line 21 of file IHooks.h.

◆ SetHookInternal()

virtual bool AsaApi::IHooks::SetHookInternal ( const std::string & func_name,
LPVOID detour,
LPVOID * original )
privatepure virtual

Implemented in API::Hooks.


The documentation for this class was generated from the following file: