First draft of dynamic detours using Ayuto's DynamicHooks library
https://github.com/Ayuto/DynamicHooks
This commit is contained in:
@@ -72,6 +72,13 @@ enum HookType
|
||||
HookType_Raw
|
||||
};
|
||||
|
||||
enum CallingConvention
|
||||
{
|
||||
CallConv_CDECL,
|
||||
CallConv_THISCALL,
|
||||
CallConv_STDCALL,
|
||||
};
|
||||
|
||||
enum MRESReturn
|
||||
{
|
||||
MRES_ChangedHandled = -2, // Use changed values and return MRES_Handled
|
||||
@@ -176,6 +183,10 @@ native bool DHookRemoveEntityListener(ListenType type, ListenCB callback);
|
||||
*/
|
||||
native Handle DHookCreate(int offset, HookType hooktype, ReturnType returntype, ThisPointerType thistype, DHookCallback callback);
|
||||
|
||||
native Handle DHookCreateDetour(Address funcaddr, CallingConvention callConv, ReturnType returntype, ThisPointerType thistype);
|
||||
native bool DHookSetFromConf(Handle setup, Handle gameconf, SDKFuncConfSource source, const char[] name);
|
||||
native bool:DHookEnableDetour(Handle:setup, bool:post, DHookCallback callback);
|
||||
|
||||
/* Adds param to a hook setup
|
||||
*
|
||||
* @param setup Setup handle to add the param to.
|
||||
|
||||
Reference in New Issue
Block a user