forked from xxxleexxx/BattlegroundsChams
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathHelpers.cpp
32 lines (30 loc) · 820 Bytes
/
Helpers.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "stdafx.h"
#include "Helpers.h"
//HOOKING
void Helpers::HookFunction(PVOID *oFunction, PVOID pDetour)
{
DetourTransactionBegin();
DetourUpdateThread(GetCurrentThread());
//DetourAttach(oFunction, pDetour);
DetourTransactionCommit();
}
void Helpers::UnhookFunction(PVOID *oFunction, PVOID pDetour)
{
DetourTransactionBegin();
DetourUpdateThread(GetCurrentThread());
//DetourDetach(oFunction, pDetour);
DetourTransactionCommit();
}
//MISCELLANEOUS
void Helpers::Log(char* szMessage)
{
std::cout << "[+] " << szMessage << std::endl;
}
void Helpers::LogAddress(char* szName, int64_t iAddress)
{
std::cout << "[+] " << szName << ": 0x" << std::hex << iAddress << std::endl;
}
void Helpers::LogError(char* szMessage)
{
std::cout << "[Error] " << szMessage << std::endl;
}