Files
DNF_DLL/test/Helpers.cpp
2022-09-06 00:08:26 +08:00

21 lines
460 B
C++

#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();
}