This commit is contained in:
2022-09-06 00:08:26 +08:00
parent e17ffc3965
commit 91d57c13f0
232 changed files with 191628 additions and 250 deletions

20
test/Helpers.cpp Normal file
View File

@@ -0,0 +1,20 @@
#include "pch.h"
#include "Helpers.h"
// ¿ªÊ¼HOOK
void Helpers::HookFunction(PVOID* oFunction, PVOID Function)
{
DetourTransactionBegin();
DetourUpdateThread(GetCurrentThread());
DetourAttach(oFunction, Function);
DetourTransactionCommit();
}
// ½áÊøHOOK
void Helpers::UnHookFunction(PVOID* oFunction, PVOID Function)
{
DetourTransactionBegin();
DetourUpdateThread(GetCurrentThread());
DetourDetach(oFunction, Function);
DetourTransactionCommit();
}