sourcehook/sourcehook.cpp
changeset 386 08583103ba6f
parent 380 f9e21a2ac558
child 387 093c72464b35
     1.1 --- a/sourcehook/sourcehook.cpp	Sun Oct 07 22:45:51 2007 +0000
     1.2 +++ b/sourcehook/sourcehook.cpp	Sun Oct 07 23:00:38 2007 +0000
     1.3 @@ -733,6 +733,25 @@
     1.4  				m_ContextStack.pop();
     1.5  		}
     1.6  
     1.7 +		void *CSourceHookImpl::GetOrigVfnPtrEntry(void *vfnptr)
     1.8 +		{
     1.9 +			for (CHookManContainerList::iterator hmcl_iter = m_HookManContainers.begin();
    1.10 +				hmcl_iter != m_HookManContainers.end(); ++hmcl_iter)
    1.11 +			{
    1.12 +				for (CHookManagerContainer::iterator hookmaniter = hmcl_iter->begin();
    1.13 +					hookmaniter != hmcl_iter->end(); ++hookmaniter)
    1.14 +				{
    1.15 +					for (List<CVfnPtr>::iterator vfnptr_iter = hookmaniter->GetVfnPtrList().begin();
    1.16 +						vfnptr_iter != hookmaniter->GetVfnPtrList().end(); ++vfnptr_iter)
    1.17 +					{
    1.18 +						if (vfnptr_iter->GetPtr() == vfnptr)
    1.19 +							return vfnptr_iter->GetOrigEntry();
    1.20 +					}
    1.21 +				}
    1.22 +			}
    1.23 +			return NULL;
    1.24 +		}
    1.25 +
    1.26  		void CSourceHookImpl::DoRecall()
    1.27  		{
    1.28  			CHookContext newCtx;