Game Accessibility Library logo SourceForge.net Logo
Game Accessibility Suite: CATHOOK_CALLORIGINAL_WINAPI
#define CATHOOK_CALLORIGINAL_WINAPI ( hookInst,
numParams   ) 

Value:

void* func =  &hookInst->OrgInst;                   \
    __asm {mov    ecx,numParams}                        \
    __asm {or     ecx,ecx}                              \
    __asm {jz     skip_push}                            \
    __asm {mov    ebx,(numParams+2)*4}                  \
    __asm {repush_host:}                                \
    __asm {push   [ebp+ebx]}                            \
    __asm {sub    ebx,4}                                \
    __asm {loop   repush_host}                          \
    __asm {skip_push:}                                  \
    __asm {call   func}                                 \
    __asm {mov    [ebp-4],eax}
CATHOOK_CALLORIGINAL() calls the original function from within a hook function. The return value for EAX is automatically updated, but may be overridden using CATHOOK_SETRETURN. This may only be used between CATHOOK_PROLOGUE and CATHOOK_EPILOGUE.

Definition at line 111 of file CATIntercept.h.

Referenced by CATInjectionPropagate::OnCreateProcessW(), CATOverlayDirect3D9::OnEndScene(), CATTimeWarp::OnGetTickCount(), CATDirectSoundIntercept::OnLockBuffer(), CATDirectSoundIntercept::OnPlayBuffer(), CATDirectSoundIntercept::OnPlayBufferEAX(), CATDirectSoundIntercept::OnPlaySegment(), CATDirectSoundIntercept::OnPlaySegmentEx(), CATOverlayDirect3D9::OnPresent9(), CATTimeWarp::OnQueryPerformanceCounter(), CATOverlayOpenGL::OnSwapBuffers(), CATTimeWarp::OnTimeGetTime(), and CATDirectSoundIntercept::OnUnlockBuffer().


Generated on Mon Feb 11 04:10:00 2008 for Game Accessibility Suite by doxygen 1.5.4