Add x64 Windows support to DHooks (#2154)
* Add x64 Windows support * undo changes of hook.cpp * undo changes of hook.h * undo changes of extension.cpp * undo changes of listeners.cpp * undo changes of signatures.cpp * fix dhooks on x86 * Fix-up dhooks buildscript --------- Co-authored-by: Kenzzer <[email protected]>
This commit is contained in:
@@ -62,7 +62,11 @@ size_t GetStackParamOffset(HookParamsStruct *paramStruct, unsigned int index)
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
#ifdef PLATFORM_X64
|
||||
offset += 8;
|
||||
#else
|
||||
offset += paramStruct->dg->params[i].size;
|
||||
#endif
|
||||
}
|
||||
return offset;
|
||||
}
|
||||
@@ -77,7 +81,9 @@ size_t GetRegisterParamOffset(HookParamsStruct *paramStruct, unsigned int index)
|
||||
for (int i = paramStruct->dg->params.size() - 1; i >= 0; i--)
|
||||
{
|
||||
if (paramStruct->dg->params[i].custom_register == None)
|
||||
{
|
||||
stackSize += paramStruct->dg->params[i].size;
|
||||
}
|
||||
}
|
||||
|
||||
size_t offset = stackSize;
|
||||
|
||||
Reference in New Issue
Block a user