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:
Benoist
2024-09-10 23:26:30 +00:00
committed by GitHub
co-authored by Kenzzer
parent 4e6d66b721
commit 4e15a92984
11 changed files with 283 additions and 100 deletions
+6
View File
@@ -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;