1211
This commit is contained in:
20
test/Helpers.cpp
Normal file
20
test/Helpers.cpp
Normal 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();
|
||||
}
|
||||
Reference in New Issue
Block a user