1.1 --- a/sourcehook/sourcehook_hookmangen.cpp Sun Oct 21 21:55:17 2007 +0000
1.2 +++ b/sourcehook/sourcehook_hookmangen.cpp Thu Nov 01 01:58:44 2007 +0000
1.3 @@ -25,6 +25,8 @@
1.4 {
1.5 namespace Impl
1.6 {
1.7 + CPageAlloc GenBuffer::ms_Allocator;
1.8 +
1.9 template <class T>
1.10 jit_int32_t DownCastPtr(T ptr)
1.11 {
1.12 @@ -1123,6 +1125,9 @@
1.13 // m_HookfuncVfnPtr is a pointer to a void* because SH expects a pointer
1.14 // into the hookman's vtable
1.15 *m_HookfuncVfnptr = reinterpret_cast<void*>(m_HookFunc.GetData());
1.16 +
1.17 + m_HookFunc.SetRE();
1.18 +
1.19 return m_HookFunc.GetData();
1.20 }
1.21
1.22 @@ -1211,8 +1216,7 @@
1.23 IA32_Pop_Reg(&m_PubFunc, REG_EBP);
1.24 IA32_Return(&m_PubFunc);
1.25
1.26 - SetMemAccess(reinterpret_cast<void*>(m_PubFunc.GetData()), m_PubFunc.GetSize(),
1.27 - SH_MEM_READ | SH_MEM_EXEC);
1.28 + m_PubFunc.SetRE();
1.29
1.30 return m_PubFunc;
1.31 }