21 lines
		
	
	
		
			460 B
		
	
	
	
		
			C++
		
	
	
	
		
		
			
		
	
	
			21 lines
		
	
	
		
			460 B
		
	
	
	
		
			C++
		
	
	
	
|  | #include "pch.h"
 | |||
|  | #include "Helpers.h"
 | |||
|  | 
 | |||
|  | // <20><>ʼHOOK
 | |||
|  | void Helpers::HookFunction(PVOID* oFunction, PVOID Function) | |||
|  | { | |||
|  | 	DetourTransactionBegin(); | |||
|  | 	DetourUpdateThread(GetCurrentThread()); | |||
|  | 	DetourAttach(oFunction, Function); | |||
|  | 	DetourTransactionCommit(); | |||
|  | } | |||
|  | 
 | |||
|  | // <20><><EFBFBD><EFBFBD>HOOK
 | |||
|  | void Helpers::UnHookFunction(PVOID* oFunction, PVOID Function) | |||
|  | { | |||
|  | 	DetourTransactionBegin(); | |||
|  | 	DetourUpdateThread(GetCurrentThread()); | |||
|  | 	DetourDetach(oFunction, Function); | |||
|  | 	DetourTransactionCommit(); | |||
|  | } |