diff -r a2d986ddd522 -r 35296642e147 sourcehook/sourcehook_hookmangen.cpp --- a/sourcehook/sourcehook_hookmangen.cpp Sun Oct 21 21:55:17 2007 +0000 +++ b/sourcehook/sourcehook_hookmangen.cpp Thu Nov 01 01:58:44 2007 +0000 @@ -25,6 +25,8 @@ { namespace Impl { + CPageAlloc GenBuffer::ms_Allocator; + template jit_int32_t DownCastPtr(T ptr) { @@ -1123,6 +1125,9 @@ // m_HookfuncVfnPtr is a pointer to a void* because SH expects a pointer // into the hookman's vtable *m_HookfuncVfnptr = reinterpret_cast(m_HookFunc.GetData()); + + m_HookFunc.SetRE(); + return m_HookFunc.GetData(); } @@ -1211,8 +1216,7 @@ IA32_Pop_Reg(&m_PubFunc, REG_EBP); IA32_Return(&m_PubFunc); - SetMemAccess(reinterpret_cast(m_PubFunc.GetData()), m_PubFunc.GetSize(), - SH_MEM_READ | SH_MEM_EXEC); + m_PubFunc.SetRE(); return m_PubFunc; }