aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/hookutils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDedicatedTest/hookutils.cpp')
-rw-r--r--NorthstarDedicatedTest/hookutils.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/NorthstarDedicatedTest/hookutils.cpp b/NorthstarDedicatedTest/hookutils.cpp
index b7d82724..f5df3996 100644
--- a/NorthstarDedicatedTest/hookutils.cpp
+++ b/NorthstarDedicatedTest/hookutils.cpp
@@ -3,22 +3,6 @@
#include <iostream>
-TempReadWrite::TempReadWrite(void* ptr)
-{
- m_ptr = ptr;
- MEMORY_BASIC_INFORMATION mbi;
- VirtualQuery(m_ptr, &mbi, sizeof(mbi));
- VirtualProtect(mbi.BaseAddress, mbi.RegionSize, PAGE_EXECUTE_READWRITE, &mbi.Protect);
- m_origProtection = mbi.Protect;
-}
-
-TempReadWrite::~TempReadWrite()
-{
- MEMORY_BASIC_INFORMATION mbi;
- VirtualQuery(m_ptr, &mbi, sizeof(mbi));
- VirtualProtect(mbi.BaseAddress, mbi.RegionSize, m_origProtection, &mbi.Protect);
-}
-
void HookEnabler::CreateHook(LPVOID ppTarget, LPVOID ppDetour, LPVOID* ppOriginal, const char* targetName)
{
// the macro for this uses ppTarget's name as targetName, and this typically starts with &